[
  {
    "path": ".gitattributes",
    "content": "*.rst linguist-documentation=false\ndocument/* linguist-documentation=false\ndocument/*.rst linguist-documentation=false\ndocument/*/*.rst linguist-documentation=false\ntest/harness/wast.js linguist-vendored\ntest/harness/testharness* linguist-vendored\n\n"
  },
  {
    "path": ".gitignore",
    "content": "**/*~\n**/*.tmproj\n**/*.pyc\n**/_build\n**/_output\n"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"document/core/util/katex\"]\n\tpath = document/core/util/katex\n\turl = https://github.com/KaTeX/KaTeX.git\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: python\npython:\n  - \"3.7\"\ndist: bionic\n\naddons:\n  apt:\n    sources:\n      - sourceline: 'ppa:avsm/ppa'\n      - sourceline: 'deb https://dl.yarnpkg.com/debian/ stable main'\n        key_url: 'https://dl.yarnpkg.com/debian/pubkey.gpg'\n    update: true\n    packages:\n      - opam\n      - texlive-full\n      - yarn\n\ninstall:\n  - opam init --auto-setup --compiler=4.07.1\n  - eval $(opam env)\n  - opam --version\n  - ocaml --version\n  - opam install --yes ocamlbuild.0.14.0\n  - pip install Sphinx==2.4.4\n  - git clone https://github.com/tabatkins/bikeshed.git\n  - pip install --editable $PWD/bikeshed\n  - bikeshed update\n\nscript:\n  - ./interpreter/meta/travis/build-test.sh\n  - bash ./document/travis-deploy.sh\n\nos: linux\n\nenv:\n  global:\n    - ENCRYPTION_LABEL: \"5d9ec396f41d\"\n    - COMMIT_AUTHOR_EMAIL: \"noreply@webassembly.org\"\n"
  },
  {
    "path": "Contributing.md",
    "content": "# Contributing to WebAssembly\n\nInterested in participating? Please follow\n[the same contributing guidelines as the design repository][].\n\n  [the same contributing guidelines as the design repository]: https://github.com/WebAssembly/design/blob/master/Contributing.md\n\nAlso, please be sure to read [the README.md](README.md) for this repository.\n"
  },
  {
    "path": "LICENSE",
    "content": "Please see the LICENSE file in each top-level directory for the terms applicable to that directory and its relative sub-directories.\n\nThe relevant directories and licenses are:\n\ndocument/    - W3C Software and Document Notice and License\ninterpreter/ - Apache License 2.0\ntest/        - Apache License 2.0\npapers/      - Creative Commons Attribution 4.0 International License\n"
  },
  {
    "path": "README.md",
    "content": "[![Build Status](https://travis-ci.org/WebAssembly/reference-types.svg?branch=master)](https://travis-ci.org/WebAssembly/reference-types)\n\n# Reference Types Proposal for WebAssembly\n\nThis repository is a clone of [github.com/WebAssembly/spec/](https://github.com/WebAssembly/spec/).\nIt is meant for discussion, prototype specification and implementation of a proposal to add support for basic reference types to WebAssembly.\n\n* See the [overview](proposals/reference-types/Overview.md) for a summary of the proposal.\n\n* See the [modified spec](https://webassembly.github.io/reference-types/core/) for details.\n\nThe repository is now based on the [bulk operations proposal](proposals/bulk-memory-operations/Overview.md) and includes all respective changes.\n\nOriginal README from upstream repository follows...\n\n# spec\n\nThis repository holds a prototypical reference implementation for WebAssembly,\nwhich is currently serving as the official specification. Eventually, we expect\nto produce a specification either written in human-readable prose or in a formal\nspecification language.\n\nIt also holds the WebAssembly testsuite, which tests numerous aspects of\nconformance to the spec.\n\nView the work-in-progress spec at [webassembly.github.io/spec](https://webassembly.github.io/spec/).\n\nAt this time, the contents of this repository are under development and known\nto be \"incomplet and inkorrect\".\n\nParticipation is welcome. Discussions about new features, significant semantic\nchanges, or any specification change likely to generate substantial discussion\nshould take place in\n[the WebAssembly design repository](https://github.com/WebAssembly/design)\nfirst, so that this spec repository can remain focused. And please follow the\n[guidelines for contributing](Contributing.md).\n\n# citing\n\nFor citing WebAssembly in LaTeX, use [this bibtex file](wasm-specs.bib).\n"
  },
  {
    "path": "document/Makefile",
    "content": "DIRS     = core js-api web-api\nFILES    = index.html\nBUILDDIR = _build\n\n# Global targets.\n\n.PHONY: all\nall: $(BUILDDIR) root $(DIRS)\n\n$(BUILDDIR):\n\tmkdir -p $@\n\n.PHONY: deploy\ndeploy:\n\tGIT_DEPLOY_DIR=$(BUILDDIR) bash deploy.sh\n\n.PHONY: publish\npublish: all deploy\n\n.PHONY: clean\nclean: $(DIRS:%=clean-%)\n\trm -rf $(BUILDDIR)\n\n.PHONY: diff\ndiff: $(DIRS:%=diff-%)\n\n\n# Directory-specific targets.\n\n.PHONY: root\nroot: $(BUILDDIR)\n\ttouch $(BUILDDIR)/.nojekyll\n\tcp -f $(FILES) $(BUILDDIR)/\n\n.PHONY: $(DIRS)\n$(DIRS): %: $(BUILDDIR) $(DIRS:%=build-%) $(DIRS:%=dir-%)\n\n.PHONY: $(DIRS:%=build-%)\n$(DIRS:%=build-%): build-%:\n\t(cd $(@:build-%=%); make BUILDDIR=$(BUILDDIR) all)\n\n.PHONY: $(DIRS:%=dir-%)\n$(DIRS:%=dir-%): dir-%:\n\tmkdir -p $(BUILDDIR)/$(@:dir-%=%)\n\trm -rf $(BUILDDIR)/$(@:dir-%=%)/*\n\tcp -R $(@:dir-%=%)/$(BUILDDIR)/html/* $(BUILDDIR)/$(@:dir-%=%)/\n\n.PHONY: $(DIRS:%=deploy-%)\n$(DIRS:%=deploy-%): deploy-%:\n\tGIT_DEPLOY_DIR=$(BUILDDIR) GIT_DEPLOY_SUBDIR=$(@:deploy-%=%) bash deploy.sh\n\n.PHONY: $(DIRS:%=publish-%)\n$(DIRS:%=publish-%): publish-%: % deploy-%\n\n.PHONY: $(DIRS:%=clean-%)\n$(DIRS:%=clean-%): clean-%:\n\t(cd $(@:clean-%=%); make BUILDDIR=$(BUILDDIR) clean)\n\trm -rf $(BUILDDIR)/$(@:clean-%=%)\n\n.PHONY: $(DIRS:%=diff-%)\n$(DIRS:%=diff-%): diff-%:\n\t(cd $(@:diff-%=%); make BUILDDIR=$(BUILDDIR) diff)\n\n\n# Help.\n\n.PHONY: help\nhelp:\n\t@echo \"Please use \\`make <target>' where <target> is one of\"\n\t@echo \"  all             to build all documents\"\n\t@echo \"  publish         to make all and push to gh-pages\"\n\t@echo \"  <dir>           to build a specific subdirectory\"\n\t@echo \"  publish-<dir>   to build and push a specific subdirectory\"\n\n.PHONY: usage\nusage: help\n"
  },
  {
    "path": "document/README.md",
    "content": "# WebAssembly Specifications\n\nThis directory contains the source code for the WebAssembly spec documents, as served from the [webassembly.github.io/spec](https://webassembly.github.io/spec) pages.\nIt uses [Sphinx](http://www.sphinx-doc.org/) and [Bikeshed](https://github.com/tabatkins/bikeshed).\n\nTo install Sphinx:\n```\npip install sphinx\n```\n\nTo install Bikeshed, see the instructions [here](https://tabatkins.github.io/bikeshed/#installing).\n\n\nTo build everything locally (result appears in `_build/`):\n```\nmake all\n```\n\nTo build everything and update [webassembly.github.io/spec](https://webassembly.github.io/spec) with it:\n```\nmake publish\n```\nPlease make sure to only use that once a change has approval.\n\n## Step by step guide to building the spec\n\n### Prerequisites\n\nYou will need `python3.7`, and `pip`. `pip` should come with Python, if not follow [these installation instructions for `pip`](https://pip.pypa.io/en/stable/installing/), or check your system package manager for `pip3`.\n\n> Important: you will need the version of pip that works with `python3.7`.\n\n\nUse something like [`pipenv`](https://pipenv.pypa.io/) to keep your system installation of Python clean.\n\n```\npip install pipenv\npipenv --python 3.7\npipenv shell\n```\n\nInstall Python dependencies:\n\n```\npip install Sphinx==2.4.4\n```\n\n### Checking out the repository\n\nMake sure this repository was cloned with `--recursive`:\n\n```\ngit clone --recursive https://github.com/WebAssembly/spec\n```\n\nIf you have already cloned but without `--recursive`, you can delete and re-clone, or `cd` into `spec` and run:\n\n```\ngit submodule update --init --recursive\n```\n\nThe rest of these instructions assume you are in the directory where is README is:\n\n```\ncd spec/document\n```\n\n### Building the multi-page HTML document\n\nYou can now build the [multi-page html document](https://webassembly.github.io/spec/core/):\n\n```\nmake -C core html\n```\n\n### Building the single-page HTML document\n\nTo build the [single-page W3C version](https://webassembly.github.io/spec/core/bikeshed/), there are more dependencies to install. First, get [Bikeshed](https://github.com/tabatkins/bikeshed):\n\n```\n# cd back to root of git directory\ngit clone https://github.com/tabatkins/bikeshed.git\npip install --editable bikeshed\nbikeshed update\n```\n\nYou will also need `npm` and `yarn` for all the LaTeX goodness. `npm` might already be available on your system, you can also use something like [`nvm`](https://github.com/nvm-sh/nvm) to prevent messing with system packages:\n\n```\nnpm install -g yarn\ncd document\nmake -C core bikeshed\n```\n\n### Building the PDF\n\nTo build the [PDF](https://webassembly.github.io/spec/core/_download/WebAssembly.pdf), you will need `texlive-full`, install it using your system package manager:\n\n```\napt install texlive-full\nmake -C core pdf\n```\n\n### Building the JavaScript Embedding API\n\nTo build the [JavaScript Embedding API](https://webassembly.github.io/spec/js-api/index.html), you will need `bikeshed` as describe in the section [Building the single-page HTML document](#building-the-single-page-html-document):\n\n```\nmake -C js-api\n```\n\n### Building the Web Embedding API\n\nTo build the [Web Embedding API](https://webassembly.github.io/spec/web-api/index.html), you will need `bikeshed` as describe in the section [Building the single-page HTML document](#building-the-single-page-html-document):\n\n```\nmake -C web-api\n```\n"
  },
  {
    "path": "document/core/.gitignore",
    "content": "_build\n_static\ndocument/*.pyc\n"
  },
  {
    "path": "document/core/LICENSE",
    "content": "W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE\n\nThis work is being provided by the copyright holders under the following\nlicense.\n\n\nLICENSE\n\nBy obtaining and/or copying this work, you (the licensee) agree that you have\nread, understood, and will comply with the following terms and conditions.\n\nPermission to copy, modify, and distribute this work, with or without\nmodification, for any purpose and without fee or royalty is hereby granted,\nprovided that you include the following on ALL copies of the work or portions\nthereof, including modifications:\n\n* The full text of this NOTICE in a location viewable to users of the\n  redistributed or derivative work.\n\n* Any pre-existing intellectual property disclaimers, notices, or terms and\n  conditions. If none exist, the W3C Software and Document Short Notice\n  (https://www.w3.org/Consortium/Legal/copyright-software-short-notice) should\n  be included.\n\n* Notice of any changes or modifications, through a copyright statement on the\n  new code or document such as \"This software or document includes material\n  copied from or derived from [title and URI of the W3C document]. Copyright © [YEAR] W3C® (MIT, ERCIM, Keio, Beihang).\"\n\n\nDISCLAIMERS\n\nTHIS WORK IS PROVIDED \"AS IS,\" AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS\nOR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF\nMERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE\nSOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,\nTRADEMARKS OR OTHER RIGHTS.\n\nCOPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR\nCONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT.\n\nThe name and trademarks of copyright holders may NOT be used in advertising or\npublicity pertaining to the work without specific, written prior permission.\nTitle to copyright in this work will at all times remain with copyright\nholders.\n\n\nNOTES\n\nThis version:\nhttp://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n"
  },
  {
    "path": "document/core/Makefile",
    "content": "# Makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS    =\nSPHINXBUILD   = sphinx-build\nPAPER         = a4\nBUILDDIR      = _build\nSTATICDIR     = _static\nDOWNLOADDIR   = _download\nNAME          = WebAssembly\n\n# Internal variables.\nPAPEROPT_a4     = -D latex_paper_size=a4\nPAPEROPT_letter = -D latex_paper_size=letter\nALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) .\n# the i18n builder cannot share the environment and doctrees with the others\nI18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .\n\n.PHONY: usage\nusage:\n\t@echo \"Please use \\`make <target>' where <target> is one of\"\n\t@echo \"  html       to make standalone HTML files\"\n\t@echo \"  pdf        to make standalone PDF file\"\n\t@echo \"  bikeshed   to make a bikeshed wrapped single large HTML file\"\n\t@echo \"  diff       to make a diff of the bikeshed HTML file with the latest TR\"\n\t@echo \"  WD-tar     generate tar file for updating the Working Draft\"\n\t@echo \"  WD-echidna publish the Working Draft tar file via Echidna\"\n\t@echo \"  all        to make all 3\"\n\t@echo \"  publish    to make all and push to gh-pages\"\n\t@echo \"  help       to see more options\"\n\n.PHONY: help\nhelp:\n\t@echo \"Usage: \\`make <target>' where <target> is one of\"\n\t@echo \"  html       to make standalone HTML files\"\n\t@echo \"  pdf        to make standalone PDF file\"\n\t@echo \"  bikeshed   to make a bikeshed wrapped single large HTML file\"\n\t@echo \"  all        to make all 3\"\n\t@echo \"  publish    to make all and push to gh-pages\"\n\t@echo \"  dirhtml    to make HTML files named index.html in directories\"\n\t@echo \"  singlehtml to make a single large HTML file\"\n\t@echo \"  pickle     to make pickle files\"\n\t@echo \"  json       to make JSON files\"\n\t@echo \"  htmlhelp   to make HTML files and a HTML help project\"\n\t@echo \"  qthelp     to make HTML files and a qthelp project\"\n\t@echo \"  applehelp  to make an Apple Help Book\"\n\t@echo \"  devhelp    to make HTML files and a Devhelp project\"\n\t@echo \"  epub       to make an epub\"\n\t@echo \"  epub3      to make an epub3\"\n\t@echo \"  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter\"\n\t@echo \"  latexpdf   to make LaTeX files and run them through pdflatex\"\n\t@echo \"  latexpdfja to make LaTeX files and run them through platex/dvipdfmx\"\n\t@echo \"  text       to make text files\"\n\t@echo \"  man        to make manual pages\"\n\t@echo \"  texinfo    to make Texinfo files\"\n\t@echo \"  info       to make Texinfo files and run them through makeinfo\"\n\t@echo \"  gettext    to make PO message catalogs\"\n\t@echo \"  changes    to make an overview of all changed/added/deprecated items\"\n\t@echo \"  xml        to make Docutils-native XML files\"\n\t@echo \"  pseudoxml  to make pseudoxml-XML files for display purposes\"\n\t@echo \"  linkcheck  to check all external links for integrity\"\n\t@echo \"  doctest    to run all doctests embedded in the documentation (if enabled)\"\n\t@echo \"  coverage   to run coverage check of the documentation (if enabled)\"\n\t@echo \"  dummy      to check syntax errors of document sources\"\n\n.PHONY: deploy\ndeploy:\n\t(cd ..; make dir-core deploy-core)\n\n.PHONY: publish\npublish: clean all deploy\n\n.PHONY: publish-main\npublish-main: clean main bikeshed-keep deploy\n\n.PHONY: all\nall:\tpdf html bikeshed\n\n.PHONY: main\nmain:\tpdf html\n\n# Dirty hack to avoid rebuilding the Bikeshed version for every push.\n.PHONY: bikeshed-keep\nbikeshed-keep:\n\ttest -e $(BUILDDIR)/html/bikeshed || \\\n\t  wget -r -nH --cut-dirs=2 -P $(BUILDDIR)/html --no-check-certificate \\\n\t    https://webassembly.github.io/spec/core/bikeshed || \\\n\t  echo Downloaded Bikeshed.\n\n\n.PHONY: index\nindex:\n\t(cd appendix; ./gen-index-instructions.py)\n\n.PHONY: pdf\npdf:\tindex latexpdf\n\tmkdir -p $(BUILDDIR)/html/$(DOWNLOADDIR)\n\tln -f $(BUILDDIR)/latex/$(NAME).pdf $(BUILDDIR)/html/$(DOWNLOADDIR)/$(NAME).pdf\n\n\n.PHONY: clean\nclean:\n\trm -rf $(BUILDDIR)\n\trm -rf $(STATICDIR)\n\n.PHONY: html\nhtml: index\n\t$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html\n\tfor file in `ls $(BUILDDIR)/html/*.html`; \\\n\tdo \\\n\t  sed s:BASEDIR:.:g <$$file >$$file.out; \\\n\t  mv -f $$file.out $$file; \\\n\tdone\n\tfor file in `ls $(BUILDDIR)/html/*/*.html`; \\\n\tdo \\\n\t  sed s:BASEDIR:..:g <$$file >$$file.out; \\\n\t  mv -f $$file.out $$file; \\\n\tdone\n\t@echo\n\t@echo \"Build finished. The HTML pages are in `pwd`/$(BUILDDIR)/html/.\"\n\n.PHONY: dirhtml\ndirhtml:\n\t$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml\n\t@echo\n\t@echo \"Build finished. The HTML pages are in $(BUILDDIR)/dirhtml.\"\n\n.PHONY: singlehtml\nsinglehtml:\n\t$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml\n\t@echo\n\t@echo \"Build finished. The HTML page is in $(BUILDDIR)/singlehtml.\"\n\n.PHONY: bikeshed\nbikeshed:\n\t$(SPHINXBUILD) -b singlehtml -c util/bikeshed \\\n\t\t$(ALLSPHINXOPTS) $(BUILDDIR)/bikeshed_singlehtml\n\tpython util/bikeshed_fixup.py $(BUILDDIR)/bikeshed_singlehtml/index.html \\\n\t\t>$(BUILDDIR)/bikeshed_singlehtml/index_fixed.html\n\tmkdir -p $(BUILDDIR)/bikeshed_mathjax/\n\tbikeshed spec index.bs $(BUILDDIR)/bikeshed_mathjax/index.html\n\tmkdir -p $(BUILDDIR)/html/bikeshed/\n\t(cd util/katex/ && yarn && yarn build && npm install --only=prod)\n\tpython util/mathjax2katex.py $(BUILDDIR)/bikeshed_mathjax/index.html \\\n\t\t>$(BUILDDIR)/html/bikeshed/index.html\n\tmkdir -p $(BUILDDIR)/html/bikeshed/katex/dist/\n\tcp -r util/katex/dist/* $(BUILDDIR)/html/bikeshed/katex/dist/\n\tpatch -p0 $(BUILDDIR)/html/bikeshed/katex/dist/katex.css \\\n\t\t< util/katex_fix.patch\n\tcp $(BUILDDIR)/bikeshed_singlehtml/_static/pygments.css \\\n\t\t$(BUILDDIR)/html/bikeshed/\n\t@echo\n\t@echo \"Build finished. The HTML page is in $(BUILDDIR)/html/bikeshed/.\"\n\n.PHONY: WD-tar\nWD-tar: bikeshed\n\t@echo \"Building tar file...\"\n\ttar cvf \\\n\t\t$(BUILDDIR)/WD.tar \\\n\t\t--transform='s|$(BUILDDIR)/html/bikeshed/||' \\\n\t\t--transform='s|index.html|Overview.html|' \\\n\t\t$(BUILDDIR)/html/bikeshed/index.html \\\n\t\t$(BUILDDIR)/html/bikeshed/pygments.css \\\n\t\t$(BUILDDIR)/html/bikeshed/katex/dist/katex.css \\\n\t\t$(BUILDDIR)/html/bikeshed/katex/dist/fonts\n\t@echo \"Built $(BUILDDIR)/WD.tar.\"\n\n.PHONY: WD-echidna\nWD-echidna: WD-tar\n\t@if [ -z $(W3C_USERNAME) ] || \\\n\t    [ -z $(W3C_PASSWORD) ] || \\\n\t\t\t[ -z $(DECISION_URL) ] ; then \\\n\t\techo \"Must provide W3C_USERNAME, W3C_PASSWORD, and DECISION_URL environment variables\"; \\\n\t\texit 1; \\\n\tfi\n\tcurl 'https://labs.w3.org/echidna/api/request' \\\n\t\t--user '$(W3C_USERNAME):$(W3C_PASSWORD)' \\\n\t\t-F \"tar=@$(BUILDDIR)/WD.tar\" \\\n\t\t-F \"decision=$(DECISION_URL)\" | tee $(BUILDDIR)/WD-echidna-id.txt\n\t@echo\n\t@echo \"Published working draft. Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`\"\n\n.PHONY: diff\ndiff: bikeshed\n\t@echo \"Downloading the old single-file html spec...\"\n\tcurl `grep \"^TR\" index.bs | cut -d' ' -f2` -o $(BUILDDIR)/html/bikeshed/old.html\n\t@echo \"Done.\"\n\t@echo \"Diffing new against old (go get a coffee)...\"\n\tperl ../util/htmldiff.pl $(BUILDDIR)/html/bikeshed/old.html $(BUILDDIR)/html/bikeshed/index.html $(BUILDDIR)/html/bikeshed/diff.html\n\t@echo \"Done. The diff is at $(BUILDDIR)/html/bikeshed/diff.html\"\n\n.PHONY: pickle\npickle:\n\t$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle\n\t@echo\n\t@echo \"Build finished; now you can process the pickle files.\"\n\n.PHONY: json\njson:\n\t$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json\n\t@echo\n\t@echo \"Build finished; now you can process the JSON files.\"\n\n.PHONY: htmlhelp\nhtmlhelp:\n\t$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp\n\t@echo\n\t@echo \"Build finished; now you can run HTML Help Workshop with the\" \\\n\t      \".hhp project file in $(BUILDDIR)/htmlhelp.\"\n\n.PHONY: qthelp\nqthelp:\n\t$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp\n\t@echo\n\t@echo \"Build finished; now you can run \"qcollectiongenerator\" with the\" \\\n\t      \".qhcp project file in $(BUILDDIR)/qthelp, like this:\"\n\t@echo \"# qcollectiongenerator $(BUILDDIR)/qthelp/WebAssembly.qhcp\"\n\t@echo \"To view the help file:\"\n\t@echo \"# assistant -collectionFile $(BUILDDIR)/qthelp/WebAssembly.qhc\"\n\n.PHONY: applehelp\napplehelp:\n\t$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp\n\t@echo\n\t@echo \"Build finished. The help book is in $(BUILDDIR)/applehelp.\"\n\t@echo \"N.B. You won't be able to view it unless you put it in\" \\\n\t      \"~/Library/Documentation/Help or install it in your application\" \\\n\t      \"bundle.\"\n\n.PHONY: devhelp\ndevhelp:\n\t$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp\n\t@echo\n\t@echo \"Build finished.\"\n\t@echo \"To view the help file:\"\n\t@echo \"# mkdir -p $$HOME/.local/share/devhelp/WebAssembly\"\n\t@echo \"# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/WebAssembly\"\n\t@echo \"# devhelp\"\n\n.PHONY: epub\nepub:\n\t$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub\n\t@echo\n\t@echo \"Build finished. The epub file is in $(BUILDDIR)/epub.\"\n\n.PHONY: epub3\nepub3:\n\t$(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3\n\t@echo\n\t@echo \"Build finished. The epub3 file is in $(BUILDDIR)/epub3.\"\n\n.PHONY: latex\nlatex:\n\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\n\t@echo\n\t@echo \"Build finished; the LaTeX files are in $(BUILDDIR)/latex.\"\n\t@echo \"Run \\`make' in that directory to run these through (pdf)latex\" \\\n\t      \"(use \\`make latexpdf' here to do that automatically).\"\n\n.PHONY: latexpdf\nlatexpdf:\n\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\n\t@echo \"Running LaTeX files through pdflatex...\"\n\t$(MAKE) -C $(BUILDDIR)/latex LATEXMKOPTS=\" </dev/null\" all-pdf >$(BUILDDIR)/latex/LOG 2>&1 || cat $(BUILDDIR)/latex/LOG\n\t@echo \"pdflatex finished; the PDF files are in $(BUILDDIR)/latex.\"\n\n.PHONY: latexpdfja\nlatexpdfja:\n\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\n\t@echo \"Running LaTeX files through platex and dvipdfmx...\"\n\t$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja\n\t@echo \"pdflatex finished; the PDF files are in $(BUILDDIR)/latex.\"\n\n.PHONY: text\ntext:\n\t$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text\n\t@echo\n\t@echo \"Build finished. The text files are in $(BUILDDIR)/text.\"\n\n.PHONY: man\nman:\n\t$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man\n\t@echo\n\t@echo \"Build finished. The manual pages are in $(BUILDDIR)/man.\"\n\n.PHONY: texinfo\ntexinfo:\n\t$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo\n\t@echo\n\t@echo \"Build finished. The Texinfo files are in $(BUILDDIR)/texinfo.\"\n\t@echo \"Run \\`make' in that directory to run these through makeinfo\" \\\n\t      \"(use \\`make info' here to do that automatically).\"\n\n.PHONY: info\ninfo:\n\t$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo\n\t@echo \"Running Texinfo files through makeinfo...\"\n\tmake -C $(BUILDDIR)/texinfo info\n\t@echo \"makeinfo finished; the Info files are in $(BUILDDIR)/texinfo.\"\n\n.PHONY: gettext\ngettext:\n\t$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale\n\t@echo\n\t@echo \"Build finished. The message catalogs are in $(BUILDDIR)/locale.\"\n\n.PHONY: changes\nchanges:\n\t$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes\n\t@echo\n\t@echo \"The overview file is in $(BUILDDIR)/changes.\"\n\n.PHONY: linkcheck\nlinkcheck:\n\t$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck\n\t@echo\n\t@echo \"Link check complete; look for any errors in the above output \" \\\n\t      \"or in $(BUILDDIR)/linkcheck/output.txt.\"\n\n.PHONY: doctest\ndoctest:\n\t$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest\n\t@echo \"Testing of doctests in the sources finished, look at the \" \\\n\t      \"results in $(BUILDDIR)/doctest/output.txt.\"\n\n.PHONY: coverage\ncoverage:\n\t$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage\n\t@echo \"Testing of coverage in the sources finished, look at the \" \\\n\t      \"results in $(BUILDDIR)/coverage/python.txt.\"\n\n.PHONY: xml\nxml:\n\t$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml\n\t@echo\n\t@echo \"Build finished. The XML files are in $(BUILDDIR)/xml.\"\n\n.PHONY: pseudoxml\npseudoxml:\n\t$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml\n\t@echo\n\t@echo \"Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml.\"\n\n.PHONY: dummy\ndummy:\n\t$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy\n\t@echo\n\t@echo \"Build finished. Dummy builder generates no files.\"\n"
  },
  {
    "path": "document/core/README.md",
    "content": "# WebAssembly Core Specification\n\nThis is the official WebAssembly \"language\" specification.\n\nIt uses [Sphinx](http://www.sphinx-doc.org/). To install that:\n```\npip install sphinx\n```\nTo make HTML (result in `_build/html`):\n```\nmake html\n```\nTo make PDF (result in `_build/latex`, requires LaTeX):\n```\nmake pdf\n```\nTo make all:\n```\nmake all\n```\nFinally, to make all and update webassembly.github.io/spec with it:\n```\nmake publish\n```\nPlease make sure to only use that once a change has approval.\n"
  },
  {
    "path": "document/core/appendix/algorithm.rst",
    "content": ".. index:: validation, algorithm, instruction, module, binary format, opcode\n.. _algo-valid:\n\nValidation Algorithm\n--------------------\n\nThe specification of WebAssembly :ref:`validation <valid>` is purely *declarative*.\nIt describes the constraints that must be met by a :ref:`module <valid-module>` or :ref:`instruction <valid-instr>` sequence to be valid.\n\nThis section sketches the skeleton of a sound and complete *algorithm* for effectively validating code, i.e., sequences of :ref:`instructions <syntax-instr>`.\n(Other aspects of validation are straightforward to implement.)\n\nIn fact, the algorithm is expressed over the flat sequence of opcodes as occurring in the :ref:`binary format <binary>`, and performs only a single pass over it.\nConsequently, it can be integrated directly into a decoder.\n\nThe algorithm is expressed in typed pseudo code whose semantics is intended to be self-explanatory.\n\n\n.. index:: value type, stack, label, frame, instruction\n\nData Structures\n~~~~~~~~~~~~~~~\n\nTypes are representable as an enumeration.\n\n.. code-block:: pseudo\n\n   type val_type = I32 | I64 | F32 | F64 | Funcref | Externref\n\n   func is_num(t : val_type | Unknown) : bool =\n     return t = I32 || t = I64 || t = F32 || t = F64 || t = Unknown\n\n   func is_ref(t : val_type | Unknown) : bool =\n     return t = Funcref || t = Externref || t = Unknown\n\nThe algorithm uses two separate stacks: the *value stack* and the *control stack*.\nThe former tracks the :ref:`types <syntax-valtype>` of operand values on the :ref:`stack <stack>`,\nthe latter surrounding :ref:`structured control instructions <syntax-instr-control>` and their associated :ref:`blocks <syntax-instr-control>`.\n\n.. code-block:: pseudo\n\n   type val_stack = stack(val_type | Unknown)\n\n   type ctrl_stack = stack(ctrl_frame)\n   type ctrl_frame = {\n     opcode : opcode\n     start_types : list(val_type)\n     end_types : list(val_type)\n     height : nat\n     unreachable : bool\n   }\n\nFor each value, the value stack records its :ref:`value type <syntax-valtype>`, or :code:`Unknown` when the type is not known.\n\nFor each entered block, the control stack records a *control frame* with the originating opcode, the types on the top of the operand stack at the start and end of the block (used to check its result as well as branches), the height of the operand stack at the start of the block (used to check that operands do not underflow the current block), and a flag recording whether the remainder of the block is unreachable (used to handle :ref:`stack-polymorphic <polymorphism>` typing after branches).\n\nFor the purpose of presenting the algorithm, the operand and control stacks are simply maintained as global variables:\n\n.. code-block:: pseudo\n\n   var vals : val_stack\n   var ctrls : ctrl_stack\n\nHowever, these variables are not manipulated directly by the main checking function, but through a set of auxiliary functions:\n\n.. code-block:: pseudo\n\n   func push_val(type : val_type | Unknown) =\n     vals.push(type)\n\n   func pop_val() : val_type | Unknown =\n     if (vals.size() = ctrls[0].height && ctrls[0].unreachable) return Unknown\n     error_if(vals.size() = ctrls[0].height)\n     return vals.pop()\n\n   func pop_val(expect : val_type | Unknown) : val_type | Unknown =\n     let actual = pop_val()\n     if (actual = Unknown) return expect\n     if (expect = Unknown) return actual\n     error_if(actual =/= expect)\n     return actual\n\n   func push_vals(types : list(val_type)) = foreach (t in types) push_val(t)\n   func pop_vals(types : list(val_type)) : list(val_type) =\n     var popped := []\n     foreach (t in reverse(types)) popped.append(pop_val(t))\n     return popped\n\nPushing an operand value simply pushes the respective type to the value stack.\n\nPopping an operand value checks that the value stack does not underflow the current block and then removes one type.\nBut first, a special case is handled where the block contains no known values, but has been marked as unreachable.\nThat can occur after an unconditional branch, when the stack is typed :ref:`polymorphically <polymorphism>`.\nIn that case, an unknown type is returned.\n\nA second function for popping an operand value takes an expected type, which the actual operand type is checked against.\nThe types may differ in case one of them is Unknown.\nThe function returns the actual type popped from the stack.\n\nFinally, there are accumulative functions for pushing or popping multiple operand types.\n\n.. note::\n   The notation :code:`stack[i]` is meant to index the stack from the top,\n   so that, e.g., :code:`ctrls[0]` accesses the element pushed last.\n\n\nThe control stack is likewise manipulated through auxiliary functions:\n\n.. code-block:: pseudo\n\n   func push_ctrl(opcode : opcode, in : list(val_type), out : list(val_type)) =\n     let frame = ctrl_frame(opcode, in, out, vals.size(), false)\n     ctrls.push(frame)\n     push_vals(in)\n\n   func pop_ctrl() : ctrl_frame =\n     error_if(ctrls.is_empty())\n     let frame = ctrls[0]\n     pop_vals(frame.end_types)\n     error_if(vals.size() =/= frame.height)\n     ctrls.pop()\n     return frame\n\n   func label_types(frame : ctrl_frame) : list(val_types) =\n     return (if frame.opcode == loop then frame.start_types else frame.end_types)\n\n   func unreachable() =\n     vals.resize(ctrls[0].height)\n     ctrls[0].unreachable := true\n\nPushing a control frame takes the types of the label and result values.\nIt allocates a new frame record recording them along with the current height of the operand stack and marks the block as reachable.\n\nPopping a frame first checks that the control stack is not empty.\nIt then verifies that the operand stack contains the right types of values expected at the end of the exited block and pops them off the operand stack.\nAfterwards, it checks that the stack has shrunk back to its initial height.\n\nThe type of the :ref:`label <syntax-label>` associated with a control frame is either that of the stack at the start or the end of the frame, determined by the opcode that it originates from.\n\nFinally, the current frame can be marked as unreachable.\nIn that case, all existing operand types are purged from the value stack, in order to allow for the :ref:`stack-polymorphism <polymorphism>` logic in :code:`pop_val` to take effect.\n\n.. note::\n   Even with the unreachable flag set, consecutive operands are still pushed to and popped from the operand stack.\n   That is necessary to detect invalid :ref:`examples <polymorphism>` like :math:`(\\UNREACHABLE~(\\I32.\\CONST)~\\I64.\\ADD)`.\n   However, a polymorphic stack cannot underflow, but instead generates :code:`Unknown` types as needed.\n\n\n.. index:: opcode\n\nValidation of Opcode Sequences\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe following function shows the validation of a number of representative instructions that manipulate the stack.\nOther instructions are checked in a similar manner.\n\n.. note::\n   Various instructions not shown here will additionally require the presence of a validation :ref:`context <context>` for checking uses of :ref:`indices <syntax-index>`.\n   That is an easy addition and therefore omitted from this presentation.\n\n.. code-block:: pseudo\n\n   func validate(opcode) =\n     switch (opcode)\n       case (i32.add)\n         pop_val(I32)\n         pop_val(I32)\n         push_val(I32)\n\n       case (drop)\n         pop_val()\n\n       case (select)\n         pop_val(I32)\n         let t1 = pop_val()\n         let t2 = pop_val()\n         error_if(not (is_num(t1) && is_num(t2)))\n         error_if(t1 =/= t2 && t1 =/= Unknown && t2 =/= Unknown)\n         push_val(if (t1 = Unknown) t2 else t1)\n\n       case (select t)\n         pop_val(I32)\n         pop_val(t)\n         pop_val(t)\n         push_val(t)\n\n       case (unreachable)\n         unreachable()\n\n       case (block t1*->t2*)\n         pop_vals([t1*])\n         push_ctrl(block, [t1*], [t2*])\n\n       case (loop t1*->t2*)\n         pop_vals([t1*])\n         push_ctrl(loop, [t1*], [t2*])\n\n       case (if t1*->t2*)\n         pop_val(I32)\n         pop_vals([t1*])\n         push_ctrl(if, [t1*], [t2*])\n\n       case (end)\n         let frame = pop_ctrl()\n         push_vals(frame.end_types)\n\n       case (else)\n         let frame = pop_ctrl()\n         error_if(frame.opcode =/= if)\n         push_ctrl(else, frame.start_types, frame.end_types)\n\n       case (br n)\n         error_if(ctrls.size() < n)\n         pop_vals(label_types(ctrls[n]))\n         unreachable()\n\n       case (br_if n)\n         error_if(ctrls.size() < n)\n         pop_val(I32)\n         pop_vals(label_types(ctrls[n]))\n         push_vals(label_types(ctrls[n]))\n\n       case (br_table n* m)\n         pop_val(I32)\n         error_if(ctrls.size() < m)\n         let arity = label_types(ctrls[m]).size()\n         foreach (n in n*)\n           error_if(ctrls.size() < n)\n           error_if(label_types(ctrls[n]).size() =/= arity)\n           push_vals(pop_vals(label_types(ctrls[n])))\n         pop_vals(label_types(ctrls[m]))\n         unreachable()\n\n\n.. note::\n   It is an invariant under the current WebAssembly instruction set that an operand of :code:`Unknown` type is never duplicated on the stack.\n   This would change if the language were extended with stack instructions like :code:`dup`.\n   Under such an extension, the above algorithm would need to be refined by replacing the :code:`Unknown` type with proper *type variables* to ensure that all uses are consistent.\n"
  },
  {
    "path": "document/core/appendix/custom.rst",
    "content": ".. index:: custom section, section, binary format\n\nCustom Sections\n---------------\n\nThis appendix defines dedicated :ref:`custom sections <binary-customsec>` for WebAssembly's :ref:`binary format <binary>`.\nSuch sections do not contribute to, or otherwise affect, the WebAssembly semantics, and like any custom section they may be ignored by an implementation.\nHowever, they provide useful meta data that implementations can make use of to improve user experience or take compilation hints.\n\nCurrently, only one dedicated custom section is defined, the :ref:`name section<binary-namesec>`.\n\n\n.. index:: ! name section, name, Unicode UTF-8\n.. _binary-namesec:\n\nName Section\n~~~~~~~~~~~~\n\nThe *name section* is a :ref:`custom section <binary-customsec>` whose name string is itself :math:`\\text{name}`.\nThe name section should appear only once in a module, and only after the :ref:`data section <binary-datasec>`.\n\nThe purpose of this section is to attach printable names to definitions in a module, which e.g. can be used by a debugger or when parts of the module are to be rendered in :ref:`text form <text>`.\n\n.. note::\n   All :ref:`names <binary-name>` are represented in |Unicode|_ encoded in UTF-8.\n   Names need not be unique.\n\n\n.. _binary-namesubsection:\n\nSubsections\n...........\n\nThe :ref:`data <binary-customsec>` of a name section consists of a sequence of *subsections*.\nEach subsection consists of a\n\n* a one-byte subsection *id*,\n* the |U32| *size* of the contents, in bytes,\n* the actual *contents*, whose structure is depended on the subsection id.\n\n.. math::\n   \\begin{array}{llcll}\n   \\production{name section} & \\Bnamesec &::=&\n     \\Bsection_0(\\Bnamedata) \\\\\n   \\production{name data} & \\Bnamedata &::=&\n     n{:}\\Bname & (\\iff n = \\text{name}) \\\\ &&&\n     \\Bmodulenamesubsec^? \\\\ &&&\n     \\Bfuncnamesubsec^? \\\\ &&&\n     \\Blocalnamesubsec^? \\\\\n   \\production{name subsection} & \\Bnamesubsection_N(\\B{B}) &::=&\n     N{:}\\Bbyte~~\\X{size}{:}\\Bu32~~\\B{B}\n       & (\\iff \\X{size} = ||\\B{B}||) \\\\\n   \\end{array}\n\nThe following subsection ids are used:\n\n==  ===========================================\nId  Subsection                                 \n==  ===========================================\n 0  :ref:`module name <binary-modulenamesec>`\n 1  :ref:`function names <binary-funcnamesec>`    \n 2  :ref:`local names <binary-localnamesec>`\n==  ===========================================\n\nEach subsection may occur at most once, and in order of increasing id.\n\n\n.. index:: ! name map, index, index space\n.. _binary-indirectnamemap:\n.. _binary-namemap:\n\nName Maps\n.........\n\nA *name map* assigns :ref:`names <syntax-name>` to :ref:`indices <syntax-index>` in a given :ref:`index space <syntax-index>`.\nIt consists of a :ref:`vector <binary-vec>` of index/name pairs in order of increasing index value.\nEach index must be unique, but the assigned names need not be.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{name map} & \\Bnamemap &::=&\n     \\Bvec(\\Bnameassoc) \\\\\n   \\production{name association} & \\Bnameassoc &::=&\n     \\Bidx~\\Bname \\\\\n   \\end{array}\n\nAn *indirect name map* assigns :ref:`names <syntax-name>` to a two-dimensional :ref:`index space <syntax-index>`, where secondary indices are *grouped* by primary indices.\nIt consists of a vector of primary index/name map pairs in order of increasing index value, where each name map in turn maps secondary indices to names.\nEach primary index must be unique, and likewise each secondary index per individual name map.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{indirect name map} & \\Bindirectnamemap &::=&\n     \\Bvec(\\Bindirectnameassoc) \\\\\n   \\production{indirect name association} & \\Bindirectnameassoc &::=&\n     \\Bidx~\\Bnamemap \\\\\n   \\end{array}\n\n\n.. index:: module\n.. _binary-modulenamesec:\n\nModule Names\n............\n\nThe *module name subsection* has the id 0.\nIt simply consists of a single :ref:`name <binary-name>` that is assigned to the module itself.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{module name subsection} & \\Bmodulenamesubsec &::=&\n     \\Bnamesubsection_0(\\Bname) \\\\\n   \\end{array}\n\n\n.. index:: function, function index\n.. _binary-funcnamesec:\n\nFunction Names\n..............\n\nThe *function name subsection* has the id 1.\nIt consists of a :ref:`name map <binary-namemap>` assigning function names to :ref:`function indices <syntax-funcidx>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{function name subsection} & \\Bfuncnamesubsec &::=&\n     \\Bnamesubsection_1(\\Bnamemap) \\\\\n   \\end{array}\n\n\n.. index:: function, local, function index, local index\n.. _binary-localnamesec:\n\nLocal Names\n...........\n\nThe *local name subsection* has the id 2.\nIt consists of an :ref:`indirect name map <binary-indirectnamemap>` assigning local names to :ref:`local indices <syntax-localidx>` grouped by :ref:`function indices <syntax-funcidx>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{local name subsection} & \\Blocalnamesubsec &::=&\n     \\Bnamesubsection_2(\\Bindirectnamemap) \\\\\n   \\end{array}\n"
  },
  {
    "path": "document/core/appendix/embedding.rst",
    "content": ".. index:: ! embedding, embedder, implementation, host\n.. _embed:\n\nEmbedding\n---------\n\nA WebAssembly implementation will typically be *embedded* into a *host* environment.\nAn *embedder* implements the connection between such a host environment and the WebAssembly semantics as defined in the main body of this specification.\nAn embedder is expected to interact with the semantics in well-defined ways.\n\nThis section defines a suitable interface to the WebAssembly semantics in the form of entry points through which an embedder can access it.\nThe interface is intended to be complete, in the sense that an embedder does not need to reference other functional parts of the WebAssembly specification directly.\n\n.. note::\n   On the other hand, an embedder does not need to provide the host environment with access to all functionality defined in this interface.\n   For example, an implementation may not support :ref:`parsing <embed-module-parse>` of the :ref:`text format <text>`.\n\nTypes\n~~~~~\n\nIn the description of the embedder interface, syntactic classes from the :ref:`abstract syntax <syntax>` and the :ref:`runtime's abstract machine <syntax-runtime>` are used as names for variables that range over the possible objects from that class.\nHence, these syntactic classes can also be interpreted as types.\n\nFor numeric parameters, notation like :math:`n:\\u32` is used to specify a symbolic name in addition to the respective value range.\n\n\n.. _embed-error:\n\nErrors\n~~~~~~\n\nFailure of an interface operation is indicated by an auxiliary syntactic class:\n\n.. math::\n   \\begin{array}{llll}\n   \\production{(error)} & \\error &::=& \\ERROR \\\\\n   \\end{array}\n\nIn addition to the error conditions specified explicitly in this section, implementations may also return errors when specific :ref:`implementation limitations <impl>` are reached.\n\n.. note::\n   Errors are abstract and unspecific with this definition.\n   Implementations can refine it to carry suitable classifications and diagnostic messages.\n\n\nPre- and Post-Conditions\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nSome operations state *pre-conditions* about their arguments or *post-conditions* about their results.\nIt is the embedder's responsibility to meet the pre-conditions.\nIf it does, the post conditions are guaranteed by the semantics.\n\nIn addition to pre- and post-conditions explicitly stated with each operation, the specification adopts the following conventions for :ref:`runtime objects <syntax-runtime>` (:math:`store`, :math:`\\moduleinst`, :math:`\\externval`, :ref:`addresses <syntax-addr>`):\n\n* Every runtime object passed as a parameter must be :ref:`valid <valid-store>` per an implicit pre-condition.\n\n* Every runtime object returned as a result is :ref:`valid <valid-store>` per an implicit post-condition.\n\n.. note::\n   As long as an embedder treats runtime objects as abstract and only creates and manipulates them through the interface defined here, all implicit pre-conditions are automatically met.\n\n\n\n.. index:: allocation, store\n.. _embed-store:\n\nStore\n~~~~~\n\n.. _embed-store-init:\n\n:math:`\\F{store\\_init}() : \\store`\n..................................\n\n1. Return the empty :ref:`store <syntax-store>`.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{store\\_init}() &=& \\{ \\SFUNCS~\\epsilon,~ \\SMEMS~\\epsilon,~ \\STABLES~\\epsilon,~ \\SGLOBALS~\\epsilon \\} \\\\\n   \\end{array}\n\n\n\n.. index:: module\n.. _embed-module:\n\nModules\n~~~~~~~\n\n.. index:: binary format\n.. _embed-module-decode:\n\n:math:`\\F{module\\_decode}(\\byte^\\ast) : \\module ~|~ \\error`\n...........................................................\n\n1. If there exists a derivation for the :ref:`byte <syntax-byte>` sequence :math:`\\byte^\\ast` as a :math:`\\Bmodule` according to the :ref:`binary grammar for modules <binary-module>`, yielding a :ref:`module <syntax-module>` :math:`m`, then return :math:`m`.\n\n2. Else, return :math:`\\ERROR`.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{module\\_decode}(b^\\ast) &=& m && (\\iff \\Bmodule \\stackrel\\ast\\Longrightarrow m{:}b^\\ast) \\\\\n   \\F{module\\_decode}(b^\\ast) &=& \\ERROR && (\\otherwise) \\\\\n   \\end{array}\n\n\n.. index:: text format\n.. _embed-module-parse:\n\n:math:`\\F{module\\_parse}(\\char^\\ast) : \\module ~|~ \\error`\n..........................................................\n\n1. If there exists a derivation for the :ref:`source <text-source>` :math:`\\char^\\ast` as a :math:`\\Tmodule` according to the :ref:`text grammar for modules <text-module>`, yielding a :ref:`module <syntax-module>` :math:`m`, then return :math:`m`.\n\n2. Else, return :math:`\\ERROR`.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{module\\_parse}(c^\\ast) &=& m && (\\iff \\Tmodule \\stackrel\\ast\\Longrightarrow m{:}c^\\ast) \\\\\n   \\F{module\\_parse}(c^\\ast) &=& \\ERROR && (\\otherwise) \\\\\n   \\end{array}\n\n\n.. index:: validation\n.. _embed-module-validate:\n\n:math:`\\F{module\\_validate}(\\module) : \\error^?`\n................................................\n\n1. If :math:`\\module` is :ref:`valid <valid-module>`, then return nothing.\n\n2. Else, return :math:`\\ERROR`.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{module\\_validate}(m) &=& \\epsilon && (\\iff {} \\vdashmodule m : \\externtype^\\ast \\to {\\externtype'}^\\ast) \\\\\n   \\F{module\\_validate}(m) &=& \\ERROR && (\\otherwise) \\\\\n   \\end{array}\n\n\n.. index:: instantiation, module instance\n.. _embed-module-instantiate:\n\n:math:`\\F{module\\_instantiate}(\\store, \\module, \\externval^\\ast) : (\\store, \\moduleinst ~|~ \\error)`\n....................................................................................................\n\n1. Try :ref:`instantiating <exec-instantiation>` :math:`\\module` in :math:`\\store` with :ref:`external values <syntax-externval>` :math:`\\externval^\\ast` as imports:\n\n  a. If it succeeds with a :ref:`module instance <syntax-moduleinst>` :math:`\\moduleinst`, then let :math:`\\X{result}` be :math:`\\moduleinst`.\n\n  b. Else, let :math:`\\X{result}` be :math:`\\ERROR`.\n\n2. Return the new store paired with :math:`\\X{result}`.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{module\\_instantiate}(S, m, \\X{ev}^\\ast) &=& (S', F.\\AMODULE) && (\\iff \\instantiate(S, m, \\X{ev}^\\ast) \\stepto^\\ast S'; F; \\epsilon) \\\\\n   \\F{module\\_instantiate}(S, m, \\X{ev}^\\ast) &=& (S', \\ERROR) && (\\iff \\instantiate(S, m, \\X{ev}^\\ast) \\stepto^\\ast S'; F; \\TRAP) \\\\\n   \\end{array}\n\n.. note::\n   The store may be modified even in case of an error.\n\n\n.. index:: import\n.. _embed-module-imports:\n\n:math:`\\F{module\\_imports}(\\module) : (\\name, \\name, \\externtype)^\\ast`\n.......................................................................\n\n1. Pre-condition: :math:`\\module` is :ref:`valid <valid-module>` with external import types :math:`\\externtype^\\ast` and external export types :math:`{\\externtype'}^\\ast`.\n\n2. Let :math:`\\import^\\ast` be the :ref:`imports <syntax-import>` :math:`\\module.\\MIMPORTS`.\n\n3. Assert: the length of :math:`\\import^\\ast` equals the length of :math:`\\externtype^\\ast`.\n\n4. For each :math:`\\import_i` in :math:`\\import^\\ast` and corresponding :math:`\\externtype_i` in :math:`\\externtype^\\ast`, do:\n\n  a. Let :math:`\\X{result}_i` be the triple :math:`(\\import_i.\\IMODULE, \\import_i.\\INAME, \\externtype_i)`.\n\n5. Return the concatenation of all :math:`\\X{result}_i`, in index order.\n\n6. Post-condition: each :math:`\\externtype_i` is :ref:`valid <valid-externtype>`.\n\n.. math::\n   ~ \\\\\n   \\begin{array}{lclll}\n   \\F{module\\_imports}(m) &=& (\\X{im}.\\IMODULE, \\X{im}.\\INAME, \\externtype)^\\ast \\\\\n     && \\qquad (\\iff \\X{im}^\\ast = m.\\MIMPORTS \\wedge {} \\vdashmodule m : \\externtype^\\ast \\to {\\externtype'}^\\ast) \\\\\n   \\end{array}\n\n\n.. index:: export\n.. _embed-module-exports:\n\n:math:`\\F{module\\_exports}(\\module) : (\\name, \\externtype)^\\ast`\n................................................................\n\n1. Pre-condition: :math:`\\module` is :ref:`valid <valid-module>` with external import types :math:`\\externtype^\\ast` and external export types :math:`{\\externtype'}^\\ast`.\n\n2. Let :math:`\\export^\\ast` be the :ref:`exports <syntax-export>` :math:`\\module.\\MEXPORTS`.\n\n3. Assert: the length of :math:`\\export^\\ast` equals the length of :math:`{\\externtype'}^\\ast`.\n\n4. For each :math:`\\export_i` in :math:`\\export^\\ast` and corresponding :math:`\\externtype'_i` in :math:`{\\externtype'}^\\ast`, do:\n\n  a. Let :math:`\\X{result}_i` be the pair :math:`(\\export_i.\\ENAME, \\externtype'_i)`.\n\n5. Return the concatenation of all :math:`\\X{result}_i`, in index order.\n\n6. Post-condition: each :math:`\\externtype'_i` is :ref:`valid <valid-externtype>`.\n\n.. math::\n   ~ \\\\\n   \\begin{array}{lclll}\n   \\F{module\\_exports}(m) &=& (\\X{ex}.\\ENAME, \\externtype')^\\ast \\\\\n     && \\qquad (\\iff \\X{ex}^\\ast = m.\\MEXPORTS \\wedge {} \\vdashmodule m : \\externtype^\\ast \\to {\\externtype'}^\\ast) \\\\\n   \\end{array}\n\n\n.. index:: module, module instance\n.. _embed-instance:\n\nModule Instances\n~~~~~~~~~~~~~~~~\n\n.. index:: export, export instance\n\n.. _embed-instance-export:\n\n:math:`\\F{instance\\_export}(\\moduleinst, \\name) : \\externval ~|~ \\error`\n........................................................................\n\n1. Assert: due to :ref:`validity <valid-moduleinst>` of the :ref:`module instance <syntax-moduleinst>` :math:`\\moduleinst`, all its :ref:`export names <syntax-exportinst>` are different.\n\n2. If there exists an :math:`\\exportinst_i` in :math:`\\moduleinst.\\MIEXPORTS` such that :ref:`name <syntax-name>` :math:`\\exportinst_i.\\EINAME` equals :math:`\\name`, then:\n\n   a. Return the :ref:`external value <syntax-externval>` :math:`\\exportinst_i.\\EIVALUE`.\n\n3. Else, return :math:`\\ERROR`.\n\n.. math::\n   ~ \\\\\n   \\begin{array}{lclll}\n   \\F{instance\\_export}(m, \\name) &=& m.\\MIEXPORTS[i].\\EIVALUE && (\\iff m.\\MEXPORTS[i].\\EINAME = \\name) \\\\\n   \\F{instance\\_export}(m, \\name) &=& \\ERROR && (\\otherwise) \\\\\n   \\end{array}\n\n\n.. index:: function, host function, function address, function instance, function type, store\n.. _embed-func:\n\nFunctions\n~~~~~~~~~\n\n.. _embed-func-alloc:\n\n:math:`\\F{func\\_alloc}(\\store, \\functype, \\hostfunc) : (\\store, \\funcaddr)`\n...........................................................................\n\n1. Pre-condition: :math:`\\functype` is :math:`valid <valid-functype>`.\n\n2. Let :math:`\\funcaddr` be the result of :ref:`allocating a host function <alloc-func>` in :math:`\\store` with :ref:`function type <syntax-functype>` :math:`\\functype` and host function code :math:`\\hostfunc`.\n\n3. Return the new store paired with :math:`\\funcaddr`.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{func\\_alloc}(S, \\X{ft}, \\X{code}) &=& (S', \\X{a}) && (\\iff \\allochostfunc(S, \\X{ft}, \\X{code}) = S', \\X{a}) \\\\\n   \\end{array}\n\n.. note::\n   This operation assumes that :math:`\\hostfunc` satisfies the :ref:`pre- and post-conditions <exec-invoke-host>` required for a function instance with type :math:`\\functype`.\n\n   Regular (non-host) function instances can only be created indirectly through :ref:`module instantiation <embed-module-instantiate>`.\n\n\n.. _embed-func-type:\n\n:math:`\\F{func\\_type}(\\store, \\funcaddr) : \\functype`\n.....................................................\n\n1. Return :math:`S.\\SFUNCS[a].\\FITYPE`.\n\n2. Post-condition: the returned :ref:`function type <syntax-functype>` is :ref:`valid <valid-functype>`.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{func\\_type}(S, a) &=& S.\\SFUNCS[a].\\FITYPE \\\\\n   \\end{array}\n\n\n.. index:: invocation, value, result\n.. _embed-func-invoke:\n\n:math:`\\F{func\\_invoke}(\\store, \\funcaddr, \\val^\\ast) : (\\store, \\val^\\ast ~|~ \\error)`\n........................................................................................\n\n1. Try :ref:`invoking <exec-invocation>` the function :math:`\\funcaddr` in :math:`\\store` with :ref:`values <syntax-val>` :math:`\\val^\\ast` as arguments:\n\n  a. If it succeeds with :ref:`values <syntax-val>` :math:`{\\val'}^\\ast` as results, then let :math:`\\X{result}` be :math:`{\\val'}^\\ast`.\n\n  b. Else it has trapped, hence let :math:`\\X{result}` be :math:`\\ERROR`.\n\n2. Return the new store paired with :math:`\\X{result}`.\n\n.. math::\n   ~ \\\\\n   \\begin{array}{lclll}\n   \\F{func\\_invoke}(S, a, v^\\ast) &=& (S', {v'}^\\ast) && (\\iff \\invoke(S, a, v^\\ast) \\stepto^\\ast S'; F; {v'}^\\ast) \\\\\n   \\F{func\\_invoke}(S, a, v^\\ast) &=& (S', \\ERROR) && (\\iff \\invoke(S, a, v^\\ast) \\stepto^\\ast S'; F; \\TRAP) \\\\\n   \\end{array}\n\n.. note::\n   The store may be modified even in case of an error.\n\n\n.. index:: table, table address, store, table instance, table type, element, function address\n.. _embed-table:\n\nTables\n~~~~~~\n\n.. _embed-table-alloc:\n\n:math:`\\F{table\\_alloc}(\\store, \\tabletype) : (\\store, \\tableaddr, \\reff)`\n..........................................................................\n\n1. Pre-condition: :math:`\\tabletype` is :math:`valid <valid-tabletype>`.\n\n2. Let :math:`\\tableaddr` be the result of :ref:`allocating a table <alloc-table>` in :math:`\\store` with :ref:`table type <syntax-tabletype>` :math:`\\tabletype` and initialization value :math:`\\reff`.\n\n3. Return the new store paired with :math:`\\tableaddr`.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{table\\_alloc}(S, \\X{tt}, r) &=& (S', \\X{a}) && (\\iff \\alloctable(S, \\X{tt}, r) = S', \\X{a}) \\\\\n   \\end{array}\n\n\n.. _embed-table-type:\n\n:math:`\\F{table\\_type}(\\store, \\tableaddr) : \\tabletype`\n........................................................\n\n1. Return :math:`S.\\STABLES[a].\\TITYPE`.\n\n2. Post-condition: the returned :ref:`table type <syntax-tabletype>` is :math:`valid <valid-tabletype>`.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{table\\_type}(S, a) &=& S.\\STABLES[a].\\TITYPE \\\\\n   \\end{array}\n\n\n.. _embed-table-read:\n\n:math:`\\F{table\\_read}(\\store, \\tableaddr, i:\\u32) : \\reff ~|~ \\error`\n......................................................................\n\n1. Let :math:`\\X{ti}` be the :ref:`table instance <syntax-tableinst>` :math:`\\store.\\STABLES[\\tableaddr]`.\n\n2. If :math:`i` is larger than or equal to the length of :math:`\\X{ti}.\\TIELEM`, then return :math:`\\ERROR`.\n\n3. Else, return the :ref:`reference value <syntax-ref>` :math:`\\X{ti}.\\TIELEM[i]`.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{table\\_read}(S, a, i) &=& r && (\\iff S.\\STABLES[a].\\TIELEM[i] = r) \\\\\n   \\F{table\\_read}(S, a, i) &=& \\ERROR && (\\otherwise) \\\\\n   \\end{array}\n\n\n.. _embed-table-write:\n\n:math:`\\F{table\\_write}(\\store, \\tableaddr, i:\\u32, \\reff) : \\store ~|~ \\error`\n...............................................................................\n\n1. Let :math:`\\X{ti}` be the :ref:`table instance <syntax-tableinst>` :math:`\\store.\\STABLES[\\tableaddr]`.\n\n2. If :math:`i` is larger than or equal to the length of :math:`\\X{ti}.\\TIELEM`, then return :math:`\\ERROR`.\n\n3. Replace :math:`\\X{ti}.\\TIELEM[i]` with the :ref:`reference value <syntax-ref>` :math:`\\reff`.\n\n4. Return the updated store.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{table\\_write}(S, a, i, r) &=& S' && (\\iff S' = S \\with \\STABLES[a].\\TIELEM[i] = r) \\\\\n   \\F{table\\_write}(S, a, i, r) &=& \\ERROR && (\\otherwise) \\\\\n   \\end{array}\n\n\n.. _embed-table-size:\n\n:math:`\\F{table\\_size}(\\store, \\tableaddr) : \\u32`\n..................................................\n\n1. Return the length of :math:`\\store.\\STABLES[\\tableaddr].\\TIELEM`.\n\n.. math::\n   ~ \\\\\n   \\begin{array}{lclll}\n   \\F{table\\_size}(S, a) &=& n &&\n     (\\iff |S.\\STABLES[a].\\TIELEM| = n) \\\\\n   \\end{array}\n\n\n\n.. _embed-table-grow:\n\n:math:`\\F{table\\_grow}(\\store, \\tableaddr, n:\\u32, \\reff) : \\store ~|~ \\error`\n..............................................................................\n\n1. Try :ref:`growing <grow-table>` the :ref:`table instance <syntax-tableinst>` :math:`\\store.\\STABLES[\\tableaddr]` by :math:`n` elements with initialization value :math:`\\reff`:\n\n   a. If it succeeds, return the updated store.\n\n   b. Else, return :math:`\\ERROR`.\n\n.. math::\n   ~ \\\\\n   \\begin{array}{lclll}\n   \\F{table\\_grow}(S, a, n, r) &=& S' &&\n     (\\iff S' = S \\with \\STABLES[a] = \\growtable(S.\\STABLES[a], n, r)) \\\\\n   \\F{table\\_grow}(S, a, n, r) &=& \\ERROR && (\\otherwise) \\\\\n   \\end{array}\n\n\n.. index:: memory, memory address, store, memory instance, memory type, byte\n.. _embed-mem:\n\nMemories\n~~~~~~~~\n\n.. _embed-mem-alloc:\n\n:math:`\\F{mem\\_alloc}(\\store, \\memtype) : (\\store, \\memaddr)`\n................................................................\n\n1. Pre-condition: :math:`\\memtype` is :math:`valid <valid-memtype>`.\n\n2. Let :math:`\\memaddr` be the result of :ref:`allocating a memory <alloc-mem>` in :math:`\\store` with :ref:`memory type <syntax-memtype>` :math:`\\memtype`.\n\n3. Return the new store paired with :math:`\\memaddr`.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{mem\\_alloc}(S, \\X{mt}) &=& (S', \\X{a}) && (\\iff \\allocmem(S, \\X{mt}) = S', \\X{a}) \\\\\n   \\end{array}\n\n\n.. _embed-mem-type:\n\n:math:`\\F{mem\\_type}(\\store, \\memaddr) : \\memtype`\n..................................................\n\n1. Return :math:`S.\\SMEMS[a].\\MITYPE`.\n\n2. Post-condition: the returned :ref:`memory type <syntax-memtype>` is :math:`valid <valid-memtype>`.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{mem\\_type}(S, a) &=& S.\\SMEMS[a].\\MITYPE \\\\\n   \\end{array}\n\n\n.. _embed-mem-read:\n\n:math:`\\F{mem\\_read}(\\store, \\memaddr, i:\\u32) : \\byte ~|~ \\error`\n..................................................................\n\n1. Let :math:`\\X{mi}` be the :ref:`memory instance <syntax-meminst>` :math:`\\store.\\SMEMS[\\memaddr]`.\n\n2. If :math:`i` is larger than or equal to the length of :math:`\\X{mi}.\\MIDATA`, then return :math:`\\ERROR`.\n\n3. Else, return the  :ref:`byte <syntax-byte>` :math:`\\X{mi}.\\MIDATA[i]`.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{mem\\_read}(S, a, i) &=& b && (\\iff S.\\SMEMS[a].\\MIDATA[i] = b) \\\\\n   \\F{mem\\_read}(S, a, i) &=& \\ERROR && (\\otherwise) \\\\\n   \\end{array}\n\n\n.. _embed-mem-write:\n\n:math:`\\F{mem\\_write}(\\store, \\memaddr, i:\\u32, \\byte) : \\store ~|~ \\error`\n...........................................................................\n\n1. Let :math:`\\X{mi}` be the :ref:`memory instance <syntax-meminst>` :math:`\\store.\\SMEMS[\\memaddr]`.\n\n2. If :math:`\\u32` is larger than or equal to the length of :math:`\\X{mi}.\\MIDATA`, then return :math:`\\ERROR`.\n\n3. Replace :math:`\\X{mi}.\\MIDATA[i]` with :math:`\\byte`.\n\n4. Return the updated store.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{mem\\_write}(S, a, i, b) &=& S' && (\\iff S' = S \\with \\SMEMS[a].\\MIDATA[i] = b) \\\\\n   \\F{mem\\_write}(S, a, i, b) &=& \\ERROR && (\\otherwise) \\\\\n   \\end{array}\n\n\n.. _embed-mem-size:\n\n:math:`\\F{mem\\_size}(\\store, \\memaddr) : \\u32`\n..............................................\n\n1. Return the length of :math:`\\store.\\SMEMS[\\memaddr].\\MIDATA` divided by the :ref:`page size <page-size>`.\n\n.. math::\n   ~ \\\\\n   \\begin{array}{lclll}\n   \\F{mem\\_size}(S, a) &=& n &&\n     (\\iff |S.\\SMEMS[a].\\MIDATA| = n \\cdot 64\\,\\F{Ki}) \\\\\n   \\end{array}\n\n\n\n.. _embed-mem-grow:\n\n:math:`\\F{mem\\_grow}(\\store, \\memaddr, n:\\u32) : \\store ~|~ \\error`\n...................................................................\n\n1. Try :ref:`growing <grow-mem>` the :ref:`memory instance <syntax-meminst>` :math:`\\store.\\SMEMS[\\memaddr]` by :math:`n` :ref:`pages <page-size>`:\n\n   a. If it succeeds, return the updated store.\n\n   b. Else, return :math:`\\ERROR`.\n\n.. math::\n   ~ \\\\\n   \\begin{array}{lclll}\n   \\F{mem\\_grow}(S, a, n) &=& S' &&\n     (\\iff S' = S \\with \\SMEMS[a] = \\growmem(S.\\SMEMS[a], n)) \\\\\n   \\F{mem\\_grow}(S, a, n) &=& \\ERROR && (\\otherwise) \\\\\n   \\end{array}\n\n\n\n.. index:: global, global address, store, global instance, global type, value\n.. _embed-global:\n\nGlobals\n~~~~~~~\n\n.. _embed-global-alloc:\n\n:math:`\\F{global\\_alloc}(\\store, \\globaltype, \\val) : (\\store, \\globaladdr)`\n............................................................................\n\n1. Pre-condition: :math:`\\globaltype` is :math:`valid <valid-globaltype>`.\n\n2. Let :math:`\\globaladdr` be the result of :ref:`allocating a global <alloc-global>` in :math:`\\store` with :ref:`global type <syntax-globaltype>` :math:`\\globaltype` and initialization value :math:`\\val`.\n\n3. Return the new store paired with :math:`\\globaladdr`.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{global\\_alloc}(S, \\X{gt}, v) &=& (S', \\X{a}) && (\\iff \\allocglobal(S, \\X{gt}, v) = S', \\X{a}) \\\\\n   \\end{array}\n\n\n.. _embed-global-type:\n\n:math:`\\F{global\\_type}(\\store, \\globaladdr) : \\globaltype`\n...........................................................\n\n1. Return :math:`S.\\SGLOBALS[a].\\GITYPE`.\n\n2. Post-condition: the returned :ref:`global type <syntax-globaltype>` is :math:`valid <valid-globaltype>`.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{global\\_type}(S, a) &=& S.\\SGLOBALS[a].\\GITYPE \\\\\n   \\end{array}\n\n\n.. _embed-global-read:\n\n:math:`\\F{global\\_read}(\\store, \\globaladdr) : \\val`\n....................................................\n\n1. Let :math:`\\X{gi}` be the :ref:`global instance <syntax-globalinst>` :math:`\\store.\\SGLOBALS[\\globaladdr]`.\n\n2. Return the :ref:`value <syntax-val>` :math:`\\X{gi}.\\GIVALUE`.\n\n.. math::\n   \\begin{array}{lclll}\n   \\F{global\\_read}(S, a) &=& v && (\\iff S.\\SGLOBALS[a].\\GIVALUE = v) \\\\\n   \\end{array}\n\n\n.. _embed-global-write:\n\n:math:`\\F{global\\_write}(\\store, \\globaladdr, \\val) : \\store ~|~ \\error`\n........................................................................\n\n1. Let :math:`\\X{gi}` be the :ref:`global instance <syntax-globalinst>` :math:`\\store.\\SGLOBALS[\\globaladdr]`.\n\n2. Let :math:`\\mut~t` be the structure of the :ref:`global type <syntax-globaltype>` :math:`\\X{gi}.\\GITYPE`.\n\n3. If :math:`\\mut` is not :math:`\\MVAR`, then return :math:`\\ERROR`.\n\n4. Replace :math:`\\X{gi}.\\GIVALUE` with the :ref:`value <syntax-val>` :math:`\\val`.\n\n5. Return the updated store.\n\n.. math::\n   ~ \\\\\n   \\begin{array}{lclll}\n   \\F{global\\_write}(S, a, v) &=& S' && (\\iff S.\\SGLOBALS[a].\\GITYPE = \\MVAR~t \\wedge S' = S \\with \\SGLOBALS[a].\\GIVALUE = v) \\\\\n   \\F{global\\_write}(S, a, v) &=& \\ERROR && (\\otherwise) \\\\\n   \\end{array}\n"
  },
  {
    "path": "document/core/appendix/gen-index-instructions.py",
    "content": "#!/usr/bin/env python3\n\n# This script generates the `index-instructions.rst` file. The table in that\n# file is particularly annoying to update by hand, since the Restructured Text\n# format requires the header and columns to line up properly. This is\n# especially tedious when merging changes from the upstream spec, or merging a\n# proposal back to the spec when it is standardized.\n\nimport os\n\nSCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))\nINDEX_INSTRUCTIONS_RST = os.path.join(SCRIPT_DIR, 'index-instructions.rst')\n\nHEADER = \"\"\"\\\n.. DO NOT EDIT: This file is auto-generated by the gen-index-instructions.py script.\n\n.. index:: instruction\n.. _index-instr:\n\nIndex of Instructions\n---------------------\n\"\"\"\n\nCOLUMNS = [\n    'Instruction',\n    'Binary Opcode',\n    'Type',\n    'Validation',\n    'Execution',\n]\n\n\ndef MathWrap(s, default=''):\n    if s is None:\n        return default\n    else:\n        return f':math:`{s}`'\n\n\ndef RefWrap(s, kind):\n    if s is None:\n        return ''\n    else:\n        return f':ref:`{kind} <{s}>`'\n\n\ndef Instruction(name, opcode, type=None, validation=None, execution=None, operator=None):\n    if operator:\n        execution_str = ', '.join([RefWrap(execution, 'execution'),\n                                   RefWrap(operator, 'operator')])\n    else:\n        execution_str = RefWrap(execution, 'execution')\n\n    return (\n        MathWrap(name, '(reserved)'),\n        MathWrap(opcode),\n        MathWrap(type),\n        RefWrap(validation, 'validation'),\n        execution_str\n    )\n\n\nINSTRUCTIONS = [\n    Instruction(r'\\UNREACHABLE', r'\\hex{00}', r'[t_1^\\ast] \\to [t_2^\\ast]', r'valid-unreachable', r'exec-unreachable'),\n    Instruction(r'\\NOP', r'\\hex{01}', r'[] \\to []', r'valid-nop', r'exec-nop'),\n    Instruction(r'\\BLOCK~\\X{bt}', r'\\hex{02}', r'[t_1^\\ast] \\to [t_2^\\ast]', r'valid-block', r'exec-block'),\n    Instruction(r'\\LOOP~\\X{bt}', r'\\hex{03}', r'[t_1^\\ast] \\to [t_2^\\ast]', r'valid-loop', r'exec-loop'),\n    Instruction(r'\\IF~\\X{bt}', r'\\hex{04}', r'[t_1^\\ast] \\to [t_2^\\ast]', r'valid-if', r'exec-if'),\n    Instruction(r'\\ELSE', r'\\hex{05}'),\n    Instruction(None, r'\\hex{06}'),\n    Instruction(None, r'\\hex{07}'),\n    Instruction(None, r'\\hex{08}'),\n    Instruction(None, r'\\hex{09}'),\n    Instruction(None, r'\\hex{0A}'),\n    Instruction(r'\\END', r'\\hex{0B}'),\n    Instruction(r'\\BR~l', r'\\hex{0C}', r'[t_1^\\ast~t^\\ast] \\to [t_2^\\ast]', r'valid-br', r'exec-br'),\n    Instruction(r'\\BRIF~l', r'\\hex{0D}', r'[t^\\ast~\\I32] \\to [t^\\ast]', r'valid-br_if', r'exec-br_if'),\n    Instruction(r'\\BRTABLE~l^\\ast~l', r'\\hex{0E}', r'[t_1^\\ast~t^\\ast~\\I32] \\to [t_2^\\ast]', r'valid-br_table', r'exec-br_table'),\n    Instruction(r'\\RETURN', r'\\hex{0F}', r'[t_1^\\ast~t^\\ast] \\to [t_2^\\ast]', r'valid-return', r'exec-return'),\n    Instruction(r'\\CALL~x', r'\\hex{10}', r'[t_1^\\ast] \\to [t_2^\\ast]', r'valid-call', r'exec-call'),\n    Instruction(r'\\CALLINDIRECT~x~y', r'\\hex{11}', r'[t_1^\\ast~\\I32] \\to [t_2^\\ast]', r'valid-call_indirect', r'exec-call_indirect'),\n    Instruction(None, r'\\hex{12}'),\n    Instruction(None, r'\\hex{13}'),\n    Instruction(None, r'\\hex{14}'),\n    Instruction(None, r'\\hex{15}'),\n    Instruction(None, r'\\hex{16}'),\n    Instruction(None, r'\\hex{17}'),\n    Instruction(None, r'\\hex{18}'),\n    Instruction(None, r'\\hex{19}'),\n    Instruction(r'\\DROP', r'\\hex{1A}', r'[t] \\to []', r'valid-drop', r'exec-drop'),\n    Instruction(r'\\SELECT', r'\\hex{1B}', r'[t~t~\\I32] \\to [t]', r'valid-select', r'exec-select'),\n    Instruction(r'\\SELECT~t', r'\\hex{1C}', r'[t~t~\\I32] \\to [t]', r'valid-select', r'exec-select'),\n    Instruction(None, r'\\hex{1D}'),\n    Instruction(None, r'\\hex{1E}'),\n    Instruction(None, r'\\hex{1F}'),\n    Instruction(r'\\LOCALGET~x', r'\\hex{20}', r'[] \\to [t]', r'valid-local.get', r'exec-local.get'),\n    Instruction(r'\\LOCALSET~x', r'\\hex{21}', r'[t] \\to []', r'valid-local.set', r'exec-local.set'),\n    Instruction(r'\\LOCALTEE~x', r'\\hex{22}', r'[t] \\to [t]', r'valid-local.tee', r'exec-local.tee'),\n    Instruction(r'\\GLOBALGET~x', r'\\hex{23}', r'[] \\to [t]', r'valid-global.get', r'exec-global.get'),\n    Instruction(r'\\GLOBALSET~x', r'\\hex{24}', r'[t] \\to []', r'valid-global.set', r'exec-global.set'),\n    Instruction(r'\\TABLEGET~x', r'\\hex{25}', r'[\\I32] \\to [t]', r'valid-table.get', r'exec-table.get'),\n    Instruction(r'\\TABLESET~x', r'\\hex{26}', r'[\\I32~t] \\to []', r'valid-table.set', r'exec-table.set'),\n    Instruction(None, r'\\hex{27}'),\n    Instruction(r'\\I32.\\LOAD~\\memarg', r'\\hex{28}', r'[\\I32] \\to [\\I32]', r'valid-load', r'exec-load'),\n    Instruction(r'\\I64.\\LOAD~\\memarg', r'\\hex{29}', r'[\\I32] \\to [\\I64]', r'valid-load', r'exec-load'),\n    Instruction(r'\\F32.\\LOAD~\\memarg', r'\\hex{2A}', r'[\\I32] \\to [\\F32]', r'valid-load', r'exec-load'),\n    Instruction(r'\\F64.\\LOAD~\\memarg', r'\\hex{2B}', r'[\\I32] \\to [\\F64]', r'valid-load', r'exec-load'),\n    Instruction(r'\\I32.\\LOAD\\K{8\\_s}~\\memarg', r'\\hex{2C}', r'[\\I32] \\to [\\I32]', r'valid-loadn', r'exec-loadn'),\n    Instruction(r'\\I32.\\LOAD\\K{8\\_u}~\\memarg', r'\\hex{2D}', r'[\\I32] \\to [\\I32]', r'valid-loadn', r'exec-loadn'),\n    Instruction(r'\\I32.\\LOAD\\K{16\\_s}~\\memarg', r'\\hex{2E}', r'[\\I32] \\to [\\I32]', r'valid-loadn', r'exec-loadn'),\n    Instruction(r'\\I32.\\LOAD\\K{16\\_u}~\\memarg', r'\\hex{2F}', r'[\\I32] \\to [\\I32]', r'valid-loadn', r'exec-loadn'),\n    Instruction(r'\\I64.\\LOAD\\K{8\\_s}~\\memarg', r'\\hex{30}', r'[\\I32] \\to [\\I64]', r'valid-loadn', r'exec-loadn'),\n    Instruction(r'\\I64.\\LOAD\\K{8\\_u}~\\memarg', r'\\hex{31}', r'[\\I32] \\to [\\I64]', r'valid-loadn', r'exec-loadn'),\n    Instruction(r'\\I64.\\LOAD\\K{16\\_s}~\\memarg', r'\\hex{32}', r'[\\I32] \\to [\\I64]', r'valid-loadn', r'exec-loadn'),\n    Instruction(r'\\I64.\\LOAD\\K{16\\_u}~\\memarg', r'\\hex{33}', r'[\\I32] \\to [\\I64]', r'valid-loadn', r'exec-loadn'),\n    Instruction(r'\\I64.\\LOAD\\K{32\\_s}~\\memarg', r'\\hex{34}', r'[\\I32] \\to [\\I64]', r'valid-loadn', r'exec-loadn'),\n    Instruction(r'\\I64.\\LOAD\\K{32\\_u}~\\memarg', r'\\hex{35}', r'[\\I32] \\to [\\I64]', r'valid-loadn', r'exec-loadn'),\n    Instruction(r'\\I32.\\STORE~\\memarg', r'\\hex{36}', r'[\\I32~\\I32] \\to []', r'valid-store', r'exec-store'),\n    Instruction(r'\\I64.\\STORE~\\memarg', r'\\hex{37}', r'[\\I32~\\I64] \\to []', r'valid-store', r'exec-store'),\n    Instruction(r'\\F32.\\STORE~\\memarg', r'\\hex{38}', r'[\\I32~\\F32] \\to []', r'valid-store', r'exec-store'),\n    Instruction(r'\\F64.\\STORE~\\memarg', r'\\hex{39}', r'[\\I32~\\F64] \\to []', r'valid-store', r'exec-store'),\n    Instruction(r'\\I32.\\STORE\\K{8}~\\memarg', r'\\hex{3A}', r'[\\I32~\\I32] \\to []', r'valid-storen', r'exec-storen'),\n    Instruction(r'\\I32.\\STORE\\K{16}~\\memarg', r'\\hex{3B}', r'[\\I32~\\I32] \\to []', r'valid-storen', r'exec-storen'),\n    Instruction(r'\\I64.\\STORE\\K{8}~\\memarg', r'\\hex{3C}', r'[\\I32~\\I64] \\to []', r'valid-storen', r'exec-storen'),\n    Instruction(r'\\I64.\\STORE\\K{16}~\\memarg', r'\\hex{3D}', r'[\\I32~\\I64] \\to []', r'valid-storen', r'exec-storen'),\n    Instruction(r'\\I64.\\STORE\\K{32}~\\memarg', r'\\hex{3E}', r'[\\I32~\\I64] \\to []', r'valid-storen', r'exec-storen'),\n    Instruction(r'\\MEMORYSIZE', r'\\hex{3F}', r'[] \\to [\\I32]', r'valid-memory.size', r'exec-memory.size'),\n    Instruction(r'\\MEMORYGROW', r'\\hex{40}', r'[\\I32] \\to [\\I32]', r'valid-memory.grow', r'exec-memory.grow'),\n    Instruction(r'\\I32.\\CONST~\\i32', r'\\hex{41}', r'[] \\to [\\I32]', r'valid-const', r'exec-const'),\n    Instruction(r'\\I64.\\CONST~\\i64', r'\\hex{42}', r'[] \\to [\\I64]', r'valid-const', r'exec-const'),\n    Instruction(r'\\F32.\\CONST~\\f32', r'\\hex{43}', r'[] \\to [\\F32]', r'valid-const', r'exec-const'),\n    Instruction(r'\\F64.\\CONST~\\f64', r'\\hex{44}', r'[] \\to [\\F64]', r'valid-const', r'exec-const'),\n    Instruction(r'\\I32.\\EQZ', r'\\hex{45}', r'[\\I32] \\to [\\I32]', r'valid-testop', r'exec-testop', r'op-ieqz'),\n    Instruction(r'\\I32.\\EQ', r'\\hex{46}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-ieq'),\n    Instruction(r'\\I32.\\NE', r'\\hex{47}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-ine'),\n    Instruction(r'\\I32.\\LT\\K{\\_s}', r'\\hex{48}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-ilt_s'),\n    Instruction(r'\\I32.\\LT\\K{\\_u}', r'\\hex{49}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-ilt_u'),\n    Instruction(r'\\I32.\\GT\\K{\\_s}', r'\\hex{4A}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-igt_s'),\n    Instruction(r'\\I32.\\GT\\K{\\_u}', r'\\hex{4B}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-igt_u'),\n    Instruction(r'\\I32.\\LE\\K{\\_s}', r'\\hex{4C}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-ile_s'),\n    Instruction(r'\\I32.\\LE\\K{\\_u}', r'\\hex{4D}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-ile_u'),\n    Instruction(r'\\I32.\\GE\\K{\\_s}', r'\\hex{4E}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-ige_s'),\n    Instruction(r'\\I32.\\GE\\K{\\_u}', r'\\hex{4F}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-ige_u'),\n    Instruction(r'\\I64.\\EQZ', r'\\hex{50}', r'[\\I64] \\to [\\I32]', r'valid-testop', r'exec-testop', r'op-ieqz'),\n    Instruction(r'\\I64.\\EQ', r'\\hex{51}', r'[\\I64~\\I64] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-ieq'),\n    Instruction(r'\\I64.\\NE', r'\\hex{52}', r'[\\I64~\\I64] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-ine'),\n    Instruction(r'\\I64.\\LT\\K{\\_s}', r'\\hex{53}', r'[\\I64~\\I64] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-ilt_s'),\n    Instruction(r'\\I64.\\LT\\K{\\_u}', r'\\hex{54}', r'[\\I64~\\I64] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-ilt_u'),\n    Instruction(r'\\I64.\\GT\\K{\\_s}', r'\\hex{55}', r'[\\I64~\\I64] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-igt_s'),\n    Instruction(r'\\I64.\\GT\\K{\\_u}', r'\\hex{56}', r'[\\I64~\\I64] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-igt_u'),\n    Instruction(r'\\I64.\\LE\\K{\\_s}', r'\\hex{57}', r'[\\I64~\\I64] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-ile_s'),\n    Instruction(r'\\I64.\\LE\\K{\\_u}', r'\\hex{58}', r'[\\I64~\\I64] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-ile_u'),\n    Instruction(r'\\I64.\\GE\\K{\\_s}', r'\\hex{59}', r'[\\I64~\\I64] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-ige_s'),\n    Instruction(r'\\I64.\\GE\\K{\\_u}', r'\\hex{5A}', r'[\\I64~\\I64] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-ige_u'),\n    Instruction(r'\\F32.\\EQ', r'\\hex{5B}', r'[\\F32~\\F32] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-feq'),\n    Instruction(r'\\F32.\\NE', r'\\hex{5C}', r'[\\F32~\\F32] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-fne'),\n    Instruction(r'\\F32.\\LT', r'\\hex{5D}', r'[\\F32~\\F32] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-flt'),\n    Instruction(r'\\F32.\\GT', r'\\hex{5E}', r'[\\F32~\\F32] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-fgt'),\n    Instruction(r'\\F32.\\LE', r'\\hex{5F}', r'[\\F32~\\F32] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-fle'),\n    Instruction(r'\\F32.\\GE', r'\\hex{60}', r'[\\F32~\\F32] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-fge'),\n    Instruction(r'\\F64.\\EQ', r'\\hex{61}', r'[\\F64~\\F64] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-feq'),\n    Instruction(r'\\F64.\\NE', r'\\hex{62}', r'[\\F64~\\F64] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-fne'),\n    Instruction(r'\\F64.\\LT', r'\\hex{63}', r'[\\F64~\\F64] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-flt'),\n    Instruction(r'\\F64.\\GT', r'\\hex{64}', r'[\\F64~\\F64] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-fgt'),\n    Instruction(r'\\F64.\\LE', r'\\hex{65}', r'[\\F64~\\F64] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-fle'),\n    Instruction(r'\\F64.\\GE', r'\\hex{66}', r'[\\F64~\\F64] \\to [\\I32]', r'valid-relop', r'exec-relop', r'op-fge'),\n    Instruction(r'\\I32.\\CLZ', r'\\hex{67}', r'[\\I32] \\to [\\I32]', r'valid-unop', r'exec-unop', r'op-iclz'),\n    Instruction(r'\\I32.\\CTZ', r'\\hex{68}', r'[\\I32] \\to [\\I32]', r'valid-unop', r'exec-unop', r'op-ictz'),\n    Instruction(r'\\I32.\\POPCNT', r'\\hex{69}', r'[\\I32] \\to [\\I32]', r'valid-unop', r'exec-unop', r'op-ipopcnt'),\n    Instruction(r'\\I32.\\ADD', r'\\hex{6A}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-binop', r'exec-binop', r'op-iadd'),\n    Instruction(r'\\I32.\\SUB', r'\\hex{6B}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-binop', r'exec-binop', r'op-isub'),\n    Instruction(r'\\I32.\\MUL', r'\\hex{6C}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-binop', r'exec-binop', r'op-imul'),\n    Instruction(r'\\I32.\\DIV\\K{\\_s}', r'\\hex{6D}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-binop', r'exec-binop', r'op-idiv_s'),\n    Instruction(r'\\I32.\\DIV\\K{\\_u}', r'\\hex{6E}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-binop', r'exec-binop', r'op-idiv_u'),\n    Instruction(r'\\I32.\\REM\\K{\\_s}', r'\\hex{6F}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-binop', r'exec-binop', r'op-irem_s'),\n    Instruction(r'\\I32.\\REM\\K{\\_u}', r'\\hex{70}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-binop', r'exec-binop', r'op-irem_u'),\n    Instruction(r'\\I32.\\AND', r'\\hex{71}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-binop', r'exec-binop', r'op-iand'),\n    Instruction(r'\\I32.\\OR', r'\\hex{72}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-binop', r'exec-binop', r'op-ior'),\n    Instruction(r'\\I32.\\XOR', r'\\hex{73}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-binop', r'exec-binop', r'op-ixor'),\n    Instruction(r'\\I32.\\SHL', r'\\hex{74}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-binop', r'exec-binop', r'op-ishl'),\n    Instruction(r'\\I32.\\SHR\\K{\\_s}', r'\\hex{75}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-binop', r'exec-binop', r'op-ishr_s'),\n    Instruction(r'\\I32.\\SHR\\K{\\_u}', r'\\hex{76}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-binop', r'exec-binop', r'op-ishr_u'),\n    Instruction(r'\\I32.\\ROTL', r'\\hex{77}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-binop', r'exec-binop', r'op-irotl'),\n    Instruction(r'\\I32.\\ROTR', r'\\hex{78}', r'[\\I32~\\I32] \\to [\\I32]', r'valid-binop', r'exec-binop', r'op-irotr'),\n    Instruction(r'\\I64.\\CLZ', r'\\hex{79}', r'[\\I64] \\to [\\I64]', r'valid-unop', r'exec-unop', r'op-iclz'),\n    Instruction(r'\\I64.\\CTZ', r'\\hex{7A}', r'[\\I64] \\to [\\I64]', r'valid-unop', r'exec-unop', r'op-ictz'),\n    Instruction(r'\\I64.\\POPCNT', r'\\hex{7B}', r'[\\I64] \\to [\\I64]', r'valid-unop', r'exec-unop', r'op-ipopcnt'),\n    Instruction(r'\\I64.\\ADD', r'\\hex{7C}', r'[\\I64~\\I64] \\to [\\I64]', r'valid-binop', r'exec-binop', r'op-iadd'),\n    Instruction(r'\\I64.\\SUB', r'\\hex{7D}', r'[\\I64~\\I64] \\to [\\I64]', r'valid-binop', r'exec-binop', r'op-isub'),\n    Instruction(r'\\I64.\\MUL', r'\\hex{7E}', r'[\\I64~\\I64] \\to [\\I64]', r'valid-binop', r'exec-binop', r'op-imul'),\n    Instruction(r'\\I64.\\DIV\\K{\\_s}', r'\\hex{7F}', r'[\\I64~\\I64] \\to [\\I64]', r'valid-binop', r'exec-binop', r'op-idiv_s'),\n    Instruction(r'\\I64.\\DIV\\K{\\_u}', r'\\hex{80}', r'[\\I64~\\I64] \\to [\\I64]', r'valid-binop', r'exec-binop', r'op-idiv_u'),\n    Instruction(r'\\I64.\\REM\\K{\\_s}', r'\\hex{81}', r'[\\I64~\\I64] \\to [\\I64]', r'valid-binop', r'exec-binop', r'op-irem_s'),\n    Instruction(r'\\I64.\\REM\\K{\\_u}', r'\\hex{82}', r'[\\I64~\\I64] \\to [\\I64]', r'valid-binop', r'exec-binop', r'op-irem_u'),\n    Instruction(r'\\I64.\\AND', r'\\hex{83}', r'[\\I64~\\I64] \\to [\\I64]', r'valid-binop', r'exec-binop', r'op-iand'),\n    Instruction(r'\\I64.\\OR', r'\\hex{84}', r'[\\I64~\\I64] \\to [\\I64]', r'valid-binop', r'exec-binop', r'op-ior'),\n    Instruction(r'\\I64.\\XOR', r'\\hex{85}', r'[\\I64~\\I64] \\to [\\I64]', r'valid-binop', r'exec-binop', r'op-ixor'),\n    Instruction(r'\\I64.\\SHL', r'\\hex{86}', r'[\\I64~\\I64] \\to [\\I64]', r'valid-binop', r'exec-binop', r'op-ishl'),\n    Instruction(r'\\I64.\\SHR\\K{\\_s}', r'\\hex{87}', r'[\\I64~\\I64] \\to [\\I64]', r'valid-binop', r'exec-binop', r'op-ishr_s'),\n    Instruction(r'\\I64.\\SHR\\K{\\_u}', r'\\hex{88}', r'[\\I64~\\I64] \\to [\\I64]', r'valid-binop', r'exec-binop', r'op-ishr_u'),\n    Instruction(r'\\I64.\\ROTL', r'\\hex{89}', r'[\\I64~\\I64] \\to [\\I64]', r'valid-binop', r'exec-binop', r'op-irotl'),\n    Instruction(r'\\I64.\\ROTR', r'\\hex{8A}', r'[\\I64~\\I64] \\to [\\I64]', r'valid-binop', r'exec-binop', r'op-irotr'),\n    Instruction(r'\\F32.\\ABS', r'\\hex{8B}', r'[\\F32] \\to [\\F32]', r'valid-unop', r'exec-unop', r'op-fabs'),\n    Instruction(r'\\F32.\\NEG', r'\\hex{8C}', r'[\\F32] \\to [\\F32]', r'valid-unop', r'exec-unop', r'op-fneg'),\n    Instruction(r'\\F32.\\CEIL', r'\\hex{8D}', r'[\\F32] \\to [\\F32]', r'valid-unop', r'exec-unop', r'op-fceil'),\n    Instruction(r'\\F32.\\FLOOR', r'\\hex{8E}', r'[\\F32] \\to [\\F32]', r'valid-unop', r'exec-unop', r'op-ffloor'),\n    Instruction(r'\\F32.\\TRUNC', r'\\hex{8F}', r'[\\F32] \\to [\\F32]', r'valid-unop', r'exec-unop', r'op-ftrunc'),\n    Instruction(r'\\F32.\\NEAREST', r'\\hex{90}', r'[\\F32] \\to [\\F32]', r'valid-unop', r'exec-unop', r'op-fnearest'),\n    Instruction(r'\\F32.\\SQRT', r'\\hex{91}', r'[\\F32] \\to [\\F32]', r'valid-unop', r'exec-unop', r'op-fsqrt'),\n    Instruction(r'\\F32.\\ADD', r'\\hex{92}', r'[\\F32~\\F32] \\to [\\F32]', r'valid-binop', r'exec-binop', r'op-fadd'),\n    Instruction(r'\\F32.\\SUB', r'\\hex{93}', r'[\\F32~\\F32] \\to [\\F32]', r'valid-binop', r'exec-binop', r'op-fsub'),\n    Instruction(r'\\F32.\\MUL', r'\\hex{94}', r'[\\F32~\\F32] \\to [\\F32]', r'valid-binop', r'exec-binop', r'op-fmul'),\n    Instruction(r'\\F32.\\DIV', r'\\hex{95}', r'[\\F32~\\F32] \\to [\\F32]', r'valid-binop', r'exec-binop', r'op-fdiv'),\n    Instruction(r'\\F32.\\FMIN', r'\\hex{96}', r'[\\F32~\\F32] \\to [\\F32]', r'valid-binop', r'exec-binop', r'op-fmin'),\n    Instruction(r'\\F32.\\FMAX', r'\\hex{97}', r'[\\F32~\\F32] \\to [\\F32]', r'valid-binop', r'exec-binop', r'op-fmax'),\n    Instruction(r'\\F32.\\COPYSIGN', r'\\hex{98}', r'[\\F32~\\F32] \\to [\\F32]', r'valid-binop', r'exec-binop', r'op-fcopysign'),\n    Instruction(r'\\F64.\\ABS', r'\\hex{99}', r'[\\F64] \\to [\\F64]', r'valid-unop', r'exec-unop', r'op-fabs'),\n    Instruction(r'\\F64.\\NEG', r'\\hex{9A}', r'[\\F64] \\to [\\F64]', r'valid-unop', r'exec-unop', r'op-fneg'),\n    Instruction(r'\\F64.\\CEIL', r'\\hex{9B}', r'[\\F64] \\to [\\F64]', r'valid-unop', r'exec-unop', r'op-fceil'),\n    Instruction(r'\\F64.\\FLOOR', r'\\hex{9C}', r'[\\F64] \\to [\\F64]', r'valid-unop', r'exec-unop', r'op-ffloor'),\n    Instruction(r'\\F64.\\TRUNC', r'\\hex{9D}', r'[\\F64] \\to [\\F64]', r'valid-unop', r'exec-unop', r'op-ftrunc'),\n    Instruction(r'\\F64.\\NEAREST', r'\\hex{9E}', r'[\\F64] \\to [\\F64]', r'valid-unop', r'exec-unop', r'op-fnearest'),\n    Instruction(r'\\F64.\\SQRT', r'\\hex{9F}', r'[\\F64] \\to [\\F64]', r'valid-unop', r'exec-unop', r'op-fsqrt'),\n    Instruction(r'\\F64.\\ADD', r'\\hex{A0}', r'[\\F64~\\F64] \\to [\\F64]', r'valid-binop', r'exec-binop', r'op-fadd'),\n    Instruction(r'\\F64.\\SUB', r'\\hex{A1}', r'[\\F64~\\F64] \\to [\\F64]', r'valid-binop', r'exec-binop', r'op-fsub'),\n    Instruction(r'\\F64.\\MUL', r'\\hex{A2}', r'[\\F64~\\F64] \\to [\\F64]', r'valid-binop', r'exec-binop', r'op-fmul'),\n    Instruction(r'\\F64.\\DIV', r'\\hex{A3}', r'[\\F64~\\F64] \\to [\\F64]', r'valid-binop', r'exec-binop', r'op-fdiv'),\n    Instruction(r'\\F64.\\FMIN', r'\\hex{A4}', r'[\\F64~\\F64] \\to [\\F64]', r'valid-binop', r'exec-binop', r'op-fmin'),\n    Instruction(r'\\F64.\\FMAX', r'\\hex{A5}', r'[\\F64~\\F64] \\to [\\F64]', r'valid-binop', r'exec-binop', r'op-fmax'),\n    Instruction(r'\\F64.\\COPYSIGN', r'\\hex{A6}', r'[\\F64~\\F64] \\to [\\F64]', r'valid-binop', r'exec-binop', r'op-fcopysign'),\n    Instruction(r'\\I32.\\WRAP\\K{\\_}\\I64', r'\\hex{A7}', r'[\\I64] \\to [\\I32]', r'valid-cvtop', r'exec-cvtop', r'op-wrap'),\n    Instruction(r'\\I32.\\TRUNC\\K{\\_}\\F32\\K{\\_s}', r'\\hex{A8}', r'[\\F32] \\to [\\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_s'),\n    Instruction(r'\\I32.\\TRUNC\\K{\\_}\\F32\\K{\\_u}', r'\\hex{A9}', r'[\\F32] \\to [\\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_u'),\n    Instruction(r'\\I32.\\TRUNC\\K{\\_}\\F64\\K{\\_s}', r'\\hex{AA}', r'[\\F64] \\to [\\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_s'),\n    Instruction(r'\\I32.\\TRUNC\\K{\\_}\\F64\\K{\\_u}', r'\\hex{AB}', r'[\\F64] \\to [\\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_u'),\n    Instruction(r'\\I64.\\EXTEND\\K{\\_}\\I32\\K{\\_s}', r'\\hex{AC}', r'[\\I32] \\to [\\I64]', r'valid-cvtop', r'exec-cvtop', r'op-extend_s'),\n    Instruction(r'\\I64.\\EXTEND\\K{\\_}\\I32\\K{\\_u}', r'\\hex{AD}', r'[\\I32] \\to [\\I64]', r'valid-cvtop', r'exec-cvtop', r'op-extend_u'),\n    Instruction(r'\\I64.\\TRUNC\\K{\\_}\\F32\\K{\\_s}', r'\\hex{AE}', r'[\\F32] \\to [\\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_s'),\n    Instruction(r'\\I64.\\TRUNC\\K{\\_}\\F32\\K{\\_u}', r'\\hex{AF}', r'[\\F32] \\to [\\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_u'),\n    Instruction(r'\\I64.\\TRUNC\\K{\\_}\\F64\\K{\\_s}', r'\\hex{B0}', r'[\\F64] \\to [\\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_s'),\n    Instruction(r'\\I64.\\TRUNC\\K{\\_}\\F64\\K{\\_u}', r'\\hex{B1}', r'[\\F64] \\to [\\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_u'),\n    Instruction(r'\\F32.\\CONVERT\\K{\\_}\\I32\\K{\\_s}', r'\\hex{B2}', r'[\\I32] \\to [\\F32]', r'valid-cvtop', r'exec-cvtop', r'op-convert_s'),\n    Instruction(r'\\F32.\\CONVERT\\K{\\_}\\I32\\K{\\_u}', r'\\hex{B3}', r'[\\I32] \\to [\\F32]', r'valid-cvtop', r'exec-cvtop', r'op-convert_u'),\n    Instruction(r'\\F32.\\CONVERT\\K{\\_}\\I64\\K{\\_s}', r'\\hex{B4}', r'[\\I64] \\to [\\F32]', r'valid-cvtop', r'exec-cvtop', r'op-convert_s'),\n    Instruction(r'\\F32.\\CONVERT\\K{\\_}\\I64\\K{\\_u}', r'\\hex{B5}', r'[\\I64] \\to [\\F32]', r'valid-cvtop', r'exec-cvtop', r'op-convert_u'),\n    Instruction(r'\\F32.\\DEMOTE\\K{\\_}\\F64', r'\\hex{B6}', r'[\\F64] \\to [\\F32]', r'valid-cvtop', r'exec-cvtop', r'op-demote'),\n    Instruction(r'\\F64.\\CONVERT\\K{\\_}\\I32\\K{\\_s}', r'\\hex{B7}', r'[\\I32] \\to [\\F64]', r'valid-cvtop', r'exec-cvtop', r'op-convert_s'),\n    Instruction(r'\\F64.\\CONVERT\\K{\\_}\\I32\\K{\\_u}', r'\\hex{B8}', r'[\\I32] \\to [\\F64]', r'valid-cvtop', r'exec-cvtop', r'op-convert_u'),\n    Instruction(r'\\F64.\\CONVERT\\K{\\_}\\I64\\K{\\_s}', r'\\hex{B9}', r'[\\I64] \\to [\\F64]', r'valid-cvtop', r'exec-cvtop', r'op-convert_s'),\n    Instruction(r'\\F64.\\CONVERT\\K{\\_}\\I64\\K{\\_u}', r'\\hex{BA}', r'[\\I64] \\to [\\F64]', r'valid-cvtop', r'exec-cvtop', r'op-convert_u'),\n    Instruction(r'\\F64.\\PROMOTE\\K{\\_}\\F32', r'\\hex{BB}', r'[\\F32] \\to [\\F64]', r'valid-cvtop', r'exec-cvtop', r'op-promote'),\n    Instruction(r'\\I32.\\REINTERPRET\\K{\\_}\\F32', r'\\hex{BC}', r'[\\F32] \\to [\\I32]', r'valid-cvtop', r'exec-cvtop', r'op-reinterpret'),\n    Instruction(r'\\I64.\\REINTERPRET\\K{\\_}\\F64', r'\\hex{BD}', r'[\\F64] \\to [\\I64]', r'valid-cvtop', r'exec-cvtop', r'op-reinterpret'),\n    Instruction(r'\\F32.\\REINTERPRET\\K{\\_}\\I32', r'\\hex{BE}', r'[\\I32] \\to [\\F32]', r'valid-cvtop', r'exec-cvtop', r'op-reinterpret'),\n    Instruction(r'\\F64.\\REINTERPRET\\K{\\_}\\I64', r'\\hex{BF}', r'[\\I64] \\to [\\F64]', r'valid-cvtop', r'exec-cvtop', r'op-reinterpret'),\n    Instruction(r'\\I32.\\EXTEND\\K{8\\_s}', r'\\hex{C0}', r'[\\I32] \\to [\\I32]', r'valid-unop', r'exec-unop', r'op-iextendn_s'),\n    Instruction(r'\\I32.\\EXTEND\\K{16\\_s}', r'\\hex{C1}', r'[\\I32] \\to [\\I32]', r'valid-unop', r'exec-unop', r'op-iextendn_s'),\n    Instruction(r'\\I64.\\EXTEND\\K{8\\_s}', r'\\hex{C2}', r'[\\I64] \\to [\\I64]', r'valid-unop', r'exec-unop', r'op-iextendn_s'),\n    Instruction(r'\\I64.\\EXTEND\\K{16\\_s}', r'\\hex{C3}', r'[\\I64] \\to [\\I64]', r'valid-unop', r'exec-unop', r'op-iextendn_s'),\n    Instruction(r'\\I64.\\EXTEND\\K{32\\_s}', r'\\hex{C4}', r'[\\I64] \\to [\\I64]', r'valid-unop', r'exec-unop', r'op-iextendn_s'),\n    Instruction(None, r'\\hex{C5}'),\n    Instruction(None, r'\\hex{C6}'),\n    Instruction(None, r'\\hex{C7}'),\n    Instruction(None, r'\\hex{C8}'),\n    Instruction(None, r'\\hex{C9}'),\n    Instruction(None, r'\\hex{CA}'),\n    Instruction(None, r'\\hex{CB}'),\n    Instruction(None, r'\\hex{CC}'),\n    Instruction(None, r'\\hex{CD}'),\n    Instruction(None, r'\\hex{CE}'),\n    Instruction(None, r'\\hex{CF}'),\n    Instruction(r'\\REFNULL~t', r'\\hex{D0}', r'[] \\to [t]', r'valid-ref.null', r'exec-ref.null'),\n    Instruction(r'\\REFISNULL', r'\\hex{D1}', r'[t] \\to [\\I32]', r'valid-ref.is_null', r'exec-ref.is_null'),\n    Instruction(r'\\REFFUNC~x', r'\\hex{D2}', r'[] \\to [\\FUNCREF]', r'valid-ref.func', r'exec-ref.func'),\n    Instruction(None, r'\\hex{D3}'),\n    Instruction(None, r'\\hex{D4}'),\n    Instruction(None, r'\\hex{D5}'),\n    Instruction(None, r'\\hex{D6}'),\n    Instruction(None, r'\\hex{D7}'),\n    Instruction(None, r'\\hex{D8}'),\n    Instruction(None, r'\\hex{D9}'),\n    Instruction(None, r'\\hex{DA}'),\n    Instruction(None, r'\\hex{DB}'),\n    Instruction(None, r'\\hex{DC}'),\n    Instruction(None, r'\\hex{DD}'),\n    Instruction(None, r'\\hex{DE}'),\n    Instruction(None, r'\\hex{DF}'),\n    Instruction(None, r'\\hex{E0}'),\n    Instruction(None, r'\\hex{E1}'),\n    Instruction(None, r'\\hex{E2}'),\n    Instruction(None, r'\\hex{E3}'),\n    Instruction(None, r'\\hex{E4}'),\n    Instruction(None, r'\\hex{E5}'),\n    Instruction(None, r'\\hex{E6}'),\n    Instruction(None, r'\\hex{E7}'),\n    Instruction(None, r'\\hex{E8}'),\n    Instruction(None, r'\\hex{E9}'),\n    Instruction(None, r'\\hex{EA}'),\n    Instruction(None, r'\\hex{EB}'),\n    Instruction(None, r'\\hex{EC}'),\n    Instruction(None, r'\\hex{ED}'),\n    Instruction(None, r'\\hex{EE}'),\n    Instruction(None, r'\\hex{EF}'),\n    Instruction(None, r'\\hex{F0}'),\n    Instruction(None, r'\\hex{F1}'),\n    Instruction(None, r'\\hex{F2}'),\n    Instruction(None, r'\\hex{F3}'),\n    Instruction(None, r'\\hex{F4}'),\n    Instruction(None, r'\\hex{F5}'),\n    Instruction(None, r'\\hex{F6}'),\n    Instruction(None, r'\\hex{F7}'),\n    Instruction(None, r'\\hex{F8}'),\n    Instruction(None, r'\\hex{F9}'),\n    Instruction(None, r'\\hex{FA}'),\n    Instruction(None, r'\\hex{FB}'),\n    Instruction(r'\\I32.\\TRUNC\\K{\\_sat\\_}\\F32\\K{\\_s}', r'\\hex{FC}~\\hex{00}', r'[\\F32] \\to [\\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat_s'),\n    Instruction(r'\\I32.\\TRUNC\\K{\\_sat\\_}\\F32\\K{\\_u}', r'\\hex{FC}~\\hex{01}', r'[\\F32] \\to [\\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat_u'),\n    Instruction(r'\\I32.\\TRUNC\\K{\\_sat\\_}\\F64\\K{\\_s}', r'\\hex{FC}~\\hex{02}', r'[\\F64] \\to [\\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat_s'),\n    Instruction(r'\\I32.\\TRUNC\\K{\\_sat\\_}\\F64\\K{\\_u}', r'\\hex{FC}~\\hex{03}', r'[\\F64] \\to [\\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat_u'),\n    Instruction(r'\\I64.\\TRUNC\\K{\\_sat\\_}\\F32\\K{\\_s}', r'\\hex{FC}~\\hex{04}', r'[\\F32] \\to [\\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat_s'),\n    Instruction(r'\\I64.\\TRUNC\\K{\\_sat\\_}\\F32\\K{\\_u}', r'\\hex{FC}~\\hex{05}', r'[\\F32] \\to [\\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat_u'),\n    Instruction(r'\\I64.\\TRUNC\\K{\\_sat\\_}\\F64\\K{\\_s}', r'\\hex{FC}~\\hex{06}', r'[\\F64] \\to [\\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat_s'),\n    Instruction(r'\\I64.\\TRUNC\\K{\\_sat\\_}\\F64\\K{\\_u}', r'\\hex{FC}~\\hex{07}', r'[\\F64] \\to [\\I64]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat_u'),\n    Instruction(r'\\MEMORYINIT', r'\\hex{FC}~\\hex{08}', r'[\\I32~\\I32~\\I32] \\to []', r'valid-memory.init', r'exec-memory.init'),\n    Instruction(r'\\DATADROP', r'\\hex{FC}~\\hex{09}', r'[] \\to []', r'valid-data.drop', r'exec-data.drop'),\n    Instruction(r'\\MEMORYCOPY', r'\\hex{FC}~\\hex{0A}', r'[\\I32~\\I32~\\I32] \\to []', r'valid-memory.copy', r'exec-memory.copy'),\n    Instruction(r'\\MEMORYFILL', r'\\hex{FC}~\\hex{0B}', r'[\\I32~\\I32~\\I32] \\to []', r'valid-memory.fill', r'exec-memory.fill'),\n    Instruction(r'\\TABLEINIT', r'\\hex{FC}~\\hex{0C}', r'[\\I32~\\I32~\\I32] \\to []', r'valid-table.init', r'exec-table.init'),\n    Instruction(r'\\ELEMDROP', r'\\hex{FC}~\\hex{0D}', r'[] \\to []', r'valid-elem.drop', r'exec-elem.drop'),\n    Instruction(r'\\TABLECOPY', r'\\hex{FC}~\\hex{0E}', r'[\\I32~\\I32~\\I32] \\to []', r'valid-table.copy', r'exec-table.copy'),\n    Instruction(r'\\TABLEGROW', r'\\hex{FC}~\\hex{0F}', r'[t~\\I32] \\to []', r'valid-table.grow', r'exec-table.grow'),\n    Instruction(r'\\TABLESIZE', r'\\hex{FC}~\\hex{10}', r'[] \\to []', r'valid-table.size', r'exec-table.size'),\n    Instruction(r'\\TABLEFILL', r'\\hex{FC}~\\hex{11}', r'[\\I32~t~\\I32] \\to []', r'valid-table.fill', r'exec-table.fill'),\n]\n\ndef ColumnWidth(n):\n    return max([len(instr[n]) for instr in INSTRUCTIONS])\n\nCOLUMN_WIDTHS = [ColumnWidth(i) for i in range(len(COLUMNS))]\nDIVIDER = '  '.join('=' * width for width in COLUMN_WIDTHS)\n\ndef Row(columns):\n    return '  '.join(('{:%d}' % COLUMN_WIDTHS[i]).format(column)\n                     for i, column in enumerate(columns))\n\nif __name__ == '__main__':\n    with open(INDEX_INSTRUCTIONS_RST, 'w') as f:\n        print(HEADER, file=f)\n        print(DIVIDER, file=f)\n        print(Row(COLUMNS), file=f)\n        print(DIVIDER, file=f)\n\n        for instr in INSTRUCTIONS:\n          print(Row(instr), file=f)\n\n        print(DIVIDER, file=f)\n"
  },
  {
    "path": "document/core/appendix/implementation.rst",
    "content": ".. index:: ! implementation limitations, implementation\n.. _impl:\n\nImplementation Limitations\n--------------------------\n\nImplementations typically impose additional restrictions on a number of aspects of a WebAssembly module or execution.\nThese may stem from:\n\n* physical resource limits,\n* constraints imposed by the embedder or its environment,\n* limitations of selected implementation strategies.\n\nThis section lists allowed limitations.\nWhere restrictions take the form of numeric limits, no minimum requirements are given,\nnor are the limits assumed to be concrete, fixed numbers.\nHowever, it is expected that all implementations have \"reasonably\" large limits  to enable common applications.\n\n.. note::\n   A conforming implementation is not allowed to leave out individual *features*.\n   However, designated subsets of WebAssembly may be specified in the future.\n\n\nSyntactic Limits\n~~~~~~~~~~~~~~~~\n\n.. index:: abstract syntax, module, type, function, table, memory, global, element, data, import, export, parameter, result, local, structured control instruction, instruction, name, Unicode, character\n.. _impl-syntax:\n\nStructure\n.........\n\nAn implementation may impose restrictions on the following dimensions of a module:\n\n* the number of :ref:`types <syntax-type>` in a :ref:`module <syntax-module>`\n* the number of :ref:`functions <syntax-func>` in a :ref:`module <syntax-module>`, including imports\n* the number of :ref:`tables <syntax-table>` in a :ref:`module <syntax-module>`, including imports\n* the number of :ref:`memories <syntax-mem>` in a :ref:`module <syntax-module>`, including imports\n* the number of :ref:`globals <syntax-global>` in a :ref:`module <syntax-module>`, including imports\n* the number of :ref:`element segments <syntax-elem>` in a :ref:`module <syntax-module>`\n* the number of :ref:`data segments <syntax-data>` in a :ref:`module <syntax-module>`\n* the number of :ref:`imports <syntax-import>` to a :ref:`module <syntax-module>`\n* the number of :ref:`exports <syntax-export>` from a :ref:`module <syntax-module>`\n* the number of parameters in a :ref:`function type <syntax-functype>`\n* the number of results in a :ref:`function type <syntax-functype>`\n* the number of parameters in a :ref:`block type <syntax-blocktype>`\n* the number of results in a :ref:`block type <syntax-blocktype>`\n* the number of :ref:`locals <syntax-local>` in a :ref:`function <syntax-func>`\n* the size of a :ref:`function <syntax-func>` body\n* the size of a :ref:`structured control instruction <syntax-instr-control>`\n* the number of :ref:`structured control instructions <syntax-instr-control>` in a :ref:`function <syntax-func>`\n* the nesting depth of :ref:`structured control instructions <syntax-instr-control>`\n* the number of :ref:`label indices <syntax-labelidx>` in a |brtable| instruction\n* the length of an :ref:`element segment <syntax-elem>`\n* the length of a :ref:`data segment <syntax-data>`\n* the length of a :ref:`name <syntax-name>`\n* the range of :ref:`characters <syntax-char>` in a :ref:`name <syntax-name>`\n\nIf the limits of an implementation are exceeded for a given module,\nthen the implementation may reject the :ref:`validation <valid>`, compilation, or :ref:`instantiation <exec-instantiation>` of that module with an embedder-specific error.\n\n.. note::\n   The last item allows :ref:`embedders <embedder>` that operate in limited environments without support for\n   |Unicode|_ to limit the\n   names of :ref:`imports <syntax-import>` and :ref:`exports <syntax-export>`\n   to common subsets like |ASCII|_.\n\n\n.. index:: binary format, module, section, function, code\n.. _impl-binary:\n\nBinary Format\n.............\n\nFor a module given in :ref:`binary format <binary>`, additional limitations may be imposed on the following dimensions:\n\n* the size of a :ref:`module <binary-module>`\n* the size of any :ref:`section <binary-section>`\n* the size of an individual function's :ref:`code <binary-code>`\n* the number of :ref:`sections <binary-section>`\n\n\n.. index:: text format, source text, token, identifier, character, unicode\n.. _impl-text:\n\nText Format\n...........\n\nFor a module given in :ref:`text format <text>`, additional limitations may be imposed on the following dimensions:\n\n* the size of the :ref:`source text <source>`\n* the size of any syntactic element\n* the size of an individual :ref:`token <text-token>`\n* the nesting depth of :ref:`folded instructions <text-foldedinstr>`\n* the length of symbolic :ref:`identifiers <text-id>`\n* the range of literal :ref:`characters <text-char>` allowed in the :ref:`source text <source>`\n\n\n.. index:: validation, function\n.. _impl-valid:\n\nValidation\n~~~~~~~~~~\n\nAn implementation may defer :ref:`validation <valid>` of individual :ref:`functions <syntax-func>` until they are first :ref:`invoked <exec-invoke>`.\n\nIf a function turns out to be invalid, then the invocation, and every consecutive call to the same function, results in a :ref:`trap <trap>`.\n\n.. note::\n   This is to allow implementations to use interpretation or just-in-time compilation for functions.\n   The function must still be fully validated before execution of its body begins.\n\n\n.. index:: execution, module instance, function instance, table instance, memory instance, global instance, allocation, frame, label, value\n.. _impl-exec:\n\nExecution\n~~~~~~~~~\n\nRestrictions on the following dimensions may be imposed during :ref:`execution <exec>` of a WebAssembly program:\n\n* the number of allocated :ref:`module instances <syntax-moduleinst>`\n* the number of allocated :ref:`function instances <syntax-funcinst>`\n* the number of allocated :ref:`table instances <syntax-tableinst>`\n* the number of allocated :ref:`memory instances <syntax-meminst>`\n* the number of allocated :ref:`global instances <syntax-globalinst>`\n* the size of a :ref:`table instance <syntax-tableinst>`\n* the size of a :ref:`memory instance <syntax-meminst>`\n* the number of :ref:`frames <syntax-frame>` on the :ref:`stack <stack>`\n* the number of :ref:`labels <syntax-label>` on the :ref:`stack <stack>`\n* the number of :ref:`values <syntax-val>` on the :ref:`stack <stack>`\n\nIf the runtime limits of an implementation are exceeded during execution of a computation,\nthen it may terminate that computation and report an embedder-specific error to the invoking code.\n\nSome of the above limits may already be verified during instantiation, in which case an implementation may report exceedance in the same manner as for :ref:`syntactic limits <impl-syntax>`.\n\n.. note::\n   Concrete limits are usually not fixed but may be dependent on specifics, interdependent, vary over time, or depend on other implementation- or embedder-specific situations or events.\n"
  },
  {
    "path": "document/core/appendix/index-instructions.rst",
    "content": ".. DO NOT EDIT: This file is auto-generated by the gen-index-instructions.py script.\n\n.. index:: instruction\n.. _index-instr:\n\nIndex of Instructions\n---------------------\n\n=========================================  =========================  =============================================  =======================================  ===============================================================\nInstruction                                Binary Opcode              Type                                           Validation                               Execution                                                      \n=========================================  =========================  =============================================  =======================================  ===============================================================\n:math:`\\UNREACHABLE`                       :math:`\\hex{00}`           :math:`[t_1^\\ast] \\to [t_2^\\ast]`              :ref:`validation <valid-unreachable>`    :ref:`execution <exec-unreachable>`                            \n:math:`\\NOP`                               :math:`\\hex{01}`           :math:`[] \\to []`                              :ref:`validation <valid-nop>`            :ref:`execution <exec-nop>`                                    \n:math:`\\BLOCK~\\X{bt}`                      :math:`\\hex{02}`           :math:`[t_1^\\ast] \\to [t_2^\\ast]`              :ref:`validation <valid-block>`          :ref:`execution <exec-block>`                                  \n:math:`\\LOOP~\\X{bt}`                       :math:`\\hex{03}`           :math:`[t_1^\\ast] \\to [t_2^\\ast]`              :ref:`validation <valid-loop>`           :ref:`execution <exec-loop>`                                   \n:math:`\\IF~\\X{bt}`                         :math:`\\hex{04}`           :math:`[t_1^\\ast] \\to [t_2^\\ast]`              :ref:`validation <valid-if>`             :ref:`execution <exec-if>`                                     \n:math:`\\ELSE`                              :math:`\\hex{05}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{06}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{07}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{08}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{09}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{0A}`                                                                                                                                                                  \n:math:`\\END`                               :math:`\\hex{0B}`                                                                                                                                                                  \n:math:`\\BR~l`                              :math:`\\hex{0C}`           :math:`[t_1^\\ast~t^\\ast] \\to [t_2^\\ast]`       :ref:`validation <valid-br>`             :ref:`execution <exec-br>`                                     \n:math:`\\BRIF~l`                            :math:`\\hex{0D}`           :math:`[t^\\ast~\\I32] \\to [t^\\ast]`             :ref:`validation <valid-br_if>`          :ref:`execution <exec-br_if>`                                  \n:math:`\\BRTABLE~l^\\ast~l`                  :math:`\\hex{0E}`           :math:`[t_1^\\ast~t^\\ast~\\I32] \\to [t_2^\\ast]`  :ref:`validation <valid-br_table>`       :ref:`execution <exec-br_table>`                               \n:math:`\\RETURN`                            :math:`\\hex{0F}`           :math:`[t_1^\\ast~t^\\ast] \\to [t_2^\\ast]`       :ref:`validation <valid-return>`         :ref:`execution <exec-return>`                                 \n:math:`\\CALL~x`                            :math:`\\hex{10}`           :math:`[t_1^\\ast] \\to [t_2^\\ast]`              :ref:`validation <valid-call>`           :ref:`execution <exec-call>`                                   \n:math:`\\CALLINDIRECT~x~y`                  :math:`\\hex{11}`           :math:`[t_1^\\ast~\\I32] \\to [t_2^\\ast]`         :ref:`validation <valid-call_indirect>`  :ref:`execution <exec-call_indirect>`                          \n(reserved)                                 :math:`\\hex{12}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{13}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{14}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{15}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{16}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{17}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{18}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{19}`                                                                                                                                                                  \n:math:`\\DROP`                              :math:`\\hex{1A}`           :math:`[t] \\to []`                             :ref:`validation <valid-drop>`           :ref:`execution <exec-drop>`                                   \n:math:`\\SELECT`                            :math:`\\hex{1B}`           :math:`[t~t~\\I32] \\to [t]`                     :ref:`validation <valid-select>`         :ref:`execution <exec-select>`                                 \n:math:`\\SELECT~t`                          :math:`\\hex{1C}`           :math:`[t~t~\\I32] \\to [t]`                     :ref:`validation <valid-select>`         :ref:`execution <exec-select>`                                 \n(reserved)                                 :math:`\\hex{1D}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{1E}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{1F}`                                                                                                                                                                  \n:math:`\\LOCALGET~x`                        :math:`\\hex{20}`           :math:`[] \\to [t]`                             :ref:`validation <valid-local.get>`      :ref:`execution <exec-local.get>`                              \n:math:`\\LOCALSET~x`                        :math:`\\hex{21}`           :math:`[t] \\to []`                             :ref:`validation <valid-local.set>`      :ref:`execution <exec-local.set>`                              \n:math:`\\LOCALTEE~x`                        :math:`\\hex{22}`           :math:`[t] \\to [t]`                            :ref:`validation <valid-local.tee>`      :ref:`execution <exec-local.tee>`                              \n:math:`\\GLOBALGET~x`                       :math:`\\hex{23}`           :math:`[] \\to [t]`                             :ref:`validation <valid-global.get>`     :ref:`execution <exec-global.get>`                             \n:math:`\\GLOBALSET~x`                       :math:`\\hex{24}`           :math:`[t] \\to []`                             :ref:`validation <valid-global.set>`     :ref:`execution <exec-global.set>`                             \n:math:`\\TABLEGET~x`                        :math:`\\hex{25}`           :math:`[\\I32] \\to [t]`                         :ref:`validation <valid-table.get>`      :ref:`execution <exec-table.get>`                              \n:math:`\\TABLESET~x`                        :math:`\\hex{26}`           :math:`[\\I32~t] \\to []`                        :ref:`validation <valid-table.set>`      :ref:`execution <exec-table.set>`                              \n(reserved)                                 :math:`\\hex{27}`                                                                                                                                                                  \n:math:`\\I32.\\LOAD~\\memarg`                 :math:`\\hex{28}`           :math:`[\\I32] \\to [\\I32]`                      :ref:`validation <valid-load>`           :ref:`execution <exec-load>`                                   \n:math:`\\I64.\\LOAD~\\memarg`                 :math:`\\hex{29}`           :math:`[\\I32] \\to [\\I64]`                      :ref:`validation <valid-load>`           :ref:`execution <exec-load>`                                   \n:math:`\\F32.\\LOAD~\\memarg`                 :math:`\\hex{2A}`           :math:`[\\I32] \\to [\\F32]`                      :ref:`validation <valid-load>`           :ref:`execution <exec-load>`                                   \n:math:`\\F64.\\LOAD~\\memarg`                 :math:`\\hex{2B}`           :math:`[\\I32] \\to [\\F64]`                      :ref:`validation <valid-load>`           :ref:`execution <exec-load>`                                   \n:math:`\\I32.\\LOAD\\K{8\\_s}~\\memarg`         :math:`\\hex{2C}`           :math:`[\\I32] \\to [\\I32]`                      :ref:`validation <valid-loadn>`          :ref:`execution <exec-loadn>`                                  \n:math:`\\I32.\\LOAD\\K{8\\_u}~\\memarg`         :math:`\\hex{2D}`           :math:`[\\I32] \\to [\\I32]`                      :ref:`validation <valid-loadn>`          :ref:`execution <exec-loadn>`                                  \n:math:`\\I32.\\LOAD\\K{16\\_s}~\\memarg`        :math:`\\hex{2E}`           :math:`[\\I32] \\to [\\I32]`                      :ref:`validation <valid-loadn>`          :ref:`execution <exec-loadn>`                                  \n:math:`\\I32.\\LOAD\\K{16\\_u}~\\memarg`        :math:`\\hex{2F}`           :math:`[\\I32] \\to [\\I32]`                      :ref:`validation <valid-loadn>`          :ref:`execution <exec-loadn>`                                  \n:math:`\\I64.\\LOAD\\K{8\\_s}~\\memarg`         :math:`\\hex{30}`           :math:`[\\I32] \\to [\\I64]`                      :ref:`validation <valid-loadn>`          :ref:`execution <exec-loadn>`                                  \n:math:`\\I64.\\LOAD\\K{8\\_u}~\\memarg`         :math:`\\hex{31}`           :math:`[\\I32] \\to [\\I64]`                      :ref:`validation <valid-loadn>`          :ref:`execution <exec-loadn>`                                  \n:math:`\\I64.\\LOAD\\K{16\\_s}~\\memarg`        :math:`\\hex{32}`           :math:`[\\I32] \\to [\\I64]`                      :ref:`validation <valid-loadn>`          :ref:`execution <exec-loadn>`                                  \n:math:`\\I64.\\LOAD\\K{16\\_u}~\\memarg`        :math:`\\hex{33}`           :math:`[\\I32] \\to [\\I64]`                      :ref:`validation <valid-loadn>`          :ref:`execution <exec-loadn>`                                  \n:math:`\\I64.\\LOAD\\K{32\\_s}~\\memarg`        :math:`\\hex{34}`           :math:`[\\I32] \\to [\\I64]`                      :ref:`validation <valid-loadn>`          :ref:`execution <exec-loadn>`                                  \n:math:`\\I64.\\LOAD\\K{32\\_u}~\\memarg`        :math:`\\hex{35}`           :math:`[\\I32] \\to [\\I64]`                      :ref:`validation <valid-loadn>`          :ref:`execution <exec-loadn>`                                  \n:math:`\\I32.\\STORE~\\memarg`                :math:`\\hex{36}`           :math:`[\\I32~\\I32] \\to []`                     :ref:`validation <valid-store>`          :ref:`execution <exec-store>`                                  \n:math:`\\I64.\\STORE~\\memarg`                :math:`\\hex{37}`           :math:`[\\I32~\\I64] \\to []`                     :ref:`validation <valid-store>`          :ref:`execution <exec-store>`                                  \n:math:`\\F32.\\STORE~\\memarg`                :math:`\\hex{38}`           :math:`[\\I32~\\F32] \\to []`                     :ref:`validation <valid-store>`          :ref:`execution <exec-store>`                                  \n:math:`\\F64.\\STORE~\\memarg`                :math:`\\hex{39}`           :math:`[\\I32~\\F64] \\to []`                     :ref:`validation <valid-store>`          :ref:`execution <exec-store>`                                  \n:math:`\\I32.\\STORE\\K{8}~\\memarg`           :math:`\\hex{3A}`           :math:`[\\I32~\\I32] \\to []`                     :ref:`validation <valid-storen>`         :ref:`execution <exec-storen>`                                 \n:math:`\\I32.\\STORE\\K{16}~\\memarg`          :math:`\\hex{3B}`           :math:`[\\I32~\\I32] \\to []`                     :ref:`validation <valid-storen>`         :ref:`execution <exec-storen>`                                 \n:math:`\\I64.\\STORE\\K{8}~\\memarg`           :math:`\\hex{3C}`           :math:`[\\I32~\\I64] \\to []`                     :ref:`validation <valid-storen>`         :ref:`execution <exec-storen>`                                 \n:math:`\\I64.\\STORE\\K{16}~\\memarg`          :math:`\\hex{3D}`           :math:`[\\I32~\\I64] \\to []`                     :ref:`validation <valid-storen>`         :ref:`execution <exec-storen>`                                 \n:math:`\\I64.\\STORE\\K{32}~\\memarg`          :math:`\\hex{3E}`           :math:`[\\I32~\\I64] \\to []`                     :ref:`validation <valid-storen>`         :ref:`execution <exec-storen>`                                 \n:math:`\\MEMORYSIZE`                        :math:`\\hex{3F}`           :math:`[] \\to [\\I32]`                          :ref:`validation <valid-memory.size>`    :ref:`execution <exec-memory.size>`                            \n:math:`\\MEMORYGROW`                        :math:`\\hex{40}`           :math:`[\\I32] \\to [\\I32]`                      :ref:`validation <valid-memory.grow>`    :ref:`execution <exec-memory.grow>`                            \n:math:`\\I32.\\CONST~\\i32`                   :math:`\\hex{41}`           :math:`[] \\to [\\I32]`                          :ref:`validation <valid-const>`          :ref:`execution <exec-const>`                                  \n:math:`\\I64.\\CONST~\\i64`                   :math:`\\hex{42}`           :math:`[] \\to [\\I64]`                          :ref:`validation <valid-const>`          :ref:`execution <exec-const>`                                  \n:math:`\\F32.\\CONST~\\f32`                   :math:`\\hex{43}`           :math:`[] \\to [\\F32]`                          :ref:`validation <valid-const>`          :ref:`execution <exec-const>`                                  \n:math:`\\F64.\\CONST~\\f64`                   :math:`\\hex{44}`           :math:`[] \\to [\\F64]`                          :ref:`validation <valid-const>`          :ref:`execution <exec-const>`                                  \n:math:`\\I32.\\EQZ`                          :math:`\\hex{45}`           :math:`[\\I32] \\to [\\I32]`                      :ref:`validation <valid-testop>`         :ref:`execution <exec-testop>`, :ref:`operator <op-ieqz>`      \n:math:`\\I32.\\EQ`                           :math:`\\hex{46}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-ieq>`        \n:math:`\\I32.\\NE`                           :math:`\\hex{47}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-ine>`        \n:math:`\\I32.\\LT\\K{\\_s}`                    :math:`\\hex{48}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-ilt_s>`      \n:math:`\\I32.\\LT\\K{\\_u}`                    :math:`\\hex{49}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-ilt_u>`      \n:math:`\\I32.\\GT\\K{\\_s}`                    :math:`\\hex{4A}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-igt_s>`      \n:math:`\\I32.\\GT\\K{\\_u}`                    :math:`\\hex{4B}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-igt_u>`      \n:math:`\\I32.\\LE\\K{\\_s}`                    :math:`\\hex{4C}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-ile_s>`      \n:math:`\\I32.\\LE\\K{\\_u}`                    :math:`\\hex{4D}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-ile_u>`      \n:math:`\\I32.\\GE\\K{\\_s}`                    :math:`\\hex{4E}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-ige_s>`      \n:math:`\\I32.\\GE\\K{\\_u}`                    :math:`\\hex{4F}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-ige_u>`      \n:math:`\\I64.\\EQZ`                          :math:`\\hex{50}`           :math:`[\\I64] \\to [\\I32]`                      :ref:`validation <valid-testop>`         :ref:`execution <exec-testop>`, :ref:`operator <op-ieqz>`      \n:math:`\\I64.\\EQ`                           :math:`\\hex{51}`           :math:`[\\I64~\\I64] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-ieq>`        \n:math:`\\I64.\\NE`                           :math:`\\hex{52}`           :math:`[\\I64~\\I64] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-ine>`        \n:math:`\\I64.\\LT\\K{\\_s}`                    :math:`\\hex{53}`           :math:`[\\I64~\\I64] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-ilt_s>`      \n:math:`\\I64.\\LT\\K{\\_u}`                    :math:`\\hex{54}`           :math:`[\\I64~\\I64] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-ilt_u>`      \n:math:`\\I64.\\GT\\K{\\_s}`                    :math:`\\hex{55}`           :math:`[\\I64~\\I64] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-igt_s>`      \n:math:`\\I64.\\GT\\K{\\_u}`                    :math:`\\hex{56}`           :math:`[\\I64~\\I64] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-igt_u>`      \n:math:`\\I64.\\LE\\K{\\_s}`                    :math:`\\hex{57}`           :math:`[\\I64~\\I64] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-ile_s>`      \n:math:`\\I64.\\LE\\K{\\_u}`                    :math:`\\hex{58}`           :math:`[\\I64~\\I64] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-ile_u>`      \n:math:`\\I64.\\GE\\K{\\_s}`                    :math:`\\hex{59}`           :math:`[\\I64~\\I64] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-ige_s>`      \n:math:`\\I64.\\GE\\K{\\_u}`                    :math:`\\hex{5A}`           :math:`[\\I64~\\I64] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-ige_u>`      \n:math:`\\F32.\\EQ`                           :math:`\\hex{5B}`           :math:`[\\F32~\\F32] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-feq>`        \n:math:`\\F32.\\NE`                           :math:`\\hex{5C}`           :math:`[\\F32~\\F32] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-fne>`        \n:math:`\\F32.\\LT`                           :math:`\\hex{5D}`           :math:`[\\F32~\\F32] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-flt>`        \n:math:`\\F32.\\GT`                           :math:`\\hex{5E}`           :math:`[\\F32~\\F32] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-fgt>`        \n:math:`\\F32.\\LE`                           :math:`\\hex{5F}`           :math:`[\\F32~\\F32] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-fle>`        \n:math:`\\F32.\\GE`                           :math:`\\hex{60}`           :math:`[\\F32~\\F32] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-fge>`        \n:math:`\\F64.\\EQ`                           :math:`\\hex{61}`           :math:`[\\F64~\\F64] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-feq>`        \n:math:`\\F64.\\NE`                           :math:`\\hex{62}`           :math:`[\\F64~\\F64] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-fne>`        \n:math:`\\F64.\\LT`                           :math:`\\hex{63}`           :math:`[\\F64~\\F64] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-flt>`        \n:math:`\\F64.\\GT`                           :math:`\\hex{64}`           :math:`[\\F64~\\F64] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-fgt>`        \n:math:`\\F64.\\LE`                           :math:`\\hex{65}`           :math:`[\\F64~\\F64] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-fle>`        \n:math:`\\F64.\\GE`                           :math:`\\hex{66}`           :math:`[\\F64~\\F64] \\to [\\I32]`                 :ref:`validation <valid-relop>`          :ref:`execution <exec-relop>`, :ref:`operator <op-fge>`        \n:math:`\\I32.\\CLZ`                          :math:`\\hex{67}`           :math:`[\\I32] \\to [\\I32]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-iclz>`        \n:math:`\\I32.\\CTZ`                          :math:`\\hex{68}`           :math:`[\\I32] \\to [\\I32]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-ictz>`        \n:math:`\\I32.\\POPCNT`                       :math:`\\hex{69}`           :math:`[\\I32] \\to [\\I32]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-ipopcnt>`     \n:math:`\\I32.\\ADD`                          :math:`\\hex{6A}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-iadd>`       \n:math:`\\I32.\\SUB`                          :math:`\\hex{6B}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-isub>`       \n:math:`\\I32.\\MUL`                          :math:`\\hex{6C}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-imul>`       \n:math:`\\I32.\\DIV\\K{\\_s}`                   :math:`\\hex{6D}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-idiv_s>`     \n:math:`\\I32.\\DIV\\K{\\_u}`                   :math:`\\hex{6E}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-idiv_u>`     \n:math:`\\I32.\\REM\\K{\\_s}`                   :math:`\\hex{6F}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-irem_s>`     \n:math:`\\I32.\\REM\\K{\\_u}`                   :math:`\\hex{70}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-irem_u>`     \n:math:`\\I32.\\AND`                          :math:`\\hex{71}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-iand>`       \n:math:`\\I32.\\OR`                           :math:`\\hex{72}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-ior>`        \n:math:`\\I32.\\XOR`                          :math:`\\hex{73}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-ixor>`       \n:math:`\\I32.\\SHL`                          :math:`\\hex{74}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-ishl>`       \n:math:`\\I32.\\SHR\\K{\\_s}`                   :math:`\\hex{75}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-ishr_s>`     \n:math:`\\I32.\\SHR\\K{\\_u}`                   :math:`\\hex{76}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-ishr_u>`     \n:math:`\\I32.\\ROTL`                         :math:`\\hex{77}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-irotl>`      \n:math:`\\I32.\\ROTR`                         :math:`\\hex{78}`           :math:`[\\I32~\\I32] \\to [\\I32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-irotr>`      \n:math:`\\I64.\\CLZ`                          :math:`\\hex{79}`           :math:`[\\I64] \\to [\\I64]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-iclz>`        \n:math:`\\I64.\\CTZ`                          :math:`\\hex{7A}`           :math:`[\\I64] \\to [\\I64]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-ictz>`        \n:math:`\\I64.\\POPCNT`                       :math:`\\hex{7B}`           :math:`[\\I64] \\to [\\I64]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-ipopcnt>`     \n:math:`\\I64.\\ADD`                          :math:`\\hex{7C}`           :math:`[\\I64~\\I64] \\to [\\I64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-iadd>`       \n:math:`\\I64.\\SUB`                          :math:`\\hex{7D}`           :math:`[\\I64~\\I64] \\to [\\I64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-isub>`       \n:math:`\\I64.\\MUL`                          :math:`\\hex{7E}`           :math:`[\\I64~\\I64] \\to [\\I64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-imul>`       \n:math:`\\I64.\\DIV\\K{\\_s}`                   :math:`\\hex{7F}`           :math:`[\\I64~\\I64] \\to [\\I64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-idiv_s>`     \n:math:`\\I64.\\DIV\\K{\\_u}`                   :math:`\\hex{80}`           :math:`[\\I64~\\I64] \\to [\\I64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-idiv_u>`     \n:math:`\\I64.\\REM\\K{\\_s}`                   :math:`\\hex{81}`           :math:`[\\I64~\\I64] \\to [\\I64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-irem_s>`     \n:math:`\\I64.\\REM\\K{\\_u}`                   :math:`\\hex{82}`           :math:`[\\I64~\\I64] \\to [\\I64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-irem_u>`     \n:math:`\\I64.\\AND`                          :math:`\\hex{83}`           :math:`[\\I64~\\I64] \\to [\\I64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-iand>`       \n:math:`\\I64.\\OR`                           :math:`\\hex{84}`           :math:`[\\I64~\\I64] \\to [\\I64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-ior>`        \n:math:`\\I64.\\XOR`                          :math:`\\hex{85}`           :math:`[\\I64~\\I64] \\to [\\I64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-ixor>`       \n:math:`\\I64.\\SHL`                          :math:`\\hex{86}`           :math:`[\\I64~\\I64] \\to [\\I64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-ishl>`       \n:math:`\\I64.\\SHR\\K{\\_s}`                   :math:`\\hex{87}`           :math:`[\\I64~\\I64] \\to [\\I64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-ishr_s>`     \n:math:`\\I64.\\SHR\\K{\\_u}`                   :math:`\\hex{88}`           :math:`[\\I64~\\I64] \\to [\\I64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-ishr_u>`     \n:math:`\\I64.\\ROTL`                         :math:`\\hex{89}`           :math:`[\\I64~\\I64] \\to [\\I64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-irotl>`      \n:math:`\\I64.\\ROTR`                         :math:`\\hex{8A}`           :math:`[\\I64~\\I64] \\to [\\I64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-irotr>`      \n:math:`\\F32.\\ABS`                          :math:`\\hex{8B}`           :math:`[\\F32] \\to [\\F32]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-fabs>`        \n:math:`\\F32.\\NEG`                          :math:`\\hex{8C}`           :math:`[\\F32] \\to [\\F32]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-fneg>`        \n:math:`\\F32.\\CEIL`                         :math:`\\hex{8D}`           :math:`[\\F32] \\to [\\F32]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-fceil>`       \n:math:`\\F32.\\FLOOR`                        :math:`\\hex{8E}`           :math:`[\\F32] \\to [\\F32]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-ffloor>`      \n:math:`\\F32.\\TRUNC`                        :math:`\\hex{8F}`           :math:`[\\F32] \\to [\\F32]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-ftrunc>`      \n:math:`\\F32.\\NEAREST`                      :math:`\\hex{90}`           :math:`[\\F32] \\to [\\F32]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-fnearest>`    \n:math:`\\F32.\\SQRT`                         :math:`\\hex{91}`           :math:`[\\F32] \\to [\\F32]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-fsqrt>`       \n:math:`\\F32.\\ADD`                          :math:`\\hex{92}`           :math:`[\\F32~\\F32] \\to [\\F32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-fadd>`       \n:math:`\\F32.\\SUB`                          :math:`\\hex{93}`           :math:`[\\F32~\\F32] \\to [\\F32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-fsub>`       \n:math:`\\F32.\\MUL`                          :math:`\\hex{94}`           :math:`[\\F32~\\F32] \\to [\\F32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-fmul>`       \n:math:`\\F32.\\DIV`                          :math:`\\hex{95}`           :math:`[\\F32~\\F32] \\to [\\F32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-fdiv>`       \n:math:`\\F32.\\FMIN`                         :math:`\\hex{96}`           :math:`[\\F32~\\F32] \\to [\\F32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-fmin>`       \n:math:`\\F32.\\FMAX`                         :math:`\\hex{97}`           :math:`[\\F32~\\F32] \\to [\\F32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-fmax>`       \n:math:`\\F32.\\COPYSIGN`                     :math:`\\hex{98}`           :math:`[\\F32~\\F32] \\to [\\F32]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-fcopysign>`  \n:math:`\\F64.\\ABS`                          :math:`\\hex{99}`           :math:`[\\F64] \\to [\\F64]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-fabs>`        \n:math:`\\F64.\\NEG`                          :math:`\\hex{9A}`           :math:`[\\F64] \\to [\\F64]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-fneg>`        \n:math:`\\F64.\\CEIL`                         :math:`\\hex{9B}`           :math:`[\\F64] \\to [\\F64]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-fceil>`       \n:math:`\\F64.\\FLOOR`                        :math:`\\hex{9C}`           :math:`[\\F64] \\to [\\F64]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-ffloor>`      \n:math:`\\F64.\\TRUNC`                        :math:`\\hex{9D}`           :math:`[\\F64] \\to [\\F64]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-ftrunc>`      \n:math:`\\F64.\\NEAREST`                      :math:`\\hex{9E}`           :math:`[\\F64] \\to [\\F64]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-fnearest>`    \n:math:`\\F64.\\SQRT`                         :math:`\\hex{9F}`           :math:`[\\F64] \\to [\\F64]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-fsqrt>`       \n:math:`\\F64.\\ADD`                          :math:`\\hex{A0}`           :math:`[\\F64~\\F64] \\to [\\F64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-fadd>`       \n:math:`\\F64.\\SUB`                          :math:`\\hex{A1}`           :math:`[\\F64~\\F64] \\to [\\F64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-fsub>`       \n:math:`\\F64.\\MUL`                          :math:`\\hex{A2}`           :math:`[\\F64~\\F64] \\to [\\F64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-fmul>`       \n:math:`\\F64.\\DIV`                          :math:`\\hex{A3}`           :math:`[\\F64~\\F64] \\to [\\F64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-fdiv>`       \n:math:`\\F64.\\FMIN`                         :math:`\\hex{A4}`           :math:`[\\F64~\\F64] \\to [\\F64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-fmin>`       \n:math:`\\F64.\\FMAX`                         :math:`\\hex{A5}`           :math:`[\\F64~\\F64] \\to [\\F64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-fmax>`       \n:math:`\\F64.\\COPYSIGN`                     :math:`\\hex{A6}`           :math:`[\\F64~\\F64] \\to [\\F64]`                 :ref:`validation <valid-binop>`          :ref:`execution <exec-binop>`, :ref:`operator <op-fcopysign>`  \n:math:`\\I32.\\WRAP\\K{\\_}\\I64`               :math:`\\hex{A7}`           :math:`[\\I64] \\to [\\I32]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-wrap>`       \n:math:`\\I32.\\TRUNC\\K{\\_}\\F32\\K{\\_s}`       :math:`\\hex{A8}`           :math:`[\\F32] \\to [\\I32]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-trunc_s>`    \n:math:`\\I32.\\TRUNC\\K{\\_}\\F32\\K{\\_u}`       :math:`\\hex{A9}`           :math:`[\\F32] \\to [\\I32]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-trunc_u>`    \n:math:`\\I32.\\TRUNC\\K{\\_}\\F64\\K{\\_s}`       :math:`\\hex{AA}`           :math:`[\\F64] \\to [\\I32]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-trunc_s>`    \n:math:`\\I32.\\TRUNC\\K{\\_}\\F64\\K{\\_u}`       :math:`\\hex{AB}`           :math:`[\\F64] \\to [\\I32]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-trunc_u>`    \n:math:`\\I64.\\EXTEND\\K{\\_}\\I32\\K{\\_s}`      :math:`\\hex{AC}`           :math:`[\\I32] \\to [\\I64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-extend_s>`   \n:math:`\\I64.\\EXTEND\\K{\\_}\\I32\\K{\\_u}`      :math:`\\hex{AD}`           :math:`[\\I32] \\to [\\I64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-extend_u>`   \n:math:`\\I64.\\TRUNC\\K{\\_}\\F32\\K{\\_s}`       :math:`\\hex{AE}`           :math:`[\\F32] \\to [\\I64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-trunc_s>`    \n:math:`\\I64.\\TRUNC\\K{\\_}\\F32\\K{\\_u}`       :math:`\\hex{AF}`           :math:`[\\F32] \\to [\\I64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-trunc_u>`    \n:math:`\\I64.\\TRUNC\\K{\\_}\\F64\\K{\\_s}`       :math:`\\hex{B0}`           :math:`[\\F64] \\to [\\I64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-trunc_s>`    \n:math:`\\I64.\\TRUNC\\K{\\_}\\F64\\K{\\_u}`       :math:`\\hex{B1}`           :math:`[\\F64] \\to [\\I64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-trunc_u>`    \n:math:`\\F32.\\CONVERT\\K{\\_}\\I32\\K{\\_s}`     :math:`\\hex{B2}`           :math:`[\\I32] \\to [\\F32]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-convert_s>`  \n:math:`\\F32.\\CONVERT\\K{\\_}\\I32\\K{\\_u}`     :math:`\\hex{B3}`           :math:`[\\I32] \\to [\\F32]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-convert_u>`  \n:math:`\\F32.\\CONVERT\\K{\\_}\\I64\\K{\\_s}`     :math:`\\hex{B4}`           :math:`[\\I64] \\to [\\F32]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-convert_s>`  \n:math:`\\F32.\\CONVERT\\K{\\_}\\I64\\K{\\_u}`     :math:`\\hex{B5}`           :math:`[\\I64] \\to [\\F32]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-convert_u>`  \n:math:`\\F32.\\DEMOTE\\K{\\_}\\F64`             :math:`\\hex{B6}`           :math:`[\\F64] \\to [\\F32]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-demote>`     \n:math:`\\F64.\\CONVERT\\K{\\_}\\I32\\K{\\_s}`     :math:`\\hex{B7}`           :math:`[\\I32] \\to [\\F64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-convert_s>`  \n:math:`\\F64.\\CONVERT\\K{\\_}\\I32\\K{\\_u}`     :math:`\\hex{B8}`           :math:`[\\I32] \\to [\\F64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-convert_u>`  \n:math:`\\F64.\\CONVERT\\K{\\_}\\I64\\K{\\_s}`     :math:`\\hex{B9}`           :math:`[\\I64] \\to [\\F64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-convert_s>`  \n:math:`\\F64.\\CONVERT\\K{\\_}\\I64\\K{\\_u}`     :math:`\\hex{BA}`           :math:`[\\I64] \\to [\\F64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-convert_u>`  \n:math:`\\F64.\\PROMOTE\\K{\\_}\\F32`            :math:`\\hex{BB}`           :math:`[\\F32] \\to [\\F64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-promote>`    \n:math:`\\I32.\\REINTERPRET\\K{\\_}\\F32`        :math:`\\hex{BC}`           :math:`[\\F32] \\to [\\I32]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-reinterpret>`\n:math:`\\I64.\\REINTERPRET\\K{\\_}\\F64`        :math:`\\hex{BD}`           :math:`[\\F64] \\to [\\I64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-reinterpret>`\n:math:`\\F32.\\REINTERPRET\\K{\\_}\\I32`        :math:`\\hex{BE}`           :math:`[\\I32] \\to [\\F32]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-reinterpret>`\n:math:`\\F64.\\REINTERPRET\\K{\\_}\\I64`        :math:`\\hex{BF}`           :math:`[\\I64] \\to [\\F64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-reinterpret>`\n:math:`\\I32.\\EXTEND\\K{8\\_s}`               :math:`\\hex{C0}`           :math:`[\\I32] \\to [\\I32]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-iextendn_s>`  \n:math:`\\I32.\\EXTEND\\K{16\\_s}`              :math:`\\hex{C1}`           :math:`[\\I32] \\to [\\I32]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-iextendn_s>`  \n:math:`\\I64.\\EXTEND\\K{8\\_s}`               :math:`\\hex{C2}`           :math:`[\\I64] \\to [\\I64]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-iextendn_s>`  \n:math:`\\I64.\\EXTEND\\K{16\\_s}`              :math:`\\hex{C3}`           :math:`[\\I64] \\to [\\I64]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-iextendn_s>`  \n:math:`\\I64.\\EXTEND\\K{32\\_s}`              :math:`\\hex{C4}`           :math:`[\\I64] \\to [\\I64]`                      :ref:`validation <valid-unop>`           :ref:`execution <exec-unop>`, :ref:`operator <op-iextendn_s>`  \n(reserved)                                 :math:`\\hex{C5}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{C6}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{C7}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{C8}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{C9}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{CA}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{CB}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{CC}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{CD}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{CE}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{CF}`                                                                                                                                                                  \n:math:`\\REFNULL~t`                         :math:`\\hex{D0}`           :math:`[] \\to [t]`                             :ref:`validation <valid-ref.null>`       :ref:`execution <exec-ref.null>`                               \n:math:`\\REFISNULL`                         :math:`\\hex{D1}`           :math:`[t] \\to [\\I32]`                         :ref:`validation <valid-ref.is_null>`    :ref:`execution <exec-ref.is_null>`                            \n:math:`\\REFFUNC~x`                         :math:`\\hex{D2}`           :math:`[] \\to [\\FUNCREF]`                      :ref:`validation <valid-ref.func>`       :ref:`execution <exec-ref.func>`                               \n(reserved)                                 :math:`\\hex{D3}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{D4}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{D5}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{D6}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{D7}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{D8}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{D9}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{DA}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{DB}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{DC}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{DD}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{DE}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{DF}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{E0}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{E1}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{E2}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{E3}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{E4}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{E5}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{E6}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{E7}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{E8}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{E9}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{EA}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{EB}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{EC}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{ED}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{EE}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{EF}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{F0}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{F1}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{F2}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{F3}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{F4}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{F5}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{F6}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{F7}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{F8}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{F9}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{FA}`                                                                                                                                                                  \n(reserved)                                 :math:`\\hex{FB}`                                                                                                                                                                  \n:math:`\\I32.\\TRUNC\\K{\\_sat\\_}\\F32\\K{\\_s}`  :math:`\\hex{FC}~\\hex{00}`  :math:`[\\F32] \\to [\\I32]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-trunc_sat_s>`\n:math:`\\I32.\\TRUNC\\K{\\_sat\\_}\\F32\\K{\\_u}`  :math:`\\hex{FC}~\\hex{01}`  :math:`[\\F32] \\to [\\I32]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-trunc_sat_u>`\n:math:`\\I32.\\TRUNC\\K{\\_sat\\_}\\F64\\K{\\_s}`  :math:`\\hex{FC}~\\hex{02}`  :math:`[\\F64] \\to [\\I32]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-trunc_sat_s>`\n:math:`\\I32.\\TRUNC\\K{\\_sat\\_}\\F64\\K{\\_u}`  :math:`\\hex{FC}~\\hex{03}`  :math:`[\\F64] \\to [\\I32]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-trunc_sat_u>`\n:math:`\\I64.\\TRUNC\\K{\\_sat\\_}\\F32\\K{\\_s}`  :math:`\\hex{FC}~\\hex{04}`  :math:`[\\F32] \\to [\\I64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-trunc_sat_s>`\n:math:`\\I64.\\TRUNC\\K{\\_sat\\_}\\F32\\K{\\_u}`  :math:`\\hex{FC}~\\hex{05}`  :math:`[\\F32] \\to [\\I64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-trunc_sat_u>`\n:math:`\\I64.\\TRUNC\\K{\\_sat\\_}\\F64\\K{\\_s}`  :math:`\\hex{FC}~\\hex{06}`  :math:`[\\F64] \\to [\\I64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-trunc_sat_s>`\n:math:`\\I64.\\TRUNC\\K{\\_sat\\_}\\F64\\K{\\_u}`  :math:`\\hex{FC}~\\hex{07}`  :math:`[\\F64] \\to [\\I64]`                      :ref:`validation <valid-cvtop>`          :ref:`execution <exec-cvtop>`, :ref:`operator <op-trunc_sat_u>`\n:math:`\\MEMORYINIT`                        :math:`\\hex{FC}~\\hex{08}`  :math:`[\\I32~\\I32~\\I32] \\to []`                :ref:`validation <valid-memory.init>`    :ref:`execution <exec-memory.init>`                            \n:math:`\\DATADROP`                          :math:`\\hex{FC}~\\hex{09}`  :math:`[] \\to []`                              :ref:`validation <valid-data.drop>`      :ref:`execution <exec-data.drop>`                              \n:math:`\\MEMORYCOPY`                        :math:`\\hex{FC}~\\hex{0A}`  :math:`[\\I32~\\I32~\\I32] \\to []`                :ref:`validation <valid-memory.copy>`    :ref:`execution <exec-memory.copy>`                            \n:math:`\\MEMORYFILL`                        :math:`\\hex{FC}~\\hex{0B}`  :math:`[\\I32~\\I32~\\I32] \\to []`                :ref:`validation <valid-memory.fill>`    :ref:`execution <exec-memory.fill>`                            \n:math:`\\TABLEINIT`                         :math:`\\hex{FC}~\\hex{0C}`  :math:`[\\I32~\\I32~\\I32] \\to []`                :ref:`validation <valid-table.init>`     :ref:`execution <exec-table.init>`                             \n:math:`\\ELEMDROP`                          :math:`\\hex{FC}~\\hex{0D}`  :math:`[] \\to []`                              :ref:`validation <valid-elem.drop>`      :ref:`execution <exec-elem.drop>`                              \n:math:`\\TABLECOPY`                         :math:`\\hex{FC}~\\hex{0E}`  :math:`[\\I32~\\I32~\\I32] \\to []`                :ref:`validation <valid-table.copy>`     :ref:`execution <exec-table.copy>`                             \n:math:`\\TABLEGROW`                         :math:`\\hex{FC}~\\hex{0F}`  :math:`[t~\\I32] \\to []`                        :ref:`validation <valid-table.grow>`     :ref:`execution <exec-table.grow>`                             \n:math:`\\TABLESIZE`                         :math:`\\hex{FC}~\\hex{10}`  :math:`[] \\to []`                              :ref:`validation <valid-table.size>`     :ref:`execution <exec-table.size>`                             \n:math:`\\TABLEFILL`                         :math:`\\hex{FC}~\\hex{11}`  :math:`[\\I32~t~\\I32] \\to []`                   :ref:`validation <valid-table.fill>`     :ref:`execution <exec-table.fill>`                             \n=========================================  =========================  =============================================  =======================================  ===============================================================\n"
  },
  {
    "path": "document/core/appendix/index-rules.rst",
    "content": ".. _index-rules:\n\nIndex of Semantic Rules\n-----------------------\n\n\n.. index:: validation\n.. _index-valid:\n\nTyping of Static Constructs\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n===============================================  ===============================================================================\nConstruct                                        Judgement\n===============================================  ===============================================================================\n:ref:`Limits <valid-limits>`                     :math:`\\vdashlimits \\limits : k`\n:ref:`Function type <valid-functype>`            :math:`\\vdashfunctype \\functype \\ok`\n:ref:`Block type <valid-blocktype>`              :math:`\\vdashblocktype \\blocktype \\ok`\n:ref:`Table type <valid-tabletype>`              :math:`\\vdashtabletype \\tabletype \\ok`\n:ref:`Memory type <valid-memtype>`               :math:`\\vdashmemtype \\memtype \\ok`\n:ref:`Global type <valid-globaltype>`            :math:`\\vdashglobaltype \\globaltype \\ok`\n:ref:`External type <valid-externtype>`          :math:`\\vdashexterntype \\externtype \\ok`\n:ref:`Instruction <valid-instr>`                 :math:`S;C \\vdashinstr \\instr : \\stacktype`\n:ref:`Instruction sequence <valid-instr-seq>`    :math:`S;C \\vdashinstrseq \\instr^\\ast : \\stacktype`\n:ref:`Expression <valid-expr>`                   :math:`C \\vdashexpr \\expr : \\resulttype`\n:ref:`Function <valid-func>`                     :math:`C \\vdashfunc \\func : \\functype`\n:ref:`Table <valid-table>`                       :math:`C \\vdashtable \\table : \\tabletype`\n:ref:`Memory <valid-mem>`                        :math:`C \\vdashmem \\mem : \\memtype`\n:ref:`Global <valid-global>`                     :math:`C \\vdashglobal \\global : \\globaltype`\n:ref:`Element segment <valid-elem>`              :math:`C \\vdashelem \\elem : \\reftype`\n:ref:`Element mode <valid-elemmode>`             :math:`C \\vdashelemmode \\elemmode : \\reftype`\n:ref:`Data segment <valid-data>`                 :math:`C \\vdashdata \\data \\ok`\n:ref:`Data mode <valid-datamode>`                :math:`C \\vdashdatamode \\datamode \\ok`\n:ref:`Start function <valid-start>`              :math:`C \\vdashstart \\start \\ok`\n:ref:`Export <valid-export>`                     :math:`C \\vdashexport \\export : \\externtype`\n:ref:`Export description <valid-exportdesc>`     :math:`C \\vdashexportdesc \\exportdesc : \\externtype`\n:ref:`Import <valid-import>`                     :math:`C \\vdashimport \\import : \\externtype`\n:ref:`Import description <valid-importdesc>`     :math:`C \\vdashimportdesc \\importdesc : \\externtype`\n:ref:`Module <valid-module>`                     :math:`\\vdashmodule \\module : \\externtype^\\ast \\to \\externtype^\\ast`\n===============================================  ===============================================================================\n\n\n.. index:: runtime\n\nTyping of Runtime Constructs\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n===============================================  ===============================================================================\nConstruct                                        Judgement\n===============================================  ===============================================================================\n:ref:`Value <valid-val>`                         :math:`S \\vdashval \\val : \\valtype`\n:ref:`Result <valid-result>`                     :math:`S \\vdashresult \\result : \\resulttype`\n:ref:`External value <valid-externval>`          :math:`S \\vdashexternval \\externval : \\externtype`\n:ref:`Function instance <valid-funcinst>`        :math:`S \\vdashfuncinst \\funcinst : \\functype`\n:ref:`Table instance <valid-tableinst>`          :math:`S \\vdashtableinst \\tableinst : \\tabletype`\n:ref:`Memory instance <valid-meminst>`           :math:`S \\vdashmeminst \\meminst : \\memtype`\n:ref:`Global instance <valid-globalinst>`        :math:`S \\vdashglobalinst \\globalinst : \\globaltype`\n:ref:`Element instance <valid-eleminst>`         :math:`S \\vdasheleminst \\eleminst \\ok`\n:ref:`Data instance <valid-datainst>`            :math:`S \\vdashdatainst \\datainst \\ok`\n:ref:`Export instance <valid-exportinst>`        :math:`S \\vdashexportinst \\exportinst \\ok`\n:ref:`Module instance <valid-moduleinst>`        :math:`S \\vdashmoduleinst \\moduleinst : C`\n:ref:`Store <valid-store>`                       :math:`\\vdashstore \\store \\ok`\n:ref:`Configuration <valid-config>`              :math:`\\vdashconfig \\config \\ok`\n:ref:`Thread <valid-thread>`                     :math:`S;\\resulttype^? \\vdashthread \\thread : \\resulttype`\n:ref:`Frame <valid-frame>`                       :math:`S \\vdashframe \\frame : C`\n===============================================  ===============================================================================\n\n\nConstantness\n~~~~~~~~~~~~\n\n===============================================  ===============================================================================\nConstruct                                        Judgement\n===============================================  ===============================================================================\n:ref:`Constant expression <valid-constant>`      :math:`C \\vdashexprconst \\expr \\const`\n:ref:`Constant instruction <valid-constant>`     :math:`C \\vdashinstrconst \\instr \\const`\n===============================================  ===============================================================================\n\n\nMatching\n~~~~~~~~\n\n===============================================  ===============================================================================\nConstruct                                        Judgement\n===============================================  ===============================================================================\n:ref:`External type <match-externtype>`          :math:`\\vdashexterntypematch \\externtype_1 \\matchesexterntype \\externtype_2`\n:ref:`Limits <match-limits>`                     :math:`\\vdashlimitsmatch \\limits_1 \\matcheslimits \\limits_2`\n===============================================  ===============================================================================\n\n\nStore Extension\n~~~~~~~~~~~~~~~\n\n===============================================  ===============================================================================\nConstruct                                        Judgement\n===============================================  ===============================================================================\n:ref:`Function instance <extend-funcinst>`       :math:`\\vdashfuncinstextends \\funcinst_1 \\extendsto \\funcinst_2`\n:ref:`Table instance <extend-tableinst>`         :math:`\\vdashtableinstextends \\tableinst_1 \\extendsto \\tableinst_2`\n:ref:`Memory instance <extend-meminst>`          :math:`\\vdashmeminstextends \\meminst_1 \\extendsto \\meminst_2`\n:ref:`Global instance <extend-globalinst>`       :math:`\\vdashglobalinstextends \\globalinst_1 \\extendsto \\globalinst_2`\n:ref:`Element instance <extend-eleminst>`         :math:`\\vdasheleminstextends \\eleminst_1 \\extendsto \\eleminst_2`\n:ref:`Data instance <extend-datainst>`           :math:`\\vdashdatainstextends \\datainst_1 \\extendsto \\datainst_2`\n:ref:`Store <extend-store>`                      :math:`\\vdashstoreextends \\store_1 \\extendsto \\store_2`\n===============================================  ===============================================================================\n\n\nExecution\n~~~~~~~~~\n\n===============================================  ===============================================================================\nConstruct                                        Judgement\n===============================================  ===============================================================================\n:ref:`Instruction <exec-instr>`                  :math:`S;F;\\instr^\\ast \\stepto S';F';{\\instr'}^\\ast`\n:ref:`Expression <exec-expr>`                    :math:`S;F;\\expr \\stepto  S';F';\\expr'`\n===============================================  ===============================================================================\n"
  },
  {
    "path": "document/core/appendix/index-types.rst",
    "content": ".. index:: type\n.. _index-type:\n\nIndex of Types\n--------------\n\n========================================  ===========================================  ===============================================================================\nCategory                                  Constructor                                         Binary Opcode\n========================================  ===========================================  ===============================================================================\n:ref:`Type index <syntax-typeidx>`        :math:`x`                                    (positive number as |Bs32| or |Bu32|)\n:ref:`Number type <syntax-numtype>`       |I32|                                        :math:`\\hex{7F}` (-1 as |Bs7|)\n:ref:`Number type <syntax-numtype>`       |I64|                                        :math:`\\hex{7E}` (-2 as |Bs7|)\n:ref:`Number type <syntax-numtype>`       |F32|                                        :math:`\\hex{7D}` (-3 as |Bs7|)\n:ref:`Number type <syntax-numtype>`       |F64|                                        :math:`\\hex{7C}` (-4 as |Bs7|)\n(reserved)                                                                             :math:`\\hex{7B}` .. :math:`\\hex{71}`\n:ref:`Reference type <syntax-reftype>`    |FUNCREF|                                    :math:`\\hex{70}` (-16 as |Bs7|)\n:ref:`Reference type <syntax-reftype>`    |EXTERNREF|                                  :math:`\\hex{6F}` (-17 as |Bs7|)\n(reserved)                                                                             :math:`\\hex{6E}` .. :math:`\\hex{61}`\n:ref:`Function type <syntax-functype>`    :math:`[\\valtype^\\ast] \\to [\\valtype^\\ast]`  :math:`\\hex{60}` (-32 as |Bs7|)\n(reserved)                                                                             :math:`\\hex{5F}` .. :math:`\\hex{41}`\n:ref:`Result type <syntax-resulttype>`    :math:`[\\epsilon]`                           :math:`\\hex{40}` (-64 as |Bs7|)\n:ref:`Table type <syntax-tabletype>`      :math:`\\limits~\\reftype`                     (none)\n:ref:`Memory type <syntax-memtype>`       :math:`\\limits`                              (none)\n:ref:`Global type <syntax-globaltype>`    :math:`\\mut~\\valtype`                        (none)\n========================================  ===========================================  ===============================================================================\n"
  },
  {
    "path": "document/core/appendix/index.rst",
    "content": ".. _appendix:\n\nAppendix\n========\n\n.. toctree::\n   :maxdepth: 2\n\n   embedding\n   implementation\n   algorithm\n   custom\n   properties\n\n.. only:: singlehtml\n\n   .. toctree::\n\n      index-types\n      index-instructions\n      index-rules\n\n"
  },
  {
    "path": "document/core/appendix/properties.rst",
    "content": ".. index:: ! soundness, type system\n.. _soundness:\n\nSoundness\n---------\n\nThe :ref:`type system <type-system>` of WebAssembly is *sound*, implying both *type safety* and *memory safety* with respect to the WebAssembly semantics. For example:\n\n* All types declared and derived during validation are respected at run time;\n  e.g., every :ref:`local <syntax-local>` or :ref:`global <syntax-global>` variable will only contain type-correct values, every :ref:`instruction <syntax-instr>` will only be applied to operands of the expected type, and every :ref:`function <syntax-func>` :ref:`invocation <exec-invocation>` always evaluates to a result of the right type (if it does not :ref:`trap <trap>` or diverge).\n\n* No memory location will be read or written except those explicitly defined by the program, i.e., as a :ref:`local <syntax-local>`, a :ref:`global <syntax-global>`, an element in a :ref:`table <syntax-table>`, or a location within a linear :ref:`memory <syntax-mem>`.\n\n* There is no undefined behavior,\n  i.e., the :ref:`execution rules <exec>` cover all possible cases that can occur in a :ref:`valid <valid>` program, and the rules are mutually consistent.\n\nSoundness also is instrumental in ensuring additional properties, most notably, *encapsulation* of function and module scopes: no :ref:`locals <syntax-local>` can be accessed outside their own function and no :ref:`module <syntax-module>` components can be accessed outside their own module unless they are explicitly :ref:`exported <syntax-export>` or :ref:`imported <syntax-import>`.\n\nThe typing rules defining WebAssembly :ref:`validation <valid>` only cover the *static* components of a WebAssembly program.\nIn order to state and prove soundness precisely, the typing rules must be extended to the *dynamic* components of the abstract :ref:`runtime <syntax-runtime>`, that is, the :ref:`store <syntax-store>`, :ref:`configurations <syntax-config>`, and :ref:`administrative instructions <syntax-instr-admin>`. [#cite-pldi2017]_\n\n\n.. index:: value, value type, result, result type, trap\n.. _valid-result:\n\nResults\n~~~~~~~\n\n:ref:`Results <syntax-result>` can be classified by :ref:`result types <syntax-resulttype>` as follows.\n\n:ref:`Results <syntax-result>` :math:`\\val^\\ast`\n................................................\n\n* For each :ref:`value <syntax-val>` :math:`\\val_i` in :math:`\\val^\\ast`:\n\n  * The value :math:`\\val_i` is :ref:`valid <valid-val>` with some :ref:`value type <syntax-valtype>` :math:`t_i`.\n\n* Let :math:`t^\\ast` be the concatenation of all :math:`t_i`.\n\n* Then the result is valid with :ref:`result type <syntax-resulttype>` :math:`[t^\\ast]`.\n\n.. math::\n   \\frac{\n     (S \\vdashval \\val : t)^\\ast\n   }{\n     S \\vdashresult \\val^\\ast : [t^\\ast]\n   }\n\n\n:ref:`Results <syntax-result>` :math:`\\TRAP`\n............................................\n\n* The result is valid with :ref:`result type <syntax-resulttype>` :math:`[t^\\ast]`, for any sequence :math:`t^\\ast` of :ref:`value types <syntax-valtype>`.\n\n.. math::\n   \\frac{\n   }{\n     S \\vdashresult \\TRAP : [t^\\ast]\n   }\n\n\n.. _module-context:\n.. _valid-store:\n\nStore Validity\n~~~~~~~~~~~~~~\n\nThe following typing rules specify when a runtime :ref:`store <syntax-store>` :math:`S` is *valid*.\nA valid store must consist of\n:ref:`function <syntax-funcinst>`, :ref:`table <syntax-tableinst>`, :ref:`memory <syntax-meminst>`, :ref:`global <syntax-globalinst>`, and :ref:`module <syntax-moduleinst>` instances that are themselves valid, relative to :math:`S`.\n\nTo that end, each kind of instance is classified by a respective :ref:`function <syntax-functype>`, :ref:`table <syntax-tabletype>`, :ref:`memory <syntax-memtype>`, or :ref:`global <syntax-globaltype>` type.\nModule instances are classified by *module contexts*, which are regular :ref:`contexts <context>` repurposed as module types describing the :ref:`index spaces <syntax-index>` defined by a module.\n\n\n\n.. index:: store, function instance, table instance, memory instance, global instance, function type, table type, memory type, global type\n\n:ref:`Store <syntax-store>` :math:`S`\n.....................................\n\n* Each :ref:`function instance <syntax-funcinst>` :math:`\\funcinst_i` in :math:`S.\\SFUNCS` must be :ref:`valid <valid-funcinst>` with some :ref:`function type <syntax-functype>` :math:`\\functype_i`.\n\n* Each :ref:`table instance <syntax-tableinst>` :math:`\\tableinst_i` in :math:`S.\\STABLES` must be :ref:`valid <valid-tableinst>` with some :ref:`table type <syntax-tabletype>` :math:`\\tabletype_i`.\n\n* Each :ref:`memory instance <syntax-meminst>` :math:`\\meminst_i` in :math:`S.\\SMEMS` must be :ref:`valid <valid-meminst>` with some :ref:`memory type <syntax-memtype>` :math:`\\memtype_i`.\n\n* Each :ref:`global instance <syntax-globalinst>` :math:`\\globalinst_i` in :math:`S.\\SGLOBALS` must be :ref:`valid <valid-globalinst>` with some  :ref:`global type <syntax-globaltype>` :math:`\\globaltype_i`.\n\n* Each :ref:`element instance <syntax-eleminst>` :math:`\\eleminst_i` in :math:`S.\\SELEMS` must be :ref:`valid <valid-eleminst>`.\n\n* Each :ref:`data instance <syntax-datainst>` :math:`\\datainst_i` in :math:`S.\\SDATAS` must be :ref:`valid <valid-datainst>`.\n\n* Then the store is valid.\n\n.. math::\n   ~\\\\[-1ex]\n   \\frac{\n     \\begin{array}{@{}c@{}}\n     (S \\vdashfuncinst \\funcinst : \\functype)^\\ast\n     \\qquad\n     (S \\vdashtableinst \\tableinst : \\tabletype)^\\ast\n     \\\\\n     (S \\vdashmeminst \\meminst : \\memtype)^\\ast\n     \\qquad\n     (S \\vdashglobalinst \\globalinst : \\globaltype)^\\ast\n     \\\\\n     (S \\vdasheleminst \\eleminst \\ok)^\\ast\n     \\qquad\n     (S \\vdashdatainst \\datainst \\ok)^\\ast\n     \\\\\n     S = \\{\n       \\SFUNCS~\\funcinst^\\ast,\n       \\STABLES~\\tableinst^\\ast,\n       \\SMEMS~\\meminst^\\ast,\n       \\SGLOBALS~\\globalinst^\\ast,\n       \\SELEMS~\\eleminst^\\ast,\n       \\SDATAS~\\datainst^\\ast \\}\n     \\end{array}\n   }{\n     \\vdashstore S \\ok\n   }\n\n\n.. index:: function type, function instance\n.. _valid-funcinst:\n\n:ref:`Function Instances <syntax-funcinst>` :math:`\\{\\FITYPE~\\functype, \\FIMODULE~\\moduleinst, \\FICODE~\\func\\}`\n.......................................................................................................................\n\n* The :ref:`function type <syntax-functype>` :math:`\\functype` must be :ref:`valid <valid-functype>`.\n\n* The :ref:`module instance <syntax-moduleinst>` :math:`\\moduleinst` must be :ref:`valid <valid-moduleinst>` with some :ref:`context <context>` :math:`C`.\n\n* Under :ref:`context <context>` :math:`C`, the :ref:`function <syntax-func>` :math:`\\func` must be :ref:`valid <valid-func>` with :ref:`function type <syntax-functype>` :math:`\\functype`.\n\n* Then the function instance is valid with :ref:`function type <syntax-functype>` :math:`\\functype`.\n\n.. math::\n   \\frac{\n     \\vdashfunctype \\functype \\ok\n     \\qquad\n     S \\vdashmoduleinst \\moduleinst : C\n     \\qquad\n     C \\vdashfunc \\func : \\functype\n   }{\n     S \\vdashfuncinst \\{\\FITYPE~\\functype, \\FIMODULE~\\moduleinst, \\FICODE~\\func\\} : \\functype\n   }\n\n\n.. index:: function type, function instance, host function\n.. _valid-hostfuncinst:\n\n:ref:`Host Function Instances <syntax-funcinst>` :math:`\\{\\FITYPE~\\functype, \\FIHOSTCODE~\\X{hf}\\}`\n..................................................................................................\n\n* The :ref:`function type <syntax-functype>` :math:`\\functype` must be :ref:`valid <valid-functype>`.\n\n* Let :math:`[t_1^\\ast] \\to [t_2^\\ast]` be the :ref:`function type <syntax-functype>` :math:`\\functype`.\n\n* For every :ref:`valid <valid-store>` :ref:`store <syntax-store>` :math:`S_1` :ref:`extending <extend-store>` :math:`S` and every sequence :math:`\\val^\\ast` of :ref:`values <syntax-val>` whose :ref:`types <valid-val>` coincide with :math:`t_1^\\ast`:\n\n  * :ref:`Executing <exec-invoke-host>` :math:`\\X{hf}` in store :math:`S_1` with arguments :math:`\\val^\\ast` has a non-empty set of possible outcomes.\n\n  * For every element :math:`R` of this set:\n\n    * Either :math:`R` must be :math:`\\bot` (i.e., divergence).\n\n    * Or :math:`R` consists of a :ref:`valid <valid-store>` :ref:`store <syntax-store>` :math:`S_2` :ref:`extending <extend-store>` :math:`S_1` and a :ref:`result <syntax-result>` :math:`\\result` whose :ref:`type <valid-result>` coincides with :math:`[t_2^\\ast]`.\n\n* Then the function instance is valid with :ref:`function type <syntax-functype>` :math:`\\functype`.\n\n.. math::\n   \\frac{\n     \\begin{array}[b]{@{}l@{}}\n     \\vdashfunctype [t_1^\\ast] \\to [t_2^\\ast] \\ok \\\\\n     \\end{array}\n     \\quad\n     \\begin{array}[b]{@{}l@{}}\n     \\forall S_1, \\val^\\ast,~\n       {\\vdashstore S_1 \\ok} \\wedge\n       {\\vdashstoreextends S \\extendsto S_1} \\wedge\n       {S_1 \\vdashresult \\val^\\ast : [t_1^\\ast]}\n       \\Longrightarrow {} \\\\ \\qquad\n       \\X{hf}(S_1; \\val^\\ast) \\supset \\emptyset \\wedge {} \\\\ \\qquad\n     \\forall R \\in \\X{hf}(S_1; \\val^\\ast),~\n       R = \\bot \\vee {} \\\\ \\qquad\\qquad\n       \\exists S_2, \\result,~\n       {\\vdashstore S_2 \\ok} \\wedge\n       {\\vdashstoreextends S_1 \\extendsto S_2} \\wedge\n       {S_2 \\vdashresult \\result : [t_2^\\ast]} \\wedge\n       R = (S_2; \\result)\n     \\end{array}\n   }{\n     S \\vdashfuncinst \\{\\FITYPE~[t_1^\\ast] \\to [t_2^\\ast], \\FIHOSTCODE~\\X{hf}\\} : [t_1^\\ast] \\to [t_2^\\ast]\n   }\n\n.. note::\n   This rule states that, if appropriate pre-conditions about store and arguments are satisfied, then executing the host function must satisfy appropriate post-conditions about store and results.\n   The post-conditions match the ones in the :ref:`execution rule <exec-invoke-host>` for invoking host functions.\n\n   Any store under which the function is invoked is assumed to be an extension of the current store.\n   That way, the function itself is able to make sufficient assumptions about future stores.\n\n\n.. index:: table type, table instance, limits, function address\n.. _valid-tableinst:\n\n:ref:`Table Instances <syntax-tableinst>` :math:`\\{ \\TITYPE~(\\limits~t), \\TIELEM~\\reff^\\ast \\}`\n...............................................................................................\n\n* The :ref:`table type <syntax-tabletype>` :math:`\\limits~t` must be :ref:`valid <valid-tabletype>`.\n\n* The length of :math:`\\reff^\\ast` must equal :math:`\\limits.\\LMIN`.\n\n* For each :ref:`reference <syntax-ref>` :math:`\\reff_i` in the table's elements :math:`\\reff^n`:\n\n  * The :ref:`reference <syntax-ref>` :math:`\\reff_i` must be :ref:`valid <valid-ref>` with :ref:`reference type <syntax-reftype>` :math:`t`.\n\n* Then the table instance is valid with :ref:`table type <syntax-tabletype>` :math:`\\limits~t`.\n\n.. math::\n   \\frac{\n     \\vdashtabletype \\limits~t \\ok\n     \\qquad\n     n = \\limits.\\LMIN\n     \\qquad\n     (S \\vdash \\reff : t)^n\n   }{\n     S \\vdashtableinst \\{ \\TITYPE~(\\limits~t), \\TIELEM~\\reff^n \\} : \\limits~t\n   }\n\n\n.. index:: memory type, memory instance, limits, byte\n.. _valid-meminst:\n\n:ref:`Memory Instances <syntax-meminst>` :math:`\\{ \\MITYPE~\\limits, \\MIDATA~b^\\ast \\}`\n......................................................................................\n\n* The :ref:`memory type <syntax-memtype>` :math:`\\{\\LMIN~n, \\LMAX~m^?\\}` must be :ref:`valid <valid-memtype>`.\n\n* The length of :math:`b^\\ast` must equal :math:`\\limits.\\LMIN` multiplied by the :ref:`page size <page-size>` :math:`64\\,\\F{Ki}`.\n\n* Then the memory instance is valid with :ref:`memory type <syntax-memtype>` :math:`\\limits`.\n\n.. math::\n   \\frac{\n     \\vdashmemtype \\limits \\ok\n     \\qquad\n     n = \\limits.\\LMIN \\cdot 64\\,\\F{Ki}\n   }{\n     S \\vdashmeminst \\{ \\MITYPE~\\limits, \\MIDATA~b^n \\} : \\limits\n   }\n\n\n.. index:: global type, global instance, value, mutability\n.. _valid-globalinst:\n\n:ref:`Global Instances <syntax-globalinst>` :math:`\\{ \\GITYPE~(\\mut~t), \\GIVALUE~\\val \\}`\n.........................................................................................\n\n* The :ref:`global type <syntax-globaltype>` :math:`\\mut~t` must be :ref:`valid <valid-globaltype>`.\n\n* The :ref:`value <syntax-val>` :math:`\\val` must be :ref:`valid <valid-val>` with :ref:`value type <syntax-valtype>` :math:`t`.\n\n* Then the global instance is valid with :ref:`global type <syntax-globaltype>` :math:`\\mut~t`.\n\n.. math::\n   \\frac{\n     \\vdashglobaltype \\mut~t \\ok\n     \\qquad\n     S \\vdashval \\val : t\n   }{\n     S \\vdashglobalinst \\{ \\GITYPE~(\\mut~t), \\GIVALUE~\\val \\} : \\mut~t\n   }\n\n\n.. index:: element instance, reference\n.. _valid-eleminst:\n\n:ref:`Element Instances <syntax-eleminst>` :math:`\\{ \\EIELEM~\\X{fa}^\\ast \\}`\n............................................................................\n\n* For each :ref:`reference <syntax-ref>` :math:`\\reff_i` in the elements :math:`\\reff^n`:\n\n  * The :ref:`reference <syntax-ref>` :math:`\\reff_i` must be :ref:`valid <valid-ref>` with :ref:`reference type <syntax-reftype>` :math:`t`.\n\n* Then the table instance is valid.\n\n.. math::\n   \\frac{\n     (S \\vdash \\reff : t)^\\ast\n   }{\n     S \\vdasheleminst \\{ \\EITYPE~t, \\EIELEM~\\reff^\\ast \\} \\ok\n   }\n\n\n.. index:: data instance, byte\n.. _valid-datainst:\n\n:ref:`Data Instances <syntax-eleminst>` :math:`\\{ \\DIDATA~b^\\ast \\}`\n....................................................................\n\n* The data instance is valid.\n\n.. math::\n   \\frac{\n   }{\n     S \\vdashdatainst \\{ \\DIDATA~b^\\ast \\} \\ok\n   }\n\n\n.. index:: external type, export instance, name, external value\n.. _valid-exportinst:\n\n:ref:`Export Instances <syntax-exportinst>` :math:`\\{ \\EINAME~\\name, \\EIVALUE~\\externval \\}`\n.......................................................................................................\n\n* The :ref:`external value <syntax-externval>` :math:`\\externval` must be :ref:`valid <valid-externval>` with some :ref:`external type <syntax-externtype>` :math:`\\externtype`.\n\n* Then the export instance is valid.\n\n.. math::\n   \\frac{\n     S \\vdashexternval \\externval : \\externtype\n   }{\n     S \\vdashexportinst \\{ \\EINAME~\\name, \\EIVALUE~\\externval \\} \\ok\n   }\n\n\n.. index:: module instance, context\n.. _valid-moduleinst:\n\n:ref:`Module Instances <syntax-moduleinst>` :math:`\\moduleinst`\n...............................................................\n\n* Each :ref:`function type <syntax-functype>` :math:`\\functype_i` in :math:`\\moduleinst.\\MITYPES` must be :ref:`valid <valid-functype>`.\n\n* For each :ref:`function address <syntax-funcaddr>` :math:`\\funcaddr_i` in :math:`\\moduleinst.\\MIFUNCS`, the :ref:`external value <syntax-externval>` :math:`\\EVFUNC~\\funcaddr_i` must be :ref:`valid <valid-externval-func>` with some :ref:`external type <syntax-externtype>` :math:`\\ETFUNC~\\functype'_i`.\n\n* For each :ref:`table address <syntax-tableaddr>` :math:`\\tableaddr_i` in :math:`\\moduleinst.\\MITABLES`, the :ref:`external value <syntax-externval>` :math:`\\EVTABLE~\\tableaddr_i` must be :ref:`valid <valid-externval-table>` with some :ref:`external type <syntax-externtype>` :math:`\\ETTABLE~\\tabletype_i`.\n\n* For each :ref:`memory address <syntax-memaddr>` :math:`\\memaddr_i` in :math:`\\moduleinst.\\MIMEMS`, the :ref:`external value <syntax-externval>` :math:`\\EVMEM~\\memaddr_i` must be :ref:`valid <valid-externval-mem>` with some :ref:`external type <syntax-externtype>` :math:`\\ETMEM~\\memtype_i`.\n\n* For each :ref:`global address <syntax-globaladdr>` :math:`\\globaladdr_i` in :math:`\\moduleinst.\\MIGLOBALS`, the :ref:`external value <syntax-externval>` :math:`\\EVGLOBAL~\\globaladdr_i` must be :ref:`valid <valid-externval-global>` with some :ref:`external type <syntax-externtype>` :math:`\\ETGLOBAL~\\globaltype_i`.\n\n* For each :ref:`element address <syntax-elemaddr>` :math:`\\elemaddr_i` in :math:`\\moduleinst.\\MIELEMS`, the :ref:`element instance <syntax-eleminst>` :math:`S.\\SELEMS[\\elemaddr_i]` must be :ref:`valid <valid-eleminst>`.\n\n* For each :ref:`data address <syntax-dataaddr>` :math:`\\dataaddr_i` in :math:`\\moduleinst.\\MIDATAS`, the :ref:`data instance <syntax-datainst>` :math:`S.\\SDATAS[\\dataaddr_i]` must be :ref:`valid <valid-datainst>`.\n\n* Each :ref:`export instance <syntax-exportinst>` :math:`\\exportinst_i` in :math:`\\moduleinst.\\MIEXPORTS` must be :ref:`valid <valid-exportinst>`.\n\n* For each :ref:`export instance <syntax-exportinst>` :math:`\\exportinst_i` in :math:`\\moduleinst.\\MIEXPORTS`, the :ref:`name <syntax-name>` :math:`\\exportinst_i.\\EINAME` must be different from any other name occurring in :math:`\\moduleinst.\\MIEXPORTS`.\n\n* Let :math:`{\\functype'}^\\ast` be the concatenation of all :math:`\\functype'_i` in order.\n\n* Let :math:`\\tabletype^\\ast` be the concatenation of all :math:`\\tabletype_i` in order.\n\n* Let :math:`\\memtype^\\ast` be the concatenation of all :math:`\\memtype_i` in order.\n\n* Let :math:`\\globaltype^\\ast` be the concatenation of all :math:`\\globaltype_i` in order.\n\n* Then the module instance is valid with :ref:`context <context>` :math:`\\{\\CTYPES~\\functype^\\ast, \\CFUNCS~{\\functype'}^\\ast, \\CTABLES~\\tabletype^\\ast, \\CMEMS~\\memtype^\\ast, \\CGLOBALS~\\globaltype^\\ast\\}`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\frac{\n     \\begin{array}{@{}c@{}}\n     (\\vdashfunctype \\functype \\ok)^\\ast\n     \\\\\n     (S \\vdashexternval \\EVFUNC~\\funcaddr : \\ETFUNC~\\functype')^\\ast\n     \\qquad\n     (S \\vdashexternval \\EVTABLE~\\tableaddr : \\ETTABLE~\\tabletype)^\\ast\n     \\\\\n     (S \\vdashexternval \\EVMEM~\\memaddr : \\ETMEM~\\memtype)^\\ast\n     \\qquad\n     (S \\vdashexternval \\EVGLOBAL~\\globaladdr : \\ETGLOBAL~\\globaltype)^\\ast\n     \\\\\n     (S \\vdasheleminst S.\\SELEMS[\\elemaddr] \\ok)^\\ast\n     \\qquad\n     (S \\vdashdatainst S.\\SDATAS[\\dataaddr] \\ok)^\\ast\n     \\\\\n     (S \\vdashexportinst \\exportinst \\ok)^\\ast\n     \\qquad\n     (\\exportinst.\\EINAME)^\\ast ~\\mbox{disjoint}\n     \\end{array}\n   }{\n     S \\vdashmoduleinst \\{\n       \\begin{array}[t]{@{}l@{~}l@{}}\n       \\MITYPES & \\functype^\\ast, \\\\\n       \\MIFUNCS & \\funcaddr^\\ast, \\\\\n       \\MITABLES & \\tableaddr^\\ast, \\\\\n       \\MIMEMS & \\memaddr^\\ast, \\\\\n       \\MIGLOBALS & \\globaladdr^\\ast, \\\\\n       \\MIELEMS & \\elemaddr^\\ast, \\\\\n       \\MIDATAS & \\dataaddr^\\ast, \\\\\n       \\MIEXPORTS & \\exportinst^\\ast ~\\} : \\{\n         \\begin{array}[t]{@{}l@{~}l@{}}\n         \\CTYPES & \\functype^\\ast, \\\\\n         \\CFUNCS & {\\functype'}^\\ast, \\\\\n         \\CTABLES & \\tabletype^\\ast, \\\\\n         \\CMEMS & \\memtype^\\ast, \\\\\n         \\CGLOBALS & \\globaltype^\\ast ~\\}\n         \\end{array}\n       \\end{array}\n   }\n\n\n.. index:: configuration, administrative instruction, store, frame\n.. _frame-context:\n.. _valid-config:\n\nConfiguration Validity\n~~~~~~~~~~~~~~~~~~~~~~\n\nTo relate the WebAssembly :ref:`type system <valid>` to its :ref:`execution semantics <exec>`, the :ref:`typing rules for instructions <valid-instr>` must be extended to :ref:`configurations <syntax-config>` :math:`S;T`,\nwhich relates the :ref:`store <syntax-store>` to execution :ref:`threads <syntax-thread>`.\n\nConfigurations and threads are classified by their :ref:`result type <syntax-resulttype>`.\nIn addition to the store :math:`S`, threads are typed under a *return type* :math:`\\resulttype^?`, which controls whether and with which type a |return| instruction is allowed.\nThis type is absent (:math:`\\epsilon`) except for instruction sequences inside an administrative |FRAME| instruction.\n\nFinally, :ref:`frames <syntax-frame>` are classified with *frame contexts*, which extend the :ref:`module contexts <module-context>` of a frame's associated :ref:`module instance <syntax-moduleinst>` with the :ref:`locals <syntax-local>` that the frame contains.\n\n\n.. index:: result type, thread\n\n:ref:`Configurations <syntax-config>` :math:`S;T`\n.................................................\n\n* The :ref:`store <syntax-store>` :math:`S` must be :ref:`valid <valid-store>`.\n\n* Under no allowed return type,\n  the :ref:`thread <syntax-thread>` :math:`T` must be :ref:`valid <valid-thread>` with some :ref:`result type <syntax-resulttype>` :math:`[t^\\ast]`.\n\n* Then the configuration is valid with the :ref:`result type <syntax-resulttype>` :math:`[t^\\ast]`.\n\n.. math::\n   \\frac{\n     \\vdashstore S \\ok\n     \\qquad\n     S; \\epsilon \\vdashthread T : [t^\\ast]\n   }{\n     \\vdashconfig S; T : [t^\\ast]\n   }\n\n\n.. index:: thread, frame, instruction, result type, context\n.. _valid-thread:\n\n:ref:`Threads <syntax-thread>` :math:`F;\\instr^\\ast`\n....................................................\n\n* Let :math:`\\resulttype^?` be the current allowed return type.\n\n* The :ref:`frame <syntax-frame>` :math:`F` must be :ref:`valid <valid-frame>` with a :ref:`context <context>` :math:`C`.\n\n* Let :math:`C'` be the same :ref:`context <context>` as :math:`C`, but with |CRETURN| set to :math:`\\resulttype^?`.\n\n* Under context :math:`C'`,\n  the instruction sequence :math:`\\instr^\\ast` must be :ref:`valid <valid-instr-seq>` with some type :math:`[] \\to [t^\\ast]`.\n\n* Then the thread is valid with the :ref:`result type <syntax-resulttype>` :math:`[t^\\ast]`.\n\n.. math::\n   \\frac{\n     S \\vdashframe F : C\n     \\qquad\n     S; C,\\CRETURN~\\resulttype^? \\vdashinstrseq \\instr^\\ast : [] \\to [t^\\ast]\n   }{\n     S; \\resulttype^? \\vdashthread F; \\instr^\\ast : [t^\\ast]\n   }\n\n\n.. index:: frame, local, module instance, value, value type, context\n.. _valid-frame:\n\n:ref:`Frames <syntax-frame>` :math:`\\{\\ALOCALS~\\val^\\ast, \\AMODULE~\\moduleinst\\}`\n.................................................................................\n\n* The :ref:`module instance <syntax-moduleinst>` :math:`\\moduleinst` must be :ref:`valid <valid-moduleinst>` with some :ref:`module context <module-context>` :math:`C`.\n\n* Each :ref:`value <syntax-val>` :math:`\\val_i` in :math:`\\val^\\ast` must be :ref:`valid <valid-val>` with some :ref:`value type <syntax-valtype>` :math:`t_i`.\n\n* Let :math:`t^\\ast` the concatenation of all :math:`t_i` in order.\n\n* Let :math:`C'` be the same :ref:`context <context>` as :math:`C`, but with the :ref:`value types <syntax-valtype>` :math:`t^\\ast` prepended to the |CLOCALS| vector.\n\n* Then the frame is valid with :ref:`frame context <frame-context>` :math:`C'`.\n\n.. math::\n   \\frac{\n     S \\vdashmoduleinst \\moduleinst : C\n     \\qquad\n     (S \\vdashval \\val : t)^\\ast\n   }{\n     S \\vdashframe \\{\\ALOCALS~\\val^\\ast, \\AMODULE~\\moduleinst\\} : (C, \\CLOCALS~t^\\ast)\n   }\n\n\n.. index:: administrative instruction, value type, context, store\n.. _valid-instr-admin:\n\nAdministrative Instructions\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTyping rules for :ref:`administrative instructions <syntax-instr-admin>` are specified as follows.\nIn addition to the :ref:`context <context>` :math:`C`, typing of these instructions is defined under a given :ref:`store <syntax-store>` :math:`S`.\nTo that end, all previous typing judgements :math:`C \\vdash \\X{prop}` are generalized to include the store, as in :math:`S; C \\vdash \\X{prop}`, by implicitly adding :math:`S` to all rules -- :math:`S` is never modified by the pre-existing rules, but it is accessed in the extra rules for :ref:`administrative instructions <valid-instr-admin>` given below.\n\n\n.. index:: trap\n\n:math:`\\TRAP`\n.............\n\n* The instruction is valid with type :math:`[t_1^\\ast] \\to [t_2^\\ast]`, for any sequences of :ref:`value types <syntax-valtype>` :math:`t_1^\\ast` and :math:`t_2^\\ast`.\n\n.. math::\n   \\frac{\n   }{\n     S; C \\vdashadmininstr \\TRAP : [t_1^\\ast] \\to [t_2^\\ast]\n   }\n\n\n.. index:: extern address\n\n:math:`\\REFEXTERNADDR~\\externaddr`\n..................................\n\n* The instruction is valid with type :math:`[] \\to [\\EXTERNREF]`.\n\n.. math::\n   \\frac{\n   }{\n     S; C \\vdashadmininstr \\REFEXTERNADDR~\\externaddr : [] \\to [\\EXTERNREF]\n   }\n\n\n.. index:: function address, extern value, extern type, function type\n\n:math:`\\REFFUNCADDR~\\funcaddr`\n..............................\n\n* The :ref:`external function value <syntax-externval>` :math:`\\EVFUNC~\\funcaddr` must be :ref:`valid <valid-externval-func>` with :ref:`external function type <syntax-externtype>` :math:`\\ETFUNC \\functype`.\n\n* Then the instruction is valid with type :math:`[] \\to [\\FUNCREF]`.\n\n.. math::\n   \\frac{\n     S \\vdashexternval \\EVFUNC~\\funcaddr : \\ETFUNC~\\functype\n   }{\n     S; C \\vdashadmininstr \\REFFUNCADDR~\\funcaddr : [] \\to [\\FUNCREF]\n   }\n\n\n.. index:: function address, extern value, extern type, function type\n\n:math:`\\INVOKE~\\funcaddr`\n.........................\n\n* The :ref:`external function value <syntax-externval>` :math:`\\EVFUNC~\\funcaddr` must be :ref:`valid <valid-externval-func>` with :ref:`external function type <syntax-externtype>` :math:`\\ETFUNC ([t_1^\\ast] \\to [t_2^\\ast])`.\n\n* Then the instruction is valid with type :math:`[t_1^\\ast] \\to [t_2^\\ast]`.\n\n.. math::\n   \\frac{\n     S \\vdashexternval \\EVFUNC~\\funcaddr : \\ETFUNC~[t_1^\\ast] \\to [t_2^\\ast]\n   }{\n     S; C \\vdashadmininstr \\INVOKE~\\funcaddr : [t_1^\\ast] \\to [t_2^\\ast]\n   }\n\n\n.. index:: label, instruction, result type\n\n:math:`\\LABEL_n\\{\\instr_0^\\ast\\}~\\instr^\\ast~\\END`\n..................................................\n\n* The instruction sequence :math:`\\instr_0^\\ast` must be :ref:`valid <valid-instr-seq>` with some type :math:`[t_1^n] \\to [t_2^*]`.\n\n* Let :math:`C'` be the same :ref:`context <context>` as :math:`C`, but with the :ref:`result type <syntax-resulttype>` :math:`[t_1^n]` prepended to the |CLABELS| vector.\n\n* Under context :math:`C'`,\n  the instruction sequence :math:`\\instr^\\ast` must be :ref:`valid <valid-instr-seq>` with type :math:`[] \\to [t_2^*]`.\n\n* Then the compound instruction is valid with type :math:`[] \\to [t_2^*]`.\n\n.. math::\n   \\frac{\n     S; C \\vdashinstrseq \\instr_0^\\ast : [t_1^n] \\to [t_2^*]\n     \\qquad\n     S; C,\\CLABELS\\,[t_1^n] \\vdashinstrseq \\instr^\\ast : [] \\to [t_2^*]\n   }{\n     S; C \\vdashadmininstr \\LABEL_n\\{\\instr_0^\\ast\\}~\\instr^\\ast~\\END : [] \\to [t_2^*]\n   }\n\n\n.. index:: frame, instruction, result type\n\n:math:`\\FRAME_n\\{F\\}~\\instr^\\ast~\\END`\n...........................................\n\n* Under the return type :math:`[t^n]`,\n  the :ref:`thread <syntax-frame>` :math:`F; \\instr^\\ast` must be :ref:`valid <valid-frame>` with :ref:`result type <syntax-resulttype>` :math:`[t^n]`.\n\n* Then the compound instruction is valid with type :math:`[] \\to [t^n]`.\n\n.. math::\n   \\frac{\n     S; [t^n] \\vdashinstrseq F; \\instr^\\ast : [t^n]\n   }{\n     S; C \\vdashadmininstr \\FRAME_n\\{F\\}~\\instr^\\ast~\\END : [] \\to [t^n]\n   }\n\n\n.. index:: ! store extension, store\n.. _extend:\n\nStore Extension\n~~~~~~~~~~~~~~~\n\nPrograms can mutate the :ref:`store <syntax-store>` and its contained instances.\nAny such modification must respect certain invariants, such as not removing allocated instances or changing immutable definitions.\nWhile these invariants are inherent to the execution semantics of WebAssembly :ref:`instructions <exec-instr>` and :ref:`modules <exec-instantiation>`,\n:ref:`host functions <syntax-hostfunc>` do not automatically adhere to them. Consequently, the required invariants must be stated as explicit constraints on the :ref:`invocation <exec-invoke-host>` of host functions.\nSoundness only holds when the :ref:`embedder <embedder>` ensures these constraints.\n\nThe necessary constraints are codified by the notion of store *extension*:\na store state :math:`S'` extends state :math:`S`, written :math:`S \\extendsto S'`, when the following rules hold.\n\n.. note::\n   Extension does not imply that the new store is valid, which is defined separately :ref:`above <valid-store>`.\n\n\n.. index:: store, function instance, table instance, memory instance, global instance\n.. _extend-store:\n\n:ref:`Store <syntax-store>` :math:`S`\n.....................................\n\n* The length of :math:`S.\\SFUNCS` must not shrink.\n\n* The length of :math:`S.\\STABLES` must not shrink.\n\n* The length of :math:`S.\\SMEMS` must not shrink.\n\n* The length of :math:`S.\\SGLOBALS` must not shrink.\n\n* The length of :math:`S.\\SELEMS` must not shrink.\n\n* The length of :math:`S.\\SDATAS` must not shrink.\n\n* For each :ref:`function instance <syntax-funcinst>` :math:`\\funcinst_i` in the original :math:`S.\\SFUNCS`, the new function instance must be an :ref:`extension <extend-funcinst>` of the old.\n\n* For each :ref:`table instance <syntax-tableinst>` :math:`\\tableinst_i` in the original :math:`S.\\STABLES`, the new table instance must be an :ref:`extension <extend-tableinst>` of the old.\n\n* For each :ref:`memory instance <syntax-meminst>` :math:`\\meminst_i` in the original :math:`S.\\SMEMS`, the new memory instance must be an :ref:`extension <extend-meminst>` of the old.\n\n* For each :ref:`global instance <syntax-globalinst>` :math:`\\globalinst_i` in the original :math:`S.\\SGLOBALS`, the new global instance must be an :ref:`extension <extend-globalinst>` of the old.\n\n* For each :ref:`element instance <syntax-eleminst>` :math:`\\eleminst_i` in the original :math:`S.\\SELEMS`, the new global instance must be an :ref:`extension <extend-eleminst>` of the old.\n\n* For each :ref:`data instance <syntax-datainst>` :math:`\\datainst_i` in the original :math:`S.\\SDATAS`, the new global instance must be an :ref:`extension <extend-datainst>` of the old.\n\n.. math::\n   \\frac{\n     \\begin{array}{@{}ccc@{}}\n     S_1.\\SFUNCS = \\funcinst_1^\\ast &\n     S_2.\\SFUNCS = {\\funcinst'_1}^\\ast~\\funcinst_2^\\ast &\n     (\\vdashfuncinstextends \\funcinst_1 \\extendsto \\funcinst'_1)^\\ast \\\\\n     S_1.\\STABLES = \\tableinst_1^\\ast &\n     S_2.\\STABLES = {\\tableinst'_1}^\\ast~\\tableinst_2^\\ast &\n     (\\vdashtableinstextends \\tableinst_1 \\extendsto \\tableinst'_1)^\\ast \\\\\n     S_1.\\SMEMS = \\meminst_1^\\ast &\n     S_2.\\SMEMS = {\\meminst'_1}^\\ast~\\meminst_2^\\ast &\n     (\\vdashmeminstextends \\meminst_1 \\extendsto \\meminst'_1)^\\ast \\\\\n     S_1.\\SGLOBALS = \\globalinst_1^\\ast &\n     S_2.\\SGLOBALS = {\\globalinst'_1}^\\ast~\\globalinst_2^\\ast &\n     (\\vdashglobalinstextends \\globalinst_1 \\extendsto \\globalinst'_1)^\\ast \\\\\n     S_1.\\SELEMS = \\eleminst_1^\\ast &\n     S_2.\\SELEMS = {\\eleminst'_1}^\\ast~\\eleminst_2^\\ast &\n     (\\vdasheleminstextends \\eleminst_1 \\extendsto \\eleminst'_1)^\\ast \\\\\n     S_1.\\SDATAS = \\datainst_1^\\ast &\n     S_2.\\SDATAS = {\\datainst'_1}^\\ast~\\datainst_2^\\ast &\n     (\\vdashdatainstextends \\datainst_1 \\extendsto \\datainst'_1)^\\ast \\\\\n     \\end{array}\n   }{\n     \\vdashstoreextends S_1 \\extendsto S_2\n   }\n\n\n.. index:: function instance\n.. _extend-funcinst:\n\n:ref:`Function Instance <syntax-funcinst>` :math:`\\funcinst`\n............................................................\n\n* A function instance must remain unchanged.\n\n.. math::\n   \\frac{\n   }{\n     \\vdashfuncinstextends \\funcinst \\extendsto \\funcinst\n   }\n\n\n.. index:: table instance\n.. _extend-tableinst:\n\n:ref:`Table Instance <syntax-tableinst>` :math:`\\tableinst`\n...........................................................\n\n* The :ref:`table type <syntax-tabletype>` :math:`\\tableinst.\\TITYPE` must remain unchanged.\n\n* The length of :math:`\\tableinst.\\TIELEM` must not shrink.\n\n.. math::\n   \\frac{\n     n_1 \\leq n_2\n   }{\n     \\vdashtableinstextends \\{\\TITYPE~\\X{tt}, \\TIELEM~(\\X{fa}_1^?)^{n_1}\\} \\extendsto \\{\\TITYPE~\\X{tt}, \\TIELEM~(\\X{fa}_2^?)^{n_2}\\}\n   }\n\n\n.. index:: memory instance\n.. _extend-meminst:\n\n:ref:`Memory Instance <syntax-meminst>` :math:`\\meminst`\n........................................................\n\n* The :ref:`memory type <syntax-memtype>` :math:`\\meminst.\\MITYPE` must remain unchanged.\n\n* The length of :math:`\\meminst.\\MIDATA` must not shrink.\n\n.. math::\n   \\frac{\n     n_1 \\leq n_2\n   }{\n     \\vdashmeminstextends \\{\\MITYPE~\\X{mt}, \\MIDATA~b_1^{n_1}\\} \\extendsto \\{\\MITYPE~\\X{mt}, \\MIDATA~b_2^{n_2}\\}\n   }\n\n\n.. index:: global instance, value, mutability\n.. _extend-globalinst:\n\n:ref:`Global Instance <syntax-globalinst>` :math:`\\globalinst`\n..............................................................\n\n* The :ref:`global type <syntax-globaltype>` :math:`\\globalinst.\\GITYPE` must remain unchanged.\n\n* Let :math:`\\mut~t` be the structure of :math:`\\globalinst.\\GITYPE`.\n\n* If :math:`\\mut` is |MCONST|, then the :ref:`value <syntax-val>` :math:`\\globalinst.\\GIVALUE` must remain unchanged.\n\n.. math::\n   \\frac{\n     \\mut = \\MVAR \\vee \\val_1 = \\val_2\n   }{\n     \\vdashglobalinstextends \\{\\GITYPE~(\\mut~t), \\GIVALUE~\\val_1\\} \\extendsto \\{\\GITYPE~(\\mut~t), \\GIVALUE~\\val_2\\}\n   }\n\n\n.. index:: element instance\n.. _extend-eleminst:\n\n:ref:`Element Instance <syntax-eleminst>` :math:`\\eleminst`\n...........................................................\n\n* The vector :math:`\\eleminst.\\EIELEM` must either remain unchanged or shrink to length :math:`0`.\n\n.. math::\n   \\frac{\n     \\X{fa}_1^\\ast = \\X{fa}_2^\\ast \\vee \\X{fa}_2^\\ast = \\epsilon\n   }{\n     \\vdasheleminstextends \\{\\EIELEM~\\X{fa}_1^\\ast\\} \\extendsto \\{\\EIELEM~\\X{fa}_2^\\ast\\}\n   }\n\n\n.. index:: data instance\n.. _extend-datainst:\n\n:ref:`Data Instance <syntax-datainst>` :math:`\\datainst`\n........................................................\n\n* The vector :math:`\\datainst.\\DIDATA` must either remain unchanged or shrink to length :math:`0`.\n\n.. math::\n   \\frac{\n     b_1^\\ast = b_2^\\ast \\vee b_2^\\ast = \\epsilon\n   }{\n     \\vdashdatainstextends \\{\\DIDATA~b_1^\\ast\\} \\extendsto \\{\\DIDATA~b_2^\\ast\\}\n   }\n\n\n\n.. index:: ! preservation, ! progress, soundness, configuration, thread, terminal configuration, instantiation, invocation, validity, module\n.. _soundness-statement:\n\nTheorems\n~~~~~~~~\n\nGiven the definition of :ref:`valid configurations <valid-config>`,\nthe standard soundness theorems hold. [#cite-cpp2018]_\n\n**Theorem (Preservation).**\nIf a :ref:`configuration <syntax-config>` :math:`S;T` is :ref:`valid <valid-config>` with :ref:`result type <syntax-resulttype>` :math:`[t^\\ast]` (i.e., :math:`\\vdashconfig S;T : [t^\\ast]`),\nand steps to :math:`S';T'` (i.e., :math:`S;T \\stepto S';T'`),\nthen :math:`S';T'` is a valid configuration with the same result type (i.e., :math:`\\vdashconfig S';T' : [t^\\ast]`).\nFurthermore, :math:`S'` is an :ref:`extension <extend-store>` of :math:`S` (i.e., :math:`\\vdashstoreextends S \\extendsto S'`).\n\nA *terminal* :ref:`thread <syntax-thread>` is one whose sequence of :ref:`instructions <syntax-instr>` is a :ref:`result <syntax-result>`.\nA terminal configuration is a configuration whose thread is terminal.\n\n**Theorem (Progress).**\nIf a :ref:`configuration <syntax-config>` :math:`S;T` is :ref:`valid <valid-config>` (i.e., :math:`\\vdashconfig S;T : [t^\\ast]` for some :ref:`result type <syntax-resulttype>` :math:`[t^\\ast]`),\nthen either it is terminal,\nor it can step to some configuration :math:`S';T'` (i.e., :math:`S;T \\stepto S';T'`).\n\nFrom Preservation and Progress the soundness of the WebAssembly type system follows directly.\n\n**Corollary (Soundness).**\nIf a :ref:`configuration <syntax-config>` :math:`S;T` is :ref:`valid <valid-config>` (i.e., :math:`\\vdashconfig S;T : [t^\\ast]` for some :ref:`result type <syntax-resulttype>` :math:`[t^\\ast]`),\nthen it either diverges or takes a finite number of steps to reach a terminal configuration :math:`S';T'` (i.e., :math:`S;T \\stepto^\\ast S';T'`) that is valid with the same result type (i.e., :math:`\\vdashconfig S';T' : [t^\\ast]`)\nand where :math:`S'` is an :ref:`extension <extend-store>` of :math:`S` (i.e., :math:`\\vdashstoreextends S \\extendsto S'`).\n\nIn other words, every thread in a valid configuration either runs forever, traps, or terminates with a result that has the expected type.\nConsequently, given a :ref:`valid store <valid-store>`, no computation defined by :ref:`instantiation <exec-instantiation>` or :ref:`invocation <exec-invocation>` of a valid module can \"crash\" or otherwise (mis)behave in ways not covered by the :ref:`execution <exec>` semantics given in this specification.\n\n\n.. [#cite-pldi2017]\n   The formalization and theorems are derived from the following article:\n   Andreas Haas, Andreas Rossberg, Derek Schuff, Ben Titzer, Dan Gohman, Luke Wagner, Alon Zakai, JF Bastien, Michael Holman. |PLDI2017|_. Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2017). ACM 2017.\n\n.. [#cite-cpp2018]\n   A machine-verified version of the formalization and soundness proof is described in the following article:\n   Conrad Watt. |CPP2018|_. Proceedings of the 7th ACM SIGPLAN Conference on Certified Programs and Proofs (CPP 2018). ACM 2018.\n"
  },
  {
    "path": "document/core/binary/conventions.rst",
    "content": ".. index:: ! binary format, module, byte, file extension, abstract syntax\n\nConventions\n-----------\n\nThe binary format for WebAssembly :ref:`modules <module>` is a dense linear *encoding* of their :ref:`abstract syntax <syntax-module>`.\n[#compression]_\n\nThe format is defined by an *attribute grammar* whose only terminal symbols are :ref:`bytes <syntax-byte>`.\nA byte sequence is a well-formed encoding of a module if and only if it is generated by the grammar.\n\nEach production of this grammar has exactly one synthesized attribute: the abstract syntax that the respective byte sequence encodes.\nThus, the attribute grammar implicitly defines a *decoding* function\n(i.e., a parsing function for the binary format).\n\nExcept for a few exceptions, the binary grammar closely mirrors the grammar of the abstract syntax.\n\n.. note::\n   Some phrases of abstract syntax have multiple possible encodings in the binary format.\n   For example, numbers may be encoded as if they had optional leading zeros.\n   Implementations of decoders must support all possible alternatives;\n   implementations of encoders can pick any allowed encoding.\n\nThe recommended extension for files containing WebAssembly modules in binary format is \":math:`\\T{.wasm}`\"\nand the recommended |MediaType|_ is \":math:`\\T{application/wasm}`\".\n\n.. [#compression]\n   Additional encoding layers -- for example, introducing compression -- may be defined on top of the basic representation defined here.\n   However, such layers are outside the scope of the current specification.\n\n\n.. index:: grammar notation, notation, byte\n   single: binary format; grammar\n   pair: binary format; notation\n.. _binary-grammar:\n\nGrammar\n~~~~~~~\n\nThe following conventions are adopted in defining grammar rules for the binary format.\nThey mirror the conventions used for :ref:`abstract syntax <grammar>`.\nIn order to distinguish symbols of the binary syntax from symbols of the abstract syntax, :math:`\\mathtt{typewriter}` font is adopted for the former.\n\n* Terminal symbols are :ref:`bytes <syntax-byte>` expressed in hexadecimal notation: :math:`\\hex{0F}`.\n\n* Nonterminal symbols are written in typewriter font: :math:`\\B{valtype}, \\B{instr}`.\n\n* :math:`B^n` is a sequence of :math:`n\\geq 0` iterations  of :math:`B`.\n\n* :math:`B^\\ast` is a possibly empty sequence of iterations of :math:`B`.\n  (This is a shorthand for :math:`B^n` used where :math:`n` is not relevant.)\n\n* :math:`B^?` is an optional occurrence of :math:`B`.\n  (This is a shorthand for :math:`B^n` where :math:`n \\leq 1`.)\n\n* :math:`x{:}B` denotes the same language as the nonterminal :math:`B`, but also binds the variable :math:`x` to the attribute synthesized for :math:`B`.\n\n* Productions are written :math:`\\B{sym} ::= B_1 \\Rightarrow A_1 ~|~ \\dots ~|~ B_n \\Rightarrow A_n`, where each :math:`A_i` is the attribute that is synthesized for :math:`\\B{sym}` in the given case, usually from attribute variables bound in :math:`B_i`.\n\n* Some productions are augmented by side conditions in parentheses, which restrict the applicability of the production. They provide a shorthand for a combinatorial expansion of the production into many separate cases.\n\n* If the same meta variable or non-terminal symbol appears multiple times in a production (in the syntax or in an attribute), then all those occurrences must have the same instantiation.\n  (This is a shorthand for a side condition requiring multiple different variables to be equal.)\n\n.. note::\n   For example, the :ref:`binary grammar <binary-valtype>` for :ref:`value types <syntax-valtype>` is given as follows:\n\n   .. math::\n     \\begin{array}{llcll@{\\qquad\\qquad}l}\n     \\production{value types} & \\Bvaltype &::=&\n       \\hex{7F} &\\Rightarrow& \\I32 \\\\ &&|&\n       \\hex{7E} &\\Rightarrow& \\I64 \\\\ &&|&\n       \\hex{7D} &\\Rightarrow& \\F32 \\\\ &&|&\n       \\hex{7C} &\\Rightarrow& \\F64 \\\\\n     \\end{array}\n\n   Consequently, the byte :math:`\\hex{7F}` encodes the type |I32|,\n   :math:`\\hex{7E}` encodes the type |I64|, and so forth.\n   No other byte value is allowed as the encoding of a value type.\n\n   The :ref:`binary grammar <binary-limits>` for :ref:`limits <syntax-limits>` is defined as follows:   \n\n   .. math::\n      \\begin{array}{llclll}\n      \\production{limits} & \\Blimits &::=&\n        \\hex{00}~~n{:}\\Bu32 &\\Rightarrow& \\{ \\LMIN~n, \\LMAX~\\epsilon \\} \\\\ &&|&\n        \\hex{01}~~n{:}\\Bu32~~m{:}\\Bu32 &\\Rightarrow& \\{ \\LMIN~n, \\LMAX~m \\} \\\\\n      \\end{array}\n\n   That is, a limits pair is encoded as either the byte :math:`\\hex{00}` followed by the encoding of a |U32| value,\n   or the byte :math:`\\hex{01}` followed by two such encodings. \n   The variables :math:`n` and :math:`m` name the attributes of the respective |Bu32| nonterminals, which in this case are the actual :ref:`unsigned integers <syntax-uint>` those decode into.\n   The attribute of the complete production then is the abstract syntax for the limit, expressed in terms of the former values.\n\n\n.. _binary-notation:\n\nAuxiliary Notation\n~~~~~~~~~~~~~~~~~~\n\nWhen dealing with binary encodings the following notation is also used:\n\n* :math:`\\epsilon` denotes the empty byte sequence.\n\n* :math:`||B||` is the length of the byte sequence generated from the production :math:`B` in a derivation.\n\n\n.. index:: vector\n   pair: binary format; vector\n.. _binary-vec:\n\nVectors\n~~~~~~~\n\n:ref:`Vectors <syntax-vec>` are encoded with their |Bu32| length followed by the encoding of their element sequence.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{vector} & \\Bvec(\\B{B}) &::=&\n     n{:}\\Bu32~~(x{:}\\B{B})^n &\\Rightarrow& x^n \\\\\n   \\end{array}\n"
  },
  {
    "path": "document/core/binary/index.rst",
    "content": ".. _binary:\n\nBinary Format\n=============\n\n.. toctree::\n   :maxdepth: 2\n\n   conventions\n   values\n   types\n   instructions\n   modules\n"
  },
  {
    "path": "document/core/binary/instructions.rst",
    "content": ".. index:: instruction, ! opcode\n.. _binary-instr:\n\nInstructions\n------------\n\n:ref:`Instructions <syntax-instr>` are encoded by *opcodes*.\nEach opcode is represented by a single byte,\nand is followed by the instruction's immediate arguments, where present.\nThe only exception are :ref:`structured control instructions <binary-instr-control>`, which consist of several opcodes bracketing their nested instruction sequences.\n\n.. note::\n   Gaps in the byte code ranges for encoding instructions are reserved for future extensions.\n\n\n.. index:: control instructions, structured control, label, block, branch, result type, value type, block type, label index, function index, type index, vector, polymorphism, LEB128\n   pair: binary format; instruction\n   pair: binary format; block type\n.. _binary-instr-control:\n\nControl Instructions\n~~~~~~~~~~~~~~~~~~~~\n\n:ref:`Control instructions <syntax-instr-control>` have varying encodings. For structured instructions, the instruction sequences forming nested blocks are terminated with explicit opcodes for |END| and |ELSE|.\n\n:ref:`Block types <syntax-blocktype>` are encoded in special compressed form, by either the byte :math:`\\hex{40}` indicating the empty type, as a single :ref:`value type <binary-valtype>`, or as a :ref:`type index <binary-typeidx>` encoded as a positive :ref:`signed integer <binary-sint>`.\n\n.. _binary-blocktype:\n.. _binary-nop:\n.. _binary-unreachable:\n.. _binary-block:\n.. _binary-loop:\n.. _binary-if:\n.. _binary-br:\n.. _binary-br_if:\n.. _binary-br_table:\n.. _binary-return:\n.. _binary-call:\n.. _binary-call_indirect:\n\n.. math::\n   \\begin{array}{llcllll}\n   \\production{block type} & \\Bblocktype &::=&\n     \\hex{40} &\\Rightarrow& \\epsilon \\\\ &&|&\n     t{:}\\Bvaltype &\\Rightarrow& t \\\\ &&|&\n     x{:}\\Bs33 &\\Rightarrow& x & (\\iff x \\geq 0) \\\\\n   \\production{instruction} & \\Binstr &::=&\n     \\hex{00} &\\Rightarrow& \\UNREACHABLE \\\\ &&|&\n     \\hex{01} &\\Rightarrow& \\NOP \\\\ &&|&\n     \\hex{02}~~\\X{bt}{:}\\Bblocktype~~(\\X{in}{:}\\Binstr)^\\ast~~\\hex{0B}\n       &\\Rightarrow& \\BLOCK~\\X{bt}~\\X{in}^\\ast~\\END \\\\ &&|&\n     \\hex{03}~~\\X{bt}{:}\\Bblocktype~~(\\X{in}{:}\\Binstr)^\\ast~~\\hex{0B}\n       &\\Rightarrow& \\LOOP~\\X{bt}~\\X{in}^\\ast~\\END \\\\ &&|&\n     \\hex{04}~~\\X{bt}{:}\\Bblocktype~~(\\X{in}{:}\\Binstr)^\\ast~~\\hex{0B}\n       &\\Rightarrow& \\IF~\\X{bt}~\\X{in}^\\ast~\\ELSE~\\epsilon~\\END \\\\ &&|&\n     \\hex{04}~~\\X{bt}{:}\\Bblocktype~~(\\X{in}_1{:}\\Binstr)^\\ast~~\n       \\hex{05}~~(\\X{in}_2{:}\\Binstr)^\\ast~~\\hex{0B}\n       &\\Rightarrow& \\IF~\\X{bt}~\\X{in}_1^\\ast~\\ELSE~\\X{in}_2^\\ast~\\END \\\\ &&|&\n     \\hex{0C}~~l{:}\\Blabelidx &\\Rightarrow& \\BR~l \\\\ &&|&\n     \\hex{0D}~~l{:}\\Blabelidx &\\Rightarrow& \\BRIF~l \\\\ &&|&\n     \\hex{0E}~~l^\\ast{:}\\Bvec(\\Blabelidx)~~l_N{:}\\Blabelidx\n       &\\Rightarrow& \\BRTABLE~l^\\ast~l_N \\\\ &&|&\n     \\hex{0F} &\\Rightarrow& \\RETURN \\\\ &&|&\n     \\hex{10}~~x{:}\\Bfuncidx &\\Rightarrow& \\CALL~x \\\\ &&|&\n     \\hex{11}~~y{:}\\Btypeidx~~x{:}\\Btableidx &\\Rightarrow& \\CALLINDIRECT~x~y \\\\\n   \\end{array}\n\n.. note::\n   The |ELSE| opcode :math:`\\hex{05}` in the encoding of an |IF| instruction can be omitted if the following instruction sequence is empty.\n\n   Unlike any :ref:`other occurrence <binary-typeidx>`, the :ref:`type index <syntax-typeidx>` in a :ref:`block type <syntax-blocktype>` is encoded as a positive :ref:`signed integer <syntax-sint>`, so that its |SignedLEB128| bit pattern cannot collide with the encoding of :ref:`value types <binary-valtype>` or the special code :math:`\\hex{40}`, which correspond to the LEB128 encoding of negative integers.\n   To avoid any loss in the range of allowed indices, it is treated as a 33 bit signed integer. \n\n   In future versions of WebAssembly, the zero byte occurring in the encoding\n   of the |CALLINDIRECT| instruction may be used to index additional tables.\n\n\n.. index:: reference instruction\n   pair: binary format; instruction\n.. _binary-instr-ref:\n\nReference Instructions\n~~~~~~~~~~~~~~~~~~~~~~\n\n:ref:`Reference instructions <syntax-instr-ref>` are represented by single byte codes.\n\n.. _binary-ref.null:\n.. _binary-ref.isnull:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{instruction} & \\Binstr &::=& \\dots \\\\ &&|&\n     \\hex{D0}~~t{:}\\Breftype &\\Rightarrow& \\REFNULL~t \\\\ &&|&\n     \\hex{D1} &\\Rightarrow& \\REFISNULL \\\\ &&|&\n     \\hex{D2}~~x{:}\\Bfuncidx &\\Rightarrow& \\REFFUNC~x \\\\\n   \\end{array}\n\n.. note::\n   These opcode assignments are preliminary.\n\n\n.. index:: parametric instruction, value type, polymorphism\n   pair: binary format; instruction\n.. _binary-instr-parametric:\n\nParametric Instructions\n~~~~~~~~~~~~~~~~~~~~~~~\n\n:ref:`Parametric instructions <syntax-instr-parametric>` are represented by single byte codes, possibly followed by a type annotation.\n\n.. _binary-drop:\n.. _binary-select:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{instruction} & \\Binstr &::=& \\dots \\\\ &&|&\n     \\hex{1A} &\\Rightarrow& \\DROP \\\\ &&|&\n     \\hex{1B} &\\Rightarrow& \\SELECT \\\\ &&|&\n     \\hex{1C}~~t^\\ast{:}\\Bvec(\\Bvaltype) &\\Rightarrow& \\SELECT~t^\\ast \\\\\n   \\end{array}\n\n\n.. index:: variable instructions, local index, global index\n   pair: binary format; instruction\n.. _binary-instr-variable:\n\nVariable Instructions\n~~~~~~~~~~~~~~~~~~~~~\n\n:ref:`Variable instructions <syntax-instr-variable>` are represented by byte codes followed by the encoding of the respective :ref:`index <syntax-index>`.\n\n.. _binary-local.get:\n.. _binary-local.set:\n.. _binary-local.tee:\n.. _binary-global.get:\n.. _binary-global.set:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{instruction} & \\Binstr &::=& \\dots \\\\ &&|&\n     \\hex{20}~~x{:}\\Blocalidx &\\Rightarrow& \\LOCALGET~x \\\\ &&|&\n     \\hex{21}~~x{:}\\Blocalidx &\\Rightarrow& \\LOCALSET~x \\\\ &&|&\n     \\hex{22}~~x{:}\\Blocalidx &\\Rightarrow& \\LOCALTEE~x \\\\ &&|&\n     \\hex{23}~~x{:}\\Bglobalidx &\\Rightarrow& \\GLOBALGET~x \\\\ &&|&\n     \\hex{24}~~x{:}\\Bglobalidx &\\Rightarrow& \\GLOBALSET~x \\\\\n   \\end{array}\n\n\n.. index:: table instruction, table index\n   pair: binary format; instruction\n.. _binary-instr-table:\n.. _binary-table.get:\n.. _binary-table.set:\n.. _binary-table.size:\n.. _binary-table.grow:\n.. _binary-table.fill:\n.. _binary-table.copy:\n.. _binary-table.init:\n.. _binary-elem.drop:\n\nTable Instructions\n~~~~~~~~~~~~~~~~~~\n\n:ref:`Table instructions <syntax-instr-table>` are represented by either single byte or two byte codes.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{instruction} & \\Binstr &::=& \\dots \\\\ &&|&\n     \\hex{25}~~x{:}\\Btableidx &\\Rightarrow& \\TABLEGET~x \\\\ &&|&\n     \\hex{26}~~x{:}\\Btableidx &\\Rightarrow& \\TABLESET~x \\\\ &&|&\n     \\hex{FC}~~12{:}\\Bu32~~y{:}\\Belemidx~~x{:}\\Btableidx &\\Rightarrow& \\TABLEINIT~x~y \\\\ &&|&\n     \\hex{FC}~~13{:}\\Bu32~~x{:}\\Belemidx &\\Rightarrow& \\ELEMDROP~x \\\\ &&|&\n     \\hex{FC}~~14{:}\\Bu32~~x{:}\\Btableidx~~y{:}\\Btableidx &\\Rightarrow& \\TABLECOPY~x~y \\\\ &&|&\n     \\hex{FC}~~15{:}\\Bu32~~x{:}\\Btableidx &\\Rightarrow& \\TABLEGROW~x \\\\ &&|&\n     \\hex{FC}~~16{:}\\Bu32~~x{:}\\Btableidx &\\Rightarrow& \\TABLESIZE~x \\\\ &&|&\n     \\hex{FC}~~17{:}\\Bu32~~x{:}\\Btableidx &\\Rightarrow& \\TABLEFILL~x \\\\\n   \\end{array}\n\n\n.. index:: memory instruction, memory index\n   pair: binary format; instruction\n.. _binary-instr-memory:\n\nMemory Instructions\n~~~~~~~~~~~~~~~~~~~\n\nEach variant of :ref:`memory instruction <syntax-instr-memory>` is encoded with a different byte code. Loads and stores are followed by the encoding of their |memarg| immediate.\n\n.. _binary-memarg:\n.. _binary-load:\n.. _binary-loadn:\n.. _binary-store:\n.. _binary-storen:\n.. _binary-memory.size:\n.. _binary-memory.grow:\n.. _binary-memory.fill:\n.. _binary-memory.copy:\n.. _binary-memory.init:\n.. _binary-data.drop:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{memory argument} & \\Bmemarg &::=&\n     a{:}\\Bu32~~o{:}\\Bu32 &\\Rightarrow& \\{ \\ALIGN~a,~\\OFFSET~o \\} \\\\\n   \\production{instruction} & \\Binstr &::=& \\dots \\\\ &&|&\n     \\hex{28}~~m{:}\\Bmemarg &\\Rightarrow& \\I32.\\LOAD~m \\\\ &&|&\n     \\hex{29}~~m{:}\\Bmemarg &\\Rightarrow& \\I64.\\LOAD~m \\\\ &&|&\n     \\hex{2A}~~m{:}\\Bmemarg &\\Rightarrow& \\F32.\\LOAD~m \\\\ &&|&\n     \\hex{2B}~~m{:}\\Bmemarg &\\Rightarrow& \\F64.\\LOAD~m \\\\ &&|&\n     \\hex{2C}~~m{:}\\Bmemarg &\\Rightarrow& \\I32.\\LOAD\\K{8\\_s}~m \\\\ &&|&\n     \\hex{2D}~~m{:}\\Bmemarg &\\Rightarrow& \\I32.\\LOAD\\K{8\\_u}~m \\\\ &&|&\n     \\hex{2E}~~m{:}\\Bmemarg &\\Rightarrow& \\I32.\\LOAD\\K{16\\_s}~m \\\\ &&|&\n     \\hex{2F}~~m{:}\\Bmemarg &\\Rightarrow& \\I32.\\LOAD\\K{16\\_u}~m \\\\ &&|&\n     \\hex{30}~~m{:}\\Bmemarg &\\Rightarrow& \\I64.\\LOAD\\K{8\\_s}~m \\\\ &&|&\n     \\hex{31}~~m{:}\\Bmemarg &\\Rightarrow& \\I64.\\LOAD\\K{8\\_u}~m \\\\ &&|&\n     \\hex{32}~~m{:}\\Bmemarg &\\Rightarrow& \\I64.\\LOAD\\K{16\\_s}~m \\\\ &&|&\n     \\hex{33}~~m{:}\\Bmemarg &\\Rightarrow& \\I64.\\LOAD\\K{16\\_u}~m \\\\ &&|&\n     \\hex{34}~~m{:}\\Bmemarg &\\Rightarrow& \\I64.\\LOAD\\K{32\\_s}~m \\\\ &&|&\n     \\hex{35}~~m{:}\\Bmemarg &\\Rightarrow& \\I64.\\LOAD\\K{32\\_u}~m \\\\ &&|&\n     \\hex{36}~~m{:}\\Bmemarg &\\Rightarrow& \\I32.\\STORE~m \\\\ &&|&\n     \\hex{37}~~m{:}\\Bmemarg &\\Rightarrow& \\I64.\\STORE~m \\\\ &&|&\n     \\hex{38}~~m{:}\\Bmemarg &\\Rightarrow& \\F32.\\STORE~m \\\\ &&|&\n     \\hex{39}~~m{:}\\Bmemarg &\\Rightarrow& \\F64.\\STORE~m \\\\ &&|&\n     \\hex{3A}~~m{:}\\Bmemarg &\\Rightarrow& \\I32.\\STORE\\K{8}~m \\\\ &&|&\n     \\hex{3B}~~m{:}\\Bmemarg &\\Rightarrow& \\I32.\\STORE\\K{16}~m \\\\ &&|&\n     \\hex{3C}~~m{:}\\Bmemarg &\\Rightarrow& \\I64.\\STORE\\K{8}~m \\\\ &&|&\n     \\hex{3D}~~m{:}\\Bmemarg &\\Rightarrow& \\I64.\\STORE\\K{16}~m \\\\ &&|&\n     \\hex{3E}~~m{:}\\Bmemarg &\\Rightarrow& \\I64.\\STORE\\K{32}~m \\\\ &&|&\n     \\hex{3F}~~\\hex{00} &\\Rightarrow& \\MEMORYSIZE \\\\ &&|&\n     \\hex{40}~~\\hex{00} &\\Rightarrow& \\MEMORYGROW \\\\ &&|&\n     \\hex{FC}~~8{:}\\Bu32~~x{:}\\Bdataidx~\\hex{00} &\\Rightarrow& \\MEMORYINIT~x \\\\ &&|&\n     \\hex{FC}~~9{:}\\Bu32~~x{:}\\Bdataidx &\\Rightarrow& \\DATADROP~x \\\\ &&|&\n     \\hex{FC}~~10{:}\\Bu32~~\\hex{00}~~\\hex{00} &\\Rightarrow& \\MEMORYCOPY \\\\ &&|&\n     \\hex{FC}~~11{:}\\Bu32~~\\hex{00} &\\Rightarrow& \\MEMORYFILL \\\\\n   \\end{array}\n\n.. note::\n   In future versions of WebAssembly, the additional zero bytes occurring in the encoding of the |MEMORYSIZE|, |MEMORYGROW|, |MEMORYCOPY|, and |MEMORYFILL| instructions may be used to index additional memories.\n\n\n.. index:: numeric instruction\n   pair: binary format; instruction\n.. _binary-instr-numeric:\n\nNumeric Instructions\n~~~~~~~~~~~~~~~~~~~~\n\nAll variants of :ref:`numeric instructions <syntax-instr-numeric>` are represented by separate byte codes.\n\nThe |CONST| instructions are followed by the respective literal.\n\n.. _binary-const:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{instruction} & \\Binstr &::=& \\dots \\\\&&|&\n     \\hex{41}~~n{:}\\Bi32 &\\Rightarrow& \\I32.\\CONST~n \\\\ &&|&\n     \\hex{42}~~n{:}\\Bi64 &\\Rightarrow& \\I64.\\CONST~n \\\\ &&|&\n     \\hex{43}~~z{:}\\Bf32 &\\Rightarrow& \\F32.\\CONST~z \\\\ &&|&\n     \\hex{44}~~z{:}\\Bf64 &\\Rightarrow& \\F64.\\CONST~z \\\\\n   \\end{array}\n\nAll other numeric instructions are plain opcodes without any immediates.\n\n.. _binary-testop:\n.. _binary-relop:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{instruction} & \\Binstr &::=& \\dots && \\phantom{thisshouldbeenough} \\\\&&|&\n     \\hex{45} &\\Rightarrow& \\I32.\\EQZ \\\\ &&|&\n     \\hex{46} &\\Rightarrow& \\I32.\\EQ \\\\ &&|&\n     \\hex{47} &\\Rightarrow& \\I32.\\NE \\\\ &&|&\n     \\hex{48} &\\Rightarrow& \\I32.\\LT\\K{\\_s} \\\\ &&|&\n     \\hex{49} &\\Rightarrow& \\I32.\\LT\\K{\\_u} \\\\ &&|&\n     \\hex{4A} &\\Rightarrow& \\I32.\\GT\\K{\\_s} \\\\ &&|&\n     \\hex{4B} &\\Rightarrow& \\I32.\\GT\\K{\\_u} \\\\ &&|&\n     \\hex{4C} &\\Rightarrow& \\I32.\\LE\\K{\\_s} \\\\ &&|&\n     \\hex{4D} &\\Rightarrow& \\I32.\\LE\\K{\\_u} \\\\ &&|&\n     \\hex{4E} &\\Rightarrow& \\I32.\\GE\\K{\\_s} \\\\ &&|&\n     \\hex{4F} &\\Rightarrow& \\I32.\\GE\\K{\\_u} \\\\\n   \\end{array}\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Binstr} &\\phantom{::=}& \\phantom{\\dots} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\hex{50} &\\Rightarrow& \\I64.\\EQZ \\\\ &&|&\n     \\hex{51} &\\Rightarrow& \\I64.\\EQ \\\\ &&|&\n     \\hex{52} &\\Rightarrow& \\I64.\\NE \\\\ &&|&\n     \\hex{53} &\\Rightarrow& \\I64.\\LT\\K{\\_s} \\\\ &&|&\n     \\hex{54} &\\Rightarrow& \\I64.\\LT\\K{\\_u} \\\\ &&|&\n     \\hex{55} &\\Rightarrow& \\I64.\\GT\\K{\\_s} \\\\ &&|&\n     \\hex{56} &\\Rightarrow& \\I64.\\GT\\K{\\_u} \\\\ &&|&\n     \\hex{57} &\\Rightarrow& \\I64.\\LE\\K{\\_s} \\\\ &&|&\n     \\hex{58} &\\Rightarrow& \\I64.\\LE\\K{\\_u} \\\\ &&|&\n     \\hex{59} &\\Rightarrow& \\I64.\\GE\\K{\\_s} \\\\ &&|&\n     \\hex{5A} &\\Rightarrow& \\I64.\\GE\\K{\\_u} \\\\\n   \\end{array}\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Binstr} &\\phantom{::=}& \\phantom{\\dots} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\hex{5B} &\\Rightarrow& \\F32.\\EQ \\\\ &&|&\n     \\hex{5C} &\\Rightarrow& \\F32.\\NE \\\\ &&|&\n     \\hex{5D} &\\Rightarrow& \\F32.\\LT \\\\ &&|&\n     \\hex{5E} &\\Rightarrow& \\F32.\\GT \\\\ &&|&\n     \\hex{5F} &\\Rightarrow& \\F32.\\LE \\\\ &&|&\n     \\hex{60} &\\Rightarrow& \\F32.\\GE \\\\\n   \\end{array}\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Binstr} &\\phantom{::=}& \\phantom{\\dots} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\hex{61} &\\Rightarrow& \\F64.\\EQ \\\\ &&|&\n     \\hex{62} &\\Rightarrow& \\F64.\\NE \\\\ &&|&\n     \\hex{63} &\\Rightarrow& \\F64.\\LT \\\\ &&|&\n     \\hex{64} &\\Rightarrow& \\F64.\\GT \\\\ &&|&\n     \\hex{65} &\\Rightarrow& \\F64.\\LE \\\\ &&|&\n     \\hex{66} &\\Rightarrow& \\F64.\\GE \\\\\n   \\end{array}\n\n.. _binary-unop:\n.. _binary-binop:\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Binstr} &\\phantom{::=}& \\phantom{\\dots} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\hex{67} &\\Rightarrow& \\I32.\\CLZ \\\\ &&|&\n     \\hex{68} &\\Rightarrow& \\I32.\\CTZ \\\\ &&|&\n     \\hex{69} &\\Rightarrow& \\I32.\\POPCNT \\\\ &&|&\n     \\hex{6A} &\\Rightarrow& \\I32.\\ADD \\\\ &&|&\n     \\hex{6B} &\\Rightarrow& \\I32.\\SUB \\\\ &&|&\n     \\hex{6C} &\\Rightarrow& \\I32.\\MUL \\\\ &&|&\n     \\hex{6D} &\\Rightarrow& \\I32.\\DIV\\K{\\_s} \\\\ &&|&\n     \\hex{6E} &\\Rightarrow& \\I32.\\DIV\\K{\\_u} \\\\ &&|&\n     \\hex{6F} &\\Rightarrow& \\I32.\\REM\\K{\\_s} \\\\ &&|&\n     \\hex{70} &\\Rightarrow& \\I32.\\REM\\K{\\_u} \\\\ &&|&\n     \\hex{71} &\\Rightarrow& \\I32.\\AND \\\\ &&|&\n     \\hex{72} &\\Rightarrow& \\I32.\\OR \\\\ &&|&\n     \\hex{73} &\\Rightarrow& \\I32.\\XOR \\\\ &&|&\n     \\hex{74} &\\Rightarrow& \\I32.\\SHL \\\\ &&|&\n     \\hex{75} &\\Rightarrow& \\I32.\\SHR\\K{\\_s} \\\\ &&|&\n     \\hex{76} &\\Rightarrow& \\I32.\\SHR\\K{\\_u} \\\\ &&|&\n     \\hex{77} &\\Rightarrow& \\I32.\\ROTL \\\\ &&|&\n     \\hex{78} &\\Rightarrow& \\I32.\\ROTR \\\\\n   \\end{array}\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Binstr} &\\phantom{::=}& \\phantom{\\dots} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\hex{79} &\\Rightarrow& \\I64.\\CLZ \\\\ &&|&\n     \\hex{7A} &\\Rightarrow& \\I64.\\CTZ \\\\ &&|&\n     \\hex{7B} &\\Rightarrow& \\I64.\\POPCNT \\\\ &&|&\n     \\hex{7C} &\\Rightarrow& \\I64.\\ADD \\\\ &&|&\n     \\hex{7D} &\\Rightarrow& \\I64.\\SUB \\\\ &&|&\n     \\hex{7E} &\\Rightarrow& \\I64.\\MUL \\\\ &&|&\n     \\hex{7F} &\\Rightarrow& \\I64.\\DIV\\K{\\_s} \\\\ &&|&\n     \\hex{80} &\\Rightarrow& \\I64.\\DIV\\K{\\_u} \\\\ &&|&\n     \\hex{81} &\\Rightarrow& \\I64.\\REM\\K{\\_s} \\\\ &&|&\n     \\hex{82} &\\Rightarrow& \\I64.\\REM\\K{\\_u} \\\\ &&|&\n     \\hex{83} &\\Rightarrow& \\I64.\\AND \\\\ &&|&\n     \\hex{84} &\\Rightarrow& \\I64.\\OR \\\\ &&|&\n     \\hex{85} &\\Rightarrow& \\I64.\\XOR \\\\ &&|&\n     \\hex{86} &\\Rightarrow& \\I64.\\SHL \\\\ &&|&\n     \\hex{87} &\\Rightarrow& \\I64.\\SHR\\K{\\_s} \\\\ &&|&\n     \\hex{88} &\\Rightarrow& \\I64.\\SHR\\K{\\_u} \\\\ &&|&\n     \\hex{89} &\\Rightarrow& \\I64.\\ROTL \\\\ &&|&\n     \\hex{8A} &\\Rightarrow& \\I64.\\ROTR \\\\\n   \\end{array}\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Binstr} &\\phantom{::=}& \\phantom{\\dots} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\hex{8B} &\\Rightarrow& \\F32.\\ABS \\\\ &&|&\n     \\hex{8C} &\\Rightarrow& \\F32.\\NEG \\\\ &&|&\n     \\hex{8D} &\\Rightarrow& \\F32.\\CEIL \\\\ &&|&\n     \\hex{8E} &\\Rightarrow& \\F32.\\FLOOR \\\\ &&|&\n     \\hex{8F} &\\Rightarrow& \\F32.\\TRUNC \\\\ &&|&\n     \\hex{90} &\\Rightarrow& \\F32.\\NEAREST \\\\ &&|&\n     \\hex{91} &\\Rightarrow& \\F32.\\SQRT \\\\ &&|&\n     \\hex{92} &\\Rightarrow& \\F32.\\ADD \\\\ &&|&\n     \\hex{93} &\\Rightarrow& \\F32.\\SUB \\\\ &&|&\n     \\hex{94} &\\Rightarrow& \\F32.\\MUL \\\\ &&|&\n     \\hex{95} &\\Rightarrow& \\F32.\\DIV \\\\ &&|&\n     \\hex{96} &\\Rightarrow& \\F32.\\FMIN \\\\ &&|&\n     \\hex{97} &\\Rightarrow& \\F32.\\FMAX \\\\ &&|&\n     \\hex{98} &\\Rightarrow& \\F32.\\COPYSIGN \\\\\n   \\end{array}\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Binstr} &\\phantom{::=}& \\phantom{\\dots} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\hex{99} &\\Rightarrow& \\F64.\\ABS \\\\ &&|&\n     \\hex{9A} &\\Rightarrow& \\F64.\\NEG \\\\ &&|&\n     \\hex{9B} &\\Rightarrow& \\F64.\\CEIL \\\\ &&|&\n     \\hex{9C} &\\Rightarrow& \\F64.\\FLOOR \\\\ &&|&\n     \\hex{9D} &\\Rightarrow& \\F64.\\TRUNC \\\\ &&|&\n     \\hex{9E} &\\Rightarrow& \\F64.\\NEAREST \\\\ &&|&\n     \\hex{9F} &\\Rightarrow& \\F64.\\SQRT \\\\ &&|&\n     \\hex{A0} &\\Rightarrow& \\F64.\\ADD \\\\ &&|&\n     \\hex{A1} &\\Rightarrow& \\F64.\\SUB \\\\ &&|&\n     \\hex{A2} &\\Rightarrow& \\F64.\\MUL \\\\ &&|&\n     \\hex{A3} &\\Rightarrow& \\F64.\\DIV \\\\ &&|&\n     \\hex{A4} &\\Rightarrow& \\F64.\\FMIN \\\\ &&|&\n     \\hex{A5} &\\Rightarrow& \\F64.\\FMAX \\\\ &&|&\n     \\hex{A6} &\\Rightarrow& \\F64.\\COPYSIGN \\\\\n   \\end{array}\n\n.. _binary-cvtop:\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Binstr} &\\phantom{::=}& \\phantom{\\dots} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\hex{A7} &\\Rightarrow& \\I32.\\WRAP\\K{\\_}\\I64 \\\\ &&|&\n     \\hex{A8} &\\Rightarrow& \\I32.\\TRUNC\\K{\\_}\\F32\\K{\\_s} \\\\ &&|&\n     \\hex{A9} &\\Rightarrow& \\I32.\\TRUNC\\K{\\_}\\F32\\K{\\_u} \\\\ &&|&\n     \\hex{AA} &\\Rightarrow& \\I32.\\TRUNC\\K{\\_}\\F64\\K{\\_s} \\\\ &&|&\n     \\hex{AB} &\\Rightarrow& \\I32.\\TRUNC\\K{\\_}\\F64\\K{\\_u} \\\\ &&|&\n     \\hex{AC} &\\Rightarrow& \\I64.\\EXTEND\\K{\\_}\\I32\\K{\\_s} \\\\ &&|&\n     \\hex{AD} &\\Rightarrow& \\I64.\\EXTEND\\K{\\_}\\I32\\K{\\_u} \\\\ &&|&\n     \\hex{AE} &\\Rightarrow& \\I64.\\TRUNC\\K{\\_}\\F32\\K{\\_s} \\\\ &&|&\n     \\hex{AF} &\\Rightarrow& \\I64.\\TRUNC\\K{\\_}\\F32\\K{\\_u} \\\\ &&|&\n     \\hex{B0} &\\Rightarrow& \\I64.\\TRUNC\\K{\\_}\\F64\\K{\\_s} \\\\ &&|&\n     \\hex{B1} &\\Rightarrow& \\I64.\\TRUNC\\K{\\_}\\F64\\K{\\_u} \\\\ &&|&\n     \\hex{B2} &\\Rightarrow& \\F32.\\CONVERT\\K{\\_}\\I32\\K{\\_s} \\\\ &&|&\n     \\hex{B3} &\\Rightarrow& \\F32.\\CONVERT\\K{\\_}\\I32\\K{\\_u} \\\\ &&|&\n     \\hex{B4} &\\Rightarrow& \\F32.\\CONVERT\\K{\\_}\\I64\\K{\\_s} \\\\ &&|&\n     \\hex{B5} &\\Rightarrow& \\F32.\\CONVERT\\K{\\_}\\I64\\K{\\_u} \\\\ &&|&\n     \\hex{B6} &\\Rightarrow& \\F32.\\DEMOTE\\K{\\_}\\F64 \\\\ &&|&\n     \\hex{B7} &\\Rightarrow& \\F64.\\CONVERT\\K{\\_}\\I32\\K{\\_s} \\\\ &&|&\n     \\hex{B8} &\\Rightarrow& \\F64.\\CONVERT\\K{\\_}\\I32\\K{\\_u} \\\\ &&|&\n     \\hex{B9} &\\Rightarrow& \\F64.\\CONVERT\\K{\\_}\\I64\\K{\\_s} \\\\ &&|&\n     \\hex{BA} &\\Rightarrow& \\F64.\\CONVERT\\K{\\_}\\I64\\K{\\_u} \\\\ &&|&\n     \\hex{BB} &\\Rightarrow& \\F64.\\PROMOTE\\K{\\_}\\F32 \\\\ &&|&\n     \\hex{BC} &\\Rightarrow& \\I32.\\REINTERPRET\\K{\\_}\\F32 \\\\ &&|&\n     \\hex{BD} &\\Rightarrow& \\I64.\\REINTERPRET\\K{\\_}\\F64 \\\\ &&|&\n     \\hex{BE} &\\Rightarrow& \\F32.\\REINTERPRET\\K{\\_}\\I32 \\\\ &&|&\n     \\hex{BF} &\\Rightarrow& \\F64.\\REINTERPRET\\K{\\_}\\I64 \\\\\n   \\end{array}\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Binstr} &\\phantom{::=}& \\phantom{\\dots} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\hex{C0} &\\Rightarrow& \\I32.\\EXTEND\\K{8\\_s} \\\\ &&|&\n     \\hex{C1} &\\Rightarrow& \\I32.\\EXTEND\\K{16\\_s} \\\\ &&|&\n     \\hex{C2} &\\Rightarrow& \\I64.\\EXTEND\\K{8\\_s} \\\\ &&|&\n     \\hex{C3} &\\Rightarrow& \\I64.\\EXTEND\\K{16\\_s} \\\\ &&|&\n     \\hex{C4} &\\Rightarrow& \\I64.\\EXTEND\\K{32\\_s} \\\\\n   \\end{array}\n\n.. _binary-cvtop-trunc-sat:\n\nThe saturating truncation instructions all have a one byte prefix,\nwhereas the actual opcode is encoded by a variable-length :ref:`unsigned integer <binary-uint>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{instruction} & \\Binstr &::=& \\dots && \\phantom{thisshouldbeenough} \\\\&&|&\n     \\hex{FC}~~0{:}\\Bu32 &\\Rightarrow& \\I32.\\TRUNC\\K{\\_sat\\_}\\F32\\K{\\_s} \\\\ &&|&\n     \\hex{FC}~~1{:}\\Bu32 &\\Rightarrow& \\I32.\\TRUNC\\K{\\_sat\\_}\\F32\\K{\\_u} \\\\ &&|&\n     \\hex{FC}~~2{:}\\Bu32 &\\Rightarrow& \\I32.\\TRUNC\\K{\\_sat\\_}\\F64\\K{\\_s} \\\\ &&|&\n     \\hex{FC}~~3{:}\\Bu32 &\\Rightarrow& \\I32.\\TRUNC\\K{\\_sat\\_}\\F64\\K{\\_u} \\\\ &&|&\n     \\hex{FC}~~4{:}\\Bu32 &\\Rightarrow& \\I64.\\TRUNC\\K{\\_sat\\_}\\F32\\K{\\_s} \\\\ &&|&\n     \\hex{FC}~~5{:}\\Bu32 &\\Rightarrow& \\I64.\\TRUNC\\K{\\_sat\\_}\\F32\\K{\\_u} \\\\ &&|&\n     \\hex{FC}~~6{:}\\Bu32 &\\Rightarrow& \\I64.\\TRUNC\\K{\\_sat\\_}\\F64\\K{\\_s} \\\\ &&|&\n     \\hex{FC}~~7{:}\\Bu32 &\\Rightarrow& \\I64.\\TRUNC\\K{\\_sat\\_}\\F64\\K{\\_u} \\\\\n   \\end{array}\n\n\n.. index:: expression\n   pair: binary format; expression\n   single: expression; constant\n.. _binary-expr:\n\nExpressions\n~~~~~~~~~~~\n\n:ref:`Expressions <syntax-expr>` are encoded by their instruction sequence terminated with an explicit :math:`\\hex{0B}` opcode for |END|.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{expression} & \\Bexpr &::=&\n     (\\X{in}{:}\\Binstr)^\\ast~~\\hex{0B} &\\Rightarrow& \\X{in}^\\ast~\\END \\\\\n   \\end{array}\n"
  },
  {
    "path": "document/core/binary/modules.rst",
    "content": "Modules\n-------\n\nThe binary encoding of modules is organized into *sections*.\nMost sections correspond to one component of a :ref:`module <syntax-module>` record,\nexcept that :ref:`function definitions <syntax-func>` are split into two sections, separating their type declarations in the :ref:`function section <binary-funcsec>` from their bodies in the :ref:`code section <binary-codesec>`.\n\n.. note::\n   This separation enables *parallel* and *streaming* compilation of the functions in a module.\n\n\n.. index:: index, type index, function index, table index, memory index, global index, element index, data index, local index, label index\n   pair: binary format; type index\n   pair: binary format; function index\n   pair: binary format; table index\n   pair: binary format; memory index\n   pair: binary format; global index\n   pair: binary format; element index\n   pair: binary format; data index\n   pair: binary format; local index\n   pair: binary format; label index\n.. _binary-typeidx:\n.. _binary-funcidx:\n.. _binary-tableidx:\n.. _binary-memidx:\n.. _binary-globalidx:\n.. _binary-elemidx:\n.. _binary-dataidx:\n.. _binary-localidx:\n.. _binary-labelidx:\n.. _binary-index:\n\nIndices\n~~~~~~~\n\nAll :ref:`indices <syntax-index>` are encoded with their respective value.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{type index} & \\Btypeidx &::=& x{:}\\Bu32 &\\Rightarrow& x \\\\\n   \\production{function index} & \\Bfuncidx &::=& x{:}\\Bu32 &\\Rightarrow& x \\\\\n   \\production{table index} & \\Btableidx &::=& x{:}\\Bu32 &\\Rightarrow& x \\\\\n   \\production{memory index} & \\Bmemidx &::=& x{:}\\Bu32 &\\Rightarrow& x \\\\\n   \\production{global index} & \\Bglobalidx &::=& x{:}\\Bu32 &\\Rightarrow& x \\\\\n   \\production{element index} & \\Belemidx &::=& x{:}\\Bu32 &\\Rightarrow& x \\\\\n   \\production{data index} & \\Bdataidx &::=& x{:}\\Bu32 &\\Rightarrow& x \\\\\n   \\production{local index} & \\Blocalidx &::=& x{:}\\Bu32 &\\Rightarrow& x \\\\\n   \\production{label index} & \\Blabelidx &::=& l{:}\\Bu32 &\\Rightarrow& l \\\\\n   \\end{array}\n\n\n.. index:: ! section\n   pair: binary format; section\n.. _binary-section:\n\nSections\n~~~~~~~~\n\nEach section consists of\n\n* a one-byte section *id*,\n* the |U32| *size* of the contents, in bytes,\n* the actual *contents*, whose structure is depended on the section id.\n\nEvery section is optional; an omitted section is equivalent to the section being present with empty contents.\n\nThe following parameterized grammar rule defines the generic structure of a section with id :math:`N` and contents described by the grammar :math:`\\B{B}`.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad}l}\n   \\production{section} & \\Bsection_N(\\B{B}) &::=&\n     N{:}\\Bbyte~~\\X{size}{:}\\Bu32~~\\X{cont}{:}\\B{B}\n       &\\Rightarrow& \\X{cont} & (\\iff \\X{size} = ||\\B{B}||) \\\\ &&|&\n     \\epsilon &\\Rightarrow& \\epsilon\n   \\end{array}\n\nFor most sections, the contents :math:`\\B{B}` encodes a :ref:`vector <binary-vec>`.\nIn these cases, the empty result :math:`\\epsilon` is interpreted as the empty vector.\n\n.. note::\n   Other than for unknown :ref:`custom sections <binary-customsec>`,\n   the :math:`\\X{size}` is not required for decoding, but can be used to skip sections when navigating through a binary.\n   The module is malformed if the size does not match the length of the binary contents :math:`\\B{B}`.\n\nThe following section ids are used:\n\n==  ===============================================\nId  Section                                        \n==  ===============================================\n 0  :ref:`custom section <binary-customsec>`       \n 1  :ref:`type section <binary-typesec>`           \n 2  :ref:`import section <binary-importsec>`       \n 3  :ref:`function section <binary-funcsec>`       \n 4  :ref:`table section <binary-tablesec>`         \n 5  :ref:`memory section <binary-memsec>`          \n 6  :ref:`global section <binary-globalsec>`       \n 7  :ref:`export section <binary-exportsec>`       \n 8  :ref:`start section <binary-startsec>`         \n 9  :ref:`element section <binary-elemsec>`        \n10  :ref:`code section <binary-codesec>`           \n11  :ref:`data section <binary-datasec>`           \n12  :ref:`data count section <binary-datacountsec>`\n==  ===============================================\n\n\n.. index:: ! custom section\n   pair: binary format; custom section\n   single: section; custom\n.. _binary-customsec:\n\nCustom Section\n~~~~~~~~~~~~~~\n\n*Custom sections* have the id 0.\nThey are intended to be used for debugging information or third-party extensions, and are ignored by the WebAssembly semantics.\nTheir contents consist of a :ref:`name <syntax-name>` further identifying the custom section, followed by an uninterpreted sequence of bytes for custom use.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{custom section} & \\Bcustomsec &::=&\n     \\Bsection_0(\\Bcustom) \\\\\n   \\production{custom data} & \\Bcustom &::=&\n     \\Bname~~\\Bbyte^\\ast \\\\\n   \\end{array}\n\n.. note::\n   If an implementation interprets the data of a custom section, then errors in that data, or the placement of the section, must not invalidate the module.\n\n\n.. index:: ! type section, type definition\n   pair: binary format; type section\n   pair: section; type\n.. _binary-typedef:\n.. _binary-typesec:\n\nType Section\n~~~~~~~~~~~~\n\nThe *type section* has the id 1.\nIt decodes into a vector of :ref:`function types <syntax-functype>` that represent the |MTYPES| component of a :ref:`module <syntax-module>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{type section} & \\Btypesec &::=&\n     \\X{ft}^\\ast{:\\,}\\Bsection_1(\\Bvec(\\Bfunctype)) &\\Rightarrow& \\X{ft}^\\ast \\\\\n   \\end{array}\n\n\n.. index:: ! import section, import, name, function type, table type, memory type, global type\n   pair: binary format; import\n   pair: section; import\n.. _binary-import:\n.. _binary-importdesc:\n.. _binary-importsec:\n\nImport Section\n~~~~~~~~~~~~~~\n\nThe *import section* has the id 2.\nIt decodes into a vector of :ref:`imports <syntax-import>` that represent the |MIMPORTS| component of a :ref:`module <syntax-module>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{import section} & \\Bimportsec &::=&\n     \\X{im}^\\ast{:}\\Bsection_2(\\Bvec(\\Bimport)) &\\Rightarrow& \\X{im}^\\ast \\\\\n   \\production{import} & \\Bimport &::=&\n     \\X{mod}{:}\\Bname~~\\X{nm}{:}\\Bname~~d{:}\\Bimportdesc\n       &\\Rightarrow& \\{ \\IMODULE~\\X{mod}, \\INAME~\\X{nm}, \\IDESC~d \\} \\\\\n   \\production{import description} & \\Bimportdesc &::=&\n     \\hex{00}~~x{:}\\Btypeidx &\\Rightarrow& \\IDFUNC~x \\\\ &&|&\n     \\hex{01}~~\\X{tt}{:}\\Btabletype &\\Rightarrow& \\IDTABLE~\\X{tt} \\\\ &&|&\n     \\hex{02}~~\\X{mt}{:}\\Bmemtype &\\Rightarrow& \\IDMEM~\\X{mt} \\\\ &&|&\n     \\hex{03}~~\\X{gt}{:}\\Bglobaltype &\\Rightarrow& \\IDGLOBAL~\\X{gt} \\\\\n   \\end{array}\n\n\n.. index:: ! function section, function, type index, function type\n   pair: binary format; function\n   pair: section; function\n.. _binary-funcsec:\n\nFunction Section\n~~~~~~~~~~~~~~~~\n\nThe *function section* has the id 3.\nIt decodes into a vector of :ref:`type indices <syntax-typeidx>` that represent the |FTYPE| fields of the :ref:`functions <syntax-func>` in the |MFUNCS| component of a :ref:`module <syntax-module>`.\nThe |FLOCALS| and |FBODY| fields of the respective functions are encoded separately in the :ref:`code section <binary-codesec>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{function section} & \\Bfuncsec &::=&\n     x^\\ast{:}\\Bsection_3(\\Bvec(\\Btypeidx)) &\\Rightarrow& x^\\ast \\\\\n   \\end{array}\n\n\n.. index:: ! table section, table, table type\n   pair: binary format; table\n   pair: section; table\n.. _binary-table:\n.. _binary-tablesec:\n\nTable Section\n~~~~~~~~~~~~~\n\nThe *table section* has the id 4.\nIt decodes into a vector of :ref:`tables <syntax-table>` that represent the |MTABLES| component of a :ref:`module <syntax-module>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{table section} & \\Btablesec &::=&\n     \\X{tab}^\\ast{:}\\Bsection_4(\\Bvec(\\Btable)) &\\Rightarrow& \\X{tab}^\\ast \\\\\n   \\production{table} & \\Btable &::=&\n     \\X{tt}{:}\\Btabletype &\\Rightarrow& \\{ \\TTYPE~\\X{tt} \\} \\\\\n   \\end{array}\n\n\n.. index:: ! memory section, memory, memory type\n   pair: binary format; memory\n   pair: section; memory\n.. _binary-mem:\n.. _binary-memsec:\n\nMemory Section\n~~~~~~~~~~~~~~\n\nThe *memory section* has the id 5.\nIt decodes into a vector of :ref:`memories <syntax-mem>` that represent the |MMEMS| component of a :ref:`module <syntax-module>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{memory section} & \\Bmemsec &::=&\n     \\X{mem}^\\ast{:}\\Bsection_5(\\Bvec(\\Bmem)) &\\Rightarrow& \\X{mem}^\\ast \\\\\n   \\production{memory} & \\Bmem &::=&\n     \\X{mt}{:}\\Bmemtype &\\Rightarrow& \\{ \\MTYPE~\\X{mt} \\} \\\\\n   \\end{array}\n\n\n.. index:: ! global section, global, global type, expression\n   pair: binary format; global\n   pair: section; global\n.. _binary-global:\n.. _binary-globalsec:\n\nGlobal Section\n~~~~~~~~~~~~~~\n\nThe *global section* has the id 6.\nIt decodes into a vector of :ref:`globals <syntax-global>` that represent the |MGLOBALS| component of a :ref:`module <syntax-module>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{global section} & \\Bglobalsec &::=&\n     \\X{glob}^\\ast{:}\\Bsection_6(\\Bvec(\\Bglobal)) &\\Rightarrow& \\X{glob}^\\ast \\\\\n   \\production{global} & \\Bglobal &::=&\n     \\X{gt}{:}\\Bglobaltype~~e{:}\\Bexpr\n       &\\Rightarrow& \\{ \\GTYPE~\\X{gt}, \\GINIT~e \\} \\\\\n   \\end{array}\n\n\n.. index:: ! export section, export, name, index, function index, table index, memory index, global index\n   pair: binary format; export\n   pair: section; export\n.. _binary-export:\n.. _binary-exportdesc:\n.. _binary-exportsec:\n\nExport Section\n~~~~~~~~~~~~~~\n\nThe *export section* has the id 7.\nIt decodes into a vector of :ref:`exports <syntax-export>` that represent the |MEXPORTS| component of a :ref:`module <syntax-module>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{export section} & \\Bexportsec &::=&\n     \\X{ex}^\\ast{:}\\Bsection_7(\\Bvec(\\Bexport)) &\\Rightarrow& \\X{ex}^\\ast \\\\\n   \\production{export} & \\Bexport &::=&\n     \\X{nm}{:}\\Bname~~d{:}\\Bexportdesc\n       &\\Rightarrow& \\{ \\ENAME~\\X{nm}, \\EDESC~d \\} \\\\\n   \\production{export description} & \\Bexportdesc &::=&\n     \\hex{00}~~x{:}\\Bfuncidx &\\Rightarrow& \\EDFUNC~x \\\\ &&|&\n     \\hex{01}~~x{:}\\Btableidx &\\Rightarrow& \\EDTABLE~x \\\\ &&|&\n     \\hex{02}~~x{:}\\Bmemidx &\\Rightarrow& \\EDMEM~x \\\\ &&|&\n     \\hex{03}~~x{:}\\Bglobalidx &\\Rightarrow& \\EDGLOBAL~x \\\\\n   \\end{array}\n\n\n.. index:: ! start section, start function, function index\n   pair: binary format; start function\n   single: section; start\n   single: start function; section\n.. _binary-start:\n.. _binary-startsec:\n\nStart Section\n~~~~~~~~~~~~~\n\nThe *start section* has the id 8.\nIt decodes into an optional :ref:`start function <syntax-start>` that represents the |MSTART| component of a :ref:`module <syntax-module>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{start section} & \\Bstartsec &::=&\n     \\X{st}^?{:}\\Bsection_8(\\Bstart) &\\Rightarrow& \\X{st}^? \\\\\n   \\production{start function} & \\Bstart &::=&\n     x{:}\\Bfuncidx &\\Rightarrow& \\{ \\SFUNC~x \\} \\\\\n   \\end{array}\n\n\n.. index:: ! element section, element, table index, expression, function index\n   pair: binary format; element\n   pair: section; element\n   single: table; element\n   single: element; segment\n.. _binary-elem:\n.. _binary-elemsec:\n.. _binary-elemkind:\n\nElement Section\n~~~~~~~~~~~~~~~\n\nThe *element section* has the id 9.\nIt decodes into a vector of :ref:`element segments <syntax-elem>` that represent the |MELEMS| component of a :ref:`module <syntax-module>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{element section} & \\Belemsec &::=&\n     \\X{seg}^\\ast{:}\\Bsection_9(\\Bvec(\\Belem)) &\\Rightarrow& \\X{seg} \\\\\n   \\production{element segment} & \\Belem &::=&\n     \\hex{00}~~e{:}\\Bexpr~~y^\\ast{:}\\Bvec(\\Bfuncidx)\n       &\\Rightarrow& \\{ \\ETYPE~\\FUNCREF, \\EINIT~((\\REFFUNC~y)~\\END)^\\ast, \\EMODE~\\EACTIVE~\\{ \\ETABLE~0, \\EOFFSET~e \\} \\} \\\\ &&|&\n     \\hex{01}~~\\X{et}:\\Belemkind~~y^\\ast{:}\\Bvec(\\Bfuncidx)\n       &\\Rightarrow& \\{ \\ETYPE~\\X{et}, \\EINIT~((\\REFFUNC~y)~\\END)^\\ast, \\EMODE~\\EPASSIVE \\} \\\\ &&|&\n     \\hex{02}~~x{:}\\Btableidx~~e{:}\\Bexpr~~\\X{et}:\\Belemkind~~y^\\ast{:}\\Bvec(\\Bfuncidx)\n       &\\Rightarrow& \\{ \\ETYPE~\\X{et}, \\EINIT~((\\REFFUNC~y)~\\END)^\\ast, \\EMODE~\\EACTIVE~\\{ \\ETABLE~x, \\EOFFSET~e \\} \\} \\\\ &&|&\n     \\hex{03}~~\\X{et}:\\Belemkind~~y^\\ast{:}\\Bvec(\\Bfuncidx)\n       &\\Rightarrow& \\{ \\ETYPE~\\X{et}, \\EINIT~((\\REFFUNC~y)~\\END)^\\ast, \\EMODE~\\EDECLARATIVE \\} \\\\ &&|&\n     \\hex{04}~~e{:}\\Bexpr~~\\X{el}^\\ast{:}\\Bvec(\\Bexpr)\n       &\\Rightarrow& \\{ \\ETYPE~\\FUNCREF, \\EINIT~\\X{el}^\\ast, \\EMODE~\\EACTIVE~\\{ \\ETABLE~0, \\EOFFSET~e \\} \\} \\\\ &&|&\n     \\hex{05}~~\\X{et}:\\Breftype~~\\X{el}^\\ast{:}\\Bvec(\\Bexpr)\n       &\\Rightarrow& \\{ \\ETYPE~et, \\EINIT~\\X{el}^\\ast, \\EMODE~\\EPASSIVE \\} \\\\ &&|&\n     \\hex{06}~~x{:}\\Btableidx~~e{:}\\Bexpr~~\\X{et}:\\Breftype~~\\X{el}^\\ast{:}\\Bvec(\\Bexpr)\n       &\\Rightarrow& \\{ \\ETYPE~et, \\EINIT~\\X{el}^\\ast, \\EMODE~\\EACTIVE~\\{ \\ETABLE~x, \\EOFFSET~e \\} \\} \\\\ &&|&\n     \\hex{07}~~\\X{et}:\\Breftype~~\\X{el}^\\ast{:}\\Bvec(\\Bexpr)\n       &\\Rightarrow& \\{ \\ETYPE~et, \\EINIT~\\X{el}^\\ast, \\EMODE~\\EDECLARATIVE \\} \\\\\n   \\production{element kind} & \\Belemkind &::=&\n     \\hex{00} &\\Rightarrow& \\FUNCREF \\\\\n   \\end{array}\n\n.. note::\n   The initial byte can be interpreted as a bitfield.\n   Bit 0 indicates a passive or declarative segment,\n   bit 1 indicates the presence of an explicit table index for an active segment and otherwise distinguishes passive from declarative segments,\n   bit 2 indicates the use of element type and element :ref:`expressions <binary-expr>` instead of element kind and element indices.\n\n   Additional element kinds may be added in future versions of WebAssembly.\n\n\n.. index:: ! code section, function, local, type index, function type\n   pair: binary format; function\n   pair: binary format; local\n   pair: section; code\n.. _binary-code:\n.. _binary-func:\n.. _binary-local:\n.. _binary-codesec:\n\nCode Section\n~~~~~~~~~~~~\n\nThe *code section* has the id 10.\nIt decodes into a vector of *code* entries that are pairs of :ref:`value type <syntax-valtype>` vectors and :ref:`expressions <syntax-expr>`.\nThey represent the |FLOCALS| and |FBODY| field of the :ref:`functions <syntax-func>` in the |MFUNCS| component of a :ref:`module <syntax-module>`.\nThe |FTYPE| fields of the respective functions are encoded separately in the :ref:`function section <binary-funcsec>`.\n\nThe encoding of each code entry consists of\n\n* the |U32| *size* of the function code in bytes,\n* the actual *function code*, which in turn consists of\n\n  * the declaration of *locals*,\n  * the function *body* as an :ref:`expression <binary-expr>`.\n\nLocal declarations are compressed into a vector whose entries consist of\n\n* a |U32| *count*,\n* a :ref:`value type <binary-valtype>`,\n\ndenoting *count* locals of the same value type.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad}l}\n   \\production{code section} & \\Bcodesec &::=&\n     \\X{code}^\\ast{:}\\Bsection_{10}(\\Bvec(\\Bcode))\n       &\\Rightarrow& \\X{code}^\\ast \\\\\n   \\production{code} & \\Bcode &::=&\n     \\X{size}{:}\\Bu32~~\\X{code}{:}\\Bfunc\n       &\\Rightarrow& \\X{code} & (\\iff \\X{size} = ||\\Bfunc||) \\\\\n   \\production{function} & \\Bfunc &::=&\n     (t^\\ast)^\\ast{:}\\Bvec(\\Blocals)~~e{:}\\Bexpr\n       &\\Rightarrow& \\concat((t^\\ast)^\\ast), e^\\ast\n         & (\\iff |\\concat((t^\\ast)^\\ast)| < 2^{32}) \\\\\n   \\production{locals} & \\Blocals &::=&\n     n{:}\\Bu32~~t{:}\\Bvaltype &\\Rightarrow& t^n \\\\\n   \\end{array}\n\nHere, :math:`\\X{code}` ranges over pairs :math:`(\\valtype^\\ast, \\expr)`.\nThe meta function :math:`\\concat((t^\\ast)^\\ast)` concatenates all sequences :math:`t_i^\\ast` in :math:`(t^\\ast)^\\ast`.\nAny code for which the length of the resulting sequence is out of bounds of the maximum size of a :ref:`vector <syntax-vec>` is malformed.\n\n.. note::\n   Like with :ref:`sections <binary-section>`, the code :math:`\\X{size}` is not needed for decoding, but can be used to skip functions when navigating through a binary.\n   The module is malformed if a size does not match the length of the respective function code.\n\n\n.. index:: ! data section, data, memory, memory index, expression, byte\n   pair: binary format; data\n   pair: section; data\n   single: memory; data\n   single: data; segment\n.. _binary-data:\n.. _binary-datasec:\n\nData Section\n~~~~~~~~~~~~\n\nThe *data section* has the id 11.\nIt decodes into a vector of :ref:`data segments <syntax-data>` that represent the |MDATAS| component of a :ref:`module <syntax-module>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{data section} & \\Bdatasec &::=&\n     \\X{seg}^\\ast{:}\\Bsection_{11}(\\Bvec(\\Bdata)) &\\Rightarrow& \\X{seg} \\\\\n   \\production{data segment} & \\Bdata &::=&\n     \\hex{00}~~e{:}\\Bexpr~~b^\\ast{:}\\Bvec(\\Bbyte)\n       &\\Rightarrow& \\{ \\DINIT~b^\\ast, \\DMODE~\\DACTIVE~\\{ \\DMEM~0, \\DOFFSET~e \\} \\} \\\\ &&|&\n     \\hex{01}~~b^\\ast{:}\\Bvec(\\Bbyte)\n       &\\Rightarrow& \\{ \\DINIT~b^\\ast, \\DMODE~\\DPASSIVE \\} \\\\ &&|&\n     \\hex{02}~~x{:}\\Bmemidx~~e{:}\\Bexpr~~b^\\ast{:}\\Bvec(\\Bbyte)\n       &\\Rightarrow& \\{ \\DINIT~b^\\ast, \\DMODE~\\DACTIVE~\\{ \\DMEM~x, \\DOFFSET~e \\} \\} \\\\\n   \\end{array}\n\n.. note::\n   The initial byte can be interpreted as a bitfield.\n   Bit 0 indicates a passive segment,\n   bit 1 indicates the presence of an explicit memory index for an active segment.\n\n   In the current version of WebAssembly, at most one memory may be defined or\n   imported in a single module, so all valid :ref:`active <syntax-data>` data\n   segments have a |DMEM| value of :math:`0`.\n\n\n.. index:: ! data count section, data count, data segment\n   pair: binary format; data count\n   pair: section; data count\n.. _binary-datacountsec:\n\nData Count Section\n~~~~~~~~~~~~~~~~~~\n\nThe *data count section* has the id 12.\nIt decodes into an optional :ref:`u32 <syntax-uint>` that represents the number of :ref:`data segments <syntax-data>` in the :ref:`data section <binary-datasec>`. If this count does not match the length of the data segment vector, the module is malformed.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{data count section} & \\Bdatacountsec &::=&\n     \\X{n}^?{:}\\Bsection_{12}(\\Bu32) &\\Rightarrow& \\X{n}^? \\\\\n   \\end{array}\n\n.. note::\n   The data count section is used to simplify single-pass validation. Since the\n   data section occurs after the code section, the :math:`\\MEMORYINIT` and\n   :math:`\\DATADROP` instructions would not be able to check whether the data\n   segment index is valid until the data section is read. The data count section\n   occurs before the code section, so a single-pass validator can use this count\n   instead of deferring validation.\n\n\n.. index:: module, section, type definition, function type, function, table, memory, global, element, data, start function, import, export, context, version\n   pair: binary format; module\n.. _binary-magic:\n.. _binary-version:\n.. _binary-module:\n\nModules\n~~~~~~~\n\nThe encoding of a :ref:`module <syntax-module>` starts with a preamble containing a 4-byte magic number (the string :math:`\\text{\\backslash0asm}`) and a version field.\nThe current version of the WebAssembly binary format is 1.\n\nThe preamble is followed by a sequence of :ref:`sections <binary-section>`.\n:ref:`Custom sections <binary-customsec>` may be inserted at any place in this sequence,\nwhile other sections must occur at most once and in the prescribed order.\nAll sections can be empty.\n\nThe lengths of vectors produced by the (possibly empty) :ref:`function <binary-funcsec>` and :ref:`code <binary-codesec>` section must match up.\n\nSimilarly, the optional data count must match the length of the :ref:`data segment <binary-datasec>` vector.\nFurthermore, it must be present if any :math:`data index <syntax-dataidx>` occurs in the code section.\n\n.. math::\n   \\begin{array}{llcllll}\n   \\production{magic} & \\Bmagic &::=&\n     \\hex{00}~\\hex{61}~\\hex{73}~\\hex{6D} \\\\\n   \\production{version} & \\Bversion &::=&\n     \\hex{01}~\\hex{00}~\\hex{00}~\\hex{00} \\\\\n   \\production{module} & \\Bmodule &::=&\n     \\Bmagic \\\\ &&&\n     \\Bversion \\\\ &&&\n     \\Bcustomsec^\\ast \\\\ &&&\n     \\functype^\\ast{:\\,}\\Btypesec \\\\ &&&\n     \\Bcustomsec^\\ast \\\\ &&&\n     \\import^\\ast{:\\,}\\Bimportsec \\\\ &&&\n     \\Bcustomsec^\\ast \\\\ &&&\n     \\typeidx^n{:\\,}\\Bfuncsec \\\\ &&&\n     \\Bcustomsec^\\ast \\\\ &&&\n     \\table^\\ast{:\\,}\\Btablesec \\\\ &&&\n     \\Bcustomsec^\\ast \\\\ &&&\n     \\mem^\\ast{:\\,}\\Bmemsec \\\\ &&&\n     \\Bcustomsec^\\ast \\\\ &&&\n     \\global^\\ast{:\\,}\\Bglobalsec \\\\ &&&\n     \\Bcustomsec^\\ast \\\\ &&&\n     \\export^\\ast{:\\,}\\Bexportsec \\\\ &&&\n     \\Bcustomsec^\\ast \\\\ &&&\n     \\start^?{:\\,}\\Bstartsec \\\\ &&&\n     \\Bcustomsec^\\ast \\\\ &&&\n     \\elem^\\ast{:\\,}\\Belemsec \\\\ &&&\n     \\Bcustomsec^\\ast \\\\ &&&\n     m^?{:\\,}\\Bdatacountsec \\\\ &&&\n     \\Bcustomsec^\\ast \\\\ &&&\n     \\X{code}^n{:\\,}\\Bcodesec \\\\ &&&\n     \\Bcustomsec^\\ast \\\\ &&&\n     \\data^m{:\\,}\\Bdatasec \\\\ &&&\n     \\Bcustomsec^\\ast\n     \\quad\\Rightarrow\\quad \\{~\n       \\begin{array}[t]{@{}l@{}}\n       \\MTYPES~\\functype^\\ast, \\\\\n       \\MFUNCS~\\func^n, \\\\\n       \\MTABLES~\\table^\\ast, \\\\\n       \\MMEMS~\\mem^\\ast, \\\\\n       \\MGLOBALS~\\global^\\ast, \\\\\n       \\MELEMS~\\elem^\\ast, \\\\\n       \\MDATAS~\\data^m, \\\\\n       \\MSTART~\\start^?, \\\\\n       \\MIMPORTS~\\import^\\ast, \\\\\n       \\MEXPORTS~\\export^\\ast ~\\} \\\\\n       \\end{array} \\\\ &&&\n     (\\iff m^? \\neq \\epsilon \\vee \\freedataidx(\\X{code}^n) = \\emptyset) \\\\\n   \\end{array}\n\nwhere for each :math:`t_i^\\ast, e_i` in :math:`\\X{code}^n`,\n\n.. math::\n   \\func^n[i] = \\{ \\FTYPE~\\typeidx^n[i], \\FLOCALS~t_i^\\ast, \\FBODY~e_i \\} ) \\\\\n\n.. note::\n   The version of the WebAssembly binary format may increase in the future\n   if backward-incompatible changes have to be made to the format.\n   However, such changes are expected to occur very infrequently, if ever.\n   The binary format is intended to be forward-compatible,\n   such that future extensions can be made without incrementing its version.\n"
  },
  {
    "path": "document/core/binary/types.rst",
    "content": ".. index:: type\n   pair: binary format; type\n.. _binary-type:\n\nTypes\n-----\n\n.. note::\n   In future versions of WebAssembly, value types may include types denoted by :ref:`type indices <syntax-typeidx>`.\n   Thus, the binary format for types corresponds to the encodings of small negative :math:`\\xref{binary/values}{binary-sint}{\\sN}` values, so that they can coexist with (positive) type indices in the future.\n\n\n.. index:: number type\n   pair: binary format; number type\n.. _binary-numtype:\n\nNumber Types\n~~~~~~~~~~~~\n\n:ref:`Number types <syntax-numtype>` are encoded by a single byte.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{number type} & \\Bnumtype &::=&\n     \\hex{7F} &\\Rightarrow& \\I32 \\\\ &&|&\n     \\hex{7E} &\\Rightarrow& \\I64 \\\\ &&|&\n     \\hex{7D} &\\Rightarrow& \\F32 \\\\ &&|&\n     \\hex{7C} &\\Rightarrow& \\F64 \\\\\n   \\end{array}\n\n\n.. index:: reference type\n   pair: binary format; reference type\n.. _binary-reftype:\n\nReference Types\n~~~~~~~~~~~~~~~\n\n:ref:`Reference types <syntax-reftype>` are also encoded by a single byte.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{reference type} & \\Breftype &::=&\n     \\hex{70} &\\Rightarrow& \\FUNCREF \\\\ &&|&\n     \\hex{6F} &\\Rightarrow& \\EXTERNREF \\\\\n   \\end{array}\n\n\n.. index:: value type, number type, reference type\n   pair: binary format; value type\n.. _binary-valtype:\n\nValue Types\n~~~~~~~~~~~\n\n:ref:`Value types <syntax-valtype>` are encoded with their respective encoding as a :ref:`number type <binary-numtype>` or :ref:`reference type <binary-reftype>`.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{value type} & \\Bvaltype &::=&\n     t{:}\\Bnumtype &\\Rightarrow& t \\\\ &&|&\n     t{:}\\Breftype &\\Rightarrow& t \\\\\n   \\end{array}\n\n.. note::\n   Value types can occur in contexts where :ref:`type indices <syntax-typeidx>` are also allowed, such as in the case of :ref:`block types <binary-blocktype>`.\n   Thus, the binary format for types corresponds to the |SignedLEB128|_ :ref:`encoding <binary-sint>` of small negative :math:`\\sN` values, so that they can coexist with (positive) type indices in the future.\n\n\n.. index:: result type, value type\n   pair: binary format; result type\n.. _binary-resulttype:\n\nResult Types\n~~~~~~~~~~~~\n\n:ref:`Result types <syntax-resulttype>` are encoded by the respective :ref:`vectors <binary-vec>` of :ref:`value types `<binary-valtype>`.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{result type} & \\Bresulttype &::=&\n     t^\\ast{:\\,}\\Bvec(\\Bvaltype) &\\Rightarrow& [t^\\ast] \\\\\n   \\end{array}\n\n\n.. index:: function type, value type, result type\n   pair: binary format; function type\n.. _binary-functype:\n\nFunction Types\n~~~~~~~~~~~~~~\n\n:ref:`Function types <syntax-functype>` are encoded by the byte :math:`\\hex{60}` followed by the respective :ref:`vectors <binary-vec>` of parameter and result types.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{function type} & \\Bfunctype &::=&\n     \\hex{60}~~\\X{rt}_1{:\\,}\\Bresulttype~~\\X{rt}_2{:\\,}\\Bresulttype\n       &\\Rightarrow& \\X{rt}_1 \\to \\X{rt}_2 \\\\\n   \\end{array}\n\n\n.. index:: limits\n   pair: binary format; limits\n.. _binary-limits:\n\nLimits\n~~~~~~\n\n:ref:`Limits <syntax-limits>` are encoded with a preceding flag indicating whether a maximum is present.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{limits} & \\Blimits &::=&\n     \\hex{00}~~n{:}\\Bu32 &\\Rightarrow& \\{ \\LMIN~n, \\LMAX~\\epsilon \\} \\\\ &&|&\n     \\hex{01}~~n{:}\\Bu32~~m{:}\\Bu32 &\\Rightarrow& \\{ \\LMIN~n, \\LMAX~m \\} \\\\\n   \\end{array}\n\n\n.. index:: memory type, limits, page size\n   pair: binary format; memory type\n.. _binary-memtype:\n\nMemory Types\n~~~~~~~~~~~~\n\n:ref:`Memory types <syntax-memtype>` are encoded with their :ref:`limits <binary-limits>`.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{memory type} & \\Bmemtype &::=&\n     \\X{lim}{:}\\Blimits &\\Rightarrow& \\X{lim} \\\\\n   \\end{array}\n\n\n.. index:: table type, reference type, limits\n   pair: binary format; table type\n.. _binary-tabletype:\n\nTable Types\n~~~~~~~~~~~\n\n:ref:`Table types <syntax-tabletype>` are encoded with their :ref:`limits <binary-limits>` and the encoding of their element :ref:`reference type <syntax-reftype>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{table type} & \\Btabletype &::=&\n     \\X{et}{:}\\Breftype~~\\X{lim}{:}\\Blimits &\\Rightarrow& \\X{lim}~\\X{et} \\\\\n   \\end{array}\n\n\n.. index:: global type, mutability, value type\n   pair: binary format; global type\n   pair: binary format; mutability\n.. _binary-mut:\n.. _binary-globaltype:\n\nGlobal Types\n~~~~~~~~~~~~\n\n:ref:`Global types <syntax-globaltype>` are encoded by their :ref:`value type <binary-valtype>` and a flag for their :ref:`mutability <syntax-mut>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{global type} & \\Bglobaltype &::=&\n     t{:}\\Bvaltype~~m{:}\\Bmut &\\Rightarrow& m~t \\\\\n   \\production{mutability} & \\Bmut &::=&\n     \\hex{00} &\\Rightarrow& \\MCONST \\\\ &&|&\n     \\hex{01} &\\Rightarrow& \\MVAR \\\\\n   \\end{array}\n"
  },
  {
    "path": "document/core/binary/values.rst",
    "content": ".. index:: value\n   pair: binary format; value\n.. _binary-value:\n\nValues\n------\n\n\n.. index:: byte\n   pair: binary format; byte\n.. _binary-byte:\n\nBytes\n~~~~~\n\n:ref:`Bytes <syntax-byte>` encode themselves.\n\n.. math::\n   \\begin{array}{llcll@{\\qquad}l}\n   \\production{byte} & \\Bbyte &::=&\n     \\hex{00} &\\Rightarrow& \\hex{00} \\\\ &&|&&\n     \\dots \\\\ &&|&\n     \\hex{FF} &\\Rightarrow& \\hex{FF} \\\\\n   \\end{array}\n\n\n.. index:: integer, unsigned integer, signed integer, uninterpreted integer, LEB128, two's complement\n   pair: binary format; integer\n   pair: binary format; unsigned integer\n   pair: binary format; signed integer\n   pair: binary format; uninterpreted integer\n.. _binary-sint:\n.. _binary-uint:\n.. _binary-int:\n\nIntegers\n~~~~~~~~\n\nAll :ref:`integers <syntax-int>` are encoded using the |LEB128|_ variable-length integer encoding, in either unsigned or signed variant.\n\n:ref:`Unsigned integers <syntax-uint>` are encoded in |UnsignedLEB128|_ format.\nAs an additional constraint, the total number of bytes encoding a value of type :math:`\\uN` must not exceed :math:`\\F{ceil}(N/7)` bytes.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad}l}\n   \\production{unsigned integer} & \\BuN &::=&\n     n{:}\\Bbyte &\\Rightarrow& n & (\\iff n < 2^7 \\wedge n < 2^N) \\\\ &&|&\n     n{:}\\Bbyte~~m{:}\\BuX{(N\\B{-7})} &\\Rightarrow&\n       2^7\\cdot m + (n-2^7) & (\\iff n \\geq 2^7 \\wedge N > 7) \\\\\n   \\end{array}\n\n:ref:`Signed integers <syntax-sint>` are encoded in |SignedLEB128|_ format, which uses a two's complement representation.\nAs an additional constraint, the total number of bytes encoding a value of type :math:`\\sN` must not exceed :math:`\\F{ceil}(N/7)` bytes.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad}l}\n   \\production{signed integer} & \\BsN &::=&\n     n{:}\\Bbyte &\\Rightarrow& n & (\\iff n < 2^6 \\wedge n < 2^{N-1}) \\\\ &&|&\n     n{:}\\Bbyte &\\Rightarrow& n-2^7 & (\\iff 2^6 \\leq n < 2^7 \\wedge n \\geq 2^7-2^{N-1}) \\\\ &&|&\n     n{:}\\Bbyte~~m{:}\\BsX{(N\\B{-7})} &\\Rightarrow&\n       2^7\\cdot m + (n-2^7) & (\\iff n \\geq 2^7 \\wedge N > 7) \\\\\n   \\end{array}\n\n:ref:`Uninterpreted integers <syntax-int>` are encoded as signed integers.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{uninterpreted integer} & \\BiN &::=&\n     n{:}\\BsN &\\Rightarrow& i & (\\iff n = \\signed_{\\iN}(i))\n   \\end{array}\n\n.. note::\n   The side conditions :math:`N > 7` in the productions for non-terminal bytes of the :math:`\\uX{}` and :math:`\\sX{}` encodings restrict the encoding's length.\n   However, \"trailing zeros\" are still allowed within these bounds.\n   For example, :math:`\\hex{03}` and :math:`\\hex{83}~\\hex{00}` are both well-formed encodings for the value :math:`3` as a |u8|.\n   Similarly, either of :math:`\\hex{7e}` and :math:`\\hex{FE}~\\hex{7F}` and :math:`\\hex{FE}~\\hex{FF}~\\hex{7F}` are well-formed encodings of the value :math:`-2` as a |s16|.\n\n   The side conditions on the value :math:`n` of terminal bytes further enforce that\n   any unused bits in these bytes must be :math:`0` for positive values and :math:`1` for negative ones.\n   For example, :math:`\\hex{83}~\\hex{10}` is malformed as a |u8| encoding.\n   Similarly, both :math:`\\hex{83}~\\hex{3E}` and :math:`\\hex{FF}~\\hex{7B}` are malformed as |s8| encodings.\n\n\n.. index:: floating-point number, little endian\n   pair: binary format; floating-point number\n.. _binary-float:\n\nFloating-Point\n~~~~~~~~~~~~~~\n\n:ref:`Floating-point <syntax-float>` values are encoded directly by their |IEEE754|_ (Section 3.4) bit pattern in |LittleEndian|_ byte order:\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{floating-point value} & \\BfN &::=&\n     b^\\ast{:\\,}\\Bbyte^{N/8} &\\Rightarrow& \\bytes_{\\fN}^{-1}(b^\\ast) \\\\\n   \\end{array}\n\n\n.. index:: name, byte, Unicode, ! UTF-8\n   pair: binary format; name\n.. _binary-utf8:\n.. _binary-name:\n\nNames\n~~~~~\n\n:ref:`Names <syntax-name>` are encoded as a :ref:`vector <binary-vec>` of bytes containing the |Unicode|_ (Section 3.9) UTF-8 encoding of the name's character sequence.\n\n.. math::\n   \\begin{array}{llclllll}\n   \\production{name} & \\Bname &::=&\n     b^\\ast{:}\\Bvec(\\Bbyte) &\\Rightarrow& \\name\n       && (\\iff \\utf8(\\name) = b^\\ast) \\\\\n   \\end{array}\n\nThe auxiliary |utf8| function expressing this encoding is defined as follows:\n\n.. math::\n   \\begin{array}{@{}l@{}}\n   \\begin{array}{@{}lcl@{\\qquad}l@{}}\n   \\utf8(c^\\ast) &=& (\\utf8(c))^\\ast \\\\[1ex]\n   \\utf8(c) &=& b &\n     (\\begin{array}[t]{@{}c@{~}l@{}}\n      \\iff & c < \\unicode{80} \\\\\n      \\wedge & c = b) \\\\\n      \\end{array} \\\\\n   \\utf8(c) &=& b_1~b_2 &\n     (\\begin{array}[t]{@{}c@{~}l@{}}\n      \\iff & \\unicode{80} \\leq c < \\unicode{800} \\\\\n      \\wedge & c = 2^6(b_1-\\hex{C0})+(b_2-\\hex{80})) \\\\\n      \\end{array} \\\\\n   \\utf8(c) &=& b_1~b_2~b_3 &\n     (\\begin{array}[t]{@{}c@{~}l@{}}\n      \\iff & \\unicode{800} \\leq c < \\unicode{D800} \\vee \\unicode{E000} \\leq c < \\unicode{10000} \\\\\n      \\wedge & c = 2^{12}(b_1-\\hex{E0})+2^6(b_2-\\hex{80})+(b_3-\\hex{80})) \\\\\n      \\end{array} \\\\\n   \\utf8(c) &=& b_1~b_2~b_3~b_4 &\n     (\\begin{array}[t]{@{}c@{~}l@{}}\n      \\iff & \\unicode{10000} \\leq c < \\unicode{110000} \\\\\n      \\wedge & c = 2^{18}(b_1-\\hex{F0})+2^{12}(b_2-\\hex{80})+2^6(b_3-\\hex{80})+(b_4-\\hex{80})) \\\\\n      \\end{array} \\\\\n   \\end{array} \\\\\n   \\where b_2, b_3, b_4 < \\hex{C0} \\\\\n   \\end{array}\n\n.. note::\n   Unlike in some other formats, name strings are not 0-terminated.\n"
  },
  {
    "path": "document/core/conf.py",
    "content": "# -*- coding: utf-8 -*-\n#\n# WebAssembly documentation build configuration file, created by\n# sphinx-quickstart on Mon Nov 21 11:32:49 2016.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\nimport os\nimport sys\npwd = os.path.abspath('.')\nsys.path.insert(0, pwd + '/util')\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\nneeds_sphinx = '1.4'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n  'sphinx.ext.todo',\n  'sphinx.ext.coverage',\n  'sphinx.ext.mathjax',\n  'sphinx.ext.ifconfig',\n  'sphinx.ext.githubpages',\n  'mathdef',\n  'pseudo-lexer'\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\nsource_suffix = ['.rst']\n\n# The encoding of source files.\n#\n# source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nname = 'WebAssembly'\nproject = u'WebAssembly'\ntitle = u'WebAssembly Specification'\ncopyright = u'2017, WebAssembly Community Group'\nauthor = u'WebAssembly Community Group'\neditor = u'Andreas Rossberg (editor)'\nlogo = 'static/webassembly.png'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nversion = u'1.1'\n# The full version, including alpha/beta/rc tags.\nrelease = version + ''\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#\n# today = ''\n#\n# Else, today_fmt is used as the format for a strftime call.\n#\n# today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This patterns also effect to html_static_path and html_extra_path\nexclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']\n\n# The reST default role (used for this markup: `text`) to use for all\n# documents.\n#\n# default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#\n# add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#\n# add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#\n# show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n# modindex_common_prefix = []\n\n# If true, keep warnings as \"system message\" paragraphs in the built documents.\n# keep_warnings = False\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = True\n\n\n# -- Options for HTML output ----------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = 'alabaster'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#\nhtml_theme_options = {\n  'logo': logo,\n  'logo_name': 'WebAssembly',\n  'description': 'WebAssembly Specification',\n  'fixed_sidebar': True,\n  'sidebar_width': '260px',\n  'sidebar_collapse': True,\n  'show_powered_by': False,\n  'extra_nav_links': {\n    'Index': 'BASEDIR/genindex.html',\n    'Download as PDF': 'BASEDIR/_download/' + name + '.pdf'\n  },\n}\n\nhtml_sidebars = {\n  '**': [\n    # 'about.html',\n    'navigation.html',\n    # 'relations.html',\n    'searchbox.html',\n  ]\n}\n\n\n# Add any paths that contain custom themes here, relative to this directory.\n# html_theme_path = []\n\n# The name for this set of Sphinx documents.\n# \"<project> v<release> documentation\" by default.\n#\nhtml_title = project + u' ' + release\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n#\n# html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#\nhtml_logo = logo\n\n# The name of an image file (relative to this directory) to use as a favicon of\n# the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n#\n# html_favicon = None\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static', 'static/custom.css']\n\n# Add any extra paths that contain custom files (such as robots.txt or\n# .htaccess) here, relative to this directory. These files are copied\n# directly to the root of the documentation.\n#\n# html_extra_path = []\n\n# If not None, a 'Last updated on:' timestamp is inserted at every page\n# bottom, using the given strftime format.\n# The empty string is equivalent to '%b %d, %Y'.\n#\n# html_last_updated_fmt = None\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#\n# html_use_smartypants = True\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#\n# html_additional_pages = {}\n\n# If false, no module index is generated.\n#\nhtml_domain_indices = False\n\n# If false, no index is generated.\n#\nhtml_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#\nhtml_split_index = False\n\n# If true, the reST sources are included in the HTML build as _sources/name. The default is True.\n#\nhtml_copy_source = False\n\n# If true, links to the reST sources are added to the pages.\n#\nhtml_show_sourcelink = False\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#\nhtml_show_sphinx = False\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n#\nhtml_show_copyright = True\n\n# If this is not None, a ‘Last updated on:’ timestamp is inserted at every\n# page bottom, using the given strftime() format.\n#\nhtml_last_updated_fmt = '%F'\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n#\n# html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n#\n# html_file_suffix = None\n\n# Language to be used for generating the HTML full-text search index.\n# Sphinx supports the following languages:\n#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'\n#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'\n#\n# html_search_language = 'en'\n\n# A dictionary with options for the search language support, empty by default.\n# 'ja' uses this config value.\n# 'zh' user can custom change `jieba` dictionary path.\n#\n# html_search_options = {'type': 'default'}\n\n# The name of a javascript file (relative to the configuration directory) that\n# implements a search results scorer. If empty, the default will be used.\n#\n# html_search_scorer = 'scorer.js'\n\n# Output file base name for HTML help builder.\n#\nhtmlhelp_basename = 'WebAssemblydoc'\n\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n   # The paper size ('a4paper' or 'letterpaper').\n  'papersize': 'a4paper',\n\n   # The font size ('10pt', '11pt' or '12pt').\n  'pointsize': '10pt',\n\n   # Additional stuff for the LaTeX preamble.\n   'preamble': '',\n\n   # Latex figure (float) alignment\n  'figure_align': 'htbp',\n\n   # Fancy chapters [Bjarne, Sonny, Lenny, Glenn, Conny, Rejne]\n   'fncychap': '\\\\usepackage[Sonny]{fncychap}',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n  ( master_doc,\n    name + '.tex',\n    title,\n    author + '\\\\\\\\ \\\\hfill\\\\large ' + editor,\n    'manual'\n  ),\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#\nlatex_logo = logo\n\n# For \"manual\" documents [part, chapter, or section].\n#\nlatex_toplevel_sectioning = 'chapter'\n\n# If true, show page references after internal links.\n#\nlatex_show_pagerefs = False\n\n# How to show URL addresses after external links [no, footnote, inline].\n#\nlatex_show_urls = 'footnote'\n\n# Documents to append as an appendix to all manuals.\n#\n# latex_appendices = []\n\n# It false, will not define \\strong, \\code, \\titleref, \\crossref ... but only\n# \\sphinxstrong, ..., \\sphinxtitleref, ... To help avoid clash with user added\n# packages.\n#\n# latex_keep_old_macro_names = True\n\n# If false, no module index is generated.\n#\nlatex_domain_indices = False\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n  ( master_doc,\n    name,\n    title,\n    [author],\n    1\n  )\n]\n\n# If true, show URL addresses after external links.\n#\n# man_show_urls = False\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n  ( master_doc,\n    name,\n    title,\n    author,\n    name,\n    'A portable low-level execution format.',\n    'Virtual Machine'\n  ),\n]\n\n# Documents to append as an appendix to all manuals.\n#\n# texinfo_appendices = []\n\n# If false, no module index is generated.\n#\ntexinfo_domain_indices = False\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#\n# texinfo_show_urls = 'footnote'\n\n# If true, do not generate a @detailmenu in the \"Top\" node's menu.\n#\n# texinfo_no_detailmenu = False\n\n\n# -- Options for Epub output ----------------------------------------------\n\n# Bibliographic Dublin Core info.\nepub_title = project\nepub_author = author\nepub_publisher = author\nepub_copyright = copyright\n\n# The basename for the epub file. It defaults to the project name.\n# epub_basename = project\n\n# The HTML theme for the epub output. Since the default themes are not\n# optimized for small screen space, using the same theme for HTML and epub\n# output is usually not wise. This defaults to 'epub', a theme designed to save\n# visual space.\n#\n# epub_theme = 'epub'\n\n# The language of the text. It defaults to the language option\n# or 'en' if the language is not set.\n#\n# epub_language = ''\n\n# The scheme of the identifier. Typical schemes are ISBN or URL.\n# epub_scheme = ''\n\n# The unique identifier of the text. This can be a ISBN number\n# or the project homepage.\n#\n# epub_identifier = ''\n\n# A unique identification for the text.\n#\n# epub_uid = ''\n\n# A tuple containing the cover image and cover page html template filenames.\n#\n# epub_cover = ()\n\n# A sequence of (type, uri, title) tuples for the guide element of content.opf.\n#\n# epub_guide = ()\n\n# HTML files that should be inserted before the pages created by sphinx.\n# The format is a list of tuples containing the path and title.\n#\n# epub_pre_files = []\n\n# HTML files that should be inserted after the pages created by sphinx.\n# The format is a list of tuples containing the path and title.\n#\n# epub_post_files = []\n\n# A list of files that should not be packed into the epub file.\nepub_exclude_files = ['search.html']\n\n# The depth of the table of contents in toc.ncx.\n#\n# epub_tocdepth = 3\n\n# Allow duplicate toc entries.\n#\n# epub_tocdup = True\n\n# Choose between 'default' and 'includehidden'.\n#\n# epub_tocscope = 'default'\n\n# Fix unsupported image types using the Pillow.\n#\n# epub_fix_images = False\n\n# Scale large images.\n#\n# epub_max_image_width = 0\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#\n# epub_show_urls = 'inline'\n\n# If false, no index is generated.\n#\n# epub_use_index = True\n\n# Macros\nrst_prolog = \"\"\"\n.. include:: /\"\"\" + pwd + \"\"\"/util/macros.def\n\"\"\"\n\n# https://www.sphinx-doc.org/en/master/usage/extensions/math.html#confval-mathjax_config\n# http://docs.mathjax.org/en/v2.7-latest/options/input-processors/TeX.html\nmathjax_config = {\n    'TeX': { 'MAXBUFFER': 30*1024 },\n}\n"
  },
  {
    "path": "document/core/exec/conventions.rst",
    "content": ".. index:: ! execution, stack, store\n\nConventions\n-----------\n\nWebAssembly code is *executed* when :ref:`instantiating <exec-instantiation>` a module or :ref:`invoking <exec-invocation>` an :ref:`exported <syntax-export>` function on the resulting module :ref:`instance <syntax-moduleinst>`.\n\nExecution behavior is defined in terms of an *abstract machine* that models the *program state*.\nIt includes a *stack*, which records operand values and control constructs, and an abstract *store* containing global state.\n\nFor each instruction, there is a rule that specifies the effect of its execution on the program state.\nFurthermore, there are rules describing the instantiation of a module.\nAs with :ref:`validation <validation>`, all rules are given in two *equivalent* forms:\n\n1. In *prose*, describing the execution in intuitive form.\n2. In *formal notation*, describing the rule in mathematical form. [#cite-pldi2017]_\n\n.. note::\n   As with validation, the prose and formal rules are equivalent,\n   so that understanding of the formal notation is *not* required to read this specification.\n   The formalism offers a more concise description in notation that is used widely in programming languages semantics and is readily amenable to mathematical proof.\n\n\n.. _exec-notation-textual:\n\nProse Notation\n~~~~~~~~~~~~~~\n\nExecution is specified by stylised, step-wise rules for each :ref:`instruction <syntax-instr>` of the :ref:`abstract syntax <syntax>`.\nThe following conventions are adopted in stating these rules.\n\n* The execution rules implicitly assume a given :ref:`store <store>` :math:`S`.\n\n* The execution rules also assume the presence of an implicit :ref:`stack <stack>`\n  that is modified by *pushing* or *popping*\n  :ref:`values <syntax-value>`, :ref:`labels <syntax-label>`, and :ref:`frames <syntax-frame>`.\n\n* Certain rules require the stack to contain at least one frame.\n  The most recent frame is referred to as the *current* frame.\n\n* Both the store and the current frame are mutated by *replacing* some of their components.\n  Such replacement is assumed to apply globally.\n\n* The execution of an instruction may *trap*,\n  in which case the entire computation is aborted and no further modifications to the store are performed by it. (Other computations can still be initiated afterwards.)\n\n* The execution of an instruction may also end in a *jump* to a designated target,\n  which defines the next instruction to execute.\n\n* Execution can *enter* and *exit* :ref:`instruction sequences <syntax-instr-seq>` that form :ref:`blocks <syntax-instr-control>`.\n\n* :ref:`Instruction sequences <syntax-instr-seq>` are implicitly executed in order, unless a trap or jump occurs.\n\n* In various places the rules contain *assertions* expressing crucial invariants about the program state.\n\n\n.. index:: ! reduction rules, configuration, evaluation context\n.. _exec-notation:\n\nFormal Notation\n~~~~~~~~~~~~~~~\n\n.. note::\n   This section gives a brief explanation of the notation for specifying execution formally.\n   For the interested reader, a more thorough introduction can be found in respective text books. [#cite-tapl]_\n\nThe formal execution rules use a standard approach for specifying operational semantics, rendering them into *reduction rules*.\nEvery rule has the following general form:\n\n.. math::\n   \\X{configuration} \\quad\\stepto\\quad \\X{configuration}\n\nA *configuration* is a syntactic description of a program state.\nEach rule specifies one *step* of execution.\nAs long as there is at most one reduction rule applicable to a given configuration, reduction -- and thereby execution -- is *deterministic*.\nWebAssembly has only very few exceptions to this, which are noted explicitly in this specification.\n\nFor WebAssembly, a configuration typically is a tuple :math:`(S; F; \\instr^\\ast)` consisting of the current :ref:`store <store>` :math:`S`, the :ref:`call frame <frame>` :math:`F` of the current function, and the sequence of :ref:`instructions <syntax-instr>` that is to be executed.\n(A more precise definition is given :ref:`later <syntax-config>`.)\n\nTo avoid unnecessary clutter, the store :math:`S` and the frame :math:`F` are omitted from reduction rules that do not touch them.\n\nThere is no separate representation of the :ref:`stack <stack>`.\nInstead, it is conveniently represented as part of the configuration's instruction sequence.\nIn particular, :ref:`values <syntax-val>` are defined to coincide with |CONST| instructions,\nand a sequence of |CONST| instructions can be interpreted as an operand \"stack\" that grows to the right.\n\n.. note::\n   For example, the :ref:`reduction rule <exec-binop>` for the :math:`\\I32.\\ADD` instruction can be given as follows:\n\n   .. math::\n      (\\I32.\\CONST~n_1)~(\\I32.\\CONST~n_2)~\\I32.\\ADD \\quad\\stepto\\quad (\\I32.\\CONST~(n_1 + n_2) \\mod 2^{32})\n\n   Per this rule, two |CONST| instructions and the |ADD| instruction itself are removed from the instruction stream and replaced with one new |CONST| instruction.\n   This can be interpreted as popping two value off the stack and pushing the result.\n\n   When no result is produced, an instruction reduces to the empty sequence:\n\n   .. math::\n      \\NOP \\quad\\stepto\\quad \\epsilon\n\n:ref:`Labels <label>` and :ref:`frames <frame>` are similarly :ref:`defined <syntax-instr-admin>` to be part of an instruction sequence.\n\nThe order of reduction is determined by the definition of an appropriate :ref:`evaluation context <syntax-ctxt-eval>`.\n\nReduction *terminates* when no more reduction rules are applicable.\n:ref:`Soundness <soundness>` of the WebAssembly :ref:`type system <type-system>` guarantees that this is only the case when the original instruction sequence has either been reduced to a sequence of |CONST| instructions, which can be interpreted as the :ref:`values <syntax-val>` of the resulting operand stack,\nor if a :ref:`trap <syntax-trap>` occurred.\n\n.. note::\n   For example, the following instruction sequence,\n\n   .. math::\n      (\\F64.\\CONST~x_1)~(\\F64.\\CONST~x_2)~\\F64.\\NEG~(\\F64.\\CONST~x_3)~\\F64.\\ADD~\\F64.\\MUL\n\n   terminates after three steps:\n\n   .. math::\n      \\begin{array}{ll}\n      & (\\F64.\\CONST~x_1)~(\\F64.\\CONST~x_2)~\\F64.\\NEG~(\\F64.\\CONST~x_3)~\\F64.\\ADD~\\F64.\\MUL \\\\\n      \\stepto & (\\F64.\\CONST~x_1)~(\\F64.\\CONST~x_4)~(\\F64.\\CONST~x_3)~\\F64.\\ADD~\\F64.\\MUL \\\\\n      \\stepto & (\\F64.\\CONST~x_1)~(\\F64.\\CONST~x_5)~\\F64.\\MUL \\\\\n      \\stepto & (\\F64.\\CONST~x_6) \\\\\n      \\end{array}\n\n   where :math:`x_4 = -x_2` and :math:`x_5 = -x_2 + x_3` and :math:`x_6 = x_1 \\cdot (-x_2 + x_3)`.\n\n\n.. [#cite-pldi2017]\n   The semantics is derived from the following article:\n   Andreas Haas, Andreas Rossberg, Derek Schuff, Ben Titzer, Dan Gohman, Luke Wagner, Alon Zakai, JF Bastien, Michael Holman. |PLDI2017|_. Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2017). ACM 2017.\n\n.. [#cite-tapl]\n   For example: Benjamin Pierce. |TAPL|_. The MIT Press 2002\n"
  },
  {
    "path": "document/core/exec/index.rst",
    "content": ".. _exec:\n\nExecution\n=========\n\n.. toctree::\n   :maxdepth: 2\n\n   conventions\n   runtime\n   numerics\n   instructions\n   modules\n"
  },
  {
    "path": "document/core/exec/instructions.rst",
    "content": ".. index:: instruction, function type, store, validation\n.. _exec-instr:\n\nInstructions\n------------\n\nWebAssembly computation is performed by executing individual :ref:`instructions <syntax-instr>`.\n\n\n.. index:: numeric instruction, determinism, trap, NaN, value, value type\n   pair: execution; instruction\n   single: abstract syntax; instruction\n.. _exec-instr-numeric:\n\nNumeric Instructions\n~~~~~~~~~~~~~~~~~~~~\n\nNumeric instructions are defined in terms of the generic :ref:`numeric operators <exec-numeric>`.\nThe mapping of numeric instructions to their underlying operators is expressed by the following definition:\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\X{op}_{\\K{i}N}(n_1,\\dots,n_k) &=& \\F{i}\\X{op}_N(n_1,\\dots,n_k) \\\\\n   \\X{op}_{\\K{f}N}(z_1,\\dots,z_k) &=& \\F{f}\\X{op}_N(z_1,\\dots,z_k) \\\\\n   \\end{array}\n\nAnd for :ref:`conversion operators <exec-cvtop>`:\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\X{cvtop}^{\\sx^?}_{t_1,t_2}(c) &=& \\X{cvtop}^{\\sx^?}_{|t_1|,|t_2|}(c) \\\\\n   \\end{array}\n\nWhere the underlying operators are partial, the corresponding instruction will :ref:`trap <trap>` when the result is not defined.\nWhere the underlying operators are non-deterministic, because they may return one of multiple possible :ref:`NaN <syntax-nan>` values, so are the corresponding instructions.\n\n.. note::\n   For example, the result of instruction :math:`\\I32.\\ADD` applied to operands :math:`i_1, i_2`\n   invokes :math:`\\ADD_{\\I32}(i_1, i_2)`,\n   which maps to the generic :math:`\\iadd_{32}(i_1, i_2)` via the above definition.\n   Similarly, :math:`\\I64.\\TRUNC\\K{\\_}\\F32\\K{\\_s}` applied to :math:`z`\n   invokes :math:`\\TRUNC^{\\K{s}}_{\\F32,\\I64}(z)`,\n   which maps to the generic :math:`\\truncs_{32,64}(z)`.\n\n\n.. _exec-const:\n\n:math:`t\\K{.}\\CONST~c`\n......................\n\n1. Push the value :math:`t.\\CONST~c` to the stack.\n\n.. note::\n   No formal reduction rule is required for this instruction, since |CONST| instructions already are :ref:`values <syntax-val>`.\n\n\n.. _exec-unop:\n\n:math:`t\\K{.}\\unop`\n...................\n\n1. Assert: due to :ref:`validation <valid-unop>`, a value of :ref:`value type <syntax-valtype>` :math:`t` is on the top of the stack.\n\n2. Pop the value :math:`t.\\CONST~c_1` from the stack.\n\n3. If :math:`\\unop_t(c_1)` is defined, then:\n\n   a. Let :math:`c` be a possible result of computing :math:`\\unop_t(c_1)`.\n\n   b. Push the value :math:`t.\\CONST~c` to the stack.\n\n4. Else:\n\n   a. Trap.\n\n.. math::\n   \\begin{array}{lcl@{\\qquad}l}\n   (t\\K{.}\\CONST~c_1)~t\\K{.}\\unop &\\stepto& (t\\K{.}\\CONST~c)\n     & (\\iff c \\in \\unop_t(c_1)) \\\\\n   (t\\K{.}\\CONST~c_1)~t\\K{.}\\unop &\\stepto& \\TRAP\n     & (\\iff \\unop_{t}(c_1) = \\{\\})\n   \\end{array}\n\n\n.. _exec-binop:\n\n:math:`t\\K{.}\\binop`\n....................\n\n1. Assert: due to :ref:`validation <valid-binop>`, two values of :ref:`value type <syntax-valtype>` :math:`t` are on the top of the stack.\n\n2. Pop the value :math:`t.\\CONST~c_2` from the stack.\n\n3. Pop the value :math:`t.\\CONST~c_1` from the stack.\n\n4. If :math:`\\binop_t(c_1, c_2)` is defined, then:\n\n   a. Let :math:`c` be a possible result of computing :math:`\\binop_t(c_1, c_2)`.\n\n   b. Push the value :math:`t.\\CONST~c` to the stack.\n\n5. Else:\n\n   a. Trap.\n\n.. math::\n   \\begin{array}{lcl@{\\qquad}l}\n   (t\\K{.}\\CONST~c_1)~(t\\K{.}\\CONST~c_2)~t\\K{.}\\binop &\\stepto& (t\\K{.}\\CONST~c)\n     & (\\iff c \\in \\binop_t(c_1,c_2)) \\\\\n   (t\\K{.}\\CONST~c_1)~(t\\K{.}\\CONST~c_2)~t\\K{.}\\binop &\\stepto& \\TRAP\n     & (\\iff \\binop_{t}(c_1,c2) = \\{\\})\n   \\end{array}\n\n\n.. _exec-testop:\n\n:math:`t\\K{.}\\testop`\n.....................\n\n1. Assert: due to :ref:`validation <valid-testop>`, a value of :ref:`value type <syntax-valtype>` :math:`t` is on the top of the stack.\n\n2. Pop the value :math:`t.\\CONST~c_1` from the stack.\n\n3. Let :math:`c` be the result of computing :math:`\\testop_t(c_1)`.\n\n4. Push the value :math:`\\I32.\\CONST~c` to the stack.\n\n.. math::\n   \\begin{array}{lcl@{\\qquad}l}\n   (t\\K{.}\\CONST~c_1)~t\\K{.}\\testop &\\stepto& (\\I32\\K{.}\\CONST~c)\n     & (\\iff c = \\testop_t(c_1)) \\\\\n   \\end{array}\n\n\n.. _exec-relop:\n\n:math:`t\\K{.}\\relop`\n....................\n\n1. Assert: due to :ref:`validation <valid-relop>`, two values of :ref:`value type <syntax-valtype>` :math:`t` are on the top of the stack.\n\n2. Pop the value :math:`t.\\CONST~c_2` from the stack.\n\n3. Pop the value :math:`t.\\CONST~c_1` from the stack.\n\n4. Let :math:`c` be the result of computing :math:`\\relop_t(c_1, c_2)`.\n\n5. Push the value :math:`\\I32.\\CONST~c` to the stack.\n\n.. math::\n   \\begin{array}{lcl@{\\qquad}l}\n   (t\\K{.}\\CONST~c_1)~(t\\K{.}\\CONST~c_2)~t\\K{.}\\relop &\\stepto& (\\I32\\K{.}\\CONST~c)\n     & (\\iff c = \\relop_t(c_1,c_2)) \\\\\n   \\end{array}\n\n\n.. _exec-cvtop:\n\n:math:`t_2\\K{.}\\cvtop\\K{\\_}t_1\\K{\\_}\\sx^?`\n..........................................\n\n1. Assert: due to :ref:`validation <valid-cvtop>`, a value of :ref:`value type <syntax-valtype>` :math:`t_1` is on the top of the stack.\n\n2. Pop the value :math:`t_1.\\CONST~c_1` from the stack.\n\n3. If :math:`\\cvtop^{\\sx^?}_{t_1,t_2}(c_1)` is defined:\n\n   a. Let :math:`c_2` be a possible result of computing :math:`\\cvtop^{\\sx^?}_{t_1,t_2}(c_1)`.\n\n   b. Push the value :math:`t_2.\\CONST~c_2` to the stack.\n\n4. Else:\n\n   a. Trap.\n\n.. math::\n   \\begin{array}{lcl@{\\qquad}l}\n   (t_1\\K{.}\\CONST~c_1)~t_2\\K{.}\\cvtop\\K{\\_}t_1\\K{\\_}\\sx^? &\\stepto& (t_2\\K{.}\\CONST~c_2)\n     & (\\iff c_2 \\in \\cvtop^{\\sx^?}_{t_1,t_2}(c_1)) \\\\\n   (t_1\\K{.}\\CONST~c_1)~t_2\\K{.}\\cvtop\\K{\\_}t_1\\K{\\_}\\sx^? &\\stepto& \\TRAP\n     & (\\iff \\cvtop^{\\sx^?}_{t_1,t_2}(c_1) = \\{\\})\n   \\end{array}\n\n\n.. index:: reference instructions, reference\n   pair: execution; instruction\n   single: abstract syntax; instruction\n.. _exec-instr-ref:\n\nReference Instructions\n~~~~~~~~~~~~~~~~~~~~~~\n\n.. _exec-ref.null:\n\n:math:`\\REFNULL~t`\n..................\n\n1. Push the value :math:`\\REFNULL~t` to the stack.\n\n.. note::\n   No formal reduction rule is required for this instruction, since the |REFNULL| instruction is already a :ref:`value <syntax-val>`.\n\n\n.. _exec-ref.is_null:\n\n:math:`\\REFISNULL`\n..................\n\n1. Assert: due to :ref:`validation <valid-ref.is_null>`, a :ref:`reference value <syntax-ref>` is on the top of the stack.\n\n2. Pop the value :math:`\\val` from the stack.\n\n3. If :math:`\\val` is :math:`\\REFNULL~t`, then:\n\n   a. Push the value :math:`\\I32.\\CONST~1` to the stack.\n\n4. Else:\n\n   a. Push the value :math:`\\I32.\\CONST~0` to the stack.\n\n.. math::\n   \\begin{array}{lcl@{\\qquad}l}\n   \\val~\\REFISNULL &\\stepto& \\I32.\\CONST~1\n     & (\\iff \\val = \\REFNULL~t) \\\\\n   \\val~\\REFISNULL &\\stepto& \\I32.\\CONST~0\n     & (\\otherwise) \\\\\n   \\end{array}\n\n\n.. _exec-ref.func:\n\n:math:`\\REFFUNC~x`\n..................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-ref.func>`, :math:`F.\\AMODULE.\\MIFUNCS[x]` exists.\n\n3. Let :math:`a` be the :ref:`function address <syntax-funcaddr>` :math:`F.\\AMODULE.\\MIFUNCS[x]`.\n\n4. Push the value :math:`\\REFFUNCADDR~a` to the stack.\n\n.. math::\n   \\begin{array}{lcl@{\\qquad}l}\n   F; \\REFFUNC~x &\\stepto& F; \\REFFUNCADDR~a\n     & (\\iff a = F.\\AMODULE.\\MIFUNCS[x]) \\\\\n   \\end{array}\n\n\n.. index:: parametric instructions, value\n   pair: execution; instruction\n   single: abstract syntax; instruction\n.. _exec-instr-parametric:\n\nParametric Instructions\n~~~~~~~~~~~~~~~~~~~~~~~\n\n.. _exec-drop:\n\n:math:`\\DROP`\n.............\n\n1. Assert: due to :ref:`validation <valid-drop>`, a value is on the top of the stack.\n\n2. Pop the value :math:`\\val` from the stack.\n\n.. math::\n   \\begin{array}{lcl@{\\qquad}l}\n   \\val~~\\DROP &\\stepto& \\epsilon\n   \\end{array}\n\n\n.. _exec-select:\n\n:math:`\\SELECT~(t^\\ast)^?`\n..........................\n\n1. Assert: due to :ref:`validation <valid-select>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n2. Pop the value :math:`\\I32.\\CONST~c` from the stack.\n\n3. Assert: due to :ref:`validation <valid-select>`, two more values (of the same :ref:`value type <syntax-valtype>`) are on the top of the stack.\n\n4. Pop the value :math:`\\val_2` from the stack.\n\n5. Pop the value :math:`\\val_1` from the stack.\n\n6. If :math:`c` is not :math:`0`, then:\n\n   a. Push the value :math:`\\val_1` back to the stack.\n\n7. Else:\n\n   a. Push the value :math:`\\val_2` back to the stack.\n\n.. math::\n   \\begin{array}{lcl@{\\qquad}l}\n   \\val_1~\\val_2~(\\I32\\K{.}\\CONST~c)~\\SELECT~t^? &\\stepto& \\val_1\n     & (\\iff c \\neq 0) \\\\\n   \\val_1~\\val_2~(\\I32\\K{.}\\CONST~c)~\\SELECT~t^? &\\stepto& \\val_2\n     & (\\iff c = 0) \\\\\n   \\end{array}\n\n.. note::\n   In future versions of WebAssembly, |SELECT| may allow more than one value per choice.\n\n\n.. index:: variable instructions, local index, global index, address, global address, global instance, store, frame, value\n   pair: execution; instruction\n   single: abstract syntax; instruction\n.. _exec-instr-variable:\n\nVariable Instructions\n~~~~~~~~~~~~~~~~~~~~~\n\n.. _exec-local.get:\n\n:math:`\\LOCALGET~x`\n...................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-local.get>`, :math:`F.\\ALOCALS[x]` exists.\n\n3. Let :math:`\\val` be the value :math:`F.\\ALOCALS[x]`.\n\n4. Push the value :math:`\\val` to the stack.\n\n.. math::\n   \\begin{array}{lcl@{\\qquad}l}\n   F; (\\LOCALGET~x) &\\stepto& F; \\val\n     & (\\iff F.\\ALOCALS[x] = \\val) \\\\\n   \\end{array}\n\n\n.. _exec-local.set:\n\n:math:`\\LOCALSET~x`\n...................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-local.set>`, :math:`F.\\ALOCALS[x]` exists.\n\n3. Assert: due to :ref:`validation <valid-local.set>`, a value is on the top of the stack.\n\n4. Pop the value :math:`\\val` from the stack.\n\n5. Replace :math:`F.\\ALOCALS[x]` with the value :math:`\\val`.\n\n.. math::\n   \\begin{array}{lcl@{\\qquad}l}\n   F; \\val~(\\LOCALSET~x) &\\stepto& F'; \\epsilon\n     & (\\iff F' = F \\with \\ALOCALS[x] = \\val) \\\\\n   \\end{array}\n\n\n.. _exec-local.tee:\n\n:math:`\\LOCALTEE~x`\n...................\n\n1. Assert: due to :ref:`validation <valid-local.tee>`, a value is on the top of the stack.\n\n2. Pop the value :math:`\\val` from the stack.\n\n3. Push the value :math:`\\val` to the stack.\n\n4. Push the value :math:`\\val` to the stack.\n\n5. :ref:`Execute <exec-local.set>` the instruction :math:`(\\LOCALSET~x)`.\n\n.. math::\n   \\begin{array}{lcl@{\\qquad}l}\n   \\val~(\\LOCALTEE~x) &\\stepto& \\val~\\val~(\\LOCALSET~x)\n   \\end{array}\n\n\n.. _exec-global.get:\n\n:math:`\\GLOBALGET~x`\n....................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-global.get>`, :math:`F.\\AMODULE.\\MIGLOBALS[x]` exists.\n\n3. Let :math:`a` be the :ref:`global address <syntax-globaladdr>` :math:`F.\\AMODULE.\\MIGLOBALS[x]`.\n\n4. Assert: due to :ref:`validation <valid-global.get>`, :math:`S.\\SGLOBALS[a]` exists.\n\n5. Let :math:`\\X{glob}` be the :ref:`global instance <syntax-globalinst>` :math:`S.\\SGLOBALS[a]`.\n\n6. Let :math:`\\val` be the value :math:`\\X{glob}.\\GIVALUE`.\n\n7. Push the value :math:`\\val` to the stack.\n\n.. math::\n   \\begin{array}{l}\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\GLOBALGET~x) &\\stepto& S; F; \\val\n   \\end{array}\n   \\\\ \\qquad\n     (\\iff S.\\SGLOBALS[F.\\AMODULE.\\MIGLOBALS[x]].\\GIVALUE = \\val) \\\\\n   \\end{array}\n\n\n.. _exec-global.set:\n\n:math:`\\GLOBALSET~x`\n....................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-global.set>`, :math:`F.\\AMODULE.\\MIGLOBALS[x]` exists.\n\n3. Let :math:`a` be the :ref:`global address <syntax-globaladdr>` :math:`F.\\AMODULE.\\MIGLOBALS[x]`.\n\n4. Assert: due to :ref:`validation <valid-global.set>`, :math:`S.\\SGLOBALS[a]` exists.\n\n5. Let :math:`\\X{glob}` be the :ref:`global instance <syntax-globalinst>` :math:`S.\\SGLOBALS[a]`.\n\n6. Assert: due to :ref:`validation <valid-global.set>`, a value is on the top of the stack.\n\n7. Pop the value :math:`\\val` from the stack.\n\n8. Replace :math:`\\X{glob}.\\GIVALUE` with the value :math:`\\val`.\n\n.. math::\n   \\begin{array}{l}\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; \\val~(\\GLOBALSET~x) &\\stepto& S'; F; \\epsilon\n   \\end{array}\n   \\\\ \\qquad\n   (\\iff S' = S \\with \\SGLOBALS[F.\\AMODULE.\\MIGLOBALS[x]].\\GIVALUE = \\val) \\\\\n   \\end{array}\n\n.. note::\n   :ref:`Validation <valid-global.set>` ensures that the global is, in fact, marked as mutable.\n\n\n.. index:: table instruction, table index, store, frame, address, table address, table instance, element address, element instance, value, integer, limits, reference, reference type\n   pair: execution; instruction\n   single: abstract syntax; instruction\n.. _exec-instr-table:\n\nTable Instructions\n~~~~~~~~~~~~~~~~~~\n\n.. _exec-table.get:\n\n:math:`\\TABLEGET~x`\n...................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-table.get>`, :math:`F.\\AMODULE.\\MITABLES[x]` exists.\n\n3. Let :math:`a` be the :ref:`table address <syntax-tableaddr>` :math:`F.\\AMODULE.\\MITABLES[x]`.\n\n4. Assert: due to :ref:`validation <valid-table.get>`, :math:`S.\\STABLES[a]` exists.\n\n5. Let :math:`\\X{tab}` be the :ref:`table instance <syntax-tableinst>` :math:`S.\\STABLES[a]`.\n\n6. Assert: due to :ref:`validation <valid-table.get>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n7. Pop the value :math:`\\I32.\\CONST~i` from the stack.\n\n8. If :math:`i` is not smaller than the length of :math:`\\X{tab}.\\TIELEM`, then:\n\n   a. Trap.\n\n9. Let :math:`\\val` be the value :math:`\\X{tab}.\\TIELEM[i]`.\n\n10. Push the value :math:`\\val` to the stack.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{l}\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\I32.\\CONST~i)~(\\TABLEGET~x) &\\stepto& S; F; \\val\n   \\end{array}\n   \\\\ \\qquad\n     (\\iff S.\\STABLES[F.\\AMODULE.\\MITABLES[x]].\\TIELEM[i] = \\val) \\\\\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\I32.\\CONST~i)~(\\TABLEGET~x) &\\stepto& S; F; \\TRAP\n   \\end{array}\n   \\\\ \\qquad\n     (\\otherwise) \\\\\n   \\end{array}\n\n\n.. _exec-table.set:\n\n:math:`\\TABLESET`\n.................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-table.set>`, :math:`F.\\AMODULE.\\MITABLES[x]` exists.\n\n3. Let :math:`a` be the :ref:`table address <syntax-tableaddr>` :math:`F.\\AMODULE.\\MITABLES[x]`.\n\n4. Assert: due to :ref:`validation <valid-table.set>`, :math:`S.\\STABLES[a]` exists.\n\n5. Let :math:`\\X{tab}` be the :ref:`table instance <syntax-tableinst>` :math:`S.\\STABLES[a]`.\n\n6. Assert: due to :ref:`validation <valid-table.set>`, a :ref:`reference value <syntax-ref>` is on the top of the stack.\n\n7. Pop the value :math:`\\val` from the stack.\n\n8. Assert: due to :ref:`validation <valid-table.set>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n9. Pop the value :math:`\\I32.\\CONST~i` from the stack.\n\n10. If :math:`i` is not smaller than the length of :math:`\\X{tab}.\\TIELEM`, then:\n\n    a. Trap.\n\n11. Replace the element :math:`\\X{tab}.\\TIELEM[i]` with :math:`\\val`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{l}\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\I32.\\CONST~i)~\\val~(\\TABLESET~x) &\\stepto& S'; F; \\epsilon\n   \\end{array}\n   \\\\ \\qquad\n     (\\iff S' = S \\with \\STABLES[F.\\AMODULE.\\MITABLES[x]].\\TIELEM[i] = \\val) \\\\\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\I32.\\CONST~i)~\\val~(\\TABLESET~x) &\\stepto& S; F; \\TRAP\n   \\end{array}\n   \\\\ \\qquad\n     (\\otherwise) \\\\\n   \\end{array}\n\n\n.. _exec-table.size:\n\n:math:`\\TABLESIZE~x`\n....................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-table.size>`, :math:`F.\\AMODULE.\\MITABLES[x]` exists.\n\n3. Let :math:`a` be the :ref:`table address <syntax-tableaddr>` :math:`F.\\AMODULE.\\MITABLES[x]`.\n\n4. Assert: due to :ref:`validation <valid-table.size>`, :math:`S.\\STABLES[a]` exists.\n\n5. Let :math:`\\X{tab}` be the :ref:`table instance <syntax-tableinst>` :math:`S.\\STABLES[a]`.\n\n6. Let :math:`\\X{sz}` be the length of :math:`\\X{tab}.\\TIELEM`.\n\n7. Push the value :math:`\\I32.\\CONST~\\X{sz}` to the stack.\n\n.. math::\n   \\begin{array}{l}\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; \\TABLESIZE~x &\\stepto& S; F; (\\I32.\\CONST~\\X{sz})\n   \\end{array}\n   \\\\ \\qquad\n     (\\iff |S.\\STABLES[F.\\AMODULE.\\MITABLES[x]].\\TIELEM| = \\X{sz}) \\\\\n   \\end{array}\n\n\n.. _exec-table.grow:\n\n:math:`\\TABLEGROW~x`\n....................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-table.grow>`, :math:`F.\\AMODULE.\\MITABLES[x]` exists.\n\n3. Let :math:`a` be the :ref:`table address <syntax-tableaddr>` :math:`F.\\AMODULE.\\MITABLES[x]`.\n\n4. Assert: due to :ref:`validation <valid-table.grow>`, :math:`S.\\STABLES[a]` exists.\n\n5. Let :math:`\\X{tab}` be the :ref:`table instance <syntax-tableinst>` :math:`S.\\STABLES[a]`.\n\n6. Let :math:`\\X{sz}` be the length of :math:`S.\\STABLES[a]`.\n\n7. Assert: due to :ref:`validation <valid-table.grow>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n8. Pop the value :math:`\\I32.\\CONST~n` from the stack.\n\n9. Assert: due to :ref:`validation <valid-table.fill>`, a :ref:`reference value <syntax-ref>` is on the top of the stack.\n\n10. Pop the value :math:`\\val` from the stack.\n\n11. Either, try :ref:`growing <grow-table>` :math:`\\X{table}` by :math:`n` entries with initialization value :math:`\\val`:\n\n   a. If it succeeds, push the value :math:`\\I32.\\CONST~\\X{sz}` to the stack.\n\n   b. Else, push the value :math:`\\I32.\\CONST~(-1)` to the stack.\n\n12. Or, push the value :math:`\\I32.\\CONST~(-1)` to the stack.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{l}\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; \\val~(\\I32.\\CONST~n)~\\TABLEGROW~x &\\stepto& S'; F; (\\I32.\\CONST~\\X{sz})\n   \\end{array}\n   \\\\ \\qquad\n     \\begin{array}[t]{@{}r@{~}l@{}}\n     (\\iff & F.\\AMODULE.\\MITABLES[x] = a \\\\\n     \\wedge & \\X{sz} = |S.\\STABLES[a].\\TIELEM| \\\\\n     \\wedge & S' = S \\with \\STABLES[a] = \\growtable(S.\\STABLES[a], n, \\val)) \\\\\n     \\end{array}\n   \\\\[1ex]\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\I32.\\CONST~n)~\\TABLEGROW~x &\\stepto& S; F; (\\I32.\\CONST~{-1})\n   \\end{array}\n   \\end{array}\n\n.. note::\n   The |TABLEGROW| instruction is non-deterministic.\n   It may either succeed, returning the old table size :math:`\\X{sz}`,\n   or fail, returning :math:`{-1}`.\n   Failure *must* occur if the referenced table instance has a maximum size defined that would be exceeded.\n   However, failure *can* occur in other cases as well.\n   In practice, the choice depends on the :ref:`resources <impl-exec>` available to the :ref:`embedder <embedder>`.\n\n\n.. _exec-table.fill:\n\n:math:`\\TABLEFILL~x`\n....................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-table.fill>`, :math:`F.\\AMODULE.\\MITABLES[x]` exists.\n\n3. Let :math:`\\X{ta}` be the :ref:`table address <syntax-tableaddr>` :math:`F.\\AMODULE.\\MITABLES[x]`.\n\n4. Assert: due to :ref:`validation <valid-table.fill>`, :math:`S.\\STABLES[\\X{ta}]` exists.\n\n5. Let :math:`\\X{tab}` be the :ref:`table instance <syntax-tableinst>` :math:`S.\\STABLES[\\X{ta}]`.\n\n6. Assert: due to :ref:`validation <valid-table.fill>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n7. Pop the value :math:`\\I32.\\CONST~n` from the stack.\n\n8. Assert: due to :ref:`validation <valid-table.fill>`, a :ref:`reference value <syntax-ref>` is on the top of the stack.\n\n9. Pop the value :math:`\\val` from the stack.\n\n10. Assert: due to :ref:`validation <valid-table.fill>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n11. Pop the value :math:`\\I32.\\CONST~i` from the stack.\n\n12. If :math:`i + n` is larger than the length of :math:`\\X{tab}.\\TIELEM`, then:\n\n    a. Trap.\n\n12. If :math:`n` is :math:`0`, then:\n\n    a. Return.\n\n13. Push the value :math:`\\I32.CONST~i` to the stack.\n\n14. Push the value :math:`\\val` to the stack.\n\n15. Execute the instruction :math:`\\TABLESET~x`.\n\n16. Push the value :math:`\\I32.CONST~(i+1)` to the stack.\n\n17. Push the value :math:`\\val` to the stack.\n\n18. Push the value :math:`\\I32.CONST~(n-1)` to the stack.\n\n19. Execute the instruction :math:`\\TABLEFILL~x`.\n\n.. math::\n   \\begin{array}{l}\n   S; F; (\\I32.\\CONST~i)~\\val~(\\I32.\\CONST~n)~(\\TABLEFILL~x)\n     \\quad\\stepto\\quad S; F; \\TRAP\n     \\\\ \\qquad\n     \\begin{array}[t]{@{}r@{~}l@{}}\n     (\\iff & i + n > |S.\\STABLES[F.\\AMODULE.\\MITABLES[x]].\\TIELEM|) \\\\\n     \\end{array}\n   \\\\[1ex]\n   S; F; (\\I32.\\CONST~i)~\\val~(\\I32.\\CONST~0)~(\\TABLEFILL~x)\n     \\quad\\stepto\\quad S; F; \\epsilon\n     \\\\ \\qquad\n     (\\otherwise)\n   \\\\[1ex]\n   S; F; (\\I32.\\CONST~i)~\\val~(\\I32.\\CONST~n+1)~(\\TABLEFILL~x)\n     \\quad\\stepto\\quad S; F;\n       \\begin{array}[t]{@{}l@{}}\n       (\\I32.\\CONST~i)~\\val~(\\TABLESET~x) \\\\\n       (\\I32.\\CONST~i+1)~\\val~(\\I32.\\CONST~n)~(\\TABLEFILL~x) \\\\\n       \\end{array}\n     \\\\ \\qquad\n     (\\otherwise) \\\\\n   \\end{array}\n\n\n.. _exec-table.copy:\n\n:math:`\\TABLECOPY~x~y`\n......................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-table.copy>`, :math:`F.\\AMODULE.\\MITABLES[x]` exists.\n\n3. Let :math:`\\X{ta}_x` be the :ref:`table address <syntax-tableaddr>` :math:`F.\\AMODULE.\\MITABLES[x]`.\n\n4. Assert: due to :ref:`validation <valid-table.copy>`, :math:`S.\\STABLES[\\X{ta}_x]` exists.\n\n5. Let :math:`\\X{tab}_x` be the :ref:`table instance <syntax-tableinst>` :math:`S.\\STABLES[\\X{ta}_x]`.\n\n6. Assert: due to :ref:`validation <valid-table.copy>`, :math:`F.\\AMODULE.\\MITABLES[y]` exists.\n\n7. Let :math:`\\X{ta}_y` be the :ref:`table address <syntax-tableaddr>` :math:`F.\\AMODULE.\\MITABLES[y]`.\n\n8. Assert: due to :ref:`validation <valid-table.copy>`, :math:`S.\\STABLES[\\X{ta}_y]` exists.\n\n9. Let :math:`\\X{tab}_y` be the :ref:`table instance <syntax-tableinst>` :math:`S.\\STABLES[\\X{ta}_y]`.\n\n10. Assert: due to :ref:`validation <valid-table.copy>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n11. Pop the value :math:`\\I32.\\CONST~n` from the stack.\n\n12. Assert: due to :ref:`validation <valid-table.copy>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n13. Pop the value :math:`\\I32.\\CONST~s` from the stack.\n\n14. Assert: due to :ref:`validation <valid-table.copy>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n15. Pop the value :math:`\\I32.\\CONST~d` from the stack.\n\n16. If :math:`s + n` is larger than the length of :math:`\\X{tab}_y.\\TIELEM` or :math:`d + n` is larger than the length of :math:`\\X{tab}_x.\\TIELEM`, then:\n\n    a. Trap.\n\n17. If :math:`n = 0`, then:\n\n   a. Return.\n\n18. If :math:`d \\leq s`, then:\n\n   a. Push the value :math:`\\I32.\\CONST~d` to the stack.\n\n   b. Push the value :math:`\\I32.\\CONST~s` to the stack.\n\n   c. Execute the instruction :math:`\\TABLEGET~y`.\n\n   d. Execute the instruction :math:`\\TABLESET~x`.\n\n   e. Assert: due to the earlier check against the table size, :math:`d+1 < 2^{32}`.\n\n   f. Push the value :math:`\\I32.\\CONST~(d+1)` to the stack.\n\n   g. Assert: due to the earlier check against the table size, :math:`s+1 < 2^{32}`.\n\n   h. Push the value :math:`\\I32.\\CONST~(s+1)` to the stack.\n\n19. Else:\n\n   a. Assert: due to the earlier check against the table size, :math:`d+n-1 < 2^{32}`.\n\n   b. Push the value :math:`\\I32.\\CONST~(d+n-1)` to the stack.\n\n   c. Assert: due to the earlier check against the table size, :math:`s+n-1 < 2^{32}`.\n\n   d. Push the value :math:`\\I32.\\CONST~(s+n-1)` to the stack.\n\n   c. Execute the instruction :math:`\\TABLEGET~y`.\n\n   f. Execute the instruction :math:`\\TABLESET~x`.\n\n   g. Push the value :math:`\\I32.\\CONST~d` to the stack.\n\n   h. Push the value :math:`\\I32.\\CONST~s` to the stack.\n\n20. Push the value :math:`\\I32.\\CONST~(n-1)` to the stack.\n\n21. Execute the instruction :math:`\\TABLECOPY~x~y`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{l}\n   S; F; (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\I32.\\CONST~n)~(\\TABLECOPY~x~y)\n     \\quad\\stepto\\quad S; F; \\TRAP\n     \\\\ \\qquad\n     \\begin{array}[t]{@{}r@{~}l@{}}\n     (\\iff & s + n > |S.\\STABLES[F.\\AMODULE.\\MITABLES[y]].\\TIELEM| \\\\\n      \\vee & d + n > |S.\\STABLES[F.\\AMODULE.\\MITABLES[x]].\\TIELEM|) \\\\\n     \\end{array}\n   \\\\[1ex]\n   S; F; (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\I32.\\CONST~0)~(\\TABLECOPY~x~y)\n     \\quad\\stepto\\quad S; F; \\epsilon\n     \\\\ \\qquad\n     (\\otherwise)\n   \\\\[1ex]\n   S; F; (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\I32.\\CONST~n+1)~(\\TABLECOPY~x~y)\n     \\quad\\stepto\\quad S; F;\n       \\begin{array}[t]{@{}l@{}}\n       (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\TABLEGET~y)~(\\TABLESET~x) \\\\\n       (\\I32.\\CONST~d+1)~(\\I32.\\CONST~s+1)~(\\I32.\\CONST~n)~(\\TABLECOPY~x~y) \\\\\n       \\end{array}\n     \\\\ \\qquad\n     (\\otherwise, \\iff d \\leq s)\n   \\\\[1ex]\n   S; F; (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\I32.\\CONST~n+1)~(\\TABLECOPY~x~y)\n     \\quad\\stepto\\quad S; F;\n       \\begin{array}[t]{@{}l@{}}\n       (\\I32.\\CONST~d+n-1)~(\\I32.\\CONST~s+n-1)~(\\TABLEGET~y)~(\\TABLESET~x) \\\\\n       (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\I32.\\CONST~n)~(\\TABLECOPY~x~y) \\\\\n       \\end{array}\n     \\\\ \\qquad\n     (\\otherwise, \\iff d > s) \\\\\n   \\end{array}\n\n\n.. _exec-table.init:\n\n:math:`\\TABLEINIT~x~y`\n......................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-table.init>`, :math:`F.\\AMODULE.\\MITABLES[x]` exists.\n\n3. Let :math:`\\X{ta}` be the :ref:`table address <syntax-tableaddr>` :math:`F.\\AMODULE.\\MITABLES[x]`.\n\n4. Assert: due to :ref:`validation <valid-table.init>`, :math:`S.\\STABLES[\\X{ta}]` exists.\n\n5. Let :math:`\\X{tab}` be the :ref:`table instance <syntax-tableinst>` :math:`S.\\STABLES[\\X{ta}]`.\n\n6. Assert: due to :ref:`validation <valid-table.init>`, :math:`F.\\AMODULE.\\MIELEMS[y]` exists.\n\n7. Let :math:`\\X{ea}` be the :ref:`element address <syntax-elemaddr>` :math:`F.\\AMODULE.\\MIELEMS[y]`.\n\n8. Assert: due to :ref:`validation <valid-table.init>`, :math:`S.\\SELEMS[\\X{ea}]` exists.\n\n9. Let :math:`\\X{elem}` be the :ref:`element instance <syntax-eleminst>` :math:`S.\\SELEMS[\\X{ea}]`.\n\n10. Assert: due to :ref:`validation <valid-table.init>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n11. Pop the value :math:`\\I32.\\CONST~n` from the stack.\n\n12. Assert: due to :ref:`validation <valid-table.init>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n13. Pop the value :math:`\\I32.\\CONST~s` from the stack.\n\n14. Assert: due to :ref:`validation <valid-table.init>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n15. Pop the value :math:`\\I32.\\CONST~d` from the stack.\n\n16. If :math:`s + n` is larger than the length of :math:`\\X{elem}.\\EIELEM` or :math:`d + n` is larger than the length of :math:`\\X{tab}.\\TIELEM`, then:\n\n    a. Trap.\n\n17. If :math:`n = 0`, then:\n\n    a. Return.\n\n18. Let :math:`\\val` be the :ref:`reference value <syntax-ref>` :math:`\\X{elem}.\\EIELEM[s]`.\n\n19. Push the value :math:`\\I32.\\CONST~d` to the stack.\n\n20. Push the value :math:`\\val` to the stack.\n\n21. Execute the instruction :math:`\\TABLESET~x`.\n\n22. Assert: due to the earlier check against the table size, :math:`d+1 < 2^{32}`.\n\n23. Push the value :math:`\\I32.\\CONST~(d+1)` to the stack.\n\n24. Assert: due to the earlier check against the segment size, :math:`s+1 < 2^{32}`.\n\n25. Push the value :math:`\\I32.\\CONST~(s+1)` to the stack.\n\n26. Push the value :math:`\\I32.\\CONST~(n-1)` to the stack.\n\n27. Execute the instruction :math:`\\TABLEINIT~x~y`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{l}\n   S; F; (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\I32.\\CONST~n)~(\\TABLEINIT~x~y)\n     \\quad\\stepto\\quad S; F; \\TRAP\n     \\\\ \\qquad\n     \\begin{array}[t]{@{}r@{~}l@{}}\n     (\\iff & s + n > |S.\\SELEMS[F.\\AMODULE.\\MIELEMS[y]].\\EIELEM| \\\\\n      \\vee & d + n > |S.\\STABLES[F.\\AMODULE.\\MITABLES[x]].\\TIELEM|) \\\\\n     \\end{array}\n   \\\\[1ex]\n   S; F; (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\I32.\\CONST~0)~(\\TABLEINIT~x~y)\n     \\quad\\stepto\\quad S; F; \\epsilon\n     \\\\ \\qquad\n     (\\otherwise)\n   \\\\[1ex]\n   S; F; (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\I32.\\CONST~n+1)~(\\TABLEINIT~x~y)\n     \\quad\\stepto\\quad S; F;\n       \\begin{array}[t]{@{}l@{}}\n       (\\I32.\\CONST~d)~\\val~(\\TABLESET~x) \\\\\n       (\\I32.\\CONST~d+1)~(\\I32.\\CONST~s+1)~(\\I32.\\CONST~n)~(\\TABLEINIT~x~y) \\\\\n       \\end{array}\n     \\\\ \\qquad\n     (\\otherwise, \\iff \\val = S.\\SELEMS[F.\\AMODULE.\\MIELEMS[x]].\\EIELEM[s]) \\\\\n   \\end{array}\n\n\n.. _exec-elem.drop:\n\n:math:`\\ELEMDROP~x`\n...................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-elem.drop>`, :math:`F.\\AMODULE.\\MIELEMS[x]` exists.\n\n3. Let :math:`a` be the :ref:`element address <syntax-elemaddr>` :math:`F.\\AMODULE.\\MIELEMS[x]`.\n\n4. Assert: due to :ref:`validation <valid-elem.drop>`, :math:`S.\\SELEMS[a]` exists.\n\n5. Replace :math:`S.\\SELEMS[a]` with the :ref:`element instance <syntax-eleminst>` :math:`\\{\\EIELEM~\\epsilon\\}`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{l}\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\ELEMDROP~x) &\\stepto& S'; F; \\epsilon\n   \\end{array}\n   \\\\ \\qquad\n     (\\iff S' = S \\with \\SELEMS[F.\\AMODULE.\\MIELEMS[x]] = \\{ \\EIELEM~\\epsilon \\}) \\\\\n   \\end{array}\n\n\n.. index:: memory instruction, memory index, store, frame, address, memory address, memory instance, value, integer, limits, value type, bit width\n   pair: execution; instruction\n   single: abstract syntax; instruction\n.. _exec-memarg:\n.. _exec-instr-memory:\n\nMemory Instructions\n~~~~~~~~~~~~~~~~~~~\n\n.. note::\n   The alignment :math:`\\memarg.\\ALIGN` in load and store instructions does not affect the semantics.\n   It is an indication that the offset :math:`\\X{ea}` at which the memory is accessed is intended to satisfy the property :math:`\\X{ea} \\mod 2^{\\memarg.\\ALIGN} = 0`.\n   A WebAssembly implementation can use this hint to optimize for the intended use.\n   Unaligned access violating that property is still allowed and must succeed regardless of the annotation.\n   However, it may be substantially slower on some hardware.\n\n\n.. _exec-load:\n.. _exec-loadn:\n\n:math:`t\\K{.}\\LOAD~\\memarg` and :math:`t\\K{.}\\LOAD{N}\\K{\\_}\\sx~\\memarg`\n.......................................................................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-loadn>`, :math:`F.\\AMODULE.\\MIMEMS[0]` exists.\n\n3. Let :math:`a` be the :ref:`memory address <syntax-memaddr>` :math:`F.\\AMODULE.\\MIMEMS[0]`.\n\n4. Assert: due to :ref:`validation <valid-loadn>`, :math:`S.\\SMEMS[a]` exists.\n\n5. Let :math:`\\X{mem}` be the :ref:`memory instance <syntax-meminst>` :math:`S.\\SMEMS[a]`.\n\n6. Assert: due to :ref:`validation <valid-loadn>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n7. Pop the value :math:`\\I32.\\CONST~i` from the stack.\n\n8. Let :math:`\\X{ea}` be the integer :math:`i + \\memarg.\\OFFSET`.\n\n9. If :math:`N` is not part of the instruction, then:\n\n   a. Let :math:`N` be the :ref:`bit width <syntax-valtype>` :math:`|t|` of :ref:`value type <syntax-valtype>` :math:`t`.\n\n10. If :math:`\\X{ea} + N/8` is larger than the length of :math:`\\X{mem}.\\MIDATA`, then:\n\n    a. Trap.\n\n11. Let :math:`b^\\ast` be the byte sequence :math:`\\X{mem}.\\MIDATA[\\X{ea} \\slice N/8]`.\n\n12. If :math:`N` and :math:`\\sx` are part of the instruction, then:\n\n    a. Let :math:`n` be the integer for which :math:`\\bytes_{\\iN}(n) = b^\\ast`.\n\n    b. Let :math:`c` be the result of computing :math:`\\extend^{\\sx}_{N,|t|}(n)`.\n\n13. Else:\n\n    a. Let :math:`c` be the constant for which :math:`\\bytes_t(c) = b^\\ast`.\n\n14. Push the value :math:`t.\\CONST~c` to the stack.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{l}\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\I32.\\CONST~i)~(t.\\LOAD~\\memarg) &\\stepto& S; F; (t.\\CONST~c)\n   \\end{array}\n   \\\\ \\qquad\n     \\begin{array}[t]{@{}r@{~}l@{}}\n     (\\iff & \\X{ea} = i + \\memarg.\\OFFSET \\\\\n     \\wedge & \\X{ea} + |t|/8 \\leq |S.\\SMEMS[F.\\AMODULE.\\MIMEMS[0]].\\MIDATA| \\\\\n     \\wedge & \\bytes_t(c) = S.\\SMEMS[F.\\AMODULE.\\MIMEMS[0]].\\MIDATA[\\X{ea} \\slice |t|/8])\n     \\end{array}\n   \\\\[1ex]\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\I32.\\CONST~i)~(t.\\LOAD{N}\\K{\\_}\\sx~\\memarg) &\\stepto&\n     S; F; (t.\\CONST~\\extend^{\\sx}_{N,|t|}(n))\n   \\end{array}\n   \\\\ \\qquad\n     \\begin{array}[t]{@{}r@{~}l@{}}\n     (\\iff & \\X{ea} = i + \\memarg.\\OFFSET \\\\\n     \\wedge & \\X{ea} + N/8 \\leq |S.\\SMEMS[F.\\AMODULE.\\MIMEMS[0]].\\MIDATA| \\\\\n     \\wedge & \\bytes_{\\iN}(n) = S.\\SMEMS[F.\\AMODULE.\\MIMEMS[0]].\\MIDATA[\\X{ea} \\slice N/8])\n     \\end{array}\n   \\\\[1ex]\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\I32.\\CONST~k)~(t.\\LOAD({N}\\K{\\_}\\sx)^?~\\memarg) &\\stepto& S; F; \\TRAP\n   \\end{array}\n   \\\\ \\qquad\n     (\\otherwise) \\\\\n   \\end{array}\n\n\n.. _exec-store:\n.. _exec-storen:\n\n:math:`t\\K{.}\\STORE~\\memarg` and :math:`t\\K{.}\\STORE{N}~\\memarg`\n................................................................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-storen>`, :math:`F.\\AMODULE.\\MIMEMS[0]` exists.\n\n3. Let :math:`a` be the :ref:`memory address <syntax-memaddr>` :math:`F.\\AMODULE.\\MIMEMS[0]`.\n\n4. Assert: due to :ref:`validation <valid-storen>`, :math:`S.\\SMEMS[a]` exists.\n\n5. Let :math:`\\X{mem}` be the :ref:`memory instance <syntax-meminst>` :math:`S.\\SMEMS[a]`.\n\n6. Assert: due to :ref:`validation <valid-storen>`, a value of :ref:`value type <syntax-valtype>` :math:`t` is on the top of the stack.\n\n7. Pop the value :math:`t.\\CONST~c` from the stack.\n\n8. Assert: due to :ref:`validation <valid-storen>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n9. Pop the value :math:`\\I32.\\CONST~i` from the stack.\n\n10. Let :math:`\\X{ea}` be the integer :math:`i + \\memarg.\\OFFSET`.\n\n11. If :math:`N` is not part of the instruction, then:\n\n    a. Let :math:`N` be the :ref:`bit width <syntax-valtype>` :math:`|t|` of :ref:`value type <syntax-valtype>` :math:`t`.\n\n12. If :math:`\\X{ea} + N/8` is larger than the length of :math:`\\X{mem}.\\MIDATA`, then:\n\n    a. Trap.\n\n13. If :math:`N` is part of the instruction, then:\n\n    a. Let :math:`n` be the result of computing :math:`\\wrap_{|t|,N}(c)`.\n\n    b. Let :math:`b^\\ast` be the byte sequence :math:`\\bytes_{\\iN}(n)`.\n\n14. Else:\n\n    a. Let :math:`b^\\ast` be the byte sequence :math:`\\bytes_t(c)`.\n\n15. Replace the bytes :math:`\\X{mem}.\\MIDATA[\\X{ea} \\slice N/8]` with :math:`b^\\ast`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{l}\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\I32.\\CONST~i)~(t.\\CONST~c)~(t.\\STORE~\\memarg) &\\stepto& S'; F; \\epsilon\n   \\end{array}\n   \\\\ \\qquad\n     \\begin{array}[t]{@{}r@{~}l@{}}\n     (\\iff & \\X{ea} = i + \\memarg.\\OFFSET \\\\\n     \\wedge & \\X{ea} + |t|/8 \\leq |S.\\SMEMS[F.\\AMODULE.\\MIMEMS[0]].\\MIDATA| \\\\\n     \\wedge & S' = S \\with \\SMEMS[F.\\AMODULE.\\MIMEMS[0]].\\MIDATA[\\X{ea} \\slice |t|/8] = \\bytes_t(c))\n     \\end{array}\n   \\\\[1ex]\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\I32.\\CONST~i)~(t.\\CONST~c)~(t.\\STORE{N}~\\memarg) &\\stepto& S'; F; \\epsilon\n   \\end{array}\n   \\\\ \\qquad\n     \\begin{array}[t]{@{}r@{~}l@{}}\n     (\\iff & \\X{ea} = i + \\memarg.\\OFFSET \\\\\n     \\wedge & \\X{ea} + N/8 \\leq |S.\\SMEMS[F.\\AMODULE.\\MIMEMS[0]].\\MIDATA| \\\\\n     \\wedge & S' = S \\with \\SMEMS[F.\\AMODULE.\\MIMEMS[0]].\\MIDATA[\\X{ea} \\slice N/8] = \\bytes_{\\iN}(\\wrap_{|t|,N}(c))\n     \\end{array}\n   \\\\[1ex]\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\I32.\\CONST~k)~(t.\\CONST~c)~(t.\\STORE{N}^?~\\memarg) &\\stepto& S; F; \\TRAP\n   \\end{array}\n   \\\\ \\qquad\n     (\\otherwise) \\\\\n   \\end{array}\n\n\n.. _exec-memory.size:\n\n:math:`\\MEMORYSIZE`\n...................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-memory.size>`, :math:`F.\\AMODULE.\\MIMEMS[0]` exists.\n\n3. Let :math:`a` be the :ref:`memory address <syntax-memaddr>` :math:`F.\\AMODULE.\\MIMEMS[0]`.\n\n4. Assert: due to :ref:`validation <valid-memory.size>`, :math:`S.\\SMEMS[a]` exists.\n\n5. Let :math:`\\X{mem}` be the :ref:`memory instance <syntax-meminst>` :math:`S.\\SMEMS[a]`.\n\n6. Let :math:`\\X{sz}` be the length of :math:`\\X{mem}.\\MIDATA` divided by the :ref:`page size <page-size>`.\n\n7. Push the value :math:`\\I32.\\CONST~\\X{sz}` to the stack.\n\n.. math::\n   \\begin{array}{l}\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; \\MEMORYSIZE &\\stepto& S; F; (\\I32.\\CONST~\\X{sz})\n   \\end{array}\n   \\\\ \\qquad\n     (\\iff |S.\\SMEMS[F.\\AMODULE.\\MIMEMS[0]].\\MIDATA| = \\X{sz}\\cdot64\\,\\F{Ki}) \\\\\n   \\end{array}\n\n\n.. _exec-memory.grow:\n\n:math:`\\MEMORYGROW`\n...................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-memory.grow>`, :math:`F.\\AMODULE.\\MIMEMS[0]` exists.\n\n3. Let :math:`a` be the :ref:`memory address <syntax-memaddr>` :math:`F.\\AMODULE.\\MIMEMS[0]`.\n\n4. Assert: due to :ref:`validation <valid-memory.grow>`, :math:`S.\\SMEMS[a]` exists.\n\n5. Let :math:`\\X{mem}` be the :ref:`memory instance <syntax-meminst>` :math:`S.\\SMEMS[a]`.\n\n6. Let :math:`\\X{sz}` be the length of :math:`S.\\SMEMS[a]` divided by the :ref:`page size <page-size>`.\n\n7. Assert: due to :ref:`validation <valid-memory.grow>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n8. Pop the value :math:`\\I32.\\CONST~n` from the stack.\n\n9. Let :math:`\\X{err}` be the |i32| value :math:`2^{32}-1`, for which :math:`\\signed_{32}(\\X{err})` is :math:`-1`.\n\n10. Either, try :ref:`growing <grow-mem>` :math:`\\X{mem}` by :math:`n` :ref:`pages <page-size>`:\n\n   a. If it succeeds, push the value :math:`\\I32.\\CONST~\\X{sz}` to the stack.\n\n   b. Else, push the value :math:`\\I32.\\CONST~\\X{err}` to the stack.\n\n11. Or, push the value :math:`\\I32.\\CONST~\\X{err}` to the stack.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{l}\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\I32.\\CONST~n)~\\MEMORYGROW &\\stepto& S'; F; (\\I32.\\CONST~\\X{sz})\n   \\end{array}\n   \\\\ \\qquad\n     \\begin{array}[t]{@{}r@{~}l@{}}\n     (\\iff & F.\\AMODULE.\\MIMEMS[0] = a \\\\\n     \\wedge & \\X{sz} = |S.\\SMEMS[a].\\MIDATA|/64\\,\\F{Ki} \\\\\n     \\wedge & S' = S \\with \\SMEMS[a] = \\growmem(S.\\SMEMS[a], n)) \\\\\n     \\end{array}\n   \\\\[1ex]\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\I32.\\CONST~n)~\\MEMORYGROW &\\stepto& S; F; (\\I32.\\CONST~\\signed_{32}^{-1}(-1))\n   \\end{array}\n   \\end{array}\n\n.. note::\n   The |MEMORYGROW| instruction is non-deterministic.\n   It may either succeed, returning the old memory size :math:`\\X{sz}`,\n   or fail, returning :math:`{-1}`.\n   Failure *must* occur if the referenced memory instance has a maximum size defined that would be exceeded.\n   However, failure *can* occur in other cases as well.\n   In practice, the choice depends on the :ref:`resources <impl-exec>` available to the :ref:`embedder <embedder>`.\n\n\n.. _exec-memory.fill:\n\n:math:`\\MEMORYFILL`\n...................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-memory.fill>`, :math:`F.\\AMODULE.\\MIMEMS[0]` exists.\n\n3. Let :math:`\\X{ma}` be the :ref:`memory address <syntax-memaddr>` :math:`F.\\AMODULE.\\MIMEMS[0]`.\n\n4. Assert: due to :ref:`validation <valid-memory.fill>`, :math:`S.\\SMEMS[\\X{ma}]` exists.\n\n5. Let :math:`\\X{mem}` be the :ref:`memory instance <syntax-meminst>` :math:`S.\\SMEMS[\\X{ma}]`.\n\n6. Assert: due to :ref:`validation <valid-memory.fill>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n7. Pop the value :math:`\\I32.\\CONST~n` from the stack.\n\n8. Assert: due to :ref:`validation <valid-memory.fill>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n9. Pop the value :math:`\\val` from the stack.\n\n10. Assert: due to :ref:`validation <valid-memory.fill>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n11. Pop the value :math:`\\I32.\\CONST~d` from the stack.\n\n12. If :math:`d + n` is larger than the length of :math:`\\X{mem}.\\MIDATA`, then:\n\n    a. Trap.\n\n13. If :math:`n = 0`, then:\n\n    a. Return.\n\n14. Push the value :math:`\\I32.\\CONST~d` to the stack.\n\n15. Push the value :math:`\\val` to the stack.\n\n16. Execute the instruction :math:`\\I32\\K{.}\\STORE\\K{8}~\\{ \\OFFSET~0, \\ALIGN~0 \\}`.\n\n17. Assert: due to the earlier check against the memory size, :math:`d+1 < 2^{32}`.\n\n18. Push the value :math:`\\I32.\\CONST~(d+1)` to the stack.\n\n19. Push the value :math:`\\val` to the stack.\n\n20. Push the value :math:`\\I32.\\CONST~(n-1)` to the stack.\n\n21. Execute the instruction :math:`\\MEMORYFILL`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{l}\n   S; F; (\\I32.\\CONST~d)~\\val~(\\I32.\\CONST~n)~\\MEMORYFILL\n     \\quad\\stepto\\quad S; F; \\TRAP\n     \\\\ \\qquad\n     (\\iff d + n > |S.\\SMEMS[F.\\AMODULE.\\MIMEMS[x]].\\MIDATA|) \\\\\n   \\\\[1ex]\n   S; F; (\\I32.\\CONST~d)~\\val~(\\I32.\\CONST~0)~\\MEMORYFILL\n     \\quad\\stepto\\quad S; F; \\epsilon\n     \\\\ \\qquad\n     (\\otherwise)\n   \\\\[1ex]\n   S; F; (\\I32.\\CONST~d)~\\val~(\\I32.\\CONST~n+1)~\\MEMORYFILL\n     \\quad\\stepto\\quad S; F;\n       \\begin{array}[t]{@{}l@{}}\n       (\\I32.\\CONST~d)~\\val~(\\I32\\K{.}\\STORE\\K{8}~\\{ \\OFFSET~0, \\ALIGN~0 \\}) \\\\\n       (\\I32.\\CONST~d+1)~\\val~(\\I32.\\CONST~n)~\\MEMORYFILL \\\\\n       \\end{array}\n     \\\\ \\qquad\n     (\\otherwise) \\\\\n   \\end{array}\n\n\n.. _exec-memory.copy:\n\n:math:`\\MEMORYCOPY`\n...................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-memory.copy>`, :math:`F.\\AMODULE.\\MIMEMS[0]` exists.\n\n3. Let :math:`\\X{ma}` be the :ref:`memory address <syntax-memaddr>` :math:`F.\\AMODULE.\\MIMEMS[0]`.\n\n4. Assert: due to :ref:`validation <valid-memory.copy>`, :math:`S.\\SMEMS[\\X{ma}]` exists.\n\n5. Let :math:`\\X{mem}` be the :ref:`memory instance <syntax-meminst>` :math:`S.\\SMEMS[\\X{ma}]`.\n\n6. Assert: due to :ref:`validation <valid-memory.copy>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n7. Pop the value :math:`\\I32.\\CONST~n` from the stack.\n\n8. Assert: due to :ref:`validation <valid-memory.copy>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n9. Pop the value :math:`\\I32.\\CONST~s` from the stack.\n\n10. Assert: due to :ref:`validation <valid-memory.copy>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n11. Pop the value :math:`\\I32.\\CONST~d` from the stack.\n\n12. If :math:`s + n` is larger than the length of :math:`\\X{mem}.\\MIDATA` or :math:`d + n` is larger than the length of :math:`\\X{mem}.\\MIDATA`, then:\n\n    a. Trap.\n\n13. If :math:`n = 0`, then:\n\n   a. Return.\n\n14. If :math:`d \\leq s`, then:\n\n   a. Push the value :math:`\\I32.\\CONST~d` to the stack.\n\n   b. Push the value :math:`\\I32.\\CONST~s` to the stack.\n\n   c. Execute the instruction :math:`\\I32\\K{.}\\LOAD\\K{8\\_u}~\\{ \\OFFSET~0, \\ALIGN~0 \\}`.\n\n   d. Execute the instruction :math:`\\I32\\K{.}\\STORE\\K{8}~\\{ \\OFFSET~0, \\ALIGN~0 \\}`.\n\n   e. Assert: due to the earlier check against the memory size, :math:`d+1 < 2^{32}`.\n\n   f. Push the value :math:`\\I32.\\CONST~(d+1)` to the stack.\n\n   g. Assert: due to the earlier check against the memory size, :math:`s+1 < 2^{32}`.\n\n   h. Push the value :math:`\\I32.\\CONST~(s+1)` to the stack.\n\n15. Else:\n\n   a. Assert: due to the earlier check against the memory size, :math:`d+n-1 < 2^{32}`.\n\n   b. Push the value :math:`\\I32.\\CONST~(d+n-1)` to the stack.\n\n   c. Assert: due to the earlier check against the memory size, :math:`s+n-1 < 2^{32}`.\n\n   d. Push the value :math:`\\I32.\\CONST~(s+n-1)` to the stack.\n\n   e. Execute the instruction :math:`\\I32\\K{.}\\LOAD\\K{8\\_u}~\\{ \\OFFSET~0, \\ALIGN~0 \\}`.\n\n   f. Execute the instruction :math:`\\I32\\K{.}\\STORE\\K{8}~\\{ \\OFFSET~0, \\ALIGN~0 \\}`.\n\n   g. Push the value :math:`\\I32.\\CONST~d` to the stack.\n\n   h. Push the value :math:`\\I32.\\CONST~s` to the stack.\n\n16. Push the value :math:`\\I32.\\CONST~(n-1)` to the stack.\n\n17. Execute the instruction :math:`\\MEMORYCOPY`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{l}\n   S; F; (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\I32.\\CONST~n)~\\MEMORYCOPY\n     \\quad\\stepto\\quad S; F; \\TRAP\n     \\\\ \\qquad\n     \\begin{array}[t]{@{}r@{~}l@{}}\n     (\\iff & s + n > |S.\\SMEMS[F.\\AMODULE.\\MIMEMS[0]].\\MIDATA| \\\\\n      \\vee & d + n > |S.\\SMEMS[F.\\AMODULE.\\MIMEMS[0]].\\MIDATA|) \\\\\n     \\end{array}\n   \\\\[1ex]\n   S; F; (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\I32.\\CONST~0)~\\MEMORYCOPY\n     \\quad\\stepto\\quad S; F; \\epsilon\n     \\\\ \\qquad\n     (\\otherwise)\n   \\\\[1ex]\n   S; F; (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\I32.\\CONST~n+1)~\\MEMORYCOPY\n     \\quad\\stepto\\quad S; F;\n       \\begin{array}[t]{@{}l@{}}\n       (\\I32.\\CONST~d) \\\\\n       (\\I32.\\CONST~s)~(\\I32\\K{.}\\LOAD\\K{8\\_u}~\\{ \\OFFSET~0, \\ALIGN~0 \\}) \\\\\n       (\\I32\\K{.}\\STORE\\K{8}~\\{ \\OFFSET~0, \\ALIGN~0 \\}) \\\\\n       (\\I32.\\CONST~d+1)~(\\I32.\\CONST~s+1)~(\\I32.\\CONST~n)~\\MEMORYCOPY \\\\\n       \\end{array}\n     \\\\ \\qquad\n     (\\otherwise, \\iff d \\leq s)\n   \\\\[1ex]\n   S; F; (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\I32.\\CONST~n+1)~\\MEMORYCOPY\n     \\quad\\stepto\\quad S; F;\n       \\begin{array}[t]{@{}l@{}}\n       (\\I32.\\CONST~d+n-1) \\\\\n       (\\I32.\\CONST~s+n-1)~(\\I32\\K{.}\\LOAD\\K{8\\_u}~\\{ \\OFFSET~0, \\ALIGN~0 \\}) \\\\\n       (\\I32\\K{.}\\STORE\\K{8}~\\{ \\OFFSET~0, \\ALIGN~0 \\}) \\\\\n       (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\I32.\\CONST~n)~\\MEMORYCOPY \\\\\n       \\end{array}\n     \\\\ \\qquad\n     (\\otherwise, \\iff d > s) \\\\\n   \\end{array}\n\n\n.. _exec-memory.init:\n\n:math:`\\MEMORYINIT~x`\n.....................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-memory.init>`, :math:`F.\\AMODULE.\\MIMEMS[0]` exists.\n\n3. Let :math:`\\X{ma}` be the :ref:`memory address <syntax-memaddr>` :math:`F.\\AMODULE.\\MIMEMS[0]`.\n\n4. Assert: due to :ref:`validation <valid-memory.init>`, :math:`S.\\SMEMS[\\X{ma}]` exists.\n\n5. Let :math:`\\X{mem}` be the :ref:`memory instance <syntax-meminst>` :math:`S.\\SMEMS[\\X{ma}]`.\n\n6. Assert: due to :ref:`validation <valid-memory.init>`, :math:`F.\\AMODULE.\\MIDATAS[x]` exists.\n\n7. Let :math:`\\X{da}` be the :ref:`data address <syntax-dataaddr>` :math:`F.\\AMODULE.\\MIDATAS[x]`.\n\n8. Assert: due to :ref:`validation <valid-memory.init>`, :math:`S.\\SDATAS[\\X{da}]` exists.\n\n9. Let :math:`\\X{data}` be the  :ref:`data instance <syntax-datainst>` :math:`S.\\SDATAS[\\X{da}]`.\n\n10. Assert: due to :ref:`validation <valid-memory.init>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n11. Pop the value :math:`\\I32.\\CONST~cnt` from the stack.\n\n12. Assert: due to :ref:`validation <valid-memory.init>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n13. Pop the value :math:`\\I32.\\CONST~src` from the stack.\n\n14. Assert: due to :ref:`validation <valid-memory.init>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n15. Pop the value :math:`\\I32.\\CONST~dst` from the stack.\n\n16. If :math:`s + n` is larger than the length of :math:`\\X{data}.\\DIDATA` or :math:`d + n` is larger than the length of :math:`\\X{mem}.\\MIDATA`, then:\n\n    a. Trap.\n\n17. If :math:`n = 0`, then:\n\n    a. Return.\n\n18. Let :math:`b` be the byte :math:`\\X{data}.\\DIDATA[s]`.\n\n19. Push the value :math:`\\I32.\\CONST~d` to the stack.\n\n20. Push the value :math:`\\I32.\\CONST~b` to the stack.\n\n21. Execute the instruction :math:`\\I32\\K{.}\\STORE\\K{8}~\\{ \\OFFSET~0, \\ALIGN~0 \\}`.\n\n22. Assert: due to the earlier check against the memory size, :math:`d+1 < 2^{32}`.\n\n23. Push the value :math:`\\I32.\\CONST~(d+1)` to the stack.\n\n24. Assert: due to the earlier check against the memory size, :math:`s+1 < 2^{32}`.\n\n25. Push the value :math:`\\I32.\\CONST~(s+1)` to the stack.\n\n26. Push the value :math:`\\I32.\\CONST~(n-1)` to the stack.\n\n27. Execute the instruction :math:`\\MEMORYINIT~x`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{l}\n   S; F; (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\I32.\\CONST~n)~(\\MEMORYINIT~x)\n     \\quad\\stepto\\quad S; F; \\TRAP\n     \\\\ \\qquad\n     \\begin{array}[t]{@{}r@{~}l@{}}\n     (\\iff & s + n > |S.\\SDATAS[F.\\AMODULE.\\MIDATAS[x]].\\DIDATA| \\\\\n      \\vee & d + n > |S.\\SMEMS[F.\\AMODULE.\\MIMEMS[x]].\\MIDATA|) \\\\\n     \\end{array}\n   \\\\[1ex]\n   S; F; (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\I32.\\CONST~0)~(\\MEMORYINIT~x)\n     \\quad\\stepto\\quad S; F; \\epsilon\n     \\\\ \\qquad\n     (\\otherwise)\n   \\\\[1ex]\n   S; F; (\\I32.\\CONST~d)~(\\I32.\\CONST~s)~(\\I32.\\CONST~n+1)~(\\MEMORYINIT~x)\n     \\quad\\stepto\\quad S; F;\n       \\begin{array}[t]{@{}l@{}}\n       (\\I32.\\CONST~d)~(\\I32.\\CONST~b)~(\\I32\\K{.}\\STORE\\K{8}~\\{ \\OFFSET~0, \\ALIGN~0 \\}) \\\\\n       (\\I32.\\CONST~d+1)~(\\I32.\\CONST~s+1)~(\\I32.\\CONST~n)~(\\MEMORYINIT~x) \\\\\n       \\end{array}\n     \\\\ \\qquad\n     (\\otherwise, \\iff b = S.\\SDATAS[F.\\AMODULE.\\MIDATAS[x]].\\DIDATA[s]) \\\\\n   \\end{array}\n\n\n.. _exec-data.drop:\n\n:math:`\\DATADROP~x`\n...................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-data.drop>`, :math:`F.\\AMODULE.\\MIDATAS[x]` exists.\n\n3. Let :math:`a` be the :ref:`data address <syntax-dataaddr>` :math:`F.\\AMODULE.\\MIDATAS[x]`.\n\n4. Assert: due to :ref:`validation <valid-data.drop>`, :math:`S.\\SDATAS[a]` exists.\n\n5. Replace :math:`S.\\SDATAS[a]` with the :ref:`data instance <syntax-datainst>` :math:`\\{\\DIDATA~\\epsilon\\}`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{l}\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\DATADROP~x) &\\stepto& S'; F; \\epsilon\n   \\end{array}\n   \\\\ \\qquad\n     (\\iff S' = S \\with \\SDATAS[F.\\AMODULE.\\MIDATAS[x]] = \\{ \\DIDATA~\\epsilon \\}) \\\\\n   \\end{array}\n\n\n.. index:: control instructions, structured control, label, block, branch, result type, label index, function index, type index, vector, address, table address, table instance, store, frame\n   pair: execution; instruction\n   single: abstract syntax; instruction\n.. _exec-label:\n.. _exec-instr-control:\n\nControl Instructions\n~~~~~~~~~~~~~~~~~~~~\n\n.. _exec-nop:\n\n:math:`\\NOP`\n............\n\n1. Do nothing.\n\n.. math::\n   \\begin{array}{lcl@{\\qquad}l}\n   \\NOP &\\stepto& \\epsilon\n   \\end{array}\n\n\n.. _exec-unreachable:\n\n:math:`\\UNREACHABLE`\n....................\n\n1. Trap.\n\n.. math::\n   \\begin{array}{lcl@{\\qquad}l}\n   \\UNREACHABLE &\\stepto& \\TRAP\n   \\end{array}\n\n\n.. _exec-block:\n\n:math:`\\BLOCK~\\blocktype~\\instr^\\ast~\\END`\n..........................................\n\n1. Assert: due to :ref:`validation <valid-blocktype>`, :math:`\\expand_F(\\blocktype)` is defined.\n\n2. Let :math:`[t_1^m] \\to [t_2^n]` be the :ref:`function type <syntax-functype>` :math:`\\expand_F(\\blocktype)`.\n\n3. Let :math:`L` be the label whose arity is :math:`n` and whose continuation is the end of the block.\n\n4. Assert: due to :ref:`validation <valid-block>`, there are at least :math:`m` values on the top of the stack.\n\n5. Pop the values :math:`\\val^m` from the stack.\n\n6. :ref:`Enter <exec-instr-seq-enter>` the block :math:`\\val^m~\\instr^\\ast` with label :math:`L`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{lcl@{\\qquad}l}\n   F; \\val^m~\\BLOCK~\\X{bt}~\\instr^\\ast~\\END &\\stepto&\n     F; \\LABEL_n\\{\\epsilon\\}~\\val^m~\\instr^\\ast~\\END\n     & (\\iff \\expand_F(\\X{bt}) = [t_1^m] \\to [t_2^n])\n   \\end{array}\n\n\n.. _exec-loop:\n\n:math:`\\LOOP~\\blocktype~\\instr^\\ast~\\END`\n.........................................\n\n1. Assert: due to :ref:`validation <valid-blocktype>`, :math:`\\expand_F(\\blocktype)` is defined.\n\n2. Let :math:`[t_1^m] \\to [t_2^n]` be the :ref:`function type <syntax-functype>` :math:`\\expand_F(\\blocktype)`.\n\n3. Let :math:`L` be the label whose arity is :math:`m` and whose continuation is the start of the loop.\n\n4. Assert: due to :ref:`validation <valid-loop>`, there are at least :math:`m` values on the top of the stack.\n\n5. Pop the values :math:`\\val^m` from the stack.\n\n6. :ref:`Enter <exec-instr-seq-enter>` the block :math:`\\val^m~\\instr^\\ast` with label :math:`L`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{lcl@{\\qquad}l}\n   F; \\val^m~\\LOOP~\\X{bt}~\\instr^\\ast~\\END &\\stepto&\n     F; \\LABEL_m\\{\\LOOP~\\X{bt}~\\instr^\\ast~\\END\\}~\\val^m~\\instr^\\ast~\\END\n     & (\\iff \\expand_F(\\X{bt}) = [t_1^m] \\to [t_2^n])\n   \\end{array}\n\n\n.. _exec-if:\n\n:math:`\\IF~\\blocktype~\\instr_1^\\ast~\\ELSE~\\instr_2^\\ast~\\END`\n.............................................................\n\n1. Assert: due to :ref:`validation <valid-blocktype>`, :math:`\\expand_F(\\blocktype)` is defined.\n\n2. Let :math:`[t_1^m] \\to [t_2^n]` be the :ref:`function type <syntax-functype>` :math:`\\expand_F(\\blocktype)`.\n\n3. Let :math:`L` be the label whose arity is :math:`n` and whose continuation is the end of the |IF| instruction.\n\n4. Assert: due to :ref:`validation <valid-if>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n5. Pop the value :math:`\\I32.\\CONST~c` from the stack.\n\n6. Assert: due to :ref:`validation <valid-if>`, there are at least :math:`m` values on the top of the stack.\n\n7. Pop the values :math:`\\val^m` from the stack.\n\n8. If :math:`c` is non-zero, then:\n\n   a. :ref:`Enter <exec-instr-seq-enter>` the block :math:`\\val^m~\\instr_1^\\ast` with label :math:`L`.\n\n9. Else:\n\n   a. :ref:`Enter <exec-instr-seq-enter>` the block :math:`\\val^m~\\instr_2^\\ast` with label :math:`L`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{lcl@{\\qquad}l}\n   F; \\val^m~(\\I32.\\CONST~c)~\\IF~\\X{bt}~\\instr_1^\\ast~\\ELSE~\\instr_2^\\ast~\\END &\\stepto&\n     F; \\LABEL_n\\{\\epsilon\\}~\\val^m~\\instr_1^\\ast~\\END\n     & (\\iff c \\neq 0 \\wedge \\expand_F(\\X{bt}) = [t_1^m] \\to [t_2^n]) \\\\\n   F; \\val^m~(\\I32.\\CONST~c)~\\IF~\\X{bt}~\\instr_1^\\ast~\\ELSE~\\instr_2^\\ast~\\END &\\stepto&\n     F; \\LABEL_n\\{\\epsilon\\}~\\val^m~\\instr_2^\\ast~\\END\n     & (\\iff c = 0 \\wedge \\expand_F(\\X{bt}) = [t_1^m] \\to [t_2^n]) \\\\\n   \\end{array}\n\n\n.. _exec-br:\n\n:math:`\\BR~l`\n.............\n\n1. Assert: due to :ref:`validation <valid-br>`, the stack contains at least :math:`l+1` labels.\n\n2. Let :math:`L` be the :math:`l`-th label appearing on the stack, starting from the top and counting from zero.\n\n3. Let :math:`n` be the arity of :math:`L`.\n\n4. Assert: due to :ref:`validation <valid-br>`, there are at least :math:`n` values on the top of the stack.\n\n5. Pop the values :math:`\\val^n` from the stack.\n\n6. Repeat :math:`l+1` times:\n\n   a. While the top of the stack is a value, do:\n\n      i. Pop the value from the stack.\n\n   b. Assert: due to :ref:`validation <valid-br>`, the top of the stack now is a label.\n\n   c. Pop the label from the stack.\n\n7. Push the values :math:`\\val^n` to the stack.\n\n8. Jump to the continuation of :math:`L`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{lcl@{\\qquad}l}\n   \\LABEL_n\\{\\instr^\\ast\\}~\\XB^l[\\val^n~(\\BR~l)]~\\END &\\stepto& \\val^n~\\instr^\\ast\n   \\end{array}\n\n\n.. _exec-br_if:\n\n:math:`\\BRIF~l`\n...............\n\n1. Assert: due to :ref:`validation <valid-br_if>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n2. Pop the value :math:`\\I32.\\CONST~c` from the stack.\n\n3. If :math:`c` is non-zero, then:\n\n   a. :ref:`Execute <exec-br>` the instruction :math:`(\\BR~l)`.\n\n4. Else:\n\n   a. Do nothing.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{lcl@{\\qquad}l}\n   (\\I32.\\CONST~c)~(\\BRIF~l) &\\stepto& (\\BR~l)\n     & (\\iff c \\neq 0) \\\\\n   (\\I32.\\CONST~c)~(\\BRIF~l) &\\stepto& \\epsilon\n     & (\\iff c = 0) \\\\\n   \\end{array}\n\n\n.. _exec-br_table:\n\n:math:`\\BRTABLE~l^\\ast~l_N`\n...........................\n\n1. Assert: due to :ref:`validation <valid-if>`, a value of :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n2. Pop the value :math:`\\I32.\\CONST~i` from the stack.\n\n3. If :math:`i` is smaller than the length of :math:`l^\\ast`, then:\n\n   a. Let :math:`l_i` be the label :math:`l^\\ast[i]`.\n\n   b. :ref:`Execute <exec-br>` the instruction :math:`(\\BR~l_i)`.\n\n4. Else:\n\n   a. :ref:`Execute <exec-br>` the instruction :math:`(\\BR~l_N)`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{lcl@{\\qquad}l}\n   (\\I32.\\CONST~i)~(\\BRTABLE~l^\\ast~l_N) &\\stepto& (\\BR~l_i)\n     & (\\iff l^\\ast[i] = l_i) \\\\\n   (\\I32.\\CONST~i)~(\\BRTABLE~l^\\ast~l_N) &\\stepto& (\\BR~l_N)\n     & (\\iff |l^\\ast| \\leq i) \\\\\n   \\end{array}\n\n\n.. _exec-return:\n\n:math:`\\RETURN`\n...............\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Let :math:`n` be the arity of :math:`F`.\n\n3. Assert: due to :ref:`validation <valid-return>`, there are at least :math:`n` values on the top of the stack.\n\n4. Pop the results :math:`\\val^n` from the stack.\n\n5. Assert: due to :ref:`validation <valid-return>`, the stack contains at least one :ref:`frame <syntax-frame>`.\n\n6. While the top of the stack is not a frame, do:\n\n   a. Pop the top element from the stack.\n\n7. Assert: the top of the stack is the frame :math:`F`.\n\n8. Pop the frame from the stack.\n\n9. Push :math:`\\val^n` to the stack.\n\n10. Jump to the instruction after the original call that pushed the frame.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{lcl@{\\qquad}l}\n   \\FRAME_n\\{F\\}~\\XB^k[\\val^n~\\RETURN]~\\END &\\stepto& \\val^n\n   \\end{array}\n\n\n.. _exec-call:\n\n:math:`\\CALL~x`\n...............\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-call>`, :math:`F.\\AMODULE.\\MIFUNCS[x]` exists.\n\n3. Let :math:`a` be the :ref:`function address <syntax-funcaddr>` :math:`F.\\AMODULE.\\MIFUNCS[x]`.\n\n4. :ref:`Invoke <exec-invoke>` the function instance at address :math:`a`.\n\n.. math::\n   \\begin{array}{lcl@{\\qquad}l}\n   F; (\\CALL~x) &\\stepto& F; (\\INVOKE~a)\n     & (\\iff F.\\AMODULE.\\MIFUNCS[x] = a)\n   \\end{array}\n\n\n.. _exec-call_indirect:\n\n:math:`\\CALLINDIRECT~x~y`\n.........................\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Assert: due to :ref:`validation <valid-call_indirect>`, :math:`F.\\AMODULE.\\MITABLES[x]` exists.\n\n3. Let :math:`\\X{ta}` be the :ref:`table address <syntax-tableaddr>` :math:`F.\\AMODULE.\\MITABLES[x]`.\n\n4. Assert: due to :ref:`validation <valid-call_indirect>`, :math:`S.\\STABLES[\\X{ta}]` exists.\n\n5. Let :math:`\\X{tab}` be the :ref:`table instance <syntax-tableinst>` :math:`S.\\STABLES[\\X{ta}]`.\n\n6. Assert: due to :ref:`validation <valid-call_indirect>`, :math:`F.\\AMODULE.\\MITYPES[y]` exists.\n\n7. Let :math:`\\X{ft}_{\\F{expect}}` be the :ref:`function type <syntax-functype>` :math:`F.\\AMODULE.\\MITYPES[y]`.\n\n8. Assert: due to :ref:`validation <valid-call_indirect>`, a value with :ref:`value type <syntax-valtype>` |I32| is on the top of the stack.\n\n9. Pop the value :math:`\\I32.\\CONST~i` from the stack.\n\n10. If :math:`i` is not smaller than the length of :math:`\\X{tab}.\\TIELEM`, then:\n\n    a. Trap.\n\n11. Let :math:`r` be the :ref:`reference <syntax-ref>` :math:`\\X{tab}.\\TIELEM[i]`.\n\n12. If :math:`r` is :math:`\\REFNULL~t`, then:\n\n    a. Trap.\n\n13. Assert: due to :ref:`validation of table mutation <valid-table.set>`, :math:`r` is a :ref:`function reference <syntax-ref.func>`.\n\n14. Let :math:`\\REFFUNCADDR~a` be the :ref:`function reference <syntax-ref.func>` :math:`r`.\n\n15. Assert: due to :ref:`validation of table mutation <valid-table.set>`, :math:`S.\\SFUNCS[a]` exists.\n\n16. Let :math:`\\X{f}` be the :ref:`function instance <syntax-funcinst>` :math:`S.\\SFUNCS[a]`.\n\n17. Let :math:`\\X{ft}_{\\F{actual}}` be the :ref:`function type <syntax-functype>` :math:`\\X{f}.\\FITYPE`.\n\n18. If :math:`\\X{ft}_{\\F{actual}}` and :math:`\\X{ft}_{\\F{expect}}` differ, then:\n\n    a. Trap.\n\n19. :ref:`Invoke <exec-invoke>` the function instance at address :math:`a`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{l}\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\I32.\\CONST~i)~(\\CALLINDIRECT~x~y) &\\stepto& S; F; (\\INVOKE~a)\n   \\end{array}\n   \\\\ \\qquad\n     \\begin{array}[t]{@{}r@{~}l@{}}\n     (\\iff & S.\\STABLES[F.\\AMODULE.\\MITABLES[x]].\\TIELEM[i] = \\REFFUNCADDR~a \\\\\n     \\wedge & S.\\SFUNCS[a] = f \\\\\n     \\wedge & F.\\AMODULE.\\MITYPES[y] = f.\\FITYPE)\n     \\end{array}\n   \\\\[1ex]\n   \\begin{array}{lcl@{\\qquad}l}\n   S; F; (\\I32.\\CONST~i)~(\\CALLINDIRECT~x~y) &\\stepto& S; F; \\TRAP\n   \\end{array}\n   \\\\ \\qquad\n     (\\otherwise)\n   \\end{array}\n\n\n.. index:: instruction, instruction sequence, block\n.. _exec-instr-seq:\n\nBlocks\n~~~~~~\n\nThe following auxiliary rules define the semantics of executing an :ref:`instruction sequence <syntax-instr-seq>`\nthat forms a :ref:`block <exec-instr-control>`.\n\n\n.. _exec-instr-seq-enter:\n\nEntering :math:`\\instr^\\ast` with label :math:`L`\n.................................................\n\n1. Push :math:`L` to the stack.\n\n2. Jump to the start of the instruction sequence :math:`\\instr^\\ast`.\n\n.. note::\n   No formal reduction rule is needed for entering an instruction sequence,\n   because the label :math:`L` is embedded in the :ref:`administrative instruction <syntax-instr-admin>` that structured control instructions reduce to directly.\n\n\n.. _exec-instr-seq-exit:\n\nExiting :math:`\\instr^\\ast` with label :math:`L`\n................................................\n\nWhen the end of a block is reached without a jump or trap aborting it, then the following steps are performed.\n\n1. Let :math:`m` be the number of values on the top of the stack.\n\n2. Pop the values :math:`\\val^m` from the stack.\n\n3. Assert: due to :ref:`validation <valid-instr-seq>`, the label :math:`L` is now on the top of the stack.\n\n4. Pop the label from the stack.\n\n5. Push :math:`\\val^m` back to the stack.\n\n6. Jump to the position after the |END| of the :ref:`structured control instruction <syntax-instr-control>` associated with the label :math:`L`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{lcl@{\\qquad}l}\n   \\LABEL_n\\{\\instr^\\ast\\}~\\val^m~\\END &\\stepto& \\val^m\n   \\end{array}\n\n.. note::\n   This semantics also applies to the instruction sequence contained in a |LOOP| instruction.\n   Therefore, execution of a loop falls off the end, unless a backwards branch is performed explicitly.\n\n\n.. index:: ! call, function, function instance, label, frame\n\nFunction Calls\n~~~~~~~~~~~~~~\n\nThe following auxiliary rules define the semantics of invoking a :ref:`function instance <syntax-funcinst>`\nthrough one of the :ref:`call instructions <exec-instr-control>`\nand returning from it.\n\n\n.. _exec-invoke:\n\nInvocation of :ref:`function address <syntax-funcaddr>` :math:`a`\n.................................................................\n\n1. Assert: due to :ref:`validation <valid-call>`, :math:`S.\\SFUNCS[a]` exists.\n\n2. Let :math:`f` be the :ref:`function instance <syntax-funcinst>`, :math:`S.\\SFUNCS[a]`.\n\n3. Let :math:`[t_1^n] \\to [t_2^m]` be the :ref:`function type <syntax-functype>` :math:`f.\\FITYPE`.\n\n4. Let :math:`t^\\ast` be the list of :ref:`value types <syntax-valtype>` :math:`f.\\FICODE.\\FLOCALS`.\n\n5. Let :math:`\\instr^\\ast~\\END` be the :ref:`expression <syntax-expr>` :math:`f.\\FICODE.\\FBODY`.\n\n6. Assert: due to :ref:`validation <valid-call>`, :math:`n` values are on the top of the stack.\n\n7. Pop the values :math:`\\val^n` from the stack.\n\n8. Let :math:`\\val_0^\\ast` be the list of zero values of types :math:`t^\\ast`.\n\n9. Let :math:`F` be the :ref:`frame <syntax-frame>` :math:`\\{ \\AMODULE~f.\\FIMODULE, \\ALOCALS~\\val^n~(\\default_t)^\\ast \\}`.\n\n10. Push the activation of :math:`F` with arity :math:`m` to the stack.\n\n11. Let :math:`L` be the :ref:`label <syntax-label>` whose arity is :math:`m` and whose continuation is the end of the function.\n\n12. :ref:`Enter <exec-instr-seq-enter>` the instruction sequence :math:`\\instr^\\ast` with label :math:`L`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{l}\n   \\begin{array}{lcl@{\\qquad}l}\n   S; \\val^n~(\\INVOKE~a) &\\stepto& S; \\FRAME_m\\{F\\}~\\LABEL_m\\{\\}~\\instr^\\ast~\\END~\\END\n   \\end{array}\n   \\\\ \\qquad\n     \\begin{array}[t]{@{}r@{~}l@{}}\n     (\\iff & S.\\SFUNCS[a] = f \\\\\n     \\wedge & f.\\FITYPE = [t_1^n] \\to [t_2^m] \\\\\n     \\wedge & f.\\FICODE = \\{ \\FTYPE~x, \\FLOCALS~t^k, \\FBODY~\\instr^\\ast~\\END \\} \\\\\n     \\wedge & F = \\{ \\AMODULE~f.\\FIMODULE, ~\\ALOCALS~\\val^n~(\\default_t)^k \\})\n     \\end{array} \\\\\n   \\end{array}\n\n\n.. _exec-invoke-exit:\n\nReturning from a function\n.........................\n\nWhen the end of a function is reached without a jump (i.e., |RETURN|) or trap aborting it, then the following steps are performed.\n\n1. Let :math:`F` be the :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>`.\n\n2. Let :math:`n` be the arity of the activation of :math:`F`.\n\n3. Assert: due to :ref:`validation <valid-instr-seq>`, there are :math:`n` values on the top of the stack.\n\n4. Pop the results :math:`\\val^n` from the stack.\n\n5. Assert: due to :ref:`validation <valid-func>`, the frame :math:`F` is now on the top of the stack.\n\n6. Pop the frame from the stack.\n\n7. Push :math:`\\val^n` back to the stack.\n\n8. Jump to the instruction after the original call.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{lcl@{\\qquad}l}\n   \\FRAME_n\\{F\\}~\\val^n~\\END &\\stepto& \\val^n\n   \\end{array}\n\n\n.. index:: host function, store\n.. _exec-invoke-host:\n\nHost Functions\n..............\n\nInvoking a :ref:`host function <syntax-hostfunc>` has non-deterministic behavior.\nIt may either terminate with a :ref:`trap <trap>` or return regularly.\nHowever, in the latter case, it must consume and produce the right number and types of WebAssembly :ref:`values <syntax-val>` on the stack,\naccording to its :ref:`function type <syntax-functype>`.\n\nA host function may also modify the :ref:`store <syntax-store>`.\nHowever, all store modifications must result in an :ref:`extension <extend-store>` of the original store, i.e., they must only modify mutable contents and must not have instances removed.\nFurthermore, the resulting store must be :ref:`valid <valid-store>`, i.e., all data and code in it is well-typed.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{l}\n   \\begin{array}{lcl@{\\qquad}l}\n   S; \\val^n~(\\INVOKE~a) &\\stepto& S'; \\result\n   \\end{array}\n   \\\\ \\qquad\n     \\begin{array}[t]{@{}r@{~}l@{}}\n     (\\iff & S.\\SFUNCS[a] = \\{ \\FITYPE~[t_1^n] \\to [t_2^m], \\FIHOSTCODE~\\X{hf} \\} \\\\\n     \\wedge & (S'; \\result) \\in \\X{hf}(S; \\val^n)) \\\\\n     \\end{array} \\\\\n   \\begin{array}{lcl@{\\qquad}l}\n   S; \\val^n~(\\INVOKE~a) &\\stepto& S; \\val^n~(\\INVOKE~a)\n   \\end{array}\n   \\\\ \\qquad\n     \\begin{array}[t]{@{}r@{~}l@{}}\n     (\\iff & S.\\SFUNCS[a] = \\{ \\FITYPE~[t_1^n] \\to [t_2^m], \\FIHOSTCODE~\\X{hf} \\} \\\\\n     \\wedge & \\bot \\in \\X{hf}(S; \\val^n)) \\\\\n     \\end{array} \\\\\n   \\end{array}\n\nHere, :math:`\\X{hf}(S; \\val^n)` denotes the implementation-defined execution of host function :math:`\\X{hf}` in current store :math:`S` with arguments :math:`\\val^n`.\nIt yields a set of possible outcomes, where each element is either a pair of a modified store :math:`S'` and a :ref:`result <syntax-result>`\nor the special value :math:`\\bot` indicating divergence.\nA host function is non-deterministic if there is at least one argument for which the set of outcomes is not singular.\n\nFor a WebAssembly implementation to be :ref:`sound <soundness>` in the presence of host functions,\nevery :ref:`host function instance <syntax-funcinst>` must be :ref:`valid <valid-hostfuncinst>`,\nwhich means that it adheres to suitable pre- and post-conditions:\nunder a :ref:`valid store <valid-store>` :math:`S`, and given arguments :math:`\\val^n` matching the ascribed parameter types :math:`t_1^n`,\nexecuting the host function must yield a non-empty set of possible outcomes each of which is either divergence or consists of a valid store :math:`S'` that is an :ref:`extension <extend-store>` of :math:`S` and a result matching the ascribed return types :math:`t_2^m`.\nAll these notions are made precise in the :ref:`Appendix <soundness>`.\n\n.. note::\n   A host function can call back into WebAssembly by :ref:`invoking <exec-invocation>` a function :ref:`exported <syntax-export>` from a :ref:`module <syntax-module>`.\n   However, the effects of any such call are subsumed by the non-deterministic behavior allowed for the host function.\n\n\n\n.. index:: expression\n   pair: execution; expression\n   single: abstract syntax; expression\n.. _exec-expr:\n\nExpressions\n~~~~~~~~~~~\n\nAn :ref:`expression <syntax-expr>` is *evaluated* relative to a :ref:`current <exec-notation-textual>` :ref:`frame <syntax-frame>` pointing to its containing :ref:`module instance <syntax-moduleinst>`.\n\n1. Jump to the start of the instruction sequence :math:`\\instr^\\ast` of the expression.\n\n2. Execute the instruction sequence.\n\n3. Assert: due to :ref:`validation <valid-expr>`, the top of the stack contains a :ref:`value <syntax-val>`.\n\n4. Pop the :ref:`value <syntax-val>` :math:`\\val` from the stack.\n\nThe value :math:`\\val` is the result of the evaluation.\n\n.. math::\n   S; F; \\instr^\\ast \\stepto S'; F'; \\instr'^\\ast\n   \\qquad (\\iff S; F; \\instr^\\ast~\\END \\stepto S'; F'; \\instr'^\\ast~\\END)\n\n.. note::\n   Evaluation iterates this reduction rule until reaching a value.\n   Expressions constituting :ref:`function <syntax-func>` bodies are executed during function :ref:`invocation <exec-invoke>`.\n"
  },
  {
    "path": "document/core/exec/modules.rst",
    "content": "Modules\n-------\n\nFor modules, the execution semantics primarily defines :ref:`instantiation <exec-instantiation>`, which :ref:`allocates <alloc>` instances for a module and its contained definitions, initializes :ref:`tables <syntax-table>` and :ref:`memories <syntax-mem>` from contained :ref:`element <syntax-elem>` and :ref:`data <syntax-data>` segments, and invokes the :ref:`start function <syntax-start>` if present. It also includes :ref:`invocation <exec-invocation>` of exported functions.\n\nInstantiation depends on a number of auxiliary notions for :ref:`type-checking imports <exec-import>` and :ref:`allocating <alloc>` instances.\n\n\n.. index:: external value, external type, validation, import, store\n.. _valid-externval:\n\nExternal Typing\n~~~~~~~~~~~~~~~\n\nFor the purpose of checking :ref:`external values <syntax-externval>` against :ref:`imports <syntax-import>`,\nsuch values are classified by :ref:`external types <syntax-externtype>`.\nThe following auxiliary typing rules specify this typing relation relative to a :ref:`store <syntax-store>` :math:`S` in which the referenced instances live.\n\n\n.. index:: function type, function address\n.. _valid-externval-func:\n\n:math:`\\EVFUNC~a`\n.................\n\n* The store entry :math:`S.\\SFUNCS[a]` must exist.\n\n* Then :math:`\\EVFUNC~a` is valid with :ref:`external type <syntax-externtype>` :math:`\\ETFUNC~S.\\SFUNCS[a].\\FITYPE`.\n\n.. math::\n   \\frac{\n   }{\n     S \\vdashexternval \\EVFUNC~a : \\ETFUNC~S.\\SFUNCS[a].\\FITYPE\n   }\n\n\n.. index:: table type, table address\n.. _valid-externval-table:\n\n:math:`\\EVTABLE~a`\n..................\n\n* The store entry :math:`S.\\STABLES[a]` must exist.\n\n* Then :math:`\\EVTABLE~a` is valid with :ref:`external type <syntax-externtype>` :math:`\\ETTABLE~S.\\STABLES[a].\\TITYPE`.\n\n.. math::\n   \\frac{\n   }{\n     S \\vdashexternval \\EVTABLE~a : \\ETTABLE~S.\\STABLES[a].\\TITYPE\n   }\n\n\n.. index:: memory type, memory address\n.. _valid-externval-mem:\n\n:math:`\\EVMEM~a`\n................\n\n* The store entry :math:`S.\\SMEMS[a]` must exist.\n\n* Then :math:`\\EVMEM~a` is valid with :ref:`external type <syntax-externtype>` :math:`\\ETMEM~S.\\SMEMS[a].\\MITYPE`.\n\n.. math::\n   \\frac{\n   }{\n     S \\vdashexternval \\EVMEM~a : \\ETMEM~S.\\SMEMS[a].\\MITYPE\n   }\n\n\n.. index:: global type, global address, value type, mutability\n.. _valid-externval-global:\n\n:math:`\\EVGLOBAL~a`\n...................\n\n* The store entry :math:`S.\\SGLOBALS[a]` must exist.\n\n* Then :math:`\\EVGLOBAL~a` is valid with :ref:`external type <syntax-externtype>` :math:`\\ETGLOBAL~S.\\SGLOBALS[a].\\GITYPE`.\n\n.. math::\n   \\frac{\n   }{\n     S \\vdashexternval \\EVGLOBAL~a : \\ETGLOBAL~S.\\SGLOBALS[a].\\GITYPE\n   }\n\n\n.. index:: value, value type, validation\n.. _valid-val:\n\nValue Typing\n~~~~~~~~~~~~\n\nFor the purpose of checking argument :ref:`values <syntax-externval>` against the parameter types of exported :ref:`functions <syntax-func>`,\nvalues are classified by :ref:`value types <syntax-valtype>`.\nThe following auxiliary typing rules specify this typing relation relative to a :ref:`store <syntax-store>` :math:`S` in which possibly referenced addresses live.\n\n.. _valid-num:\n\n:ref:`Numeric Values <syntax-val>` :math:`t.\\CONST~c`\n.....................................................\n\n* The value is valid with :ref:`number type <syntax-numtype>` :math:`t`.\n\n.. math::\n   \\frac{\n   }{\n     S \\vdashval t.\\CONST~c : t\n   }\n\n.. _valid-ref:\n\n:ref:`Null References <syntax-ref>` :math:`\\REFNULL~t`\n......................................................\n\n* The value is valid with :ref:`reference type <syntax-reftype>` :math:`t`.\n\n.. math::\n   \\frac{\n   }{\n     S \\vdashval \\REFNULL~t : t\n   }\n\n\n:ref:`Function References <syntax-ref>` :math:`\\REFFUNCADDR~a`\n..............................................................\n\n* The :ref:`external value <syntax-externval>` :math:`\\EVFUNC~a` must be :ref:`valid <valid-externval>`.\n\n* Then the value is valid with :ref:`reference type <syntax-reftype>` :math:`\\FUNCREF`.\n\n.. math::\n   \\frac{\n     S \\vdashexternval \\EVFUNC~a : \\ETFUNC~\\functype\n   }{\n     S \\vdashval \\REFFUNCADDR~a : \\FUNCREF\n   }\n\n\n:ref:`External References <syntax-ref.extern>` :math:`\\REFEXTERNADDR~a`\n.......................................................................\n\n* The value is valid with :ref:`reference type <syntax-reftype>` :math:`\\EXTERNREF`.\n\n.. math::\n   \\frac{\n   }{\n     S \\vdashval \\REFEXTERNADDR~a : \\EXTERNREF\n   }\n\n\n.. index:: ! allocation, store, address\n.. _alloc:\n\nAllocation\n~~~~~~~~~~\n\nNew instances of :ref:`functions <syntax-funcinst>`, :ref:`tables <syntax-tableinst>`, :ref:`memories <syntax-meminst>`, and :ref:`globals <syntax-globalinst>` are *allocated* in a :ref:`store <syntax-store>` :math:`S`, as defined by the following auxiliary functions.\n\n\n.. index:: function, function instance, function address, module instance, function type\n.. _alloc-func:\n\n:ref:`Functions <syntax-funcinst>`\n..................................\n\n1. Let :math:`\\func` be the :ref:`function <syntax-func>` to allocate and :math:`\\moduleinst` its :ref:`module instance <syntax-moduleinst>`.\n\n2. Let :math:`a` be the first free :ref:`function address <syntax-funcaddr>` in :math:`S`.\n\n3. Let :math:`\\functype` be the :ref:`function type <syntax-functype>` :math:`\\moduleinst.\\MITYPES[\\func.\\FTYPE]`.\n\n4. Let :math:`\\funcinst` be the :ref:`function instance <syntax-funcinst>` :math:`\\{ \\FITYPE~\\functype, \\FIMODULE~\\moduleinst, \\FICODE~\\func \\}`.\n\n5. Append :math:`\\funcinst` to the |SFUNCS| of :math:`S`.\n\n6. Return :math:`a`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{rlll}\n   \\allocfunc(S, \\func, \\moduleinst) &=& S', \\funcaddr \\\\[1ex]\n   \\mbox{where:} \\hfill \\\\\n   \\funcaddr &=& |S.\\SFUNCS| \\\\\n   \\functype &=& \\moduleinst.\\MITYPES[\\func.\\FTYPE] \\\\\n   \\funcinst &=& \\{ \\FITYPE~\\functype, \\FIMODULE~\\moduleinst, \\FICODE~\\func \\} \\\\\n   S' &=& S \\compose \\{\\SFUNCS~\\funcinst\\} \\\\\n   \\end{array}\n\n\n.. index:: host function, function instance, function address, function type\n.. _alloc-hostfunc:\n\n:ref:`Host Functions <syntax-hostfunc>`\n.......................................\n\n1. Let :math:`\\hostfunc` be the :ref:`host function <syntax-hostfunc>` to allocate and :math:`\\functype` its :ref:`function type <syntax-functype>`.\n\n2. Let :math:`a` be the first free :ref:`function address <syntax-funcaddr>` in :math:`S`.\n\n3. Let :math:`\\funcinst` be the :ref:`function instance <syntax-funcinst>` :math:`\\{ \\FITYPE~\\functype, \\FIHOSTCODE~\\hostfunc \\}`.\n\n4. Append :math:`\\funcinst` to the |SFUNCS| of :math:`S`.\n\n5. Return :math:`a`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{rlll}\n   \\allochostfunc(S, \\functype, \\hostfunc) &=& S', \\funcaddr \\\\[1ex]\n   \\mbox{where:} \\hfill \\\\\n   \\funcaddr &=& |S.\\SFUNCS| \\\\\n   \\funcinst &=& \\{ \\FITYPE~\\functype, \\FIHOSTCODE~\\hostfunc \\} \\\\\n   S' &=& S \\compose \\{\\SFUNCS~\\funcinst\\} \\\\\n   \\end{array}\n\n.. note::\n   Host functions are never allocated by the WebAssembly semantics itself,\n   but may be allocated by the :ref:`embedder <embedder>`.\n\n\n.. index:: table, table instance, table address, table type, limits\n.. _alloc-table:\n\n:ref:`Tables <syntax-tableinst>`\n................................\n\n1. Let :math:`\\tabletype` be the :ref:`table type <syntax-tabletype>` to allocate and :math:`\\reff` the initialization value.\n\n2. Let :math:`(\\{\\LMIN~n, \\LMAX~m^?\\}~\\reftype)` be the structure of :ref:`table type <syntax-tabletype>` :math:`\\tabletype`.\n\n3. Let :math:`a` be the first free :ref:`table address <syntax-tableaddr>` in :math:`S`.\n\n4. Let :math:`\\tableinst` be the :ref:`table instance <syntax-tableinst>` :math:`\\{ \\TITYPE~\\tabletype, \\TIELEM~\\reff^n \\}` with :math:`n` elements set to :math:`\\reff`.\n\n5. Append :math:`\\tableinst` to the |STABLES| of :math:`S`.\n\n6. Return :math:`a`.\n\n.. math::\n   \\begin{array}{rlll}\n   \\alloctable(S, \\tabletype, \\reff) &=& S', \\tableaddr \\\\[1ex]\n   \\mbox{where:} \\hfill \\\\\n   \\tabletype &=& \\{\\LMIN~n, \\LMAX~m^?\\}~\\reftype \\\\\n   \\tableaddr &=& |S.\\STABLES| \\\\\n   \\tableinst &=& \\{ \\TITYPE~\\tabletype, \\TIELEM~\\reff^n \\} \\\\\n   S' &=& S \\compose \\{\\STABLES~\\tableinst\\} \\\\\n   \\end{array}\n\n\n.. index:: memory, memory instance, memory address, memory type, limits, byte\n.. _alloc-mem:\n\n:ref:`Memories <syntax-meminst>`\n................................\n\n1. Let :math:`\\memtype` be the :ref:`memory type <syntax-memtype>` to allocate.\n\n2. Let :math:`\\{\\LMIN~n, \\LMAX~m^?\\}` be the structure of :ref:`memory type <syntax-memtype>` :math:`\\memtype`.\n\n3. Let :math:`a` be the first free :ref:`memory address <syntax-memaddr>` in :math:`S`.\n\n4. Let :math:`\\meminst` be the :ref:`memory instance <syntax-meminst>` :math:`\\{ \\MITYPE~\\memtype, \\MIDATA~(\\hex{00})^{n \\cdot 64\\,\\F{Ki}} \\}` that contains :math:`n` pages of zeroed :ref:`bytes <syntax-byte>`.\n\n5. Append :math:`\\meminst` to the |SMEMS| of :math:`S`.\n\n6. Return :math:`a`.\n\n.. math::\n   \\begin{array}{rlll}\n   \\allocmem(S, \\memtype) &=& S', \\memaddr \\\\[1ex]\n   \\mbox{where:} \\hfill \\\\\n   \\memtype &=& \\{\\LMIN~n, \\LMAX~m^?\\} \\\\\n   \\memaddr &=& |S.\\SMEMS| \\\\\n   \\meminst &=& \\{ \\MITYPE~\\memtype, \\MIDATA~(\\hex{00})^{n \\cdot 64\\,\\F{Ki}} \\} \\\\\n   S' &=& S \\compose \\{\\SMEMS~\\meminst\\} \\\\\n   \\end{array}\n\n\n.. index:: global, global instance, global address, global type, value type, mutability, value\n.. _alloc-global:\n\n:ref:`Globals <syntax-globalinst>`\n..................................\n\n1. Let :math:`\\globaltype` be the :ref:`global type <syntax-globaltype>` to allocate and :math:`\\val` the :ref:`value <syntax-val>` to initialize the global with.\n\n2. Let :math:`a` be the first free :ref:`global address <syntax-globaladdr>` in :math:`S`.\n\n3. Let :math:`\\globalinst` be the :ref:`global instance <syntax-globalinst>` :math:`\\{ \\GITYPE~\\globaltype, \\GIVALUE~\\val \\}`.\n\n4. Append :math:`\\globalinst` to the |SGLOBALS| of :math:`S`.\n\n5. Return :math:`a`.\n\n.. math::\n   \\begin{array}{rlll}\n   \\allocglobal(S, \\globaltype, \\val) &=& S', \\globaladdr \\\\[1ex]\n   \\mbox{where:} \\hfill \\\\\n   \\globaladdr &=& |S.\\SGLOBALS| \\\\\n   \\globalinst &=& \\{ \\GITYPE~\\globaltype, \\GIVALUE~\\val \\} \\\\\n   S' &=& S \\compose \\{\\SGLOBALS~\\globalinst\\} \\\\\n   \\end{array}\n\n\n.. index:: element, element instance, element address\n.. _alloc-elem:\n\n:ref:`Element segments <syntax-eleminst>`\n.........................................\n\n1. Let :math:`\\reftype` be the elements' type and :math:`\\reff^\\ast` the vector of :ref:`references <syntax-ref>` to allocate.\n\n2. Let :math:`a` be the first free :ref:`element address <syntax-elemaddr>` in :math:`S`.\n\n3. Let :math:`\\eleminst` be the :ref:`element instance <syntax-eleminst>` :math:`\\{ \\EITYPE~t, \\EIELEM~\\reff^\\ast \\}`.\n\n4. Append :math:`\\eleminst` to the |SELEMS| of :math:`S`.\n\n5. Return :math:`a`.\n\n.. math::\n  \\begin{array}{rlll}\n  \\allocelem(S, \\reftype, \\reff^\\ast) &=& S', \\elemaddr \\\\[1ex]\n  \\mbox{where:} \\hfill \\\\\n  \\elemaddr &=& |S.\\SELEMS| \\\\\n  \\eleminst &=& \\{ \\EITYPE~\\reftype, \\EIELEM~\\reff^\\ast \\} \\\\\n  S' &=& S \\compose \\{\\SELEMS~\\eleminst\\} \\\\\n  \\end{array}\n\n\n.. index:: data, data instance, data address\n.. _alloc-data:\n\n:ref:`Data segments <syntax-datainst>`\n......................................\n\n1. Let :math:`\\bytes` be the vector of :ref:`bytes <syntax-byte>` to allocate.\n\n2. Let :math:`a` be the first free :ref:`data address <syntax-dataaddr>` in :math:`S`.\n\n3. Let :math:`\\datainst` be the :ref:`data instance <syntax-datainst>` :math:`\\{ \\DIDATA~\\bytes \\}`.\n\n4. Append :math:`\\datainst` to the |SDATAS| of :math:`S`.\n\n5. Return :math:`a`.\n\n.. math::\n  \\begin{array}{rlll}\n  \\allocdata(S, \\bytes) &=& S', \\dataaddr \\\\[1ex]\n  \\mbox{where:} \\hfill \\\\\n  \\dataaddr &=& |S.\\SDATAS| \\\\\n  \\datainst &=& \\{ \\DIDATA~\\bytes \\} \\\\\n  S' &=& S \\compose \\{\\SDATAS~\\datainst\\} \\\\\n  \\end{array}\n\n\n.. index:: table, table instance, table address, grow, limits\n.. _grow-table:\n\nGrowing :ref:`tables <syntax-tableinst>`\n........................................\n\n1. Let :math:`\\tableinst` be the :ref:`table instance <syntax-tableinst>` to grow, :math:`n` the number of elements by which to grow it, and :math:`\\reff` the initialization value.\n\n2. Let :math:`\\X{len}` be :math:`n` added to the length of :math:`\\tableinst.\\TIELEM`.\n\n3. If :math:`\\X{len}` is larger than or equal to :math:`2^{32}`, then fail.\n\n4. Let :math:`\\limits~t` be the structure of :ref:`table type <syntax-tabletype>` :math:`\\tableinst.\\TITYPE`.\n\n5. Let :math:`\\limits'` be :math:`\\limits` with :math:`\\LMIN` updated to :math:`\\X{len}`.\n\n6. If :math:`\\limits'` is not :ref:`valid <valid-limits>`, then fail.\n\n7. Append :math:`\\reff^n` to :math:`\\tableinst.\\TIELEM`.\n\n8. Set :math:`\\tableinst.\\TITYPE` to the :ref:`table type <syntax-tabletype>` :math:`\\limits'~t`.\n\n.. math::\n   \\begin{array}{rllll}\n   \\growtable(\\tableinst, n, \\reff) &=& \\tableinst \\with \\TITYPE = \\limits'~t \\with \\TIELEM = \\tableinst.\\TIELEM~\\reff^n \\\\\n     && (\n       \\begin{array}[t]{@{}r@{~}l@{}}\n       \\iff & \\X{len} = n + |\\tableinst.\\TIELEM| \\\\\n       \\wedge & \\X{len} < 2^{32} \\\\\n       \\wedge & \\limits~t = \\tableinst.\\TITYPE \\\\\n       \\wedge & \\limits' = \\limits \\with \\LMIN = \\X{len} \\\\\n       \\wedge & \\vdashlimits \\limits' \\ok \\\\\n       \\end{array} \\\\\n   \\end{array}\n\n\n.. index:: memory, memory instance, memory address, grow, limits\n.. _grow-mem:\n\nGrowing :ref:`memories <syntax-meminst>`\n........................................\n\n1. Let :math:`\\meminst` be the :ref:`memory instance <syntax-meminst>` to grow and :math:`n` the number of :ref:`pages <page-size>` by which to grow it.\n\n2. Assert: The length of :math:`\\meminst.\\MIDATA` is divisible by the :ref:`page size <page-size>` :math:`64\\,\\F{Ki}`.\n\n3. Let :math:`\\X{len}` be :math:`n` added to the length of :math:`\\meminst.\\MIDATA` divided by the :ref:`page size <page-size>` :math:`64\\,\\F{Ki}`.\n\n4. If :math:`\\X{len}` is larger than :math:`2^{16}`, then fail.\n\n5. Let :math:`\\limits` be the structure of :ref:`memory type <syntax-memtype>` :math:`\\meminst.\\MITYPE`.\n\n6. Let :math:`\\limits'` be :math:`\\limits` with :math:`\\LMIN` updated to :math:`\\X{len}`.\n\n7. If :math:`\\limits'` is not :ref:`valid <valid-limits>`, then fail.\n\n8. Append :math:`n` times :math:`64\\,\\F{Ki}` :ref:`bytes <syntax-byte>` with value :math:`\\hex{00}` to :math:`\\meminst.\\MIDATA`.\n\n9. Set :math:`\\meminst.\\MITYPE` to the :ref:`memory type <syntax-memtype>` :math:`\\limits'`.\n\n.. math::\n   \\begin{array}{rllll}\n   \\growmem(\\meminst, n) &=& \\meminst \\with \\MITYPE = \\limits' \\with \\MIDATA = \\meminst.\\MIDATA~(\\hex{00})^{n \\cdot 64\\,\\F{Ki}} \\\\\n     && (\n       \\begin{array}[t]{@{}r@{~}l@{}}\n       \\iff & \\X{len} = n + |\\meminst.\\MIDATA| / 64\\,\\F{Ki} \\\\\n       \\wedge & \\X{len} \\leq 2^{16} \\\\\n       \\wedge & \\limits = \\meminst.\\MITYPE \\\\\n       \\wedge & \\limits' = \\limits \\with \\LMIN = \\X{len} \\\\\n       \\wedge & \\vdashlimits \\limits' \\ok \\\\\n       \\end{array} \\\\\n   \\end{array}\n\n\n.. index:: module, module instance, function instance, table instance, memory instance, global instance, export instance, function address, table address, memory address, global address, function index, table index, memory index, global index, type, function, table, memory, global, import, export, external value, external type, matching\n.. _alloc-module:\n\n:ref:`Modules <syntax-moduleinst>`\n..................................\n\nThe allocation function for :ref:`modules <syntax-module>` requires a suitable list of :ref:`external values <syntax-externval>` that are assumed to :ref:`match <match-externtype>` the :ref:`import <syntax-import>` vector of the module,\na list of initialization :ref:`values <syntax-val>` for the module's :ref:`globals <syntax-global>`,\nand list of :ref:`reference <syntax-ref>` vectors for the module's :ref:`element segments <syntax-elem>`.\n\n1. Let :math:`\\module` be the :ref:`module <syntax-module>` to allocate and :math:`\\externval_{\\F{im}}^\\ast` the vector of :ref:`external values <syntax-externval>` providing the module's imports, :math:`\\val^\\ast` the initialization :ref:`values <syntax-val>` of the module's :ref:`globals <syntax-global>`, and :math:`(\\reff^\\ast)^\\ast` the :ref:`reference <syntax-ref>` vectors of the module's :ref:`element segments <syntax-elem>`.\n\n2. For each :ref:`function <syntax-func>` :math:`\\func_i` in :math:`\\module.\\MFUNCS`, do:\n\n   a. Let :math:`\\funcaddr_i` be the :ref:`function address <syntax-funcaddr>` resulting from :ref:`allocating <alloc-func>` :math:`\\func_i` for the :ref:`\\module instance <syntax-moduleinst>` :math:`\\moduleinst` defined below.\n\n3. For each :ref:`table <syntax-table>` :math:`\\table_i` in :math:`\\module.\\MTABLES`, do:\n\n   a. Let :math:`\\limits_i~t_i` be the :ref:`table type <syntax-tabletype>` :math:`\\table_i.\\TTYPE`.\n\n   b. Let :math:`\\tableaddr_i` be the :ref:`table address <syntax-tableaddr>` resulting from :ref:`allocating <alloc-table>` :math:`\\table_i.\\TTYPE`\n   with initialization value :math:`\\REFNULL~t_i`.\n\n4. For each :ref:`memory <syntax-mem>` :math:`\\mem_i` in :math:`\\module.\\MMEMS`, do:\n\n   a. Let :math:`\\memaddr_i` be the :ref:`memory address <syntax-memaddr>` resulting from :ref:`allocating <alloc-mem>` :math:`\\mem_i.\\MTYPE`.\n\n5. For each :ref:`global <syntax-global>` :math:`\\global_i` in :math:`\\module.\\MGLOBALS`, do:\n\n   a. Let :math:`\\globaladdr_i` be the :ref:`global address <syntax-globaladdr>` resulting from :ref:`allocating <alloc-global>` :math:`\\global_i.\\GTYPE` with initializer value :math:`\\val^\\ast[i]`.\n\n6. For each :ref:`element segment <syntax-elem>` :math:`\\elem_i` in :math:`\\module.\\MELEMS`, do:\n\n   a. Let :math:`\\elemaddr_i` be the :ref:`element address <syntax-elemaddr>` resulting from :ref:`allocating <alloc-elem>` a :ref:`element instance <syntax-eleminst>` of :ref:`reference type <syntax-reftype>` :math:`\\elem_i.\\ETYPE` with contents :math:`(\\reff^\\ast)^\\ast[i]`.\n\n7. For each :ref:`data segment <syntax-data>` :math:`\\data_i` in :math:`\\module.\\MDATAS`, do:\n\n   a. Let :math:`\\dataaddr_i` be the :ref:`data address <syntax-dataaddr>` resulting from :ref:`allocating <alloc-data>` a :ref:`data instance <syntax-datainst>` with contents :math:`\\data_i.\\DINIT`.\n\n8. Let :math:`\\funcaddr^\\ast` be the the concatenation of the :ref:`function addresses <syntax-funcaddr>` :math:`\\funcaddr_i` in index order.\n\n9. Let :math:`\\tableaddr^\\ast` be the the concatenation of the :ref:`table addresses <syntax-tableaddr>` :math:`\\tableaddr_i` in index order.\n\n10. Let :math:`\\memaddr^\\ast` be the the concatenation of the :ref:`memory addresses <syntax-memaddr>` :math:`\\memaddr_i` in index order.\n\n11. Let :math:`\\globaladdr^\\ast` be the the concatenation of the :ref:`global addresses <syntax-globaladdr>` :math:`\\globaladdr_i` in index order.\n\n12. Let :math:`\\elemaddr^\\ast` be the the concatenation of the :ref:`element addresses <syntax-elemaddr>` :math:`\\elemaddr_i` in index order.\n\n13. Let :math:`\\dataaddr^\\ast` be the the concatenation of the :ref:`data addresses <syntax-dataaddr>` :math:`\\dataaddr_i` in index order.\n\n14. Let :math:`\\funcaddr_{\\F{mod}}^\\ast` be the list of :ref:`function addresses <syntax-funcaddr>` extracted from :math:`\\externval_{\\F{im}}^\\ast`, concatenated with :math:`\\funcaddr^\\ast`.\n\n15. Let :math:`\\tableaddr_{\\F{mod}}^\\ast` be the list of :ref:`table addresses <syntax-tableaddr>` extracted from :math:`\\externval_{\\F{im}}^\\ast`, concatenated with :math:`\\tableaddr^\\ast`.\n\n16. Let :math:`\\memaddr_{\\F{mod}}^\\ast` be the list of :ref:`memory addresses <syntax-memaddr>` extracted from :math:`\\externval_{\\F{im}}^\\ast`, concatenated with :math:`\\memaddr^\\ast`.\n\n17. Let :math:`\\globaladdr_{\\F{mod}}^\\ast` be the list of :ref:`global addresses <syntax-globaladdr>` extracted from :math:`\\externval_{\\F{im}}^\\ast`, concatenated with :math:`\\globaladdr^\\ast`.\n\n18. For each :ref:`export <syntax-export>` :math:`\\export_i` in :math:`\\module.\\MEXPORTS`, do:\n\n    a. If :math:`\\export_i` is a function export for :ref:`function index <syntax-funcidx>` :math:`x`, then let :math:`\\externval_i` be the :ref:`external value <syntax-externval>` :math:`\\EVFUNC~(\\funcaddr_{\\F{mod}}^\\ast[x])`.\n\n    b. Else, if :math:`\\export_i` is a table export for :ref:`table index <syntax-tableidx>` :math:`x`, then let :math:`\\externval_i` be the :ref:`external value <syntax-externval>` :math:`\\EVTABLE~(\\tableaddr_{\\F{mod}}^\\ast[x])`.\n\n    c. Else, if :math:`\\export_i` is a memory export for :ref:`memory index <syntax-memidx>` :math:`x`, then let :math:`\\externval_i` be the :ref:`external value <syntax-externval>` :math:`\\EVMEM~(\\memaddr_{\\F{mod}}^\\ast[x])`.\n\n    d. Else, if :math:`\\export_i` is a global export for :ref:`global index <syntax-globalidx>` :math:`x`, then let :math:`\\externval_i` be the :ref:`external value <syntax-externval>` :math:`\\EVGLOBAL~(\\globaladdr_{\\F{mod}}^\\ast[x])`.\n\n    e. Let :math:`\\exportinst_i` be the :ref:`export instance <syntax-exportinst>` :math:`\\{\\EINAME~(\\export_i.\\ENAME), \\EIVALUE~\\externval_i\\}`.\n\n19. Let :math:`\\exportinst^\\ast` be the the concatenation of the :ref:`export instances <syntax-exportinst>` :math:`\\exportinst_i` in index order.\n\n20. Let :math:`\\moduleinst` be the :ref:`module instance <syntax-moduleinst>` :math:`\\{\\MITYPES~(\\module.\\MTYPES),` :math:`\\MIFUNCS~\\funcaddr_{\\F{mod}}^\\ast,` :math:`\\MITABLES~\\tableaddr_{\\F{mod}}^\\ast,` :math:`\\MIMEMS~\\memaddr_{\\F{mod}}^\\ast,` :math:`\\MIGLOBALS~\\globaladdr_{\\F{mod}}^\\ast,` :math:`\\MIEXPORTS~\\exportinst^\\ast\\}`.\n\n21. Return :math:`\\moduleinst`.\n\n\n.. math::\n   ~\\\\\n   \\begin{array}{rlll}\n   \\allocmodule(S, \\module, \\externval_{\\F{im}}^\\ast, \\val^\\ast, (\\reff^\\ast)^\\ast) &=& S', \\moduleinst\n   \\end{array}\n\nwhere:\n\n.. math::\n   \\begin{array}{rlll}\n   \\moduleinst &=& \\{~\n     \\begin{array}[t]{@{}l@{}}\n     \\MITYPES~\\module.\\MTYPES, \\\\\n     \\MIFUNCS~\\evfuncs(\\externval_{\\F{im}}^\\ast)~\\funcaddr^\\ast, \\\\\n     \\MITABLES~\\evtables(\\externval_{\\F{im}}^\\ast)~\\tableaddr^\\ast, \\\\\n     \\MIMEMS~\\evmems(\\externval_{\\F{im}}^\\ast)~\\memaddr^\\ast, \\\\\n     \\MIGLOBALS~\\evglobals(\\externval_{\\F{im}}^\\ast)~\\globaladdr^\\ast, \\\\\n     \\MIELEMS~\\elemaddr^\\ast, \\\\\n     \\MIDATAS~\\dataaddr^\\ast, \\\\\n     \\MIEXPORTS~\\exportinst^\\ast ~\\}\n     \\end{array} \\\\[1ex]\n   S_1, \\funcaddr^\\ast &=& \\allocfunc^\\ast(S, \\module.\\MFUNCS, \\moduleinst) \\\\\n   S_2, \\tableaddr^\\ast &=& \\alloctable^\\ast(S_1, (\\table.\\TTYPE)^\\ast, \\REFNULL~t)\n     \\qquad\\qquad\\qquad~ (\\where \\table^\\ast = \\module.\\MTABLES \\\\ &&\n     \\qquad\\qquad\\qquad~~ \\wedge (\\table.\\TTYPE)^\\ast = (\\limits~t)^\\ast) \\\\\n   S_3, \\memaddr^\\ast &=& \\allocmem^\\ast(S_2, (\\mem.\\MTYPE)^\\ast)\n     \\qquad\\qquad\\qquad~ (\\where \\mem^\\ast = \\module.\\MMEMS) \\\\\n   S_4, \\globaladdr^\\ast &=& \\allocglobal^\\ast(S_3, (\\global.\\GTYPE)^\\ast, \\val^\\ast)\n     \\qquad\\quad~ (\\where \\global^\\ast = \\module.\\MGLOBALS) \\\\\n   S_5, \\elemaddr^\\ast &=& \\allocelem^\\ast(S_4, (\\elem.\\ETYPE)^\\ast, (\\reff^\\ast)^\\ast) \\\\\n     \\qquad\\quad~ (\\where \\elem^\\ast = \\module.\\MELEMS) \\\\\n   S', \\dataaddr^\\ast &=& \\allocdata^\\ast(S_5, (\\data.\\DINIT)^\\ast)\n     \\qquad\\qquad\\qquad~ (\\where \\data^\\ast = \\module.\\MDATAS) \\\\\n   \\exportinst^\\ast &=& \\{ \\EINAME~(\\export.\\ENAME), \\EIVALUE~\\externval_{\\F{ex}} \\}^\\ast\n     \\quad (\\where \\export^\\ast = \\module.\\MEXPORTS) \\\\[1ex]\n   \\evfuncs(\\externval_{\\F{ex}}^\\ast) &=& (\\moduleinst.\\MIFUNCS[x])^\\ast\n     \\qquad~ (\\where x^\\ast = \\edfuncs(\\module.\\MEXPORTS)) \\\\\n   \\evtables(\\externval_{\\F{ex}}^\\ast) &=& (\\moduleinst.\\MITABLES[x])^\\ast\n     \\qquad (\\where x^\\ast = \\edtables(\\module.\\MEXPORTS)) \\\\\n   \\evmems(\\externval_{\\F{ex}}^\\ast) &=& (\\moduleinst.\\MIMEMS[x])^\\ast\n     \\qquad (\\where x^\\ast = \\edmems(\\module.\\MEXPORTS)) \\\\\n   \\evglobals(\\externval_{\\F{ex}}^\\ast) &=& (\\moduleinst.\\MIGLOBALS[x])^\\ast\n     \\qquad\\!\\!\\! (\\where x^\\ast = \\edglobals(\\module.\\MEXPORTS)) \\\\\n   \\end{array}\n\n.. scratch\n   Here, in slight abuse of notation, :math:(`\\F{allocxyz}(S, \\dots))^\\ast` is taken to express multiple allocations with the updates to the store :math:`S` being threaded through, i.e.,\n\n  .. math::\n   \\begin{array}{rlll}\n   (\\F{allocxyz}^\\ast(S_0, \\dots))^n &=& S_n, a^n \\\\[1ex]\n   \\mbox{where for all $i < n$:} \\hfill \\\\\n   S_{i+1}, a^n[i] &=& \\F{allocxyz}(S_i, \\dots)\n   \\end{array}\n\nHere, the notation :math:`\\F{allocx}^\\ast` is shorthand for multiple :ref:`allocations <alloc>` of object kind :math:`X`, defined as follows:\n\n.. math::\n   \\begin{array}{rlll}\n   \\F{allocx}^\\ast(S_0, X^n, \\dots) &=& S_n, a^n \\\\[1ex]\n   \\mbox{where for all $i < n$:} \\hfill \\\\\n   S_{i+1}, a^n[i] &=& \\F{allocx}(S_i, X^n[i], \\dots)\n   \\end{array}\n\nMoreover, if the dots :math:`\\dots` are a sequence :math:`A^n` (as for globals), then the elements of this sequence are passed to the allocation function pointwise.\n\n.. note::\n   The definition of module allocation is mutually recursive with the allocation of its associated functions, because the resulting module instance :math:`\\moduleinst` is passed to the function allocator as an argument, in order to form the necessary closures.\n   In an implementation, this recursion is easily unraveled by mutating one or the other in a secondary step.\n\n\n.. index:: ! instantiation, module, instance, store, trap\n.. _exec-module:\n.. _exec-instantiation:\n\nInstantiation\n~~~~~~~~~~~~~\n\nGiven a :ref:`store <syntax-store>` :math:`S`, a :ref:`module <syntax-module>` :math:`\\module` is instantiated with a list of :ref:`external values <syntax-externval>` :math:`\\externval^n` supplying the required imports as follows.\n\nInstantiation checks that the module is :ref:`valid <valid>` and the provided imports :ref:`match <match-externtype>` the declared types,\nand may *fail* with an error otherwise.\nInstantiation can also result in a :ref:`trap <trap>` from executing the start function.\nIt is up to the :ref:`embedder <embedder>` to define how such conditions are reported.\n\n1. If :math:`\\module` is not :ref:`valid <valid-module>`, then:\n\n   a. Fail.\n\n2. Assert: :math:`\\module` is :ref:`valid <valid-module>` with :ref:`external types <syntax-externtype>` :math:`\\externtype_{\\F{im}}^m` classifying its :ref:`imports <syntax-import>`.\n\n3. If the number :math:`m` of :ref:`imports <syntax-import>` is not equal to the number :math:`n` of provided :ref:`external values <syntax-externval>`, then:\n\n   a. Fail.\n\n4. For each :ref:`external value <syntax-externval>` :math:`\\externval_i` in :math:`\\externval^n` and :ref:`external type <syntax-externtype>` :math:`\\externtype'_i` in :math:`\\externtype_{\\F{im}}^n`, do:\n\n   a. If :math:`\\externval_i` is not :ref:`valid <valid-externval>` with an :ref:`external type <syntax-externtype>` :math:`\\externtype_i` in store :math:`S`, then:\n\n      i. Fail.\n\n   b. If :math:`\\externtype_i` does not :ref:`match <match-externtype>` :math:`\\externtype'_i`, then:\n\n      i. Fail.\n\n.. _exec-initvals:\n\n5. Let :math:`\\moduleinst_{\\F{init}}` be the auxiliary module :ref:`instance <syntax-moduleinst>` :math:`\\{\\MIGLOBALS~\\evglobals(\\externval^n), \\MIFUNCS~\\moduleinst.\\MIFUNCS\\}` that only consists of the imported globals and the imported and allocated functions from the final module instance :math:`\\moduleinst`, defined below.\n\n6. Let :math:`F_{\\F{init}}` be the auxiliary :ref:`frame <syntax-frame>` :math:`\\{ \\AMODULE~\\moduleinst_{\\F{init}}, \\ALOCALS~\\epsilon \\}`.\n\n7. Push the frame :math:`F_{\\F{init}}` to the stack.\n\n8. Let :math:`\\val^\\ast` be the vector of :ref:`global <syntax-global>` initialization :ref:`values <syntax-val>` determined by :math:`\\module` and :math:`\\externval^n`. These may be calculated as follows.\n\n   a. For each :ref:`global <syntax-global>` :math:`\\global_i` in :math:`\\module.\\MGLOBALS`, do:\n\n      i. Let :math:`\\val_i` be the result of :ref:`evaluating <exec-expr>` the initializer expression :math:`\\global_i.\\GINIT`.\n\n   b. Assert: due to :ref:`validation <valid-module>`, the frame :math:`F_{\\F{init}}` is now on the top of the stack.\n\n   c. Let :math:`\\val^\\ast` be the conatenation of :math:`\\val_i` in index order.\n\n9. Let :math:`(\\reff^\\ast)^\\ast` be the list of :ref:`reference <syntax-ref>` vectors determined by the :ref:`element segments <syntax-elem>` in :math:`\\module`. These may be calculated as follows.\n\n    a. For each :ref:`element segment <syntax-elem>` :math:`\\elem_i` in :math:`\\module.\\MELEMS`, and for each element :ref:`expression <syntax-expr>` :math:`\\expr_{ij}` in :math:`\\elem_i.\\EINIT`, do:\n\n       i. Let :math:`\\reff_{ij}` be the result of :ref:`evaluating <exec-expr>` the initializer expression :math:`\\expr_{ij}`.\n\n    b. Let :math:`\\reff^\\ast_i` be the concatenation of function elements :math:`\\reff_{ij}` in order of index :math:`j`.\n\n    c. Let :math:`(\\reff^\\ast)^\\ast` be the concatenation of function element vectors :math:`\\reff^\\ast_i` in order of index :math:`i`.\n\n10. Pop the frame :math:`F_{\\F{init}}` from the stack.\n\n11. Let :math:`\\moduleinst` be a new module instance :ref:`allocated <alloc-module>` from :math:`\\module` in store :math:`S` with imports :math:`\\externval^n`, global initializer values :math:`\\val^\\ast`, and element segment contents :math:`(\\reff^\\ast)^\\ast`, and let :math:`S'` be the extended store produced by module allocation.\n\n12. Let :math:`F` be the auxiliary :ref:`frame <syntax-frame>` :math:`\\{ \\AMODULE~\\moduleinst, \\ALOCALS~\\epsilon \\}`.\n\n13. Push the frame :math:`F` to the stack.\n\n14. For each :ref:`element segment <syntax-elem>` :math:`\\elem_i` in :math:`\\module.\\MELEMS` whose :ref:`mode <syntax-elemmode>` is of the form :math:`\\EACTIVE~\\{ \\ETABLE~\\tableidx_i, \\EOFFSET~\\X{einstr}^\\ast_i~\\END \\}`, do:\n\n    a. Assert: :math:`\\tableidx_i` is :math:`0`.\n\n    b. Let :math:`n` be the length of the vector :math:`\\elem_i.\\EINIT`.\n\n    c. :ref:`Execute <exec-instr-seq>` the instruction sequence :math:`\\X{einstr}^\\ast_i`.\n\n    d. :ref:`Execute <exec-const>` the instruction :math:`\\I32.\\CONST~0`.\n\n    e. :ref:`Execute <exec-const>` the instruction :math:`\\I32.\\CONST~n`.\n\n    f. :ref:`Execute <exec-table.init>` the instruction :math:`\\TABLEINIT~i`.\n\n    g. :ref:`Execute <exec-elem.drop>` the instruction :math:`\\ELEMDROP~i`.\n\n15. For each :ref:`data segment <syntax-data>` :math:`\\data_i` in :math:`\\module.\\MDATAS` whose :ref:`mode <syntax-datamode>` is of the form :math:`\\DACTIVE~\\{ \\DMEM~\\memidx_i, \\DOFFSET~\\X{dinstr}^\\ast_i~\\END \\}`, do:\n\n    a. Assert: :math:`\\memidx_i` is :math:`0`.\n\n    b. Let :math:`n` be the length of the vector :math:`\\data_i.\\DINIT`.\n\n    c. :ref:`Execute <exec-instr-seq>` the instruction sequence :math:`\\X{dinstr}^\\ast_i`.\n\n    d. :ref:`Execute <exec-const>` the instruction :math:`\\I32.\\CONST~0`.\n\n    e. :ref:`Execute <exec-const>` the instruction :math:`\\I32.\\CONST~n`.\n\n    f. :ref:`Execute <exec-memory.init>` the instruction :math:`\\MEMORYINIT~i`.\n\n    g. :ref:`Execute <exec-data.drop>` the instruction :math:`\\DATADROP~i`.\n\n16. If the :ref:`start function <syntax-start>` :math:`\\module.\\MSTART` is not empty, then:\n\n    a. Let :math:`\\start` be the :ref:`start function <syntax-start>` :math:`\\module.\\MSTART`.\n\n    b. :ref:`Execute <exec-call>` the instruction :math:`\\CALL~\\start.\\SFUNC`.\n\n17. Assert: due to :ref:`validation <valid-module>`, the frame :math:`F` is now on the top of the stack.\n\n18. Pop the frame :math:`F` from the stack.\n\n\n.. math::\n   ~\\\\\n   \\begin{array}{@{}rcll}\n   \\instantiate(S, \\module, \\externval^k) &=& S'; F;\n     \\begin{array}[t]{@{}l@{}}\n     \\F{runelem}_0(\\elem^n[0])~\\dots~\\F{runelem}_{n-1}(\\elem^n[n-1]) \\\\\n     \\F{rundata}_0(\\data^m[0])~\\dots~\\F{rundata}_{m-1}(\\data^m[m-1]) \\\\\n     (\\CALL~\\start.\\SFUNC)^? \\\\\n     \\end{array} \\\\\n   &(\\iff\n     & \\vdashmodule \\module : \\externtype_{\\F{im}}^k \\to \\externtype_{\\F{ex}}^\\ast \\\\\n     &\\wedge& (S \\vdashexternval \\externval : \\externtype)^k \\\\\n     &\\wedge& (\\vdashexterntypematch \\externtype \\matchesexterntype \\externtype_{\\F{im}})^k \\\\[1ex]\n     &\\wedge& \\module.\\MGLOBALS = \\global^\\ast \\\\\n     &\\wedge& \\module.\\MELEMS = \\elem^n \\\\\n     &\\wedge& \\module.\\MDATAS = \\data^m \\\\\n     &\\wedge& \\module.\\MSTART = \\start^? \\\\\n     &\\wedge& (\\expr_{\\F{g}} = \\global.GINIT)^\\ast \\\\\n     &\\wedge& (\\expr_{\\F{e}}^\\ast = \\elem.EINIT)^n \\\\[1ex]\n     &\\wedge& S', \\moduleinst = \\allocmodule(S, \\module, \\externval^k, \\val^\\ast, (\\reff^\\ast)^n) \\\\\n     &\\wedge& F = \\{ \\AMODULE~\\moduleinst, \\ALOCALS~\\epsilon \\} \\\\[1ex]\n     &\\wedge& (S'; F; \\expr_{\\F{g}} \\stepto^\\ast S'; F; \\val~\\END)^\\ast \\\\\n     &\\wedge& ((S'; F; \\expr_{\\F{e}} \\stepto^\\ast S'; F; \\reff~\\END)^\\ast)^n \\\\\n     &\\wedge& (\\tableaddr = \\moduleinst.\\MITABLES[\\elem.\\ETABLE])^\\ast \\\\\n     &\\wedge& (\\memaddr = \\moduleinst.\\MIMEMS[\\data.\\DMEM])^\\ast \\\\\n     &\\wedge& (\\funcaddr = \\moduleinst.\\MIFUNCS[\\start.\\SFUNC])^?)\n   \\end{array}\n\nwhere:\n\n.. math::\n   \\begin{array}{@{}l}\n   \\F{runelem}_i(\\{\\ETYPE~\\X{et}, \\EINIT~\\reff^n, \\EMODE~\\EPASSIVE\\}) \\quad=\\quad \\epsilon \\\\\n   \\F{runelem}_i(\\{\\ETYPE~\\X{et}, \\EINIT~\\reff^n, \\EMODE~\\EACTIVE \\{\\ETABLE~0, \\EOFFSET~\\instr^\\ast~\\END\\}\\}) \\quad=\\\\ \\qquad\n     \\instr^\\ast~(\\I32.\\CONST~0)~(\\I32.\\CONST~n)~(\\TABLEINIT~i)~(\\ELEMDROP~i) \\\\\n   \\F{runelem}_i(\\{\\ETYPE~\\X{et}, \\EINIT~\\reff^n, \\EMODE~\\EDECLARATIVE\\}) \\quad=\\\\ \\qquad\n     (\\ELEMDROP~i) \\\\[1ex]\n   \\F{rundata}_i(\\{\\DINIT~b^n, DMODE~\\DPASSIVE\\}) \\quad=\\quad \\epsilon \\\\\n   \\F{rundata}_i(\\{\\DINIT~b^n, DMODE~\\DACTIVE \\{\\DMEM~0, \\DOFFSET~\\instr^\\ast~\\END\\}\\}) \\quad=\\\\ \\qquad\n     \\instr^\\ast~(\\I32.\\CONST~0)~(\\I32.\\CONST~n)~(\\MEMORYINIT~i)~(\\DATADROP~i) \\\\\n   \\end{array}\n\n.. note::\n   Module :ref:`allocation <alloc-module>` and the :ref:`evaluation <exec-expr>` of :ref:`global <syntax-global>` initializers and :ref:`element segments <syntax-elem>` are mutually recursive because the global initialization :ref:`values <syntax-val>` :math:`\\val^\\ast` and element segment contents :math:`(\\reff^\\ast)^\\ast` are passed to the module allocator while depending on the module instance :math:`\\moduleinst` and store :math:`S'` returned by allocation.\n   However, this recursion is just a specification device.\n   In practice, the initialization values can :ref:`be determined <exec-initvals>` beforehand by staging module allocation such that first, the module's own :math:`function instances <syntax-funcinst>` are pre-allocated in the store, then the initializer expressions are evaluated, then the rest of the module instance is allocated, and finally the new function instances' :math:`\\AMODULE` fields are set to that module instance.\n   This is possible because :ref:`validation <valid-module>` ensures that initialization expressions cannot actually call a function, only take their reference.\n\n   All failure conditions are checked before any observable mutation of the store takes place.\n   Store mutation is not atomic;\n   it happens in individual steps that may be interleaved with other threads.\n\n   :ref:`Evaluation <exec-expr>` of :ref:`constant expressions <valid-constant>` does not affect the store.\n\n\n.. index:: ! invocation, module, module instance, function, export, function address, function instance, function type, value, stack, trap, store\n.. _exec-invocation:\n\nInvocation\n~~~~~~~~~~\n\nOnce a :ref:`module <syntax-module>` has been :ref:`instantiated <exec-instantiation>`, any exported function can be *invoked* externally via its :ref:`function address <syntax-funcaddr>` :math:`\\funcaddr` in the :ref:`store <syntax-store>` :math:`S` and an appropriate list :math:`\\val^\\ast` of argument :ref:`values <syntax-val>`.\n\nInvocation may *fail* with an error if the arguments do not fit the :ref:`function type <syntax-functype>`.\nInvocation can also result in a :ref:`trap <trap>`.\nIt is up to the :ref:`embedder <embedder>` to define how such conditions are reported.\n\n.. note::\n   If the :ref:`embedder <embedder>` API performs type checks itself, either statically or dynamically, before performing an invocation, then no failure other than traps can occur.\n\nThe following steps are performed:\n\n1. Assert: :math:`S.\\SFUNCS[\\funcaddr]` exists.\n\n2. Let :math:`\\funcinst` be the :ref:`function instance <syntax-funcinst>` :math:`S.\\SFUNCS[\\funcaddr]`.\n\n3. Let :math:`[t_1^n] \\to [t_2^m]` be the :ref:`function type <syntax-functype>` :math:`\\funcinst.\\FITYPE`.\n\n4. If the length :math:`|\\val^\\ast|` of the provided argument values is different from the number :math:`n` of expected arguments, then:\n\n   a. Fail.\n\n5. For each :ref:`value type <syntax-valtype>` :math:`t_i` in :math:`t_1^n` and corresponding :ref:`value <syntax-val>` :math:`val_i` in :math:`\\val^\\ast`, do:\n\n   a. If :math:`\\val_i` is not :ref:`valid <valid-val>` with value type :math:`t_i`, then:\n\n      i. Fail.\n\n6. Let :math:`F` be the dummy :ref:`frame <syntax-frame>` :math:`\\{ \\AMODULE~\\{\\}, \\ALOCALS~\\epsilon \\}`.\n\n7. Push the frame :math:`F` to the stack.\n\n8. Push the values :math:`\\val^\\ast` to the stack.\n\n9. :ref:`Invoke <exec-invoke>` the function instance at address :math:`\\funcaddr`.\n\nOnce the function has returned, the following steps are executed:\n\n1. Assert: due to :ref:`validation <valid-func>`, :math:`m` :ref:`values <syntax-val>` are on the top of the stack.\n\n2. Pop :math:`\\val_{\\F{res}}^m` from the stack.\n\nThe values :math:`\\val_{\\F{res}}^m` are returned as the results of the invocation.\n\n.. math::\n   ~\\\\[-1ex]\n   \\begin{array}{@{}lcl}\n   \\invoke(S, \\funcaddr, \\val^n) &=& S; F; \\val^n~(\\INVOKE~\\funcaddr) \\\\\n     &(\\iff & S.\\SFUNCS[\\funcaddr].\\FITYPE = [t_1^n] \\to [t_2^m] \\\\\n     &\\wedge& (S \\vdashval \\val : t_1)^n \\\\\n     &\\wedge& F = \\{ \\AMODULE~\\{\\}, \\ALOCALS~\\epsilon \\}) \\\\\n   \\end{array}\n"
  },
  {
    "path": "document/core/exec/numerics.rst",
    "content": ".. index:: value, integer, floating-point, bit width, determinism, NaN\n.. _exec-op-partial:\n.. _exec-numeric:\n\nNumerics\n--------\n\nNumeric primitives are defined in a generic manner, by operators indexed over a bit width :math:`N`.\n\nSome operators are *non-deterministic*, because they can return one of several possible results (such as different :ref:`NaN <syntax-nan>` values).\nTechnically, each operator thus returns a *set* of allowed values.\nFor convenience, deterministic results are expressed as plain values, which are assumed to be identified with a respective singleton set.\n\nSome operators are *partial*, because they are not defined on certain inputs.\nTechnically, an empty set of results is returned for these inputs.\n\nIn formal notation, each operator is defined by equational clauses that apply in decreasing order of precedence.\nThat is, the first clause that is applicable to the given arguments defines the result.\nIn some cases, similar clauses are combined into one by using the notation :math:`\\pm` or :math:`\\mp`.\nWhen several of these placeholders occur in a single clause, then they must be resolved consistently: either the upper sign is chosen for all of them or the lower sign.\n\n.. note::\n   For example, the |fcopysign| operator is defined as follows:\n\n   .. math::\n      \\begin{array}{@{}lcll}\n      \\fcopysign_N(\\pm p_1, \\pm p_2) &=& \\pm p_1 \\\\\n      \\fcopysign_N(\\pm p_1, \\mp p_2) &=& \\mp p_1 \\\\\n      \\end{array}\n\n   This definition is to be read as a shorthand for the following expansion of each clause into two separate ones:\n\n   .. math::\n      \\begin{array}{@{}lcll}\n      \\fcopysign_N(+ p_1, + p_2) &=& + p_1 \\\\\n      \\fcopysign_N(- p_1, - p_2) &=& - p_1 \\\\\n      \\fcopysign_N(+ p_1, - p_2) &=& - p_1 \\\\\n      \\fcopysign_N(- p_1, + p_2) &=& + p_1 \\\\\n      \\end{array}\n\n.. _aux-trunc:\n\nConventions:\n\n* The meta variable :math:`d` is used to range over single bits.\n\n* The meta variable :math:`p` is used to range over (signless) :ref:`magnitudes <syntax-float>` of floating-point values, including |NAN| and :math:`\\infty`.\n\n* The meta variable :math:`q` is used to range over (signless) *rational* :ref:`magnitudes <syntax-float>`, excluding |NAN| or :math:`\\infty`.\n\n* The notation :math:`f^{-1}` denotes the inverse of a bijective function :math:`f`.\n\n* Truncation of rational values is written :math:`\\trunc(\\pm q)`, with the usual mathematical definition:\n\n  .. math::\n     \\begin{array}{lll@{\\qquad}l}\n     \\trunc(\\pm q) &=& \\pm i & (\\iff i \\in \\mathbb{N} \\wedge +q - 1 < i \\leq +q) \\\\\n     \\end{array}\n\n\n.. index:: bit, integer, floating-point\n.. _aux-bits:\n\nRepresentations\n~~~~~~~~~~~~~~~\n\nNumbers have an underlying binary representation as a sequence of bits:\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\bits_{\\K{i}N}(i) &=& \\ibits_N(i) \\\\\n   \\bits_{\\K{f}N}(z) &=& \\fbits_N(z) \\\\\n   \\end{array}\n\nEach of these functions is a bijection, hence they are invertible.\n\n\n.. index:: Boolean\n.. _aux-ibits:\n\nIntegers\n........\n\n:ref:`Integers <syntax-int>` are represented as base two unsigned numbers:\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\ibits_N(i) &=& d_{N-1}~\\dots~d_0 & (i = 2^{N-1}\\cdot d_{N-1} + \\dots + 2^0\\cdot d_0) \\\\\n   \\end{array}\n\nBoolean operators like :math:`\\wedge`, :math:`\\vee`, or :math:`\\veebar` are lifted to bit sequences of equal length by applying them pointwise.\n\n\n.. index:: IEEE 754, significand, exponent\n.. _aux-fbias:\n.. _aux-fsign:\n.. _aux-fbits:\n\nFloating-Point\n..............\n\n:ref:`Floating-point values <syntax-float>` are represented in the respective binary format defined by |IEEE754|_ (Section 3.4):\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\fbits_N(\\pm (1+m\\cdot 2^{-M})\\cdot 2^e) &=& \\fsign({\\pm})~\\ibits_E(e+\\fbias_N)~\\ibits_M(m) \\\\\n   \\fbits_N(\\pm (0+m\\cdot 2^{-M})\\cdot 2^e) &=& \\fsign({\\pm})~(0)^E~\\ibits_M(m) \\\\\n   \\fbits_N(\\pm \\infty) &=& \\fsign({\\pm})~(1)^E~(0)^M \\\\\n   \\fbits_N(\\pm \\NAN(n)) &=& \\fsign({\\pm})~(1)^E~\\ibits_M(n) \\\\[1ex]\n   \\fbias_N &=& 2^{E-1}-1 \\\\\n   \\fsign({+}) &=& 0 \\\\\n   \\fsign({-}) &=& 1 \\\\\n   \\end{array}\n\nwhere :math:`M = \\significand(N)` and :math:`E = \\exponent(N)`.\n\n\n.. index:: byte, little endian, memory\n.. _aux-littleendian:\n.. _aux-bytes:\n\nStorage\n.......\n\nWhen a number is stored into :ref:`memory <syntax-mem>`, it is converted into a sequence of :ref:`bytes <syntax-byte>` in |LittleEndian|_ byte order:\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\bytes_t(i) &=& \\littleendian(\\bits_t(i)) \\\\[1ex]\n   \\littleendian(\\epsilon) &=& \\epsilon \\\\\n   \\littleendian(d^8~{d'}^\\ast~) &=& \\littleendian({d'}^\\ast)~\\ibits_8^{-1}(d^8) \\\\\n   \\end{array}\n\nAgain these functions are invertable bijections.\n\n\n.. index:: integer\n.. _int-ops:\n\nInteger Operations\n~~~~~~~~~~~~~~~~~~\n\n.. index:: sign, signed integer, unsigned integer, uninterpreted integer, two's complement\n.. _aux-signed:\n\nSign Interpretation\n...................\n\nInteger operators are defined on |iN| values.\nOperators that use a signed interpretation convert the value using the following definition, which takes the two's complement when the value lies in the upper half of the value range (i.e., its most significant bit is :math:`1`):\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\signed_N(i) &=& i & (0 \\leq i < 2^{N-1}) \\\\\n   \\signed_N(i) &=& i - 2^N & (2^{N-1} \\leq i < 2^N) \\\\\n   \\end{array}\n\nThis function is bijective, and hence invertible.\n\n\n.. index:: Boolean\n.. _aux-bool:\n\nBoolean Interpretation\n......................\n\nThe integer result of predicates -- i.e., :ref:`tests <syntax-testop>` and :ref:`relational <syntax-relop>` operators -- is defined with the help of the following auxiliary function producing the value :math:`1` or :math:`0` depending on a condition.\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\bool(C) &=& 1 & (\\iff C) \\\\\n   \\bool(C) &=& 0 & (\\otherwise) \\\\\n   \\end{array}\n\n\n.. _op-iadd:\n\n:math:`\\iadd_N(i_1, i_2)`\n.........................\n\n* Return the result of adding :math:`i_1` and :math:`i_2` modulo :math:`2^N`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\iadd_N(i_1, i_2) &=& (i_1 + i_2) \\mod 2^N\n   \\end{array}\n\n.. _op-isub:\n\n:math:`\\isub_N(i_1, i_2)`\n.........................\n\n* Return the result of subtracting :math:`i_2` from :math:`i_1` modulo :math:`2^N`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\isub_N(i_1, i_2) &=& (i_1 - i_2 + 2^N) \\mod 2^N\n   \\end{array}\n\n.. _op-imul:\n\n:math:`\\imul_N(i_1, i_2)`\n.........................\n\n* Return the result of multiplying :math:`i_1` and :math:`i_2` modulo :math:`2^N`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\imul_N(i_1, i_2) &=& (i_1 \\cdot i_2) \\mod 2^N\n   \\end{array}\n\n.. _op-idiv_u:\n\n:math:`\\idivu_N(i_1, i_2)`\n..........................\n\n* If :math:`i_2` is :math:`0`, then the result is undefined.\n\n* Else, return the result of dividing :math:`i_1` by :math:`i_2`, truncated toward zero.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\idivu_N(i_1, 0) &=& \\{\\} \\\\\n   \\idivu_N(i_1, i_2) &=& \\trunc(i_1 / i_2) \\\\\n   \\end{array}\n\n.. note::\n   This operator is :ref:`partial <exec-op-partial>`.\n\n.. _op-idiv_s:\n\n:math:`\\idivs_N(i_1, i_2)`\n..........................\n\n* Let :math:`j_1` be the :ref:`signed interpretation <aux-signed>` of :math:`i_1`.\n\n* Let :math:`j_2` be the :ref:`signed interpretation <aux-signed>` of :math:`i_2`.\n\n* If :math:`j_2` is :math:`0`, then the result is undefined.\n\n* Else if :math:`j_1` divided by :math:`j_2` is :math:`2^{N-1}`, then the result is undefined.\n\n* Else, return the result of dividing :math:`j_1` by :math:`j_2`, truncated toward zero.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\idivs_N(i_1, 0) &=& \\{\\} \\\\\n   \\idivs_N(i_1, i_2) &=& \\{\\} \\qquad\\qquad (\\iff \\signed_N(i_1) / \\signed_N(i_2) = 2^{N-1}) \\\\\n   \\idivs_N(i_1, i_2) &=& \\signed_N^{-1}(\\trunc(\\signed_N(i_1) / \\signed_N(i_2))) \\\\\n   \\end{array}\n\n.. note::\n   This operator is :ref:`partial <exec-op-partial>`.\n   Besides division by :math:`0`, the result of :math:`(-2^{N-1})/(-1) = +2^{N-1}` is not representable as an :math:`N`-bit signed integer.\n\n\n.. _op-irem_u:\n\n:math:`\\iremu_N(i_1, i_2)`\n..........................\n\n* If :math:`i_2` is :math:`0`, then the result is undefined.\n\n* Else, return the remainder of dividing :math:`i_1` by :math:`i_2`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\iremu_N(i_1, 0) &=& \\{\\} \\\\\n   \\iremu_N(i_1, i_2) &=& i_1 - i_2 \\cdot \\trunc(i_1 / i_2) \\\\\n   \\end{array}\n\n.. note::\n   This operator is :ref:`partial <exec-op-partial>`.\n\n   As long as both operators are defined,\n   it holds that :math:`i_1 = i_2\\cdot\\idivu(i_1, i_2) + \\iremu(i_1, i_2)`.\n\n.. _op-irem_s:\n\n:math:`\\irems_N(i_1, i_2)`\n..........................\n\n* Let :math:`j_1` be the :ref:`signed interpretation <aux-signed>` of :math:`i_1`.\n\n* Let :math:`j_2` be the :ref:`signed interpretation <aux-signed>` of :math:`i_2`.\n\n* If :math:`i_2` is :math:`0`, then the result is undefined.\n\n* Else, return the remainder of dividing :math:`j_1` by :math:`j_2`, with the sign of the dividend :math:`j_1`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\irems_N(i_1, 0) &=& \\{\\} \\\\\n   \\irems_N(i_1, i_2) &=& \\signed_N^{-1}(j_1 - j_2 \\cdot \\trunc(j_1 / j_2)) \\\\\n     && (\\where j_1 = \\signed_N(i_1) \\wedge j_2 = \\signed_N(i_2)) \\\\\n   \\end{array}\n\n.. note::\n   This operator is :ref:`partial <exec-op-partial>`.\n\n   As long as both operators are defined,\n   it holds that :math:`i_1 = i_2\\cdot\\idivs(i_1, i_2) + \\irems(i_1, i_2)`.\n\n\n.. _op-iand:\n\n:math:`\\iand_N(i_1, i_2)`\n.........................\n\n* Return the bitwise conjunction of :math:`i_1` and :math:`i_2`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\iand_N(i_1, i_2) &=& \\ibits_N^{-1}(\\ibits_N(i_1) \\wedge \\ibits_N(i_2))\n   \\end{array}\n\n.. _op-ior:\n\n:math:`\\ior_N(i_1, i_2)`\n........................\n\n* Return the bitwise disjunction of :math:`i_1` and :math:`i_2`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\ior_N(i_1, i_2) &=& \\ibits_N^{-1}(\\ibits_N(i_1) \\vee \\ibits_N(i_2))\n   \\end{array}\n\n.. _op-ixor:\n\n:math:`\\ixor_N(i_1, i_2)`\n.........................\n\n* Return the bitwise exclusive disjunction of :math:`i_1` and :math:`i_2`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\ixor_N(i_1, i_2) &=& \\ibits_N^{-1}(\\ibits_N(i_1) \\veebar \\ibits_N(i_2))\n   \\end{array}\n\n.. _op-ishl:\n\n:math:`\\ishl_N(i_1, i_2)`\n.........................\n\n* Let :math:`k` be :math:`i_2` modulo :math:`N`.\n\n* Return the result of shifting :math:`i_1` left by :math:`k` bits, modulo :math:`2^N`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\ishl_N(i_1, i_2) &=& \\ibits_N^{-1}(d_2^{N-k}~0^k)\n     & (\\iff \\ibits_N(i_1) = d_1^k~d_2^{N-k} \\wedge k = i_2 \\mod N)\n   \\end{array}\n\n.. _op-ishr_u:\n\n:math:`\\ishru_N(i_1, i_2)`\n..........................\n\n* Let :math:`k` be :math:`i_2` modulo :math:`N`.\n\n* Return the result of shifting :math:`i_1` right by :math:`k` bits, extended with :math:`0` bits.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\ishru_N(i_1, i_2) &=& \\ibits_N^{-1}(0^k~d_1^{N-k})\n     & (\\iff \\ibits_N(i_1) = d_1^{N-k}~d_2^k \\wedge k = i_2 \\mod N)\n   \\end{array}\n\n.. _op-ishr_s:\n\n:math:`\\ishrs_N(i_1, i_2)`\n..........................\n\n* Let :math:`k` be :math:`i_2` modulo :math:`N`.\n\n* Return the result of shifting :math:`i_1` right by :math:`k` bits, extended with the most significant bit of the original value.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\ishrs_N(i_1, i_2) &=& \\ibits_N^{-1}(d_0^{k+1}~d_1^{N-k-1})\n     & (\\iff \\ibits_N(i_1) = d_0~d_1^{N-k-1}~d_2^k \\wedge k = i_2 \\mod N)\n   \\end{array}\n\n.. _op-irotl:\n\n:math:`\\irotl_N(i_1, i_2)`\n..........................\n\n* Let :math:`k` be :math:`i_2` modulo :math:`N`.\n\n* Return the result of rotating :math:`i_1` left by :math:`k` bits.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\irotl_N(i_1, i_2) &=& \\ibits_N^{-1}(d_2^{N-k}~d_1^k)\n     & (\\iff \\ibits_N(i_1) = d_1^k~d_2^{N-k} \\wedge k = i_2 \\mod N)\n   \\end{array}\n\n.. _op-irotr:\n\n:math:`\\irotr_N(i_1, i_2)`\n..........................\n\n* Let :math:`k` be :math:`i_2` modulo :math:`N`.\n\n* Return the result of rotating :math:`i_1` right by :math:`k` bits.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\irotr_N(i_1, i_2) &=& \\ibits_N^{-1}(d_2^k~d_1^{N-k})\n     & (\\iff \\ibits_N(i_1) = d_1^{N-k}~d_2^k \\wedge k = i_2 \\mod N)\n   \\end{array}\n\n\n.. _op-iclz:\n\n:math:`\\iclz_N(i)`\n..................\n\n* Return the count of leading zero bits in :math:`i`; all bits are considered leading zeros if :math:`i` is :math:`0`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\iclz_N(i) &=& k & (\\iff \\ibits_N(i) = 0^k~(1~d^\\ast)^?)\n   \\end{array}\n\n\n.. _op-ictz:\n\n:math:`\\ictz_N(i)`\n..................\n\n* Return the count of trailing zero bits in :math:`i`; all bits are considered trailing zeros if :math:`i` is :math:`0`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\ictz_N(i) &=& k & (\\iff \\ibits_N(i) = (d^\\ast~1)^?~0^k)\n   \\end{array}\n\n\n.. _op-ipopcnt:\n\n:math:`\\ipopcnt_N(i)`\n.....................\n\n* Return the count of non-zero bits in :math:`i`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\ipopcnt_N(i) &=& k & (\\iff \\ibits_N(i) = (0^\\ast~1)^k~0^\\ast)\n   \\end{array}\n\n\n.. _op-ieqz:\n\n:math:`\\ieqz_N(i)`\n..................\n\n* Return :math:`1` if :math:`i` is zero, :math:`0` otherwise.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\ieqz_N(i) &=& \\bool(i = 0)\n   \\end{array}\n\n\n.. _op-ieq:\n\n:math:`\\ieq_N(i_1, i_2)`\n........................\n\n* Return :math:`1` if :math:`i_1` equals :math:`i_2`, :math:`0` otherwise.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\ieq_N(i_1, i_2) &=& \\bool(i_1 = i_2)\n   \\end{array}\n\n\n.. _op-ine:\n\n:math:`\\ine_N(i_1, i_2)`\n........................\n\n* Return :math:`1` if :math:`i_1` does not equal :math:`i_2`, :math:`0` otherwise.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\ine_N(i_1, i_2) &=& \\bool(i_1 \\neq i_2)\n   \\end{array}\n\n\n.. _op-ilt_u:\n\n:math:`\\iltu_N(i_1, i_2)`\n.........................\n\n* Return :math:`1` if :math:`i_1` is less than :math:`i_2`, :math:`0` otherwise.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\iltu_N(i_1, i_2) &=& \\bool(i_1 < i_2)\n   \\end{array}\n\n\n.. _op-ilt_s:\n\n:math:`\\ilts_N(i_1, i_2)`\n.........................\n\n* Let :math:`j_1` be the :ref:`signed interpretation <aux-signed>` of :math:`i_1`.\n\n* Let :math:`j_2` be the :ref:`signed interpretation <aux-signed>` of :math:`i_2`.\n\n* Return :math:`1` if :math:`j_1` is less than :math:`j_2`, :math:`0` otherwise.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\ilts_N(i_1, i_2) &=& \\bool(\\signed_N(i_1) < \\signed_N(i_2))\n   \\end{array}\n\n\n.. _op-igt_u:\n\n:math:`\\igtu_N(i_1, i_2)`\n.........................\n\n* Return :math:`1` if :math:`i_1` is greater than :math:`i_2`, :math:`0` otherwise.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\igtu_N(i_1, i_2) &=& \\bool(i_1 > i_2)\n   \\end{array}\n\n\n.. _op-igt_s:\n\n:math:`\\igts_N(i_1, i_2)`\n.........................\n\n* Let :math:`j_1` be the :ref:`signed interpretation <aux-signed>` of :math:`i_1`.\n\n* Let :math:`j_2` be the :ref:`signed interpretation <aux-signed>` of :math:`i_2`.\n\n* Return :math:`1` if :math:`j_1` is greater than :math:`j_2`, :math:`0` otherwise.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\igts_N(i_1, i_2) &=& \\bool(\\signed_N(i_1) > \\signed_N(i_2))\n   \\end{array}\n\n\n.. _op-ile_u:\n\n:math:`\\ileu_N(i_1, i_2)`\n.........................\n\n* Return :math:`1` if :math:`i_1` is less than or equal to :math:`i_2`, :math:`0` otherwise.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\ileu_N(i_1, i_2) &=& \\bool(i_1 \\leq i_2)\n   \\end{array}\n\n\n.. _op-ile_s:\n\n:math:`\\iles_N(i_1, i_2)`\n.........................\n\n* Let :math:`j_1` be the :ref:`signed interpretation <aux-signed>` of :math:`i_1`.\n\n* Let :math:`j_2` be the :ref:`signed interpretation <aux-signed>` of :math:`i_2`.\n\n* Return :math:`1` if :math:`j_1` is less than or equal to :math:`j_2`, :math:`0` otherwise.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\iles_N(i_1, i_2) &=& \\bool(\\signed_N(i_1) \\leq \\signed_N(i_2))\n   \\end{array}\n\n\n.. _op-ige_u:\n\n:math:`\\igeu_N(i_1, i_2)`\n.........................\n\n* Return :math:`1` if :math:`i_1` is greater than or equal to :math:`i_2`, :math:`0` otherwise.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\igeu_N(i_1, i_2) &=& \\bool(i_1 \\geq i_2)\n   \\end{array}\n\n\n.. _op-ige_s:\n\n:math:`\\iges_N(i_1, i_2)`\n.........................\n\n* Let :math:`j_1` be the :ref:`signed interpretation <aux-signed>` of :math:`i_1`.\n\n* Let :math:`j_2` be the :ref:`signed interpretation <aux-signed>` of :math:`i_2`.\n\n* Return :math:`1` if :math:`j_1` is greater than or equal to :math:`j_2`, :math:`0` otherwise.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\iges_N(i_1, i_2) &=& \\bool(\\signed_N(i_1) \\geq \\signed_N(i_2))\n   \\end{array}\n\n\n.. _op-iextendn_s:\n\n:math:`\\iextendMs_N(i)`\n.......................\n\n* Return :math:`\\extends_{M,N}(i)`.\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\iextendMs_{N}(i) &=& \\extends_{M,N}(i) \\\\\n   \\end{array}\n\n\n.. index:: floating-point, IEEE 754\n.. _float-ops:\n\nFloating-Point Operations\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nFloating-point arithmetic follows the |IEEE754|_ standard,\nwith the following qualifications:\n\n* All operators use round-to-nearest ties-to-even, except where otherwise specified.\n  Non-default directed rounding attributes are not supported.\n\n* Following the recommendation that operators propagate :ref:`NaN <syntax-nan>` payloads from their operands is permitted but not required.\n\n* All operators use \"non-stop\" mode, and floating-point exceptions are not otherwise observable.\n  In particular, neither alternate floating-point exception handling attributes nor operators on status flags are supported.\n  There is no observable difference between quiet and signalling NaNs.\n\n.. note::\n   Some of these limitations may be lifted in future versions of WebAssembly.\n\n\n.. index:: rounding\n.. _aux-ieee:\n\nRounding\n........\n\nRounding always is round-to-nearest ties-to-even, in correspondence with |IEEE754|_ (Section 4.3.1).\n\nAn *exact* floating-point number is a rational number that is exactly representable as a :ref:`floating-point number <syntax-float>` of given bit width :math:`N`.\n\nA *limit* number for a given floating-point bit width :math:`N` is a positive or negative number whose magnitude is the smallest power of :math:`2` that is not exactly representable as a floating-point number of width :math:`N` (that magnitude is :math:`2^{128}` for :math:`N = 32` and :math:`2^{1024}` for :math:`N = 64`).\n\nA *candidate* number is either an exact floating-point number or a positive or negative limit number for the given bit width :math:`N`.\n\nA *candidate pair* is a pair :math:`z_1,z_2` of candidate numbers, such that no candidate number exists that lies between the two.\n\nA real number :math:`r` is converted to a floating-point value of bit width :math:`N` as follows:\n\n* If :math:`r` is :math:`0`, then return :math:`+0`.\n\n* Else if :math:`r` is an exact floating-point number, then return :math:`r`.\n\n* Else if :math:`r` greater than or equal to the positive limit, then return :math:`+\\infty`.\n\n* Else if :math:`r` is less than or equal to the negative limit, then return :math:`-\\infty`.\n\n* Else if :math:`z_1` and :math:`z_2` are a candidate pair such that :math:`z_1 < r < z_2`, then:\n\n  * If :math:`|r - z_1| < |r - z_2|`, then let :math:`z` be :math:`z_1`.\n\n  * Else if :math:`|r - z_1| > |r - z_2|`, then let :math:`z` be :math:`z_2`.\n\n  * Else if :math:`|r - z_1| = |r - z_2|` and the :ref:`significand <syntax-float>` of :math:`z_1` is even, then let :math:`z` be :math:`z_1`.\n\n  * Else, let :math:`z` be :math:`z_2`.\n\n* If :math:`z` is :math:`0`, then:\n\n  * If :math:`r < 0`, then return :math:`-0`.\n\n  * Else, return :math:`+0`.\n\n* Else if :math:`z` is a limit number, then:\n\n  * If :math:`r < 0`, then return :math:`-\\infty`.\n\n  * Else, return :math:`+\\infty`.\n\n* Else, return :math:`z`.\n\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\ieee_N(0) &=& +0 \\\\\n   \\ieee_N(r) &=& r & (\\iff r \\in \\F{exact}_N) \\\\\n   \\ieee_N(r) &=& +\\infty & (\\iff r \\geq +\\F{limit}_N) \\\\\n   \\ieee_N(r) &=& -\\infty & (\\iff r \\leq -\\F{limit}_N) \\\\\n   \\ieee_N(r) &=& \\F{closest}_N(r, z_1, z_2) & (\\iff z_1 < r < z_2 \\wedge (z_1,z_2) \\in \\F{candidatepair}_N) \\\\[1ex]\n   \\F{closest}_N(r, z_1, z_2) &=& \\F{rectify}_N(r, z_1) & (\\iff |r-z_1|<|r-z_2|) \\\\\n   \\F{closest}_N(r, z_1, z_2) &=& \\F{rectify}_N(r, z_2) & (\\iff |r-z_1|>|r-z_2|) \\\\\n   \\F{closest}_N(r, z_1, z_2) &=& \\F{rectify}_N(r, z_1) & (\\iff |r-z_1|=|r-z_2| \\wedge \\F{even}_N(z_1)) \\\\\n   \\F{closest}_N(r, z_1, z_2) &=& \\F{rectify}_N(r, z_2) & (\\iff |r-z_1|=|r-z_2| \\wedge \\F{even}_N(z_2)) \\\\[1ex]\n   \\F{rectify}_N(r, \\pm \\F{limit}_N) &=& \\pm \\infty \\\\\n   \\F{rectify}_N(r, 0) &=& +0 \\qquad (r \\geq 0) \\\\\n   \\F{rectify}_N(r, 0) &=& -0 \\qquad (r < 0) \\\\\n   \\F{rectify}_N(r, z) &=& z \\\\\n   \\end{array}\n\nwhere:\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\F{exact}_N &=& \\fN \\cap \\mathbb{Q} \\\\\n   \\F{limit}_N &=& 2^{2^{\\exponent(N)-1}} \\\\\n   \\F{candidate}_N &=& \\F{exact}_N \\cup \\{+\\F{limit}_N, -\\F{limit}_N\\} \\\\\n   \\F{candidatepair}_N &=& \\{ (z_1, z_2) \\in \\F{candidate}_N^2 ~|~ z_1 < z_2 \\wedge \\forall z \\in \\F{candidate}_N, z \\leq z_1 \\vee z \\geq z_2\\} \\\\[1ex]\n   \\F{even}_N((d + m\\cdot 2^{-M}) \\cdot 2^e) &\\Leftrightarrow& m \\mod 2 = 0 \\\\\n   \\F{even}_N(\\pm \\F{limit}_N) &\\Leftrightarrow& \\F{true} \\\\\n   \\end{array}\n\n\n.. index:: NaN\n.. _aux-nans:\n\nNaN Propagation\n...............\n\nWhen the result of a floating-point operator other than |fneg|, |fabs|, or |fcopysign| is a :ref:`NaN <syntax-nan>`,\nthen its sign is non-deterministic and the :ref:`payload <syntax-payload>` is computed as follows:\n\n* If the payload of all NaN inputs to the operator is :ref:`canonical <canonical-nan>` (including the case that there are no NaN inputs), then the payload of the output is canonical as well.\n\n* Otherwise the payload is picked non-deterministically among all :ref:`arithmetic NaNs <arithmetic-nan>`; that is, its most significant bit is :math:`1` and all others are unspecified.\n\nThis non-deterministic result is expressed by the following auxiliary function producing a set of allowed outputs from a set of inputs:\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\nans_N\\{z^\\ast\\} &=& \\{ + \\NAN(n), - \\NAN(n) ~|~ n = \\canon_N \\}\n     & (\\iff \\forall \\NAN(n) \\in z^\\ast,~ n = \\canon_N) \\\\\n   \\nans_N\\{z^\\ast\\} &=& \\{ + \\NAN(n), - \\NAN(n) ~|~ n \\geq \\canon_N \\}\n     & (\\otherwise) \\\\\n   \\end{array}\n\n\n.. _op-fadd:\n\n:math:`\\fadd_N(z_1, z_2)`\n.........................\n\n* If either :math:`z_1` or :math:`z_2` is a NaN, then return an element of :math:`\\nans_N\\{z_1, z_2\\}`.\n\n* Else if both :math:`z_1` and :math:`z_2` are infinities of opposite signs, then return an element of :math:`\\nans_N\\{\\}`.\n\n* Else if both :math:`z_1` and :math:`z_2` are infinities of equal sign, then return that infinity.\n\n* Else if one of :math:`z_1` or :math:`z_2` is an infinity, then return that infinity.\n\n* Else if both :math:`z_1` and :math:`z_2` are zeroes of opposite sign, then return positive zero.\n\n* Else if both :math:`z_1` and :math:`z_2` are zeroes of equal sign, then return that zero.\n\n* Else if one of :math:`z_1` or :math:`z_2` is a zero, then return the other operand.\n\n* Else if both :math:`z_1` and :math:`z_2` are values with the same magnitude but opposite signs, then return positive zero.\n\n* Else return the result of adding :math:`z_1` and :math:`z_2`, :ref:`rounded <aux-ieee>` to the nearest representable value.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\fadd_N(\\pm \\NAN(n), z_2) &=& \\nans_N\\{\\pm \\NAN(n), z_2\\} \\\\\n   \\fadd_N(z_1, \\pm \\NAN(n)) &=& \\nans_N\\{\\pm \\NAN(n), z_1\\} \\\\\n   \\fadd_N(\\pm \\infty, \\mp \\infty) &=& \\nans_N\\{\\} \\\\\n   \\fadd_N(\\pm \\infty, \\pm \\infty) &=& \\pm \\infty \\\\\n   \\fadd_N(z_1, \\pm \\infty) &=& \\pm \\infty \\\\\n   \\fadd_N(\\pm \\infty, z_2) &=& \\pm \\infty \\\\\n   \\fadd_N(\\pm 0, \\mp 0) &=& +0 \\\\\n   \\fadd_N(\\pm 0, \\pm 0) &=& \\pm 0 \\\\\n   \\fadd_N(z_1, \\pm 0) &=& z_1 \\\\\n   \\fadd_N(\\pm 0, z_2) &=& z_2 \\\\\n   \\fadd_N(\\pm q, \\mp q) &=& +0 \\\\\n   \\fadd_N(z_1, z_2) &=& \\ieee_N(z_1 + z_2) \\\\\n   \\end{array}\n\n\n.. _op-fsub:\n\n:math:`\\fsub_N(z_1, z_2)`\n.........................\n\n* If either :math:`z_1` or :math:`z_2` is a NaN, then return an element of :math:`\\nans_N\\{z_1, z_2\\}`.\n\n* Else if both :math:`z_1` and :math:`z_2` are infinities of equal signs, then return an element of :math:`\\nans_N\\{\\}`.\n\n* Else if both :math:`z_1` and :math:`z_2` are infinities of opposite sign, then return :math:`z_1`.\n\n* Else if :math:`z_1` is an infinity, then return that infinity.\n\n* Else if :math:`z_2` is an infinity, then return that infinity negated.\n\n* Else if both :math:`z_1` and :math:`z_2` are zeroes of equal sign, then return positive zero.\n\n* Else if both :math:`z_1` and :math:`z_2` are zeroes of opposite sign, then return :math:`z_1`.\n\n* Else if :math:`z_2` is a zero, then return :math:`z_1`.\n\n* Else if :math:`z_1` is a zero, then return :math:`z_2` negated.\n\n* Else if both :math:`z_1` and :math:`z_2` are the same value, then return positive zero.\n\n* Else return the result of subtracting :math:`z_2` from :math:`z_1`, :ref:`rounded <aux-ieee>` to the nearest representable value.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\fsub_N(\\pm \\NAN(n), z_2) &=& \\nans_N\\{\\pm \\NAN(n), z_2\\} \\\\\n   \\fsub_N(z_1, \\pm \\NAN(n)) &=& \\nans_N\\{\\pm \\NAN(n), z_1\\} \\\\\n   \\fsub_N(\\pm \\infty, \\pm \\infty) &=& \\nans_N\\{\\} \\\\\n   \\fsub_N(\\pm \\infty, \\mp \\infty) &=& \\pm \\infty \\\\\n   \\fsub_N(z_1, \\pm \\infty) &=& \\mp \\infty \\\\\n   \\fsub_N(\\pm \\infty, z_2) &=& \\pm \\infty \\\\\n   \\fsub_N(\\pm 0, \\pm 0) &=& +0 \\\\\n   \\fsub_N(\\pm 0, \\mp 0) &=& \\pm 0 \\\\\n   \\fsub_N(z_1, \\pm 0) &=& z_1 \\\\\n   \\fsub_N(\\pm 0, \\pm q_2) &=& \\mp q_2 \\\\\n   \\fsub_N(\\pm q, \\pm q) &=& +0 \\\\\n   \\fsub_N(z_1, z_2) &=& \\ieee_N(z_1 - z_2) \\\\\n   \\end{array}\n\n.. note::\n   Up to the non-determinism regarding NaNs, it always holds that :math:`\\fsub_N(z_1, z_2) = \\fadd_N(z_1, \\fneg_N(z_2))`.\n\n\n.. _op-fmul:\n\n:math:`\\fmul_N(z_1, z_2)`\n.........................\n\n* If either :math:`z_1` or :math:`z_2` is a NaN, then return an element of :math:`\\nans_N\\{z_1, z_2\\}`.\n\n* Else if one of :math:`z_1` and :math:`z_2` is a zero and the other an infinity, then return an element of :math:`\\nans_N\\{\\}`.\n\n* Else if both :math:`z_1` and :math:`z_2` are infinities of equal sign, then return positive infinity.\n\n* Else if both :math:`z_1` and :math:`z_2` are infinities of opposite sign, then return negative infinity.\n\n* Else if one of :math:`z_1` or :math:`z_2` is an infinity and the other a value with equal sign, then return positive infinity.\n\n* Else if one of :math:`z_1` or :math:`z_2` is an infinity and the other a value with opposite sign, then return negative infinity.\n\n* Else if both :math:`z_1` and :math:`z_2` are zeroes of equal sign, then return positive zero.\n\n* Else if both :math:`z_1` and :math:`z_2` are zeroes of opposite sign, then return negative zero.\n\n* Else return the result of multiplying :math:`z_1` and :math:`z_2`, :ref:`rounded <aux-ieee>` to the nearest representable value.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\fmul_N(\\pm \\NAN(n), z_2) &=& \\nans_N\\{\\pm \\NAN(n), z_2\\} \\\\\n   \\fmul_N(z_1, \\pm \\NAN(n)) &=& \\nans_N\\{\\pm \\NAN(n), z_1\\} \\\\\n   \\fmul_N(\\pm \\infty, \\pm 0) &=& \\nans_N\\{\\} \\\\\n   \\fmul_N(\\pm \\infty, \\mp 0) &=& \\nans_N\\{\\} \\\\\n   \\fmul_N(\\pm 0, \\pm \\infty) &=& \\nans_N\\{\\} \\\\\n   \\fmul_N(\\pm 0, \\mp \\infty) &=& \\nans_N\\{\\} \\\\\n   \\fmul_N(\\pm \\infty, \\pm \\infty) &=& +\\infty \\\\\n   \\fmul_N(\\pm \\infty, \\mp \\infty) &=& -\\infty \\\\\n   \\fmul_N(\\pm q_1, \\pm \\infty) &=& +\\infty \\\\\n   \\fmul_N(\\pm q_1, \\mp \\infty) &=& -\\infty \\\\\n   \\fmul_N(\\pm \\infty, \\pm q_2) &=& +\\infty \\\\\n   \\fmul_N(\\pm \\infty, \\mp q_2) &=& -\\infty \\\\\n   \\fmul_N(\\pm 0, \\pm 0) &=& + 0 \\\\\n   \\fmul_N(\\pm 0, \\mp 0) &=& - 0 \\\\\n   \\fmul_N(z_1, z_2) &=& \\ieee_N(z_1 \\cdot z_2) \\\\\n   \\end{array}\n\n\n.. _op-fdiv:\n\n:math:`\\fdiv_N(z_1, z_2)`\n.........................\n\n* If either :math:`z_1` or :math:`z_2` is a NaN, then return an element of :math:`\\nans_N\\{z_1, z_2\\}`.\n\n* Else if both :math:`z_1` and :math:`z_2` are infinities, then return an element of :math:`\\nans_N\\{\\}`.\n\n* Else if both :math:`z_1` and :math:`z_2` are zeroes, then return an element of :math:`\\nans_N\\{z_1, z_2\\}`.\n\n* Else if :math:`z_1` is an infinity and :math:`z_2` a value with equal sign, then return positive infinity.\n\n* Else if :math:`z_1` is an infinity and :math:`z_2` a value with opposite sign, then return negative infinity.\n\n* Else if :math:`z_2` is an infinity and :math:`z_1` a value with equal sign, then return positive zero.\n\n* Else if :math:`z_2` is an infinity and :math:`z_1` a value with opposite sign, then return negative zero.\n\n* Else if :math:`z_1` is a zero and :math:`z_2` a value with equal sign, then return positive zero.\n\n* Else if :math:`z_1` is a zero and :math:`z_2` a value with opposite sign, then return negative zero.\n\n* Else if :math:`z_2` is a zero and :math:`z_1` a value with equal sign, then return positive infinity.\n\n* Else if :math:`z_2` is a zero and :math:`z_1` a value with opposite sign, then return negative infinity.\n\n* Else return the result of dividing :math:`z_1` by :math:`z_2`, :ref:`rounded <aux-ieee>` to the nearest representable value.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\fdiv_N(\\pm \\NAN(n), z_2) &=& \\nans_N\\{\\pm \\NAN(n), z_2\\} \\\\\n   \\fdiv_N(z_1, \\pm \\NAN(n)) &=& \\nans_N\\{\\pm \\NAN(n), z_1\\} \\\\\n   \\fdiv_N(\\pm \\infty, \\pm \\infty) &=& \\nans_N\\{\\} \\\\\n   \\fdiv_N(\\pm \\infty, \\mp \\infty) &=& \\nans_N\\{\\} \\\\\n   \\fdiv_N(\\pm 0, \\pm 0) &=& \\nans_N\\{\\} \\\\\n   \\fdiv_N(\\pm 0, \\mp 0) &=& \\nans_N\\{\\} \\\\\n   \\fdiv_N(\\pm \\infty, \\pm q_2) &=& +\\infty \\\\\n   \\fdiv_N(\\pm \\infty, \\mp q_2) &=& -\\infty \\\\\n   \\fdiv_N(\\pm q_1, \\pm \\infty) &=& +0 \\\\\n   \\fdiv_N(\\pm q_1, \\mp \\infty) &=& -0 \\\\\n   \\fdiv_N(\\pm 0, \\pm q_2) &=& +0 \\\\\n   \\fdiv_N(\\pm 0, \\mp q_2) &=& -0 \\\\\n   \\fdiv_N(\\pm q_1, \\pm 0) &=& +\\infty \\\\\n   \\fdiv_N(\\pm q_1, \\mp 0) &=& -\\infty \\\\\n   \\fdiv_N(z_1, z_2) &=& \\ieee_N(z_1 / z_2) \\\\\n   \\end{array}\n\n\n.. _op-fmin:\n\n:math:`\\fmin_N(z_1, z_2)`\n.........................\n\n* If either :math:`z_1` or :math:`z_2` is a NaN, then return an element of :math:`\\nans_N\\{z_1, z_2\\}`.\n\n* Else if one of :math:`z_1` or :math:`z_2` is a negative infinity, then return negative infinity.\n\n* Else if one of :math:`z_1` or :math:`z_2` is a positive infinity, then return the other value.\n\n* Else if both :math:`z_1` and :math:`z_2` are zeroes of opposite signs, then return negative zero.\n\n* Else return the smaller value of :math:`z_1` and :math:`z_2`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\fmin_N(\\pm \\NAN(n), z_2) &=& \\nans_N\\{\\pm \\NAN(n), z_2\\} \\\\\n   \\fmin_N(z_1, \\pm \\NAN(n)) &=& \\nans_N\\{\\pm \\NAN(n), z_1\\} \\\\\n   \\fmin_N(+ \\infty, z_2) &=& z_2 \\\\\n   \\fmin_N(- \\infty, z_2) &=& - \\infty \\\\\n   \\fmin_N(z_1, + \\infty) &=& z_1 \\\\\n   \\fmin_N(z_1, - \\infty) &=& - \\infty \\\\\n   \\fmin_N(\\pm 0, \\mp 0) &=& -0 \\\\\n   \\fmin_N(z_1, z_2) &=& z_1 & (\\iff z_1 \\leq z_2) \\\\\n   \\fmin_N(z_1, z_2) &=& z_2 & (\\iff z_2 \\leq z_1) \\\\\n   \\end{array}\n\n\n.. _op-fmax:\n\n:math:`\\fmax_N(z_1, z_2)`\n.........................\n\n* If either :math:`z_1` or :math:`z_2` is a NaN, then return an element of :math:`\\nans_N\\{z_1, z_2\\}`.\n\n* Else if one of :math:`z_1` or :math:`z_2` is a positive infinity, then return positive infinity.\n\n* Else if one of :math:`z_1` or :math:`z_2` is a negative infinity, then return the other value.\n\n* Else if both :math:`z_1` and :math:`z_2` are zeroes of opposite signs, then return positive zero.\n\n* Else return the larger value of :math:`z_1` and :math:`z_2`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\fmax_N(\\pm \\NAN(n), z_2) &=& \\nans_N\\{\\pm \\NAN(n), z_2\\} \\\\\n   \\fmax_N(z_1, \\pm \\NAN(n)) &=& \\nans_N\\{\\pm \\NAN(n), z_1\\} \\\\\n   \\fmax_N(+ \\infty, z_2) &=& + \\infty \\\\\n   \\fmax_N(- \\infty, z_2) &=& z_2 \\\\\n   \\fmax_N(z_1, + \\infty) &=& + \\infty \\\\\n   \\fmax_N(z_1, - \\infty) &=& z_1 \\\\\n   \\fmax_N(\\pm 0, \\mp 0) &=& +0 \\\\\n   \\fmax_N(z_1, z_2) &=& z_1 & (\\iff z_1 \\geq z_2) \\\\\n   \\fmax_N(z_1, z_2) &=& z_2 & (\\iff z_2 \\geq z_1) \\\\\n   \\end{array}\n\n\n.. _op-fcopysign:\n\n:math:`\\fcopysign_N(z_1, z_2)`\n..............................\n\n* If :math:`z_1` and :math:`z_2` have the same sign, then return :math:`z_1`.\n\n* Else return :math:`z_1` with negated sign.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\fcopysign_N(\\pm p_1, \\pm p_2) &=& \\pm p_1 \\\\\n   \\fcopysign_N(\\pm p_1, \\mp p_2) &=& \\mp p_1 \\\\\n   \\end{array}\n\n\n.. _op-fabs:\n\n:math:`\\fabs_N(z)`\n..................\n\n* If :math:`z` is a NaN, then return :math:`z` with positive sign.\n\n* Else if :math:`z` is an infinity, then return positive infinity.\n\n* Else if :math:`z` is a zero, then return positive zero.\n\n* Else if :math:`z` is a positive value, then :math:`z`.\n\n* Else return :math:`z` negated.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\fabs_N(\\pm \\NAN(n)) &=& +\\NAN(n) \\\\\n   \\fabs_N(\\pm \\infty) &=& +\\infty \\\\\n   \\fabs_N(\\pm 0) &=& +0 \\\\\n   \\fabs_N(\\pm q) &=& +q \\\\\n   \\end{array}\n\n\n.. _op-fneg:\n\n:math:`\\fneg_N(z)`\n..................\n\n* If :math:`z` is a NaN, then return :math:`z` with negated sign.\n\n* Else if :math:`z` is an infinity, then return that infinity negated.\n\n* Else if :math:`z` is a zero, then return that zero negated.\n\n* Else return :math:`z` negated.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\fneg_N(\\pm \\NAN(n)) &=& \\mp \\NAN(n) \\\\\n   \\fneg_N(\\pm \\infty) &=& \\mp \\infty \\\\\n   \\fneg_N(\\pm 0) &=& \\mp 0 \\\\\n   \\fneg_N(\\pm q) &=& \\mp q \\\\\n   \\end{array}\n\n\n.. _op-fsqrt:\n\n:math:`\\fsqrt_N(z)`\n...................\n\n* If :math:`z` is a NaN, then return an element of :math:`\\nans_N\\{z\\}`.\n\n* Else if :math:`z` is negative infinity, then return an element of :math:`\\nans_N\\{\\}`.\n\n* Else if :math:`z` is positive infinity, then return positive infinity.\n\n* Else if :math:`z` is a zero, then return that zero.\n\n* Else if :math:`z` has a negative sign, then return an element of :math:`\\nans_N\\{\\}`.\n\n* Else return the square root of :math:`z`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\fsqrt_N(\\pm \\NAN(n)) &=& \\nans_N\\{\\pm \\NAN(n)\\} \\\\\n   \\fsqrt_N(- \\infty) &=& \\nans_N\\{\\} \\\\\n   \\fsqrt_N(+ \\infty) &=& + \\infty \\\\\n   \\fsqrt_N(\\pm 0) &=& \\pm 0 \\\\\n   \\fsqrt_N(- q) &=& \\nans_N\\{\\} \\\\\n   \\fsqrt_N(+ q) &=& \\ieee_N\\left(\\sqrt{q}\\right) \\\\\n   \\end{array}\n\n\n.. _op-fceil:\n\n:math:`\\fceil_N(z)`\n...................\n\n* If :math:`z` is a NaN, then return an element of :math:`\\nans_N\\{z\\}`.\n\n* Else if :math:`z` is an infinity, then return :math:`z`.\n\n* Else if :math:`z` is a zero, then return :math:`z`.\n\n* Else if :math:`z` is smaller than :math:`0` but greater than :math:`-1`, then return negative zero.\n\n* Else return the smallest integral value that is not smaller than :math:`z`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\fceil_N(\\pm \\NAN(n)) &=& \\nans_N\\{\\pm \\NAN(n)\\} \\\\\n   \\fceil_N(\\pm \\infty) &=& \\pm \\infty \\\\\n   \\fceil_N(\\pm 0) &=& \\pm 0 \\\\\n   \\fceil_N(- q) &=& -0 & (\\iff -1 < -q < 0) \\\\\n   \\fceil_N(\\pm q) &=& \\ieee_N(i) & (\\iff \\pm q \\leq i < \\pm q + 1) \\\\\n   \\end{array}\n\n\n.. _op-ffloor:\n\n:math:`\\ffloor_N(z)`\n....................\n\n* If :math:`z` is a NaN, then return an element of :math:`\\nans_N\\{z\\}`.\n\n* Else if :math:`z` is an infinity, then return :math:`z`.\n\n* Else if :math:`z` is a zero, then return :math:`z`.\n\n* Else if :math:`z` is greater than :math:`0` but smaller than :math:`1`, then return positive zero.\n\n* Else return the largest integral value that is not larger than :math:`z`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\ffloor_N(\\pm \\NAN(n)) &=& \\nans_N\\{\\pm \\NAN(n)\\} \\\\\n   \\ffloor_N(\\pm \\infty) &=& \\pm \\infty \\\\\n   \\ffloor_N(\\pm 0) &=& \\pm 0 \\\\\n   \\ffloor_N(+ q) &=& +0 & (\\iff 0 < +q < 1) \\\\\n   \\ffloor_N(\\pm q) &=& \\ieee_N(i) & (\\iff \\pm q - 1 < i \\leq \\pm q) \\\\\n   \\end{array}\n\n\n.. _op-ftrunc:\n\n:math:`\\ftrunc_N(z)`\n....................\n\n* If :math:`z` is a NaN, then return an element of :math:`\\nans_N\\{z\\}`.\n\n* Else if :math:`z` is an infinity, then return :math:`z`.\n\n* Else if :math:`z` is a zero, then return :math:`z`.\n\n* Else if :math:`z` is greater than :math:`0` but smaller than :math:`1`, then return positive zero.\n\n* Else if :math:`z` is smaller than :math:`0` but greater than :math:`-1`, then return negative zero.\n\n* Else return the integral value with the same sign as :math:`z` and the largest magnitude that is not larger than the magnitude of :math:`z`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\ftrunc_N(\\pm \\NAN(n)) &=& \\nans_N\\{\\pm \\NAN(n)\\} \\\\\n   \\ftrunc_N(\\pm \\infty) &=& \\pm \\infty \\\\\n   \\ftrunc_N(\\pm 0) &=& \\pm 0 \\\\\n   \\ftrunc_N(+ q) &=& +0 & (\\iff 0 < +q < 1) \\\\\n   \\ftrunc_N(- q) &=& -0 & (\\iff -1 < -q < 0) \\\\\n   \\ftrunc_N(\\pm q) &=& \\ieee_N(\\pm i) & (\\iff +q - 1 < i \\leq +q) \\\\\n   \\end{array}\n\n\n.. _op-fnearest:\n\n:math:`\\fnearest_N(z)`\n......................\n\n* If :math:`z` is a NaN, then return an element of :math:`\\nans_N\\{z\\}`.\n\n* Else if :math:`z` is an infinity, then return :math:`z`.\n\n* Else if :math:`z` is a zero, then return :math:`z`.\n\n* Else if :math:`z` is greater than :math:`0` but smaller than or equal to :math:`0.5`, then return positive zero.\n\n* Else if :math:`z` is smaller than :math:`0` but greater than or equal to :math:`-0.5`, then return negative zero.\n\n* Else return the integral value that is nearest to :math:`z`; if two values are equally near, return the even one.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\fnearest_N(\\pm \\NAN(n)) &=& \\nans_N\\{\\pm \\NAN(n)\\} \\\\\n   \\fnearest_N(\\pm \\infty) &=& \\pm \\infty \\\\\n   \\fnearest_N(\\pm 0) &=& \\pm 0 \\\\\n   \\fnearest_N(+ q) &=& +0 & (\\iff 0 < +q \\leq 0.5) \\\\\n   \\fnearest_N(- q) &=& -0 & (\\iff -0.5 \\leq -q < 0) \\\\\n   \\fnearest_N(\\pm q) &=& \\ieee_N(\\pm i) & (\\iff |i - q| < 0.5) \\\\\n   \\fnearest_N(\\pm q) &=& \\ieee_N(\\pm i) & (\\iff |i - q| = 0.5 \\wedge i~\\mbox{even}) \\\\\n   \\end{array}\n\n\n.. _op-feq:\n\n:math:`\\feq_N(z_1, z_2)`\n........................\n\n* If either :math:`z_1` or :math:`z_2` is a NaN, then return :math:`0`.\n\n* Else if both :math:`z_1` and :math:`z_2` are zeroes, then return :math:`1`.\n\n* Else if both :math:`z_1` and :math:`z_2` are the same value, then return :math:`1`.\n\n* Else return :math:`0`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\feq_N(\\pm \\NAN(n), z_2) &=& 0 \\\\\n   \\feq_N(z_1, \\pm \\NAN(n)) &=& 0 \\\\\n   \\feq_N(\\pm 0, \\mp 0) &=& 1 \\\\\n   \\feq_N(z_1, z_2) &=& \\bool(z_1 = z_2) \\\\\n   \\end{array}\n\n\n.. _op-fne:\n\n:math:`\\fne_N(z_1, z_2)`\n........................\n\n* If either :math:`z_1` or :math:`z_2` is a NaN, then return :math:`1`.\n\n* Else if both :math:`z_1` and :math:`z_2` are zeroes, then return :math:`0`.\n\n* Else if both :math:`z_1` and :math:`z_2` are the same value, then return :math:`0`.\n\n* Else return :math:`1`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\fne_N(\\pm \\NAN(n), z_2) &=& 1 \\\\\n   \\fne_N(z_1, \\pm \\NAN(n)) &=& 1 \\\\\n   \\fne_N(\\pm 0, \\mp 0) &=& 0 \\\\\n   \\fne_N(z_1, z_2) &=& \\bool(z_1 \\neq z_2) \\\\\n   \\end{array}\n\n\n.. _op-flt:\n\n:math:`\\flt_N(z_1, z_2)`\n........................\n\n* If either :math:`z_1` or :math:`z_2` is a NaN, then return :math:`0`.\n\n* Else if :math:`z_1` and :math:`z_2` are the same value, then return :math:`0`.\n\n* Else if :math:`z_1` is positive infinity, then return :math:`0`.\n\n* Else if :math:`z_1` is negative infinity, then return :math:`1`.\n\n* Else if :math:`z_2` is positive infinity, then return :math:`1`.\n\n* Else if :math:`z_2` is negative infinity, then return :math:`0`.\n\n* Else if both :math:`z_1` and :math:`z_2` are zeroes, then return :math:`0`.\n\n* Else if :math:`z_1` is smaller than :math:`z_2`, then return :math:`1`.\n\n* Else return :math:`0`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\flt_N(\\pm \\NAN(n), z_2) &=& 0 \\\\\n   \\flt_N(z_1, \\pm \\NAN(n)) &=& 0 \\\\\n   \\flt_N(z, z) &=& 0 \\\\\n   \\flt_N(+ \\infty, z_2) &=& 0 \\\\\n   \\flt_N(- \\infty, z_2) &=& 1 \\\\\n   \\flt_N(z_1, + \\infty) &=& 1 \\\\\n   \\flt_N(z_1, - \\infty) &=& 0 \\\\\n   \\flt_N(\\pm 0, \\mp 0) &=& 0 \\\\\n   \\flt_N(z_1, z_2) &=& \\bool(z_1 < z_2) \\\\\n   \\end{array}\n\n\n.. _op-fgt:\n\n:math:`\\fgt_N(z_1, z_2)`\n........................\n\n* If either :math:`z_1` or :math:`z_2` is a NaN, then return :math:`0`.\n\n* Else if :math:`z_1` and :math:`z_2` are the same value, then return :math:`0`.\n\n* Else if :math:`z_1` is positive infinity, then return :math:`1`.\n\n* Else if :math:`z_1` is negative infinity, then return :math:`0`.\n\n* Else if :math:`z_2` is positive infinity, then return :math:`0`.\n\n* Else if :math:`z_2` is negative infinity, then return :math:`1`.\n\n* Else if both :math:`z_1` and :math:`z_2` are zeroes, then return :math:`0`.\n\n* Else if :math:`z_1` is larger than :math:`z_2`, then return :math:`1`.\n\n* Else return :math:`0`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\fgt_N(\\pm \\NAN(n), z_2) &=& 0 \\\\\n   \\fgt_N(z_1, \\pm \\NAN(n)) &=& 0 \\\\\n   \\fgt_N(z, z) &=& 0 \\\\\n   \\fgt_N(+ \\infty, z_2) &=& 1 \\\\\n   \\fgt_N(- \\infty, z_2) &=& 0 \\\\\n   \\fgt_N(z_1, + \\infty) &=& 0 \\\\\n   \\fgt_N(z_1, - \\infty) &=& 1 \\\\\n   \\fgt_N(\\pm 0, \\mp 0) &=& 0 \\\\\n   \\fgt_N(z_1, z_2) &=& \\bool(z_1 > z_2) \\\\\n   \\end{array}\n\n\n.. _op-fle:\n\n:math:`\\fle_N(z_1, z_2)`\n........................\n\n* If either :math:`z_1` or :math:`z_2` is a NaN, then return :math:`0`.\n\n* Else if :math:`z_1` and :math:`z_2` are the same value, then return :math:`1`.\n\n* Else if :math:`z_1` is positive infinity, then return :math:`0`.\n\n* Else if :math:`z_1` is negative infinity, then return :math:`1`.\n\n* Else if :math:`z_2` is positive infinity, then return :math:`1`.\n\n* Else if :math:`z_2` is negative infinity, then return :math:`0`.\n\n* Else if both :math:`z_1` and :math:`z_2` are zeroes, then return :math:`1`.\n\n* Else if :math:`z_1` is smaller than or equal to :math:`z_2`, then return :math:`1`.\n\n* Else return :math:`0`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\fle_N(\\pm \\NAN(n), z_2) &=& 0 \\\\\n   \\fle_N(z_1, \\pm \\NAN(n)) &=& 0 \\\\\n   \\fle_N(z, z) &=& 1 \\\\\n   \\fle_N(+ \\infty, z_2) &=& 0 \\\\\n   \\fle_N(- \\infty, z_2) &=& 1 \\\\\n   \\fle_N(z_1, + \\infty) &=& 1 \\\\\n   \\fle_N(z_1, - \\infty) &=& 0 \\\\\n   \\fle_N(\\pm 0, \\mp 0) &=& 1 \\\\\n   \\fle_N(z_1, z_2) &=& \\bool(z_1 \\leq z_2) \\\\\n   \\end{array}\n\n\n.. _op-fge:\n\n:math:`\\fge_N(z_1, z_2)`\n........................\n\n* If either :math:`z_1` or :math:`z_2` is a NaN, then return :math:`0`.\n\n* Else if :math:`z_1` and :math:`z_2` are the same value, then return :math:`1`.\n\n* Else if :math:`z_1` is positive infinity, then return :math:`1`.\n\n* Else if :math:`z_1` is negative infinity, then return :math:`0`.\n\n* Else if :math:`z_2` is positive infinity, then return :math:`0`.\n\n* Else if :math:`z_2` is negative infinity, then return :math:`1`.\n\n* Else if both :math:`z_1` and :math:`z_2` are zeroes, then return :math:`1`.\n\n* Else if :math:`z_1` is smaller than or equal to :math:`z_2`, then return :math:`1`.\n\n* Else return :math:`0`.\n\n.. math::\n   \\begin{array}{@{}lcll}\n   \\fge_N(\\pm \\NAN(n), z_2) &=& 0 \\\\\n   \\fge_N(z_1, \\pm \\NAN(n)) &=& 0 \\\\\n   \\fge_N(z, z) &=& 1 \\\\\n   \\fge_N(+ \\infty, z_2) &=& 1 \\\\\n   \\fge_N(- \\infty, z_2) &=& 0 \\\\\n   \\fge_N(z_1, + \\infty) &=& 0 \\\\\n   \\fge_N(z_1, - \\infty) &=& 1 \\\\\n   \\fge_N(\\pm 0, \\mp 0) &=& 1 \\\\\n   \\fge_N(z_1, z_2) &=& \\bool(z_1 \\geq z_2) \\\\\n   \\end{array}\n\n\n.. _convert-ops:\n\nConversions\n~~~~~~~~~~~\n\n.. _op-extend_u:\n\n:math:`\\extendu_{M,N}(i)`\n.........................\n\n* Return :math:`i`.\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\extendu_{M,N}(i) &=& i \\\\\n   \\end{array}\n\n.. note::\n   In the abstract syntax, unsigned extension just reinterprets the same value.\n\n\n.. _op-extend_s:\n\n:math:`\\extends_{M,N}(i)`\n.........................\n\n* Let :math:`j` be the :ref:`signed interpretation <aux-signed>` of :math:`i` of size :math:`M`.\n\n* Return the two's complement of :math:`j` relative to size :math:`N`.\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\extends_{M,N}(i) &=& \\signed_N^{-1}(\\signed_M(i)) \\\\\n   \\end{array}\n\n\n.. _op-wrap:\n\n:math:`\\wrap_{M,N}(i)`\n......................\n\n* Return :math:`i` modulo :math:`2^N`.\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\wrap_{M,N}(i) &=& i \\mod 2^N \\\\\n   \\end{array}\n\n\n.. _op-trunc_u:\n\n:math:`\\truncu_{M,N}(z)`\n........................\n\n* If :math:`z` is a NaN, then the result is undefined. \n\n* Else if :math:`z` is an infinity, then the result is undefined. \n\n* Else if :math:`z` is a number and :math:`\\trunc(z)` is a value within range of the target type, then return that value.\n\n* Else the result is undefined.\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\truncu_{M,N}(\\pm \\NAN(n)) &=& \\{\\} \\\\\n   \\truncu_{M,N}(\\pm \\infty) &=& \\{\\} \\\\\n   \\truncu_{M,N}(\\pm q) &=& \\trunc(\\pm q) & (\\iff -1 < \\trunc(\\pm q) < 2^N) \\\\\n   \\truncu_{M,N}(\\pm q) &=& \\{\\} & (\\otherwise) \\\\\n   \\end{array}\n\n.. note::\n   This operator is :ref:`partial <exec-op-partial>`.\n   It is not defined for NaNs, infinities, or values for which the result is out of range.\n\n\n.. _op-trunc_s:\n\n:math:`\\truncs_{M,N}(z)`\n........................\n\n* If :math:`z` is a NaN, then the result is undefined. \n\n* Else if :math:`z` is an infinity, then the result is undefined. \n\n* If :math:`z` is a number and :math:`\\trunc(z)` is a value within range of the target type, then return that value.\n\n* Else the result is undefined.\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\truncs_{M,N}(\\pm \\NAN(n)) &=& \\{\\} \\\\\n   \\truncs_{M,N}(\\pm \\infty) &=& \\{\\} \\\\\n   \\truncs_{M,N}(\\pm q) &=& \\trunc(\\pm q) & (\\iff -2^{N-1} - 1 < \\trunc(\\pm q) < 2^{N-1}) \\\\\n   \\truncs_{M,N}(\\pm q) &=& \\{\\} & (\\otherwise) \\\\\n   \\end{array}\n\n.. note::\n   This operator is :ref:`partial <exec-op-partial>`.\n   It is not defined for NaNs, infinities, or values for which the result is out of range.\n\n\n.. _op-trunc_sat_u:\n\n:math:`\\truncsatu_{M,N}(z)`\n...........................\n\n* If :math:`z` is a NaN, then return :math:`0`.\n\n* Else if :math:`z` is negative infinity, then return :math:`0`.\n\n* Else if :math:`z` is positive infinity, then return :math:`2^N - 1`.\n\n* Else if :math:`\\trunc(z)` is less than :math:`0`, then return :math:`0`.\n\n* Else if :math:`\\trunc(z)` is greater than :math:`2^N - 1`, then return :math:`2^N - 1`.\n\n* Else, return :math:`\\trunc(z)`.\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\truncsatu_{M,N}(\\pm \\NAN(n)) &=& 0 \\\\\n   \\truncsatu_{M,N}(- \\infty) &=& 0 \\\\\n   \\truncsatu_{M,N}(+ \\infty) &=& 2^N - 1 \\\\\n   \\truncsatu_{M,N}(- q) &=& 0 & (\\iff \\trunc(- q) < 0) \\\\\n   \\truncsatu_{M,N}(+ q) &=& 2^N - 1 & (\\iff \\trunc(+ q) > 2^N - 1) \\\\\n   \\truncsatu_{M,N}(\\pm q) &=& \\trunc(\\pm q) & (otherwise) \\\\\n   \\end{array}\n\n\n.. _op-trunc_sat_s:\n\n:math:`\\truncsats_{M,N}(z)`\n...........................\n\n* If :math:`z` is a NaN, then return :math:`0`.\n\n* Else if :math:`z` is negative infinity, then return :math:`-2^{N-1}`.\n\n* Else if :math:`z` is positive infinity, then return :math:`2^{N-1} - 1`.\n\n* Else if :math:`\\trunc(z)` is less than :math:`-2^{N-1}`, then return :math:`-2^{N-1}`.\n\n* Else if :math:`\\trunc(z)` is greater than :math:`2^{N-1} - 1`, then return :math:`2^{N-1} - 1`.\n\n* Else, return :math:`\\trunc(z)`.\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\truncsats_{M,N}(\\pm \\NAN(n)) &=& 0 \\\\\n   \\truncsats_{M,N}(- \\infty) &=& -2^{N-1} \\\\\n   \\truncsats_{M,N}(+ \\infty) &=& 2^{N-1}-1 \\\\\n   \\truncsats_{M,N}(- q) &=& -2^{N-1} & (\\iff \\trunc(- q) < -2^{N-1}) \\\\\n   \\truncsats_{M,N}(+ q) &=& 2^{N-1} - 1 & (\\iff \\trunc(+ q) > 2^{N-1} - 1) \\\\\n   \\truncsats_{M,N}(\\pm q) &=& \\trunc(\\pm q) & (otherwise) \\\\\n   \\end{array}\n\n\n.. _op-promote:\n\n:math:`\\promote_{M,N}(z)`\n.........................\n\n* If :math:`z` is a :ref:`canonical NaN <canonical-nan>`, then return an element of :math:`\\nans_N\\{\\}` (i.e., a canonical NaN of size :math:`N`).\n\n* Else if :math:`z` is a NaN, then return an element of :math:`\\nans_N\\{\\pm \\NAN(1)\\}` (i.e., any :ref:`arithmetic NaN <arithmetic-nan>` of size :math:`N`).\n\n* Else, return :math:`z`.\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\promote_{M,N}(\\pm \\NAN(n)) &=& \\nans_N\\{\\} & (\\iff n = \\canon_N) \\\\\n   \\promote_{M,N}(\\pm \\NAN(n)) &=& \\nans_N\\{+ \\NAN(1)\\} & (\\otherwise) \\\\\n   \\promote_{M,N}(z) &=& z \\\\\n   \\end{array}\n\n\n.. _op-demote:\n\n:math:`\\demote_{M,N}(z)`\n........................\n\n* If :math:`z` is a :ref:`canonical NaN <canonical-nan>`, then return an element of :math:`\\nans_N\\{\\}` (i.e., a canonical NaN of size :math:`N`).\n\n* Else if :math:`z` is a NaN, then return an element of :math:`\\nans_N\\{\\pm \\NAN(1)\\}` (i.e., any NaN of size :math:`N`).\n\n* Else if :math:`z` is an infinity, then return that infinity.\n\n* Else if :math:`z` is a zero, then return that zero.\n\n* Else, return :math:`\\ieee_N(z)`.\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\demote_{M,N}(\\pm \\NAN(n)) &=& \\nans_N\\{\\} & (\\iff n = \\canon_N) \\\\\n   \\demote_{M,N}(\\pm \\NAN(n)) &=& \\nans_N\\{+ \\NAN(1)\\} & (\\otherwise) \\\\\n   \\demote_{M,N}(\\pm \\infty) &=& \\pm \\infty \\\\\n   \\demote_{M,N}(\\pm 0) &=& \\pm 0 \\\\\n   \\demote_{M,N}(\\pm q) &=& \\ieee_N(\\pm q) \\\\\n   \\end{array}\n\n\n.. _op-convert_u:\n\n:math:`\\convertu_{M,N}(i)`\n..........................\n\n* Return :math:`\\ieee_N(i)`.\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\convertu_{M,N}(i) &=& \\ieee_N(i) \\\\\n   \\end{array}\n\n\n.. _op-convert_s:\n\n:math:`\\converts_{M,N}(i)`\n..........................\n\n* Let :math:`j` be the :ref:`signed interpretation <aux-signed>` of :math:`i`.\n\n* Return :math:`\\ieee_N(j)`.\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\converts_{M,N}(i) &=& \\ieee_N(\\signed_M(i)) \\\\\n   \\end{array}\n\n\n.. _op-reinterpret:\n\n:math:`\\reinterpret_{t_1,t_2}(c)`\n.................................\n\n* Let :math:`d^\\ast` be the bit sequence :math:`\\bits_{t_1}(c)`.\n\n* Return the constant :math:`c'` for which :math:`\\bits_{t_2}(c') = d^\\ast`.\n\n.. math::\n   \\begin{array}{lll@{\\qquad}l}\n   \\reinterpret_{t_1,t_2}(c) &=& \\bits_{t_2}^{-1}(\\bits_{t_1}(c)) \\\\\n   \\end{array}\n"
  },
  {
    "path": "document/core/exec/runtime.rst",
    "content": ".. index:: ! runtime\n.. _syntax-runtime:\n\nRuntime Structure\n-----------------\n\n:ref:`Store <store>`, :ref:`stack <stack>`, and other *runtime structure* forming the WebAssembly abstract machine, such as :ref:`values <syntax-val>` or :ref:`module instances <syntax-moduleinst>`, are made precise in terms of additional auxiliary syntax.\n\n\n.. index:: ! value, number, reference, constant, number type, reference type, ! host address, value type, integer, floating-point, ! default value\n   pair: abstract syntax; value\n.. _syntax-num:\n.. _syntax-ref:\n.. _syntax-ref.extern:\n.. _syntax-val:\n\nValues\n~~~~~~\n\nWebAssembly computations manipulate *values* of either the four basic :ref:`number types <syntax-numtype>`, i.e., :ref:`integers <syntax-int>` and :ref:`floating-point data <syntax-float>` of 32 or 64 bit width each, or of :ref:`reference type <syntax-reftype>`.\n\nIn most places of the semantics, values of different types can occur.\nIn order to avoid ambiguities, values are therefore represented with an abstract syntax that makes their type explicit.\nIt is convenient to reuse the same notation as for the |CONST| :ref:`instructions <syntax-const>` and |REFNULL| producing them.\n\nReferences other than null are represented with additional :ref:`administrative instructions <syntax-instr-admin>`.\nThey either are *function references*, pointing to a specific :ref:`function address <syntax-funcaddr>`,\nor *external references* pointing to an uninterpreted form of :ref:`extern address <syntax-externaddr>` that can be defined by the :ref:`embedder <embedder>` to represent its own objects.\n\n.. math::\n   \\begin{array}{llcl}\n   \\production{(number)} & \\num &::=&\n     \\I32.\\CONST~\\i32 \\\\&&|&\n     \\I64.\\CONST~\\i64 \\\\&&|&\n     \\F32.\\CONST~\\f32 \\\\&&|&\n     \\F64.\\CONST~\\f64 \\\\\n   \\production{(reference)} & \\reff &::=&\n     \\REFNULL~t \\\\&&|&\n     \\REFFUNCADDR~\\funcaddr \\\\&&|&\n     \\REFEXTERNADDR~\\externaddr \\\\\n   \\production{(value)} & \\val &::=&\n     \\num ~|~ \\reff \\\\\n   \\end{array}\n\n.. note::\n   Future versions of WebAssembly may add additional forms of reference.\n\n.. _default-val:\n\nEach :ref:`value type <syntax-valtype>` has an associated *default value*;\nit is the respective value :math:`0` for :ref:`number types <syntax-numtype>` and null for :ref:`reference types <syntax-reftype>`.\n\n.. math::\n   \\begin{array}{lcl@{\\qquad}l}\n   \\default_t &=& t{.}\\CONST~0 & (\\iff t = \\numtype) \\\\\n   \\default_t &=& \\REFNULL~t & (\\iff t = \\reftype) \\\\\n   \\end{array}\n\n\nConvention\n..........\n\n* The meta variable :math:`r` ranges over reference values where clear from context.\n\n\n.. index:: ! result, value, trap\n   pair: abstract syntax; result\n.. _syntax-result:\n\nResults\n~~~~~~~\n\nA *result* is the outcome of a computation.\nIt is either a sequence of :ref:`values <syntax-val>` or a :ref:`trap <syntax-trap>`.\n\n.. math::\n   \\begin{array}{llcl}\n   \\production{(result)} & \\result &::=&\n     \\val^\\ast \\\\&&|&\n     \\TRAP\n   \\end{array}\n\n.. note::\n   In the current version of WebAssembly, a result can consist of at most one value.\n\n\n.. index:: ! store, function instance, table instance, memory instance, global instance, module, allocation\n   pair: abstract syntax; store\n.. _syntax-store:\n.. _store:\n\nStore\n~~~~~\n\nThe *store* represents all global state that can be manipulated by WebAssembly programs.\nIt consists of the runtime representation of all *instances* of :ref:`functions <syntax-funcinst>`, :ref:`tables <syntax-tableinst>`, :ref:`memories <syntax-meminst>`, and :ref:`globals <syntax-globalinst>`, :ref:`element segments <syntax-eleminst>`, and :ref:`data segments <syntax-datainst>` that have been :ref:`allocated <alloc>` during the life time of the abstract machine. [#gc]_\n\nIt is an invariant of the semantics that no element or data instance is :ref:`addressed <syntax-addr>` from anywhere else but the owning module instances.\n\nSyntactically, the store is defined as a :ref:`record <notation-record>` listing the existing instances of each category:\n\n.. math::\n   \\begin{array}{llll}\n   \\production{(store)} & \\store &::=& \\{~\n     \\begin{array}[t]{l@{~}ll}\n     \\SFUNCS & \\funcinst^\\ast, \\\\\n     \\STABLES & \\tableinst^\\ast, \\\\\n     \\SMEMS & \\meminst^\\ast, \\\\\n     \\SGLOBALS & \\globalinst^\\ast, \\\\\n     \\SELEMS & \\eleminst^\\ast, \\\\\n     \\SDATAS & \\datainst^\\ast ~\\} \\\\\n     \\end{array}\n   \\end{array}\n\n.. [#gc]\n   In practice, implementations may apply techniques like garbage collection to remove objects from the store that are no longer referenced.\n   However, such techniques are not semantically observable,\n   and hence outside the scope of this specification.\n\n\nConvention\n..........\n\n* The meta variable :math:`S` ranges over stores where clear from context.\n\n\n.. index:: ! address, store, function instance, table instance, memory instance, global instance, element instance, data instance, embedder\n   pair: abstract syntax; function address\n   pair: abstract syntax; table address\n   pair: abstract syntax; memory address\n   pair: abstract syntax; global address\n   pair: abstract syntax; element address\n   pair: abstract syntax; data address\n   pair: abstract syntax; host address\n   pair: function; address\n   pair: table; address\n   pair: memory; address\n   pair: global; address\n   pair: element; address\n   pair: data; address\n   pair: host; address\n.. _syntax-funcaddr:\n.. _syntax-tableaddr:\n.. _syntax-memaddr:\n.. _syntax-globaladdr:\n.. _syntax-elemaddr:\n.. _syntax-dataaddr:\n.. _syntax-externaddr:\n.. _syntax-addr:\n\nAddresses\n~~~~~~~~~\n\n:ref:`Function instances <syntax-funcinst>`, :ref:`table instances <syntax-tableinst>`, :ref:`memory instances <syntax-meminst>`, and :ref:`global instances <syntax-globalinst>`, :ref:`element instances <syntax-eleminst>`, and :ref:`data instances <syntax-datainst>` in the :ref:`store <syntax-store>` are referenced with abstract *addresses*.\nThese are simply indices into the respective store component.\nIn addition, an :ref:`embedder <embedder>` may supply an uninterpreted set of *host addresses*.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{(address)} & \\addr &::=&\n     0 ~|~ 1 ~|~ 2 ~|~ \\dots \\\\\n   \\production{(function address)} & \\funcaddr &::=&\n     \\addr \\\\\n   \\production{(table address)} & \\tableaddr &::=&\n     \\addr \\\\\n   \\production{(memory address)} & \\memaddr &::=&\n     \\addr \\\\\n   \\production{(global address)} & \\globaladdr &::=&\n     \\addr \\\\\n   \\production{(element address)} & \\elemaddr &::=&\n     \\addr \\\\\n   \\production{(data address)} & \\dataaddr &::=&\n     \\addr \\\\\n   \\production{(extern address)} & \\externaddr &::=&\n     \\addr \\\\\n   \\end{array}\n\nAn :ref:`embedder <embedder>` may assign identity to :ref:`exported <syntax-export>` store objects corresponding to their addresses,\neven where this identity is not observable from within WebAssembly code itself\n(such as for :ref:`function instances <syntax-funcinst>` or immutable :ref:`globals <syntax-globalinst>`).\n\n.. note::\n   Addresses are *dynamic*, globally unique references to runtime objects,\n   in contrast to :ref:`indices <syntax-index>`,\n   which are *static*, module-local references to their original definitions.\n   A *memory address* |memaddr| denotes the abstract address *of* a memory *instance* in the store,\n   not an offset *inside* a memory instance.\n\n   There is no specific limit on the number of allocations of store objects,\n   hence logical addresses can be arbitrarily large natural numbers.\n\n\n.. index:: ! instance, function type, function instance, table instance, memory instance, global instance, element instance, data instance, export instance, table address, memory address, global address, element address, data address, index, name\n   pair: abstract syntax; module instance\n   pair: module; instance\n.. _syntax-moduleinst:\n\nModule Instances\n~~~~~~~~~~~~~~~~\n\nA *module instance* is the runtime representation of a :ref:`module <syntax-module>`.\nIt is created by :ref:`instantiating <exec-instantiation>` a module,\nand collects runtime representations of all entities that are imported, defined, or exported by the module.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{(module instance)} & \\moduleinst &::=& \\{\n     \\begin{array}[t]{l@{~}ll}\n     \\MITYPES & \\functype^\\ast, \\\\\n     \\MIFUNCS & \\funcaddr^\\ast, \\\\\n     \\MITABLES & \\tableaddr^\\ast, \\\\\n     \\MIMEMS & \\memaddr^\\ast, \\\\\n     \\MIGLOBALS & \\globaladdr^\\ast, \\\\\n     \\MIELEMS & \\elemaddr^\\ast, \\\\\n     \\MIDATAS & \\dataaddr^\\ast, \\\\\n     \\MIEXPORTS & \\exportinst^\\ast ~\\} \\\\\n     \\end{array}\n   \\end{array}\n\nEach component references runtime instances corresponding to respective declarations from the original module -- whether imported or defined -- in the order of their static :ref:`indices <syntax-index>`.\n:ref:`Function instances <syntax-funcinst>`, :ref:`table instances <syntax-tableinst>`, :ref:`memory instances <syntax-meminst>`, and :ref:`global instances <syntax-globalinst>` are referenced with an indirection through their respective :ref:`addresses <syntax-addr>` in the :ref:`store <syntax-store>`.\n\nIt is an invariant of the semantics that all :ref:`export instances <syntax-exportinst>` in a given module instance have different :ref:`names <syntax-name>`.\n\n\n.. index:: ! function instance, module instance, function, closure, module, ! host function, invocation\n   pair: abstract syntax; function instance\n   pair: function; instance\n.. _syntax-hostfunc:\n.. _syntax-funcinst:\n\nFunction Instances\n~~~~~~~~~~~~~~~~~~\n\nA *function instance* is the runtime representation of a :ref:`function <syntax-func>`.\nIt effectively is a *closure* of the original function over the runtime :ref:`module instance <syntax-moduleinst>` of its originating :ref:`module <syntax-module>`.\nThe module instance is used to resolve references to other definitions during execution of the function.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{(function instance)} & \\funcinst &::=&\n     \\{ \\FITYPE~\\functype, \\FIMODULE~\\moduleinst, \\FICODE~\\func \\} \\\\ &&|&\n     \\{ \\FITYPE~\\functype, \\FIHOSTCODE~\\hostfunc \\} \\\\\n   \\production{(host function)} & \\hostfunc &::=& \\dots \\\\\n   \\end{array}\n\nA *host function* is a function expressed outside WebAssembly but passed to a :ref:`module <syntax-module>` as an :ref:`import <syntax-import>`.\nThe definition and behavior of host functions are outside the scope of this specification.\nFor the purpose of this specification, it is assumed that when :ref:`invoked <exec-invoke-host>`,\na host function behaves non-deterministically,\nbut within certain :ref:`constraints <exec-invoke-host>` that ensure the integrity of the runtime.\n\n.. note::\n   Function instances are immutable, and their identity is not observable by WebAssembly code.\n   However, the :ref:`embedder <embedder>` might provide implicit or explicit means for distinguishing their :ref:`addresses <syntax-funcaddr>`.\n\n\n.. index:: ! table instance, table, function address, table type, embedder, element segment\n   pair: abstract syntax; table instance\n   pair: table; instance\n.. _syntax-tableinst:\n\nTable Instances\n~~~~~~~~~~~~~~~\n\nA *table instance* is the runtime representation of a :ref:`table <syntax-table>`.\nIt records its :ref:`type <syntax-tabletype>` and holds a vector of :ref:`reference values <syntax-ref>`.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{(table instance)} & \\tableinst &::=&\n     \\{ \\TITYPE~\\tabletype, \\TIELEM~\\vec(\\reff) \\} \\\\\n   \\end{array}\n\nTable elements can be mutated through :ref:`table instructions <syntax-instr-table>`, the execution of an active :ref:`element segment <syntax-elem>`, or by external means provided by the :ref:`embedder <embedder>`.\n\nIt is an invariant of the semantics that all table elements have a type equal to the element type of :math:`\\tabletype`.\nIt also is an invariant that the length of the element vector never exceeds the maximum size of :math:`\\tabletype`, if present.\n\n\n.. index:: ! memory instance, memory, byte, ! page size, memory type, embedder, data segment, instruction\n   pair: abstract syntax; memory instance\n   pair: memory; instance\n.. _page-size:\n.. _syntax-meminst:\n\nMemory Instances\n~~~~~~~~~~~~~~~~\n\nA *memory instance* is the runtime representation of a linear :ref:`memory <syntax-mem>`.\nIt records its :ref:`type <syntax-memtype>` and holds a vector of :ref:`bytes <syntax-byte>`.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{(memory instance)} & \\meminst &::=&\n     \\{ \\MITYPE~\\memtype, \\MIDATA~\\vec(\\byte) \\} \\\\\n   \\end{array}\n\nThe length of the vector always is a multiple of the WebAssembly *page size*, which is defined to be the constant :math:`65536` -- abbreviated :math:`64\\,\\F{Ki}`.\n\nThe bytes can be mutated through :ref:`memory instructions <syntax-instr-memory>`, the execution of an active :ref:`data segment <syntax-data>`, or by external means provided by the :ref:`embedder <embedder>`.\n\nIt is an invariant of the semantics that the length of the byte vector, divided by page size, never exceeds the maximum size of :math:`\\memtype`, if present.\n\n\n.. index:: ! global instance, global, value, mutability, instruction, embedder\n   pair: abstract syntax; global instance\n   pair: global; instance\n.. _syntax-globalinst:\n\nGlobal Instances\n~~~~~~~~~~~~~~~~\n\nA *global instance* is the runtime representation of a :ref:`global <syntax-global>` variable.\nIt records its :ref:`type <syntax-globaltype>` and holds an individual :ref:`value <syntax-val>`.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{(global instance)} & \\globalinst &::=&\n     \\{ \\GITYPE~\\valtype, \\GIVALUE~\\val \\} \\\\\n   \\end{array}\n\nThe value of mutable globals can be mutated through :ref:`variable instructions <syntax-instr-variable>` or by external means provided by the :ref:`embedder <embedder>`.\n\nIt is an invariant of the semantics that the value has a type equal to the :ref:`value type <syntax-valtype>` of :math:`\\globaltype`.\n\n\n.. index:: ! element instance, element segment, embedder, element expression\n   pair: abstract syntax; element instance\n   pair: element; instance\n.. _syntax-eleminst:\n\nElement Instances\n~~~~~~~~~~~~~~~~~\n\nAn *element instance* is the runtime representation of an :ref:`element segment <syntax-elem>`.\nIt holds a vector of references and their common :ref:`type <syntax-reftype>`.\n\n.. math::\n  \\begin{array}{llll}\n  \\production{(element instance)} & \\eleminst &::=&\n    \\{ \\EITYPE~\\reftype, \\EIELEM~\\vec(\\reff) \\} \\\\\n  \\end{array}\n\n\n.. index:: ! data instance, data segment, embedder, byte\n  pair: abstract syntax; data instance\n  pair: data; instance\n.. _syntax-datainst:\n\nData Instances\n~~~~~~~~~~~~~~\n\nAn *data instance* is the runtime representation of a :ref:`data segment <syntax-data>`.\nIt holds a vector of :ref:`bytes <syntax-byte>`.\n\n.. math::\n  \\begin{array}{llll}\n  \\production{(data instance)} & \\datainst &::=&\n    \\{ \\DIDATA~\\vec(\\byte) \\} \\\\\n  \\end{array}\n\n\n.. index:: ! export instance, export, name, external value\n   pair: abstract syntax; export instance\n   pair: export; instance\n.. _syntax-exportinst:\n\nExport Instances\n~~~~~~~~~~~~~~~~\n\nAn *export instance* is the runtime representation of an :ref:`export <syntax-export>`.\nIt defines the export's :ref:`name <syntax-name>` and the associated :ref:`external value <syntax-externval>`.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{(export instance)} & \\exportinst &::=&\n     \\{ \\EINAME~\\name, \\EIVALUE~\\externval \\} \\\\\n   \\end{array}\n\n\n.. index:: ! external value, function address, table address, memory address, global address, store, function, table, memory, global\n   pair: abstract syntax; external value\n   pair: external; value\n.. _syntax-externval:\n\nExternal Values\n~~~~~~~~~~~~~~~\n\nAn *external value* is the runtime representation of an entity that can be imported or exported.\nIt is an :ref:`address <syntax-addr>` denoting either a :ref:`function instance <syntax-funcinst>`, :ref:`table instance <syntax-tableinst>`, :ref:`memory instance <syntax-meminst>`, or :ref:`global instances <syntax-globalinst>` in the shared :ref:`store <syntax-store>`.\n\n.. math::\n   \\begin{array}{llcl}\n   \\production{(external value)} & \\externval &::=&\n     \\EVFUNC~\\funcaddr \\\\&&|&\n     \\EVTABLE~\\tableaddr \\\\&&|&\n     \\EVMEM~\\memaddr \\\\&&|&\n     \\EVGLOBAL~\\globaladdr \\\\\n   \\end{array}\n\n\nConventions\n...........\n\nThe following auxiliary notation is defined for sequences of external values.\nIt filters out entries of a specific kind in an order-preserving fashion:\n\n* :math:`\\evfuncs(\\externval^\\ast) = [\\funcaddr ~|~ (\\EVFUNC~\\funcaddr) \\in \\externval^\\ast]`\n\n* :math:`\\evtables(\\externval^\\ast) = [\\tableaddr ~|~ (\\EVTABLE~\\tableaddr) \\in \\externval^\\ast]`\n\n* :math:`\\evmems(\\externval^\\ast) = [\\memaddr ~|~ (\\EVMEM~\\memaddr) \\in \\externval^\\ast]`\n\n* :math:`\\evglobals(\\externval^\\ast) = [\\globaladdr ~|~ (\\EVGLOBAL~\\globaladdr) \\in \\externval^\\ast]`\n\n\n.. index:: ! stack, ! frame, ! label, instruction, store, activation, function, call, local, module instance\n   pair: abstract syntax; frame\n   pair: abstract syntax; label\n.. _syntax-frame:\n.. _syntax-label:\n.. _frame:\n.. _label:\n.. _stack:\n\nStack\n~~~~~\n\nBesides the :ref:`store <store>`, most :ref:`instructions <syntax-instr>` interact with an implicit *stack*.\nThe stack contains three kinds of entries:\n\n* *Values*: the *operands* of instructions.\n\n* *Labels*: active :ref:`structured control instructions <syntax-instr-control>` that can be targeted by branches.\n\n* *Activations*: the *call frames* of active :ref:`function <syntax-func>` calls.\n\nThese entries can occur on the stack in any order during the execution of a program.\nStack entries are described by abstract syntax as follows.\n\n.. note::\n   It is possible to model the WebAssembly semantics using separate stacks for operands, control constructs, and calls.\n   However, because the stacks are interdependent, additional book keeping about associated stack heights would be required.\n   For the purpose of this specification, an interleaved representation is simpler.\n\nValues\n......\n\nValues are represented by :ref:`themselves <syntax-val>`.\n\nLabels\n......\n\nLabels carry an argument arity :math:`n` and their associated branch *target*, which is expressed syntactically as an :ref:`instruction <syntax-instr>` sequence:\n\n.. math::\n   \\begin{array}{llll}\n   \\production{(label)} & \\label &::=&\n     \\LABEL_n\\{\\instr^\\ast\\} \\\\\n   \\end{array}\n\nIntuitively, :math:`\\instr^\\ast` is the *continuation* to execute when the branch is taken, in place of the original control construct.\n\n.. note::\n   For example, a loop label has the form\n\n   .. math::\n      \\LABEL_n\\{\\LOOP~\\dots~\\END\\}\n\n   When performing a branch to this label, this executes the loop, effectively restarting it from the beginning.\n   Conversely, a simple block label has the form\n\n   .. math::\n      \\LABEL_n\\{\\epsilon\\}\n\n   When branching, the empty continuation ends the targeted block, such that execution can proceed with consecutive instructions.\n\nActivations and Frames\n......................\n\nActivation frames carry the return arity :math:`n` of the respective function,\nhold the values of its :ref:`locals <syntax-local>` (including arguments) in the order corresponding to their static :ref:`local indices <syntax-localidx>`,\nand a reference to the function's own :ref:`module instance <syntax-moduleinst>`:\n\n.. math::\n   \\begin{array}{llll}\n   \\production{(activation)} & \\X{activation} &::=&\n     \\FRAME_n\\{\\frame\\} \\\\\n   \\production{(frame)} & \\frame &::=&\n     \\{ \\ALOCALS~\\val^\\ast, \\AMODULE~\\moduleinst \\} \\\\\n   \\end{array}\n\nThe values of the locals are mutated by respective :ref:`variable instructions <syntax-instr-variable>`.\n\n\n.. _exec-expand:\n\nConventions\n...........\n\n* The meta variable :math:`L` ranges over labels where clear from context.\n\n* The meta variable :math:`F` ranges over frames where clear from context.\n\n* The following auxiliary definition takes a :ref:`block type <syntax-blocktype>` and looks up the :ref:`function type <syntax-functype>` that it denotes in the current frame:\n\n.. math::\n   \\begin{array}{lll}\n   \\expand_F(\\typeidx) &=& F.\\AMODULE.\\MITYPES[\\typeidx] \\\\\n   \\expand_F([\\valtype^?]) &=& [] \\to [\\valtype^?] \\\\\n   \\end{array}\n\n\n.. index:: ! administrative instructions, function, function instance, function address, label, frame, instruction, trap, call, memory, memory instance, table, table instance, element, data, segment\n   pair:: abstract syntax; administrative instruction\n.. _syntax-trap:\n.. _syntax-reffuncaddr:\n.. _syntax-invoke:\n.. _syntax-instr-admin:\n\nAdministrative Instructions\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. note::\n   This section is only relevant for the :ref:`formal notation <exec-notation>`.\n\nIn order to express the reduction of :ref:`traps <trap>`, :ref:`calls <syntax-call>`, and :ref:`control instructions <syntax-instr-control>`, the syntax of instructions is extended to include the following *administrative instructions*:\n\n.. math::\n   \\begin{array}{llcl}\n   \\production{(administrative instruction)} & \\instr &::=&\n     \\dots \\\\ &&|&\n     \\TRAP \\\\ &&|&\n     \\REFFUNCADDR~\\funcaddr \\\\ &&|&\n     \\REFEXTERNADDR~\\externaddr \\\\ &&|&\n     \\INVOKE~\\funcaddr \\\\ &&|&\n     \\LABEL_n\\{\\instr^\\ast\\}~\\instr^\\ast~\\END \\\\ &&|&\n     \\FRAME_n\\{\\frame\\}~\\instr^\\ast~\\END \\\\\n   \\end{array}\n\nThe |TRAP| instruction represents the occurrence of a trap.\nTraps are bubbled up through nested instruction sequences, ultimately reducing the entire program to a single |TRAP| instruction, signalling abrupt termination.\n\nThe |REFFUNCADDR| instruction represents :ref:`function reference values <syntax-ref.func>`. Similarly, |REFEXTERNADDR| represents :ref:`external references <syntax-ref.extern>`.\n\nThe |INVOKE| instruction represents the imminent invocation of a :ref:`function instance <syntax-funcinst>`, identified by its :ref:`address <syntax-funcaddr>`.\nIt unifies the handling of different forms of calls.\n\nThe |LABEL| and |FRAME| instructions model :ref:`labels <syntax-label>` and :ref:`frames <syntax-frame>` :ref:`\"on the stack\" <exec-notation>`.\nMoreover, the administrative syntax maintains the nesting structure of the original :ref:`structured control instruction <syntax-instr-control>` or :ref:`function body <syntax-func>` and their :ref:`instruction sequences <syntax-instr-seq>` with an |END| marker.\nThat way, the end of the inner instruction sequence is known when part of an outer sequence.\n\n.. note::\n   For example, the :ref:`reduction rule <exec-block>` for |BLOCK| is:\n\n   .. math::\n      \\BLOCK~[t^n]~\\instr^\\ast~\\END \\quad\\stepto\\quad\n      \\LABEL_n\\{\\epsilon\\}~\\instr^\\ast~\\END\n\n   This replaces the block with a label instruction,\n   which can be interpreted as \"pushing\" the label on the stack.\n   When |END| is reached, i.e., the inner instruction sequence has been reduced to the empty sequence -- or rather, a sequence of :math:`n` |CONST| instructions representing the resulting values -- then the |LABEL| instruction is eliminated courtesy of its own :ref:`reduction rule <exec-label>`:\n\n   .. math::\n      \\LABEL_m\\{\\instr^\\ast\\}~\\val^n~\\END \\quad\\stepto\\quad \\val^n\n\n   This can be interpreted as removing the label from the stack and only leaving the locally accumulated operand values.\n\n.. commented out\n   Both rules can be seen in concert in the following example:\n\n   .. math::\n      \\begin{array}{@{}ll}\n      & (\\F32.\\CONST~1)~\\BLOCK~[]~(\\F32.\\CONST~2)~\\F32.\\NEG~\\END~\\F32.\\ADD \\\\\n      \\stepto & (\\F32.\\CONST~1)~\\LABEL_0\\{\\}~(\\F32.\\CONST~2)~\\F32.\\NEG~\\END~\\F32.\\ADD \\\\\n      \\stepto & (\\F32.\\CONST~1)~\\LABEL_0\\{\\}~(\\F32.\\CONST~{-}2)~\\END~\\F32.\\ADD \\\\\n      \\stepto & (\\F32.\\CONST~1)~(\\F32.\\CONST~{-}2)~\\F32.\\ADD \\\\\n      \\stepto & (\\F32.\\CONST~{-}1) \\\\\n      \\end{array}\n\n\n.. index:: ! block context, instruction, branch\n.. _syntax-ctxt-block:\n\nBlock Contexts\n..............\n\nIn order to specify the reduction of :ref:`branches <syntax-instr-control>`, the following syntax of *block contexts* is defined, indexed by the count :math:`k` of labels surrounding a *hole* :math:`[\\_]` that marks the place where the next step of computation is taking place:\n\n.. math::\n   \\begin{array}{llll}\n   \\production{(block contexts)} & \\XB^0 &::=&\n     \\val^\\ast~[\\_]~\\instr^\\ast \\\\\n   \\production{(block contexts)} & \\XB^{k+1} &::=&\n     \\val^\\ast~\\LABEL_n\\{\\instr^\\ast\\}~\\XB^k~\\END~\\instr^\\ast \\\\\n   \\end{array}\n\nThis definition allows to index active labels surrounding a :ref:`branch <syntax-br>` or :ref:`return <syntax-return>` instruction.\n\n.. note::\n   For example, the :ref:`reduction <exec-br>` of a simple branch can be defined as follows:\n\n   .. math::\n      \\LABEL_0\\{\\instr^\\ast\\}~\\XB^l[\\BR~l]~\\END \\quad\\stepto\\quad \\instr^\\ast\n\n   Here, the hole :math:`[\\_]` of the context is instantiated with a branch instruction.\n   When a branch occurs,\n   this rule replaces the targeted label and associated instruction sequence with the label's continuation.\n   The selected label is identified through the :ref:`label index <syntax-labelidx>` :math:`l`, which corresponds to the number of surrounding |LABEL| instructions that must be hopped over -- which is exactly the count encoded in the index of a block context.\n\n\n.. index:: ! configuration, ! thread, store, frame, instruction, module instruction\n.. _syntax-thread:\n.. _syntax-config:\n\nConfigurations\n..............\n\nA *configuration* consists of the current :ref:`store <syntax-store>` and an executing *thread*.\n\nA thread is a computation over :ref:`instructions <syntax-instr>`\nthat operates relative to a current :ref:`frame <syntax-frame>` referring to the :ref:`module instance <syntax-moduleinst>` in which the computation runs, i.e., where the current function originates from.\n\n.. math::\n   \\begin{array}{llcl}\n   \\production{(configuration)} & \\config &::=&\n     \\store; \\thread \\\\\n   \\production{(thread)} & \\thread &::=&\n     \\frame; \\instr^\\ast \\\\\n   \\end{array}\n\n.. note::\n   The current version of WebAssembly is single-threaded,\n   but configurations with multiple threads may be supported in the future.\n\n\n.. index:: ! evaluation context, instruction, trap, label, frame, value\n.. _syntax-ctxt-eval:\n\nEvaluation Contexts\n...................\n\nFinally, the following definition of *evaluation context* and associated structural rules enable reduction inside instruction sequences and administrative forms as well as the propagation of traps:\n\n.. math::\n   \\begin{array}{llll}\n   \\production{(evaluation contexts)} & E &::=&\n     [\\_] ~|~\n     \\val^\\ast~E~\\instr^\\ast ~|~\n     \\LABEL_n\\{\\instr^\\ast\\}~E~\\END \\\\\n   \\end{array}\n\n.. math::\n   \\begin{array}{rcl}\n   S; F; E[\\instr^\\ast] &\\stepto& S'; F'; E[{\\instr'}^\\ast] \\\\\n     && (\\iff S; F; \\instr^\\ast \\stepto S'; F'; {\\instr'}^\\ast) \\\\\n   S; F; \\FRAME_n\\{F'\\}~\\instr^\\ast~\\END &\\stepto& S'; F; \\FRAME_n\\{F''\\}~\\instr'^\\ast~\\END \\\\\n     && (\\iff S; F'; \\instr^\\ast \\stepto S'; F''; {\\instr'}^\\ast) \\\\[1ex]\n   S; F; E[\\TRAP] &\\stepto& S; F; \\TRAP\n     \\qquad (\\iff E \\neq [\\_]) \\\\\n   S; F; \\FRAME_n\\{F'\\}~\\TRAP~\\END &\\stepto& S; F; \\TRAP \\\\\n   \\end{array}\n\nReduction terminates when a thread's instruction sequence has been reduced to a :ref:`result <syntax-result>`,\nthat is, either a sequence of :ref:`values <syntax-val>` or to a |TRAP|.\n\n.. note::\n   The restriction on evaluation contexts rules out contexts like :math:`[\\_]` and :math:`\\epsilon~[\\_]~\\epsilon` for which :math:`E[\\TRAP] = \\TRAP`.\n\n   For an example of reduction under evaluation contexts, consider the following instruction sequence.\n\n   .. math::\n       (\\F64.\\CONST~x_1)~(\\F64.\\CONST~x_2)~\\F64.\\NEG~(\\F64.\\CONST~x_3)~\\F64.\\ADD~\\F64.\\MUL\n\n   This can be decomposed into :math:`E[(\\F64.\\CONST~x_2)~\\F64.\\NEG]` where\n\n   .. math::\n      E = (\\F64.\\CONST~x_1)~[\\_]~(\\F64.\\CONST~x_3)~\\F64.\\ADD~\\F64.\\MUL\n\n   Moreover, this is the *only* possible choice of evaluation context where the contents of the hole matches the left-hand side of a reduction rule.\n"
  },
  {
    "path": "document/core/index.bs",
    "content": "<pre class='metadata'>\nTitle: WebAssembly Core Specification\nShortname: wasm-core\nGroup: wasm\nStatus: ED\nLevel: 1\nTR: https://www.w3.org/TR/wasm-core-1/\nED: https://webassembly.github.io/spec/core/bikeshed/\nEditor: Andreas Rossberg (Dfinity Stiftung)\nRepository: WebAssembly/spec\nMarkup Shorthands: css no, markdown no, algorithm no, idl no\nAbstract: This document describes version 1.0 of the core WebAssembly standard, a safe, portable, low-level code format designed for efficient execution and compact representation.\nPrepare For TR: true\n</pre>\n\n<pre class='biblio'>\n{\n  \"WEBASSEMBLY\": {\n    \"href\": \"https://webassembly.github.io/spec/\",\n    \"title\": \"WebAssembly Specification\",\n    \"publisher\": \"W3C WebAssembly Community Group\",\n    \"status\": \"Draft\"\n  }\n}\n</pre>\n\n<pre class=include>\npath: _build/bikeshed_singlehtml/index_fixed.html\n</pre>\n"
  },
  {
    "path": "document/core/index.rst",
    "content": "WebAssembly Specification\n=========================\n\n.. only:: html\n\n   | Release |release| + bulk instructions + reference types (Draft, |today|)\n\n   | Editor: Andreas Rossberg\n\n   | Latest Draft: |WasmDraft|\n   | Issue Tracker: |WasmIssues|\n\n.. toctree::\n   :maxdepth: 2\n\n   intro/index\n   syntax/index\n   valid/index\n   exec/index\n   binary/index\n   text/index\n   appendix/index\n\n.. only:: latex\n\n   .. toctree::\n\n      appendix/index-types\n      appendix/index-instructions\n      appendix/index-rules\n\n.. only:: html\n\n   * :ref:`index-type`\n   * :ref:`index-instr`\n   * :ref:`index-rules`\n\n   * :ref:`genindex`\n"
  },
  {
    "path": "document/core/intro/index.rst",
    "content": ".. _intro:\n\nIntroduction\n============\n\n.. toctree::\n   :maxdepth: 2\n\n   introduction\n   overview\n"
  },
  {
    "path": "document/core/intro/introduction.rst",
    "content": "Introduction\n------------\n\nWebAssembly (abbreviated Wasm [#wasm]_) is a *safe, portable, low-level code format*\ndesigned for efficient execution and compact representation.\nIts main goal is to enable high performance applications on the Web, but it does not make any Web-specific assumptions or provide Web-specific features, so it can be employed in other environments as well.\n\nWebAssembly is an open standard developed by a `W3C Community Group <https://www.w3.org/community/webassembly/>`_.\n\nThis document describes version |release| of the :ref:`core <scope>` WebAssembly standard.\nIt is intended that it will be superseded by new incremental releases with additional features in the future.\n\n\n.. _goals:\n\nDesign Goals\n~~~~~~~~~~~~\n\n.. index:: design goals, portability\n\nThe design goals of WebAssembly are the following:\n\n* Fast, safe, and portable *semantics*:\n\n  * **Fast**: executes with near native code performance, taking advantage of capabilities common to all contemporary hardware.\n\n  * **Safe**: code is validated and executes in a memory-safe [#memorysafe]_, sandboxed environment preventing data corruption or security breaches.\n\n  * **Well-defined**: fully and precisely defines valid programs and their behavior in a way that is easy to reason about informally and formally.\n\n  * **Hardware-independent**: can be compiled on all modern architectures, desktop or mobile devices and embedded systems alike.\n\n  * **Language-independent**: does not privilege any particular language, programming model, or object model.\n\n  * **Platform-independent**: can be embedded in browsers, run as a stand-alone VM, or integrated in other environments.\n\n  * **Open**: programs can interoperate with their environment in a simple and universal manner.\n\n* Efficient and portable *representation*:\n\n  * **Compact**: has a binary format that is fast to transmit by being smaller than typical text or native code formats.\n\n  * **Modular**: programs can be split up in smaller parts that can be transmitted, cached, and consumed separately.\n\n  * **Efficient**: can be decoded, validated, and compiled in a fast single pass, equally with either just-in-time (JIT) or ahead-of-time (AOT) compilation.\n\n  * **Streamable**: allows decoding, validation, and compilation to begin as soon as possible, before all data has been seen.\n\n  * **Parallelizable**: allows decoding, validation, and compilation to be split into many independent parallel tasks.\n\n  * **Portable**: makes no architectural assumptions that are not broadly supported across modern hardware.\n\nWebAssembly code is also intended to be easy to inspect and debug, especially in environments like web browsers, but such features are beyond the scope of this specification.\n\n\n.. [#wasm] A contraction of \"WebAssembly\", not an acronym, hence not using all-caps.\n\n.. [#memorysafe] No program can break WebAssembly's memory model. Of course, it cannot guarantee that an unsafe language compiling to WebAssembly does not corrupt its own memory layout, e.g. inside WebAssembly's linear memory.\n\n\n.. _scope:\n\nScope\n~~~~~\n\nAt its core, WebAssembly is a *virtual instruction set architecture (virtual ISA)*.\nAs such, it has many use cases and can be embedded in many different environments.\nTo encompass their variety and enable maximum reuse, the WebAssembly specification is split and layered into several documents.\n\nThis document is concerned with the core ISA layer of WebAssembly.\nIt defines the instruction set, binary encoding, validation, and execution semantics, as well as a textual representation.\nIt does not, however, define how WebAssembly programs can interact with a specific environment they execute in, nor how they are invoked from such an environment.\n\nInstead, this specification is complemented by additional documents defining interfaces to specific embedding environments such as the Web.\nThese will each define a WebAssembly *application programming interface (API)* suitable for a given environment.\n\n\n.. index:: ! security, host, embedder,  module, function, import\n.. _security:\n\nSecurity Considerations\n~~~~~~~~~~~~~~~~~~~~~~~\n\nWebAssembly provides no ambient access to the computing environment in which code is executed.\nAny interaction with the environment, such as I/O, access to resources, or operating system calls, can only be performed by invoking :ref:`functions <function>` provided by the :ref:`embedder <embedder>` and imported into a WebAssembly :ref:`module <module>`.\nAn embedder can establish security policies suitable for a respective environment by controlling or limiting which functional capabilities it makes available for import.\nSuch considerations are an embedder’s responsibility and the subject of :ref:`API definitions <scope>` for a specific environment.\n\nBecause WebAssembly is designed to be translated into machine code running directly on the host's hardware, it is potentially vulnerable to side channel attacks on the hardware level.\nIn environments where this is a concern, an embedder may have to put suitable mitigations into place to isolate WebAssembly computations.\n\n\n.. index:: IEEE 754, floating point, Unicode, name, text format, UTF-8, character\n.. _dependencies:\n\nDependencies\n~~~~~~~~~~~~\n\nWebAssembly depends on two existing standards:\n\n* |IEEE754|_, for the representation of :ref:`floating-point data <syntax-float>` and the semantics of respective :ref:`numeric operations <float-ops>`.\n\n* |Unicode|_, for the representation of import/export :ref:`names <syntax-name>` and the :ref:`text format <text>`.\n\nHowever, to make this specification self-contained, relevant aspects of the aforementioned standards are defined and formalized as part of this specification,\nsuch as the :ref:`binary representation <aux-fbits>` and :ref:`rounding <aux-ieee>` of floating-point values, and the :ref:`value range <syntax-char>` and :ref:`UTF-8 encoding <binary-utf8>` of Unicode characters.\n\n.. note::\n   The aforementioned standards are the authoritative source of all respective definitions.\n   Formalizations given in this specification are intended to match these definitions.\n   Any discrepancy in the syntax or semantics described is to be considered an error.\n"
  },
  {
    "path": "document/core/intro/overview.rst",
    "content": "Overview\n--------\n\n.. index:: concepts, value, instruction, trap, function, table, memory, linear memory, module, ! embedder, integer, floating-point, IEEE 754, Boolean, two's complement\n.. _concepts:\n\nConcepts\n~~~~~~~~\n\nWebAssembly encodes a low-level, assembly-like programming language.\nThis language is structured around the following concepts.\n\n.. _value:\n\n**Values**\n  WebAssembly provides only four basic *value types*.\n  These are integers and |IEEE754|_ numbers,\n  each in 32 and 64 bit width.\n  32 bit integers also serve as Booleans and as memory addresses.\n  The usual operations on these types are available,\n  including the full matrix of conversions between them.\n  There is no distinction between signed and unsigned integer types.\n  Instead, integers are interpreted by respective operations\n  as either unsigned or signed in two’s complement representation.\n\n.. _instruction:\n\n**Instructions**\n  The computational model of WebAssembly is based on a *stack machine*.\n  Code consists of sequences of *instructions* that are executed in order.\n  Instructions manipulate values on an implicit *operand stack* [#stackmachine]_\n  and fall into two main categories.\n  *Simple* instructions perform basic operations on data.\n  They pop arguments from the operand stack and push results back to it.\n  *Control* instructions alter control flow.\n  Control flow is *structured*, meaning it is expressed with well-nested constructs such as blocks, loops, and conditionals.\n  Branches can only target such constructs.\n\n.. _trap:\n\n**Traps**\n  Under some conditions, certain instructions may produce a *trap*,\n  which immediately aborts execution.\n  Traps cannot be handled by WebAssembly code,\n  but are reported to the outside environment,\n  where they typically can be caught.\n\n.. _function:\n\n**Functions**\n  Code is organized into separate *functions*.\n  Each function takes a sequence of values as parameters\n  and returns a sequence of values as results. [#arity]_\n  Functions can call each other, including recursively,\n  resulting in an implicit call stack that cannot be accessed directly.\n  Functions may also declare mutable *local variables* that are usable as virtual registers.\n\n.. _table:\n\n**Tables**\n  A *table* is an array of opaque values of a particular *element type*.\n  It allows programs to select such values indirectly through a dynamic index operand.\n  Currently, the only available element type is an untyped function reference.\n  Thereby, a program can call functions indirectly through a dynamic index into a table.\n  For example, this allows emulating function pointers by way of table indices.\n\n.. _memory:\n\n**Linear Memory**\n  A *linear memory* is a contiguous, mutable array of raw bytes.\n  Such a memory is created with an initial size but can be grown dynamically.\n  A program can load and store values from/to a linear memory at any byte address (including unaligned).\n  Integer loads and stores can specify a *storage size* which is smaller than the size of the respective value type.\n  A trap occurs if an access is not within the bounds of the current memory size.\n\n.. _module:\n\n**Modules**\n  A WebAssembly binary takes the form of a *module*\n  that contains definitions for functions, tables, and linear memories,\n  as well as mutable or immutable *global variables*.\n  Definitions can also be *imported*, specifying a module/name pair and a suitable type.\n  Each definition can optionally be *exported* under one or more names.\n  In addition to definitions, modules can define initialization data for their memories or tables\n  that takes the form of *segments* copied to given offsets.\n  They can also define a *start function* that is automatically executed.\n\n.. _embedder:\n\n**Embedder**\n  A WebAssembly implementation will typically be *embedded* into a *host* environment.\n  This environment defines how loading of modules is initiated,\n  how imports are provided (including host-side definitions), and how exports can be accessed.\n  However, the details of any particular embedding are beyond the scope of this specification, and will instead be provided by complementary, environment-specific API definitions.\n\n\n.. [#stackmachine] In practice, implementations need not maintain an actual operand stack. Instead, the stack can be viewed as a set of anonymous registers that are implicitly referenced by instructions. The :ref:`type system <validation>` ensures that the stack height, and thus any referenced register, is always known statically.\n\n.. [#arity] In the current version of WebAssembly, there may be at most one result value.\n\n\n.. index:: phases, decoding, validation, execution, instantiation, invocation\n\nSemantic Phases\n~~~~~~~~~~~~~~~\n\nConceptually, the semantics of WebAssembly is divided into three phases.\nFor each part of the language, the specification specifies each of them.\n\n.. _decoding:\n\n**Decoding**\n  WebAssembly modules are distributed in a *binary format*.\n  *Decoding* processes that format and converts it into an internal representation of a module.\n  In this specification, this representation is modelled by *abstract syntax*, but a real implementation could compile directly to machine code instead.\n\n.. _validation:\n\n**Validation**\n  A decoded module has to be *valid*.\n  Validation checks a number of well-formedness conditions to guarantee that the module is meaningful and safe.\n  In particular, it performs *type checking* of functions and the instruction sequences in their bodies, ensuring for example that the operand stack is used consistently.\n\n.. _execution:\n.. _instantiation:\n.. _invocation:\n\n**Execution**\n  Finally, a valid module can be *executed*.\n  Execution can be further divided into two phases:\n\n  **Instantiation**.\n  A module *instance* is the dynamic representation of a module,\n  complete with its own state and execution stack.\n  Instantiation executes the module body itself, given definitions for all its imports.\n  It initializes globals, memories and tables and invokes the module's start function if defined.\n  It returns the instances of the module's exports.\n\n  **Invocation**.\n  Once instantiated, further WebAssembly computations can be initiated by *invoking* an exported function on a module instance.\n  Given the required arguments, that executes the respective function and returns its results.\n\n  Instantiation and invocation are operations within the embedding environment.\n"
  },
  {
    "path": "document/core/make.bat",
    "content": "@ECHO OFF\r\n\r\nREM Command file for Sphinx documentation\r\n\r\nif \"%SPHINXBUILD%\" == \"\" (\r\n\tset SPHINXBUILD=sphinx-build\r\n)\r\nset NAME=WebAssembly\r\nset BUILDDIR=_build\r\nset STATICDIR=_static\r\nset GHPAGESDIR=..\\docs\r\nset ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .\r\nset I18NSPHINXOPTS=%SPHINXOPTS% .\r\nif NOT \"%PAPER%\" == \"\" (\r\n\tset ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%\r\n\tset I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%\r\n)\r\n\r\nif \"%1\" == \"\" (\r\n\techo.Please use `make ^<target^>` where ^<target^> is one of\r\n\techo.  html       to make standalone HTML files\r\n\techo.  pdf        to make standalone PDF file\r\n\techo.  all        to make both\r\n\techo.  publish    to make all and push to gh-pages (changes must be committed)\r\n\techo.  help       to see more options\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"help\" (\r\n\t:help\r\n\techo.Usage: `make ^<target^>` where ^<target^> is one of\r\n\techo.  html       to make standalone HTML files\r\n\techo.  dirhtml    to make HTML files named index.html in directories\r\n\techo.  singlehtml to make a single large HTML file\r\n\techo.  pickle     to make pickle files\r\n\techo.  json       to make JSON files\r\n\techo.  htmlhelp   to make HTML files and a HTML help project\r\n\techo.  qthelp     to make HTML files and a qthelp project\r\n\techo.  devhelp    to make HTML files and a Devhelp project\r\n\techo.  epub       to make an epub\r\n\techo.  epub3      to make an epub3\r\n\techo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter\r\n\techo.  latexpdf   to make LaTeX files and run them through pdflatex\r\n\techo.  latexpdfja to make LaTeX files and run them through platex/dvipdfmx\r\n\techo.  text       to make text files\r\n\techo.  man        to make manual pages\r\n\techo.  texinfo    to make Texinfo files\r\n\techo.  gettext    to make PO message catalogs\r\n\techo.  changes    to make an overview over all changed/added/deprecated items\r\n\techo.  xml        to make Docutils-native XML files\r\n\techo.  pseudoxml  to make pseudoxml-XML files for display purposes\r\n\techo.  linkcheck  to check all external links for integrity\r\n\techo.  doctest    to run all doctests embedded in the documentation if enabled\r\n\techo.  coverage   to run coverage check of the documentation if enabled\r\n\techo.  dummy      to check syntax errors of document sources\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"clean\" (\r\n\trmdir /q /s %BUILDDIR%\r\n\trmdir /q /s %STATICDIR%\r\n\tgoto end\r\n)\r\n\r\n\r\nREM Check if sphinx-build is available and fallback to Python version if any\r\n%SPHINXBUILD% 1>NUL 2>NUL\r\nif errorlevel 9009 goto sphinx_python\r\ngoto sphinx_ok\r\n\r\n:sphinx_python\r\n\r\nset SPHINXBUILD=python -m sphinx.__init__\r\n%SPHINXBUILD% 2> nul\r\nif errorlevel 9009 (\r\n\techo.\r\n\techo.The 'sphinx-build' command was not found. Make sure you have Sphinx\r\n\techo.installed, then set the SPHINXBUILD environment variable to point\r\n\techo.to the full path of the 'sphinx-build' executable. Alternatively you\r\n\techo.may add the Sphinx directory to PATH.\r\n\techo.\r\n\techo.If you don't have Sphinx installed, grab it from\r\n\techo.http://sphinx-doc.org/\r\n\texit /b 1\r\n)\r\n\r\n:sphinx_ok\r\n\r\n\r\nif \"%1\" == \"publish\" (\r\n\t.\\make all\r\n\tmkdir %GHPAGESDIR%\r\n\tfor /d %%i in (%GHPAGESDIR%\\*) do rmdir /q /s %%i\r\n\txcopy %BUILDDIR%\\html\\* %GHPAGESDIR%\\\r\n\tgit add -A %GHPAGESDIR%\\*\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"all\" (\r\n\t.\\make pdf\r\n\tmkdir %STATICDIR%\r\n\tdel %STATICDIR%\\%NAME%.pdf\r\n\tcopy %BUILDDIR%\\latex\\%NAME%.pdf %STATICDIR%\\%NAME%.pdf\r\n\t.\\make html\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"pdf\" (\r\n\tgoto latexpdf\r\n)\r\n\r\n\r\nif \"%1\" == \"html\" (\r\n\t%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished. The HTML pages are in %BUILDDIR%/html.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"dirhtml\" (\r\n\t%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"singlehtml\" (\r\n\t%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"pickle\" (\r\n\t%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished; now you can process the pickle files.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"json\" (\r\n\t%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished; now you can process the JSON files.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"htmlhelp\" (\r\n\t%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished; now you can run HTML Help Workshop with the ^\r\n.hhp project file in %BUILDDIR%/htmlhelp.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"qthelp\" (\r\n\t%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished; now you can run \"qcollectiongenerator\" with the ^\r\n.qhcp project file in %BUILDDIR%/qthelp, like this:\r\n\techo.^> qcollectiongenerator %BUILDDIR%\\qthelp\\WebAssembly.qhcp\r\n\techo.To view the help file:\r\n\techo.^> assistant -collectionFile %BUILDDIR%\\qthelp\\WebAssembly.ghc\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"devhelp\" (\r\n\t%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"epub\" (\r\n\t%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished. The epub file is in %BUILDDIR%/epub.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"epub3\" (\r\n\t%SPHINXBUILD% -b epub3 %ALLSPHINXOPTS% %BUILDDIR%/epub3\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished. The epub3 file is in %BUILDDIR%/epub3.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"latex\" (\r\n\t%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished; the LaTeX files are in %BUILDDIR%/latex.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"latexpdf\" (\r\n\t:latexpdf\r\n\t%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex\r\n\tcd %BUILDDIR%/latex\r\n\tmake all-pdf\r\n\tcd %~dp0\r\n\techo.\r\n\techo.Build finished; the PDF files are in %BUILDDIR%/latex.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"latexpdfja\" (\r\n\t%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex\r\n\tcd %BUILDDIR%/latex\r\n\tmake all-pdf-ja\r\n\tcd %~dp0\r\n\techo.\r\n\techo.Build finished; the PDF files are in %BUILDDIR%/latex.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"text\" (\r\n\t%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished. The text files are in %BUILDDIR%/text.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"man\" (\r\n\t%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished. The manual pages are in %BUILDDIR%/man.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"texinfo\" (\r\n\t%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"gettext\" (\r\n\t%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished. The message catalogs are in %BUILDDIR%/locale.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"changes\" (\r\n\t%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.The overview file is in %BUILDDIR%/changes.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"linkcheck\" (\r\n\t%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Link check complete; look for any errors in the above output ^\r\nor in %BUILDDIR%/linkcheck/output.txt.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"doctest\" (\r\n\t%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Testing of doctests in the sources finished, look at the ^\r\nresults in %BUILDDIR%/doctest/output.txt.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"coverage\" (\r\n\t%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Testing of coverage in the sources finished, look at the ^\r\nresults in %BUILDDIR%/coverage/python.txt.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"xml\" (\r\n\t%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished. The XML files are in %BUILDDIR%/xml.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"pseudoxml\" (\r\n\t%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.\r\n\tgoto end\r\n)\r\n\r\nif \"%1\" == \"dummy\" (\r\n\t%SPHINXBUILD% -b dummy %ALLSPHINXOPTS% %BUILDDIR%/dummy\r\n\tif errorlevel 1 exit /b 1\r\n\techo.\r\n\techo.Build finished. Dummy builder generates no files.\r\n\tgoto end\r\n)\r\n\r\n:end\r\n"
  },
  {
    "path": "document/core/static/custom.css",
    "content": "a {\n  color: #004BAB;\n  text-decoration: none;\n}\n\na.reference {\n  border-bottom: none;\n}\n\na.reference:hover {\n  border-bottom: 1px dotted #004BAB;\n}\n\nbody {\n  font-size: 15px;\n}\n\ndiv.document { width: 1000px; }\ndiv.bodywrapper { margin: 0 0 0 200px; }\ndiv.body { padding: 0 10px 0 10px; }\ndiv.footer { width: 1000px; }\n\ndiv.body h1 { font-size: 200%; }\ndiv.body h2 { font-size: 150%; }\ndiv.body h3 { font-size: 120%; }\ndiv.body h4 { font-size: 110%; }\n\ndiv.note {\n  border: 0px;\n  font-size: 90%;\n  background-color: #F6F8FF;\n}\n\ndiv.admonition {\n  padding: 10px;\n}\n\ndiv.admonition p.admonition-title {\n  margin: 0px 0px 0px 0px;\n  font-size: 100%;\n  font-weight: bold;\n}\n\n\ndiv.relations {\n  display: block;\n}\n\ndiv.sphinxsidebar {\n  z-index: 1;\n  background: #FFF;\n  margin-top: -30px;\n  font-size: 13px;\n  width: 200px;\n  height: 100%;\n}\n\ndiv.sphinxsidebarwrapper p.logo {\n  padding: 30px 40px 10px 0px;\n}\n\ndiv.sphinxsidebar h3 {\n  font-size: 0px;\n}\n\ndiv.sphinxsidebar a {\n  border-bottom: 0px;\n}\n\ndiv.sphinxsidebar a:hover {\n  border-bottom: 1px dotted;\n}\n"
  },
  {
    "path": "document/core/syntax/conventions.rst",
    "content": ".. index:: ! abstract syntax\n\nConventions\n-----------\n\nWebAssembly is a programming language that has multiple concrete representations\n(its :ref:`binary format <binary>` and the :ref:`text format <text>`).\nBoth map to a common structure.\nFor conciseness, this structure is described in the form of an *abstract syntax*.\nAll parts of this specification are defined in terms of this abstract syntax.\n\n\n.. index:: ! grammar notation, notation\n   single: abstract syntax; grammar\n   pair: abstract syntax; notation\n.. _grammar:\n\nGrammar Notation\n~~~~~~~~~~~~~~~~\n\nThe following conventions are adopted in defining grammar rules for abstract syntax.\n\n* Terminal symbols (atoms) are written in sans-serif font: :math:`\\K{i32}, \\K{end}`.\n\n* Nonterminal symbols are written in italic font: :math:`\\X{valtype}, \\X{instr}`.\n\n* :math:`A^n` is a sequence of :math:`n\\geq 0` iterations  of :math:`A`.\n\n* :math:`A^\\ast` is a possibly empty sequence of iterations of :math:`A`.\n  (This is a shorthand for :math:`A^n` used where :math:`n` is not relevant.)\n\n* :math:`A^+` is a non-empty sequence of iterations of :math:`A`.\n  (This is a shorthand for :math:`A^n` where :math:`n \\geq 1`.)\n\n* :math:`A^?` is an optional occurrence of :math:`A`.\n  (This is a shorthand for :math:`A^n` where :math:`n \\leq 1`.)\n\n* Productions are written :math:`\\X{sym} ::= A_1 ~|~ \\dots ~|~ A_n`.\n\n* Large productions may be split into multiple definitions, indicated by ending the first one with explicit ellipses, :math:`\\X{sym} ::= A_1 ~|~ \\dots`, and starting continuations with ellipses, :math:`\\X{sym} ::= \\dots ~|~ A_2`.\n\n* Some productions are augmented with side conditions in parentheses, \":math:`(\\iff \\X{condition})`\", that provide a shorthand for a combinatorial expansion of the production into many separate cases.\n\n* If the same meta variable or non-terminal symbol appears multiple times in a production, then all those occurrences must have the same instantiation.\n  (This is a shorthand for a side condition requiring multiple different variables to be equal.)\n\n\n.. _notation-epsilon:\n.. _notation-length:\n.. _notation-index:\n.. _notation-slice:\n.. _notation-replace:\n.. _notation-record:\n.. _notation-project:\n.. _notation-concat:\n.. _notation-compose:\n\nAuxiliary Notation\n~~~~~~~~~~~~~~~~~~\n\nWhen dealing with syntactic constructs the following notation is also used:\n\n* :math:`\\epsilon` denotes the empty sequence.\n\n* :math:`|s|` denotes the length of a sequence :math:`s`.\n\n* :math:`s[i]` denotes the :math:`i`-th element of a sequence :math:`s`, starting from :math:`0`.\n\n* :math:`s[i \\slice n]` denotes the sub-sequence :math:`s[i]~\\dots~s[i+n-1]` of a sequence :math:`s`.\n\n* :math:`s \\with [i] = A` denotes the same sequence as :math:`s`,\n  except that the :math:`i`-th element is replaced with :math:`A`.\n\n* :math:`s \\with [i \\slice n] = A^n` denotes the same sequence as :math:`s`,\n  except that the sub-sequence :math:`s[i \\slice n]` is replaced with :math:`A^n`.\n\n* :math:`\\concat(s^\\ast)` denotes the flat sequence formed by concatenating all sequences :math:`s_i` in :math:`s^\\ast`.\n\nMoreover, the following conventions are employed:\n\n* The notation :math:`x^n`, where :math:`x` is a non-terminal symbol, is treated as a meta variable ranging over respective sequences of :math:`x` (similarly for :math:`x^\\ast`, :math:`x^+`, :math:`x^?`).\n\n* When given a sequence :math:`x^n`,\n  then the occurrences of :math:`x` in a sequence written :math:`(A_1~x~A_2)^n` are assumed to be in point-wise correspondence with :math:`x^n`\n  (similarly for :math:`x^\\ast`, :math:`x^+`, :math:`x^?`).\n  This implicitly expresses a form of mapping syntactic constructions over a sequence.\n\n\nProductions of the following form are interpreted as *records* that map a fixed set of fields :math:`\\K{field}_i` to \"values\" :math:`A_i`, respectively:\n\n.. math::\n   \\X{r} ~::=~ \\{ \\K{field}_1~A_1, \\K{field}_2~A_2, \\dots \\}\n\nThe following notation is adopted for manipulating such records:\n\n* :math:`r.\\K{field}` denotes the contents of the :math:`\\K{field}` component of :math:`r`.\n\n* :math:`r \\with \\K{field} = A` denotes the same record as :math:`r`,\n  except that the contents of the :math:`\\K{field}` component is replaced with :math:`A`.\n\n* :math:`r_1 \\compose r_2` denotes the composition of two records with the same fields of sequences by appending each sequence point-wise:\n\n  .. math::\n     \\{ \\K{field}_1\\,A_1^\\ast, \\K{field}_2\\,A_2^\\ast, \\dots \\} \\compose \\{ \\K{field}_1\\,B_1^\\ast, \\K{field}_2\\,B_2^\\ast, \\dots \\} = \\{ \\K{field}_1\\,A_1^\\ast~B_1^\\ast, \\K{field}_2\\,A_2^\\ast~B_2^\\ast, \\dots \\}\n\n* :math:`\\bigcompose r^\\ast` denotes the composition of a sequence of records, respectively; if the sequence is empty, then all fields of the resulting record are empty.\n\nThe update notation for sequences and records generalizes recursively to nested components accessed by \"paths\" :math:`\\X{pth} ::= ([\\dots] \\;| \\;.\\K{field})^+`:\n\n* :math:`s \\with [i]\\,\\X{pth} = A` is short for :math:`s \\with [i] = (s[i] \\with \\X{pth} = A)`.\n\n* :math:`r \\with \\K{field}\\,\\X{pth} = A` is short for :math:`r \\with \\K{field} = (r.\\K{field} \\with \\X{pth} = A)`.\n\nwhere :math:`r \\with~.\\K{field} = A` is shortened to :math:`r \\with \\K{field} = A`.\n\n\n.. index:: ! vector\n   pair: abstract syntax; vector\n.. _syntax-vec:\n\nVectors\n~~~~~~~\n\n*Vectors* are bounded sequences of the form :math:`A^n` (or :math:`A^\\ast`),\nwhere the :math:`A` can either be values or complex constructions.\nA vector can have at most :math:`2^{32}-1` elements.\n\n.. math::\n   \\begin{array}{lllll}\n   \\production{vector} & \\vec(A) &::=&\n     A^n\n     & (\\iff n < 2^{32})\\\\\n   \\end{array}\n"
  },
  {
    "path": "document/core/syntax/index.rst",
    "content": ".. _syntax:\n\nStructure\n=========\n\n.. toctree::\n   :maxdepth: 2\n\n   conventions\n   values\n   types\n   instructions\n   modules\n"
  },
  {
    "path": "document/core/syntax/instructions.rst",
    "content": ".. index:: ! instruction, code, stack machine, operand, operand stack\n   pair: abstract syntax; instruction\n.. _syntax-instr:\n\nInstructions\n------------\n\nWebAssembly code consists of sequences of *instructions*.\nIts computational model is based on a *stack machine* in that instructions manipulate values on an implicit *operand stack*,\nconsuming (popping) argument values and producing or returning (pushing) result values.\n\nIn addition to dynamic operands from the stack, some instructions also have static *immediate* arguments,\ntypically :ref:`indices <syntax-index>` or type annotations,\nwhich are part of the instruction itself.\n\nSome instructions are :ref:`structured <syntax-instr-control>` in that they bracket nested sequences of instructions.\n\nThe following sections group instructions into a number of different categories.\n\n\n.. index:: ! numeric instruction, value, value type, integer, floating-point, two's complement\n   pair: abstract syntax; instruction\n.. _syntax-sx:\n.. _syntax-const:\n.. _syntax-iunop:\n.. _syntax-ibinop:\n.. _syntax-itestop:\n.. _syntax-irelop:\n.. _syntax-funop:\n.. _syntax-fbinop:\n.. _syntax-ftestop:\n.. _syntax-frelop:\n.. _syntax-instr-numeric:\n\nNumeric Instructions\n~~~~~~~~~~~~~~~~~~~~\n\nNumeric instructions provide basic operations over numeric :ref:`values <syntax-value>` of specific :ref:`type <syntax-valtype>`.\nThese operations closely match respective operations available in hardware.\n\n.. math::\n   \\begin{array}{llcl}\n   \\production{width} & \\X{nn}, \\X{mm} &::=&\n     \\K{32} ~|~ \\K{64} \\\\\n   \\production{signedness} & \\sx &::=&\n     \\K{u} ~|~ \\K{s} \\\\\n   \\production{instruction} & \\instr &::=&\n     \\K{i}\\X{nn}\\K{.}\\CONST~\\xref{syntax/values}{syntax-int}{\\iX{\\X{nn}}} ~|~\n     \\K{f}\\X{nn}\\K{.}\\CONST~\\xref{syntax/values}{syntax-float}{\\fX{\\X{nn}}} \\\\&&|&\n     \\K{i}\\X{nn}\\K{.}\\iunop ~|~\n     \\K{f}\\X{nn}\\K{.}\\funop \\\\&&|&\n     \\K{i}\\X{nn}\\K{.}\\ibinop ~|~\n     \\K{f}\\X{nn}\\K{.}\\fbinop \\\\&&|&\n     \\K{i}\\X{nn}\\K{.}\\itestop \\\\&&|&\n     \\K{i}\\X{nn}\\K{.}\\irelop ~|~\n     \\K{f}\\X{nn}\\K{.}\\frelop \\\\&&|&\n     \\K{i}\\X{nn}\\K{.}\\EXTEND\\K{8\\_s} ~|~\n     \\K{i}\\X{nn}\\K{.}\\EXTEND\\K{16\\_s} ~|~\n     \\K{i64.}\\EXTEND\\K{32\\_s} \\\\&&|&\n     \\K{i32.}\\WRAP\\K{\\_i64} ~|~\n     \\K{i64.}\\EXTEND\\K{\\_i32}\\K{\\_}\\sx ~|~\n     \\K{i}\\X{nn}\\K{.}\\TRUNC\\K{\\_f}\\X{mm}\\K{\\_}\\sx \\\\&&|&\n     \\K{i}\\X{nn}\\K{.}\\TRUNC\\K{\\_sat\\_f}\\X{mm}\\K{\\_}\\sx \\\\&&|&\n     \\K{f32.}\\DEMOTE\\K{\\_f64} ~|~\n     \\K{f64.}\\PROMOTE\\K{\\_f32} ~|~\n     \\K{f}\\X{nn}\\K{.}\\CONVERT\\K{\\_i}\\X{mm}\\K{\\_}\\sx \\\\&&|&\n     \\K{i}\\X{nn}\\K{.}\\REINTERPRET\\K{\\_f}\\X{nn} ~|~\n     \\K{f}\\X{nn}\\K{.}\\REINTERPRET\\K{\\_i}\\X{nn} \\\\&&|&\n     \\dots \\\\\n   \\production{integer unary operator} & \\iunop &::=&\n     \\K{clz} ~|~\n     \\K{ctz} ~|~\n     \\K{popcnt} \\\\\n   \\production{integer binary operator} & \\ibinop &::=&\n     \\K{add} ~|~\n     \\K{sub} ~|~\n     \\K{mul} ~|~\n     \\K{div\\_}\\sx ~|~\n     \\K{rem\\_}\\sx \\\\&&|&\n     \\K{and} ~|~\n     \\K{or} ~|~\n     \\K{xor} ~|~\n     \\K{shl} ~|~\n     \\K{shr\\_}\\sx ~|~\n     \\K{rotl} ~|~\n     \\K{rotr} \\\\\n   \\production{floating-point unary operator} & \\funop &::=&\n     \\K{abs} ~|~\n     \\K{neg} ~|~\n     \\K{sqrt} ~|~\n     \\K{ceil} ~|~ \n     \\K{floor} ~|~ \n     \\K{trunc} ~|~ \n     \\K{nearest} \\\\\n   \\production{floating-point binary operator} & \\fbinop &::=&\n     \\K{add} ~|~\n     \\K{sub} ~|~\n     \\K{mul} ~|~\n     \\K{div} ~|~\n     \\K{min} ~|~\n     \\K{max} ~|~\n     \\K{copysign} \\\\\n   \\production{integer test operator} & \\itestop &::=&\n     \\K{eqz} \\\\\n   \\production{integer relational operator} & \\irelop &::=&\n     \\K{eq} ~|~\n     \\K{ne} ~|~\n     \\K{lt\\_}\\sx ~|~\n     \\K{gt\\_}\\sx ~|~\n     \\K{le\\_}\\sx ~|~\n     \\K{ge\\_}\\sx \\\\\n   \\production{floating-point relational operator} & \\frelop &::=&\n     \\K{eq} ~|~\n     \\K{ne} ~|~\n     \\K{lt} ~|~\n     \\K{gt} ~|~\n     \\K{le} ~|~\n     \\K{ge} \\\\\n   \\end{array}\n\nNumeric instructions are divided by :ref:`value type <syntax-valtype>`.\nFor each type, several subcategories can be distinguished:\n\n* *Constants*: return a static constant.\n\n* *Unary Operations*: consume one operand and produce one result of the respective type.\n\n* *Binary Operations*: consume two operands and produce one result of the respective type.\n\n* *Tests*: consume one operand of the respective type and produce a Boolean integer result.\n\n* *Comparisons*: consume two operands of the respective type and produce a Boolean integer result.\n\n* *Conversions*: consume a value of one type and produce a result of another\n  (the source type of the conversion is the one after the \":math:`\\K{\\_}`\").\n\nSome integer instructions come in two flavors,\nwhere a signedness annotation |sx| distinguishes whether the operands are to be :ref:`interpreted <aux-signed>` as :ref:`unsigned <syntax-uint>` or :ref:`signed <syntax-sint>` integers.\nFor the other integer instructions, the use of two's complement for the signed interpretation means that they behave the same regardless of signedness.\n\n\n.. _syntax-unop:\n.. _syntax-binop:\n.. _syntax-testop:\n.. _syntax-relop:\n.. _syntax-cvtop:\n\nConventions\n...........\n\nOccasionally, it is convenient to group operators together according to the following grammar shorthands:\n\n.. math::\n   \\begin{array}{llll}\n   \\production{unary operator} & \\unop &::=&\n     \\iunop ~|~\n     \\funop ~|~\n     \\EXTEND{N}\\K{\\_s} \\\\\n   \\production{binary operator} & \\binop &::=& \\ibinop ~|~ \\fbinop \\\\\n   \\production{test operator} & \\testop &::=& \\itestop \\\\\n   \\production{relational operator} & \\relop &::=& \\irelop ~|~ \\frelop \\\\\n   \\production{conversion operator} & \\cvtop &::=&\n     \\WRAP ~|~\n     \\EXTEND ~|~\n     \\TRUNC ~|~\n     \\TRUNC\\K{\\_sat} ~|~\n     \\CONVERT ~|~\n     \\DEMOTE ~|~\n     \\PROMOTE ~|~\n     \\REINTERPRET \\\\\n   \\end{array}\n\n\n.. index:: ! reference instruction, reference, null\n   pair: abstract syntax; instruction\n.. _syntax-ref.null:\n.. _syntax-ref.is_null:\n.. _syntax-ref.func:\n.. _syntax-instr-ref:\n\nReference Instructions\n~~~~~~~~~~~~~~~~~~~~~~\n\nInstructions in this group are concerned with accessing :ref:`references <syntax-reftype>`.\n\n.. math::\n   \\begin{array}{llcl}\n   \\production{instruction} & \\instr &::=&\n     \\dots \\\\&&|&\n     \\REFNULL~\\reftype \\\\&&|&\n     \\REFISNULL \\\\&&|&\n     \\REFFUNC~\\funcidx \\\\\n   \\end{array}\n\nThese instruction produce a null value, check for a null value, or produce a reference to a given function, respectively.\n\n\n.. index:: ! parametric instruction, value type\n   pair: abstract syntax; instruction\n.. _syntax-instr-parametric:\n\nParametric Instructions\n~~~~~~~~~~~~~~~~~~~~~~~\n\nInstructions in this group can operate on operands of any :ref:`value type <syntax-valtype>`.\n\n.. math::\n   \\begin{array}{llcl}\n   \\production{instruction} & \\instr &::=&\n     \\dots \\\\&&|&\n     \\DROP \\\\&&|&\n     \\SELECT~(\\valtype^\\ast)^? \\\\\n   \\end{array}\n\nThe |DROP| instruction simply throws away a single operand.\n\nThe |SELECT| instruction selects one of its first two operands based on whether its third operand is zero or not.\nIt may include a :ref:`value type <syntax-valtype>` determining the type of these operands. If missing, the operands must be of :ref:`numeric type <syntax-numtype>`.\n\n.. note::\n   In future versions of WebAssembly, the type annotation on |SELECT| may allow for more than a single value being selected at the same time.\n\n\n.. index:: ! variable instruction, local, global, local index, global index\n   pair: abstract syntax; instruction\n.. _syntax-instr-variable:\n\nVariable Instructions\n~~~~~~~~~~~~~~~~~~~~~\n\nVariable instructions are concerned with access to :ref:`local <syntax-local>` or :ref:`global <syntax-global>` variables.\n\n.. math::\n   \\begin{array}{llcl}\n   \\production{instruction} & \\instr &::=&\n     \\dots \\\\&&|&\n     \\LOCALGET~\\localidx \\\\&&|&\n     \\LOCALSET~\\localidx \\\\&&|&\n     \\LOCALTEE~\\localidx \\\\&&|&\n     \\GLOBALGET~\\globalidx \\\\&&|&\n     \\GLOBALSET~\\globalidx \\\\\n   \\end{array}\n\nThese instructions get or set the values of variables, respectively.\nThe |LOCALTEE| instruction is like |LOCALSET| but also returns its argument.\n\n\n.. index:: ! table instruction, table, table index, trap\n   pair: abstract syntax; instruction\n.. _syntax-instr-table:\n.. _syntax-table.get:\n.. _syntax-table.set:\n.. _syntax-table.size:\n.. _syntax-table.grow:\n.. _syntax-table.fill:\n\nTable Instructions\n~~~~~~~~~~~~~~~~~~\n\nInstructions in this group are concerned with tables :ref:`table <syntax-table>`.\n\n.. math::\n   \\begin{array}{llcl}\n   \\production{instruction} & \\instr &::=&\n     \\dots \\\\&&|&\n     \\TABLEGET~\\tableidx \\\\&&|&\n     \\TABLESET~\\tableidx \\\\&&|&\n     \\TABLESIZE~\\tableidx \\\\&&|&\n     \\TABLEGROW~\\tableidx \\\\&&|&\n     \\TABLEFILL~\\tableidx \\\\&&|&\n     \\TABLECOPY~\\tableidx~\\tableidx \\\\&&|&\n     \\TABLEINIT~\\tableidx~\\elemidx \\\\&&|&\n     \\ELEMDROP~\\elemidx \\\\\n   \\end{array}\n\nThe |TABLEGET| and |TABLESET| instructions load or store an element in a table, respectively.\n\nThe |TABLESIZE| instruction returns the current size of a table.\nThe |TABLEGROW| instruction grows table by a given delta and returns the previous size, or :math:`-1` if enough space cannot be allocated.\nIt also takes an initialization value for the newly allocated entries.\n\nThe |TABLEFILL| instruction sets all entries in a range to a given value.\n\nThe |TABLECOPY| instruction copies elements from a source table region to a possibly overlapping destination region; the first index denotes the destination.\nThe |TABLEINIT| instruction copies elements from a :ref:`passive element segment <syntax-elem>` into a table.\nThe |ELEMDROP| instruction prevents further use of a passive element segment. This instruction is intended to be used as an optimization hint. After an element segment is dropped its elements can no longer be retrieved, so the memory used by this segment may be freed.\n\nAn additional instruction that accesses a table is the :ref:`control instruction <syntax-instr-control>` |CALLINDIRECT|.\n\n\n.. index:: ! memory instruction, memory, memory index, page size, little endian, trap\n   pair: abstract syntax; instruction\n.. _syntax-loadn:\n.. _syntax-storen:\n.. _syntax-memarg:\n.. _syntax-instr-memory:\n\nMemory Instructions\n~~~~~~~~~~~~~~~~~~~\n\nInstructions in this group are concerned with linear :ref:`memory <syntax-mem>`.\n\n.. math::\n   \\begin{array}{llcl}\n   \\production{memory immediate} & \\memarg &::=&\n     \\{ \\OFFSET~\\u32, \\ALIGN~\\u32 \\} \\\\\n   \\production{instruction} & \\instr &::=&\n     \\dots \\\\&&|&\n     \\K{i}\\X{nn}\\K{.}\\LOAD~\\memarg ~|~\n     \\K{f}\\X{nn}\\K{.}\\LOAD~\\memarg \\\\&&|&\n     \\K{i}\\X{nn}\\K{.}\\STORE~\\memarg ~|~\n     \\K{f}\\X{nn}\\K{.}\\STORE~\\memarg \\\\&&|&\n     \\K{i}\\X{nn}\\K{.}\\LOAD\\K{8\\_}\\sx~\\memarg ~|~\n     \\K{i}\\X{nn}\\K{.}\\LOAD\\K{16\\_}\\sx~\\memarg ~|~\n     \\K{i64.}\\LOAD\\K{32\\_}\\sx~\\memarg \\\\&&|&\n     \\K{i}\\X{nn}\\K{.}\\STORE\\K{8}~\\memarg ~|~\n     \\K{i}\\X{nn}\\K{.}\\STORE\\K{16}~\\memarg ~|~\n     \\K{i64.}\\STORE\\K{32}~\\memarg \\\\&&|&\n     \\MEMORYSIZE \\\\&&|&\n     \\MEMORYGROW \\\\&&|&\n     \\MEMORYFILL \\\\&&|&\n     \\MEMORYCOPY \\\\&&|&\n     \\MEMORYINIT~\\dataidx \\\\&&|&\n     \\DATADROP~\\dataidx \\\\\n   \\end{array}\n\nMemory is accessed with |LOAD| and |STORE| instructions for the different :ref:`value types <syntax-valtype>`.\nThey all take a *memory immediate* |memarg| that contains an address *offset* and the expected *alignment* (expressed as the exponent of a power of 2).\nInteger loads and stores can optionally specify a *storage size* that is smaller than the :ref:`bit width <syntax-valtype>` of the respective value type.\nIn the case of loads, a sign extension mode |sx| is then required to select appropriate behavior.\n\nThe static address offset is added to the dynamic address operand, yielding a 33 bit *effective address* that is the zero-based index at which the memory is accessed.\nAll values are read and written in |LittleEndian|_ byte order.\nA :ref:`trap <trap>` results if any of the accessed memory bytes lies outside the address range implied by the memory's current size.\n\n.. note::\n   Future version of WebAssembly might provide memory instructions with 64 bit address ranges.\n\nThe |MEMORYSIZE| instruction returns the current size of a memory.\nThe |MEMORYGROW| instruction grows memory by a given delta and returns the previous size, or :math:`-1` if enough memory cannot be allocated.\nBoth instructions operate in units of :ref:`page size <page-size>`.\n\nThe |MEMORYFILL| instruction sets all values in a region to a given byte.\nThe |MEMORYCOPY| instruction copies data from a source memory region to a possibly overlapping destination region.\nThe |MEMORYINIT| instruction copies data from a :ref:`passive data segment <syntax-data>` into a memory.\nThe |DATADROP| instruction prevents further use of a passive data segment. This instruction is intended to be used as an optimization hint. After a data segment is dropped its data can no longer be retrieved, so the memory used by this segment may be freed.\n\n.. note::\n   In the current version of WebAssembly,\n   all memory instructions implicitly operate on :ref:`memory <syntax-mem>` :ref:`index <syntax-memidx>` :math:`0`.\n   This restriction may be lifted in future versions.\n\n\n.. index:: ! control instruction, ! structured control, ! label, ! block, ! block type, ! branch, ! unwinding, result type, label index, function index, type index, vector, trap, function, table, function type, value type, type index\n   pair: abstract syntax; instruction\n   pair: abstract syntax; block type\n   pair: block; type\n.. _syntax-blocktype:\n.. _syntax-nop:\n.. _syntax-unreachable:\n.. _syntax-block:\n.. _syntax-loop:\n.. _syntax-if:\n.. _syntax-br:\n.. _syntax-br_if:\n.. _syntax-br_table:\n.. _syntax-return:\n.. _syntax-call:\n.. _syntax-call_indirect:\n.. _syntax-instr-seq:\n.. _syntax-instr-control:\n\nControl Instructions\n~~~~~~~~~~~~~~~~~~~~\n\nInstructions in this group affect the flow of control.\n\n.. math::\n   \\begin{array}{llcl}\n   \\production{block type} & \\blocktype &::=&\n     \\typeidx ~|~ \\valtype^? \\\\\n   \\production{instruction} & \\instr &::=&\n     \\dots \\\\&&|&\n     \\NOP \\\\&&|&\n     \\UNREACHABLE \\\\&&|&\n     \\BLOCK~\\blocktype~\\instr^\\ast~\\END \\\\&&|&\n     \\LOOP~\\blocktype~\\instr^\\ast~\\END \\\\&&|&\n     \\IF~\\blocktype~\\instr^\\ast~\\ELSE~\\instr^\\ast~\\END \\\\&&|&\n     \\BR~\\labelidx \\\\&&|&\n     \\BRIF~\\labelidx \\\\&&|&\n     \\BRTABLE~\\vec(\\labelidx)~\\labelidx \\\\&&|&\n     \\RETURN \\\\&&|&\n     \\CALL~\\funcidx \\\\&&|&\n     \\CALLINDIRECT~\\tableidx~\\typeidx \\\\\n   \\end{array}\n\nThe |NOP| instruction does nothing.\n\nThe |UNREACHABLE| instruction causes an unconditional :ref:`trap <trap>`.\n\nThe |BLOCK|, |LOOP| and |IF| instructions are *structured* instructions.\nThey bracket nested sequences of instructions, called *blocks*, terminated with, or separated by, |END| or |ELSE| pseudo-instructions.\nAs the grammar prescribes, they must be well-nested.\n\nA structured instruction can consume *input* and produce *output* on the operand stack according to its annotated *block type*.\nIt is given either as a :ref:`type index <syntax-funcidx>` that refers to a suitable :ref:`function type <syntax-functype>`, or as an optional :ref:`value type <syntax-valtype>` inline, which is a shorthand for the function type :math:`[] \\to [\\valtype^?]`.\n\nEach structured control instruction introduces an implicit *label*.\nLabels are targets for branch instructions that reference them with :ref:`label indices <syntax-labelidx>`.\nUnlike with other :ref:`index spaces <syntax-index>`, indexing of labels is relative by nesting depth,\nthat is, label :math:`0` refers to the innermost structured control instruction enclosing the referring branch instruction,\nwhile increasing indices refer to those farther out.\nConsequently, labels can only be referenced from *within* the associated structured control instruction.\nThis also implies that branches can only be directed outwards,\n\"breaking\" from the block of the control construct they target.\nThe exact effect depends on that control construct.\nIn case of |BLOCK| or |IF| it is a *forward jump*,\nresuming execution after the matching |END|.\nIn case of |LOOP| it is a *backward jump* to the beginning of the loop.\n\n.. note::\n   This enforces *structured control flow*.\n   Intuitively, a branch targeting a |BLOCK| or |IF| behaves like a :math:`\\K{break}` statement in most C-like languages,\n   while a branch targeting a |LOOP| behaves like a :math:`\\K{continue}` statement.\n\nBranch instructions come in several flavors:\n|BR| performs an unconditional branch,\n|BRIF| performs a conditional branch,\nand |BRTABLE| performs an indirect branch through an operand indexing into the label vector that is an immediate to the instruction, or to a default target if the operand is out of bounds.\nThe |RETURN| instruction is a shortcut for an unconditional branch to the outermost block, which implicitly is the body of the current function.\nTaking a branch *unwinds* the operand stack up to the height where the targeted structured control instruction was entered.\nHowever, branches may additionally consume operands themselves, which they push back on the operand stack after unwinding.\nForward branches require operands according to the output of the targeted block's type, i.e., represent the values produced by the terminated block.\nBackward branches require operands according to the input of the targeted block's type, i.e., represent the values consumed by the restarted block.\n\nThe |CALL| instruction invokes another :ref:`function <syntax-func>`, consuming the necessary arguments from the stack and returning the result values of the call.\nThe |CALLINDIRECT| instruction calls a function indirectly through an operand indexing into a :ref:`table <syntax-table>` that is denoted by a :ref:`table index <syntax-tableidx>` and must have type |FUNCREF|.\nSince it may contain functions of heterogeneous type,\nthe callee is dynamically checked against the :ref:`function type <syntax-functype>` indexed by the instruction's second immediate, and the call is aborted with a :ref:`trap <trap>` if it does not match.\n\n\n.. index:: ! expression, constant, global, offset, element, data, instruction\n   pair: abstract syntax; expression\n   single: expression; constant\n.. _syntax-expr:\n\nExpressions\n~~~~~~~~~~~\n\n:ref:`Function <syntax-func>` bodies, initialization values for :ref:`globals <syntax-global>`, and offsets of :ref:`element <syntax-elem>` or :ref:`data <syntax-data>` segments are given as expressions, which are sequences of :ref:`instructions <syntax-instr>` terminated by an |END| marker.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{expression} & \\expr &::=&\n     \\instr^\\ast~\\END \\\\\n   \\end{array}\n\nIn some places, validation :ref:`restricts <valid-constant>` expressions to be *constant*, which limits the set of allowable instructions.\n"
  },
  {
    "path": "document/core/syntax/modules.rst",
    "content": ".. index:: ! module, type definition, function type, function, table, memory, global, element, data, start function, import, export\n   pair: abstract syntax; module\n.. _syntax-module:\n\nModules\n-------\n\nWebAssembly programs are organized into *modules*,\nwhich are the unit of deployment, loading, and compilation.\nA module collects definitions for :ref:`types <syntax-type>`, :ref:`functions <syntax-func>`, :ref:`tables <syntax-table>`, :ref:`memories <syntax-mem>`, and :ref:`globals <syntax-global>`.\nIn addition, it can declare :ref:`imports <syntax-import>` and :ref:`exports <syntax-export>`\nand provide initialization in the form of :ref:`data <syntax-data>` and :ref:`element <syntax-elem>` segments, or a :ref:`start function <syntax-start>`.\n\n.. math::\n   \\begin{array}{lllll}\n   \\production{module} & \\module &::=& \\{ &\n     \\MTYPES~\\vec(\\functype), \\\\&&&&\n     \\MFUNCS~\\vec(\\func), \\\\&&&&\n     \\MTABLES~\\vec(\\table), \\\\&&&&\n     \\MMEMS~\\vec(\\mem), \\\\&&&&\n     \\MGLOBALS~\\vec(\\global), \\\\&&&&\n     \\MELEMS~\\vec(\\elem), \\\\&&&&\n     \\MDATAS~\\vec(\\data), \\\\&&&&\n     \\MSTART~\\start^?, \\\\&&&&\n     \\MIMPORTS~\\vec(\\import), \\\\&&&&\n     \\MEXPORTS~\\vec(\\export) \\quad\\} \\\\\n   \\end{array}\n\nEach of the vectors -- and thus the entire module -- may be empty.\n\n\n.. index:: ! index, ! index space, ! type index, ! function index, ! table index, ! memory index, ! global index, ! local index, ! label index, ! element index, ! data index, function, global, table, memory, element, data, local, parameter, import\n   pair: abstract syntax; type index\n   pair: abstract syntax; function index\n   pair: abstract syntax; table index\n   pair: abstract syntax; memory index\n   pair: abstract syntax; global index\n   pair: abstract syntax; element index\n   pair: abstract syntax; data index\n   pair: abstract syntax; local index\n   pair: abstract syntax; label index\n   pair: type; index\n   pair: function; index\n   pair: table; index\n   pair: memory; index\n   pair: global; index\n   pair: element; index\n   pair: data; index\n   pair: local; index\n   pair: label; index\n.. _syntax-typeidx:\n.. _syntax-funcidx:\n.. _syntax-tableidx:\n.. _syntax-memidx:\n.. _syntax-globalidx:\n.. _syntax-elemidx:\n.. _syntax-dataidx:\n.. _syntax-localidx:\n.. _syntax-labelidx:\n.. _syntax-index:\n\nIndices\n~~~~~~~\n\nDefinitions are referenced with zero-based *indices*.\nEach class of definition has its own *index space*, as distinguished by the following classes.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{type index} & \\typeidx &::=& \\u32 \\\\\n   \\production{function index} & \\funcidx &::=& \\u32 \\\\\n   \\production{table index} & \\tableidx &::=& \\u32 \\\\\n   \\production{memory index} & \\memidx &::=& \\u32 \\\\\n   \\production{global index} & \\globalidx &::=& \\u32 \\\\\n   \\production{element index} & \\elemidx &::=& \\u32 \\\\\n   \\production{data index} & \\dataidx &::=& \\u32 \\\\\n   \\production{local index} & \\localidx &::=& \\u32 \\\\\n   \\production{label index} & \\labelidx &::=& \\u32 \\\\\n   \\end{array}\n\nThe index space for :ref:`functions <syntax-func>`, :ref:`tables <syntax-table>`, :ref:`memories <syntax-mem>` and :ref:`globals <syntax-global>` includes respective :ref:`imports <syntax-import>` declared in the same module.\nThe indices of these imports precede the indices of other definitions in the same index space.\n\nElement indices reference :ref:`element segments <syntax-elem>` and data indices reference :ref:`data segments <syntax-data>`.\n\nThe index space for :ref:`locals <syntax-local>` is only accessible inside a :ref:`function <syntax-func>` and includes the parameters of that function, which precede the local variables.\n\nLabel indices reference :ref:`structured control instructions <syntax-instr-control>` inside an instruction sequence.\n\n\n.. _free-typeidx:\n.. _free-funcidx:\n.. _free-tableidx:\n.. _free-memidx:\n.. _free-globalidx:\n.. _free-elemidx:\n.. _free-dataidx:\n.. _free-localidx:\n.. _free-labelidx:\n.. _free-index:\n\nConventions\n...........\n\n* The meta variable :math:`l` ranges over label indices.\n\n* The meta variables :math:`x, y` range over indices in any of the other index spaces.\n\n* The notation :math:`\\F{idx}(A)` denotes the set of indices from index space :math:`\\X{idx}` occurring free in :math:`A`. We sometimes reinterpret this set as the :ref:`vector <syntax-vec>` of its elements.\n\n.. note::\n   For example, if :math:`\\instr^\\ast` is :math:`(\\DATADROP~x) (\\MEMORYINIT~y)`, then :math:`\\freedataidx(\\instr^\\ast) = \\{x, y\\}`, or equivalently, the vector :math:`x~y`.\n\n\n.. index:: ! type definition, type index, function type\n   pair: abstract syntax; type definition\n.. _syntax-typedef:\n\nTypes\n~~~~~\n\nThe |MTYPES| component of a module defines a vector of :ref:`function types <syntax-functype>`.\n\nAll function types used in a module must be defined in this component.\nThey are referenced by :ref:`type indices <syntax-typeidx>`.\n\n.. note::\n   Future versions of WebAssembly may add additional forms of type definitions.\n\n\n.. index:: ! function, ! local, function index, local index, type index, value type, expression, import\n   pair: abstract syntax; function\n   pair: abstract syntax; local\n.. _syntax-local:\n.. _syntax-func:\n\nFunctions\n~~~~~~~~~\n\nThe |MFUNCS| component of a module defines a vector of *functions* with the following structure:\n\n.. math::\n   \\begin{array}{llll}\n   \\production{function} & \\func &::=&\n     \\{ \\FTYPE~\\typeidx, \\FLOCALS~\\vec(\\valtype), \\FBODY~\\expr \\} \\\\\n   \\end{array}\n\nThe |FTYPE| of a function declares its signature by reference to a :ref:`type <syntax-type>` defined in the module.\nThe parameters of the function are referenced through 0-based :ref:`local indices <syntax-localidx>` in the function's body; they are mutable.\n\nThe |FLOCALS| declare a vector of mutable local variables and their types.\nThese variables are referenced through :ref:`local indices <syntax-localidx>` in the function's body.\nThe index of the first local is the smallest index not referencing a parameter.\n\nThe |FBODY| is an :ref:`instruction <syntax-expr>` sequence that upon termination must produce a stack matching the function type's :ref:`result type <syntax-resulttype>`.\n\nFunctions are referenced through :ref:`function indices <syntax-funcidx>`,\nstarting with the smallest index not referencing a function :ref:`import <syntax-import>`.\n\n\n.. index:: ! table, table index, table type, limits, element, import\n   pair: abstract syntax; table\n.. _syntax-table:\n\nTables\n~~~~~~\n\nThe |MTABLES| component of a module defines a vector of *tables* described by their :ref:`table type <syntax-tabletype>`:\n\n.. math::\n   \\begin{array}{llll}\n   \\production{table} & \\table &::=&\n     \\{ \\TTYPE~\\tabletype \\} \\\\\n   \\end{array}\n\nA table is a vector of opaque values of a particular :ref:`reference type <syntax-reftype>`.\nThe |LMIN| size in the :ref:`limits <syntax-limits>` of the table type specifies the initial size of that table, while its |LMAX|, if present, restricts the size to which it can grow later.\n\nTables can be initialized through :ref:`element segments <syntax-elem>`.\n\nTables are referenced through :ref:`table indices <syntax-tableidx>`,\nstarting with the smallest index not referencing a table :ref:`import <syntax-import>`.\nMost constructs implicitly reference table index :math:`0`.\n\n.. note::\n   In the current version of WebAssembly, at most one table may be defined or imported in a single module,\n   and *all* constructs implicitly reference this table :math:`0`.\n   This restriction may be lifted in future versions.\n\n\n.. index:: ! memory, memory index, memory type, limits, page size, data, import\n   pair: abstract syntax; memory\n.. _syntax-mem:\n\nMemories\n~~~~~~~~\n\nThe |MMEMS| component of a module defines a vector of *linear memories* (or *memories* for short) as described by their :ref:`memory type <syntax-memtype>`:\n\n.. math::\n   \\begin{array}{llll}\n   \\production{memory} & \\mem &::=&\n     \\{ \\MTYPE~\\memtype \\} \\\\\n   \\end{array}\n\nA memory is a vector of raw uninterpreted bytes.\nThe |LMIN| size in the :ref:`limits <syntax-limits>` of the memory type specifies the initial size of that memory, while its |LMAX|, if present, restricts the size to which it can grow later.\nBoth are in units of :ref:`page size <page-size>`.\n\nMemories can be initialized through :ref:`data segments <syntax-data>`.\n\nMemories are referenced through :ref:`memory indices <syntax-memidx>`,\nstarting with the smallest index not referencing a memory :ref:`import <syntax-import>`.\nMost constructs implicitly reference memory index :math:`0`.\n\n.. note::\n   In the current version of WebAssembly, at most one memory may be defined or imported in a single module,\n   and *all* constructs implicitly reference this memory :math:`0`.\n   This restriction may be lifted in future versions.\n\n\n.. index:: ! global, global index, global type, mutability, expression, constant, value, import\n   pair: abstract syntax; global\n.. _syntax-global:\n\nGlobals\n~~~~~~~\n\nThe |MGLOBALS| component of a module defines a vector of *global variables* (or *globals* for short):\n\n.. math::\n   \\begin{array}{llll}\n   \\production{global} & \\global &::=&\n     \\{ \\GTYPE~\\globaltype, \\GINIT~\\expr \\} \\\\\n   \\end{array}\n\nEach global stores a single value of the given :ref:`global type <syntax-globaltype>`.\nIts |GTYPE| also specifies whether a global is immutable or mutable.\nMoreover, each global is initialized with an |GINIT| value given by a :ref:`constant <valid-constant>` initializer :ref:`expression <syntax-expr>`.\n\nGlobals are referenced through :ref:`global indices <syntax-globalidx>`,\nstarting with the smallest index not referencing a global :ref:`import <syntax-import>`.\n\n\n.. index:: ! element, ! element mode, ! active, ! passive, ! declarative, element index, table, table index, expression, constant, function index, vector\n   pair: abstract syntax; element\n   pair: abstract syntax; element mode\n   single: table; element\n   single: element; segment\n   single: element; mode\n.. _syntax-elem:\n.. _syntax-elemmode:\n\nElement Segments\n~~~~~~~~~~~~~~~~\n\nThe initial contents of a table is uninitialized. *Element segments* can be used to initialize a subrange of a table from a static :ref:`vector <syntax-vec>` of elements.\n\nThe |MELEMS| component of a module defines a vector of element segments.\nEach element segment defines an :ref:`reference type <syntax-reftype>` and a corresponding list of :ref:`constant <valid-constant>` element :ref:`expressions <syntax-expr>`.\n\nElement segments have a mode that identifies them as either *passive*, *active*, or *declarative*.\nA passive element segment's elements can be copied to a table using the |TABLEINIT| instruction.\nAn active element segment copies its elements into a table during :ref:`instantiation <exec-instantiation>`, as specified by a :ref:`table index <syntax-tableidx>` and a :ref:`constant <valid-constant>` :ref:`expression <syntax-expr>` defining an offset into that table.\nA declarative element segment is not available at runtime but merely serves to forward-declare references that are formed in code with instructions like :math:`REFFUNC`.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{element segment} & \\elem &::=&\n     \\{ \\ETYPE~\\reftype, \\EINIT~\\vec(\\expr), \\EMODE~\\elemmode \\} \\\\\n   \\production{element segment mode} & \\elemmode &::=&\n     \\EPASSIVE \\\\&&|&\n     \\EACTIVE~\\{ \\ETABLE~\\tableidx, \\EOFFSET~\\expr \\} \\\\&&|&\n     \\EDECLARATIVE \\\\\n   \\end{array}\n\nThe |EOFFSET| is given by a :ref:`constant <valid-constant>` :ref:`expression <syntax-expr>`.\n\nElement segments are referenced through :ref:`element indices <syntax-elemidx>`.\n\n.. note::\n   In the current version of WebAssembly, only tables of element type |FUNCREF| can be initialized with an element segment.\n   This limitation may be lifted in the future.\n\n\n.. index:: ! data, active, passive, data index, memory, memory index, expression, constant, byte, vector\n   pair: abstract syntax; data\n   single: memory; data\n   single: data; segment\n.. _syntax-data:\n.. _syntax-datamode:\n\nData Segments\n~~~~~~~~~~~~~\n\nThe initial contents of a :ref:`memory <syntax-mem>` are zero bytes. *Data segments* can be used to initialize a range of memory from a static :ref:`vector <syntax-vec>` of :ref:`bytes <syntax-byte>`.\n\nThe |MDATAS| component of a module defines a vector of data segments.\n\nLike element segments, data segments have a mode that identifies them as either *passive* or *active*.\nA passive data segment's contents can be copied into a memory using the |MEMORYINIT| instruction.\nAn active data segment copies its contents into a memory during :ref:`instantiation <exec-instantiation>`, as specified by a :ref:`memory index <syntax-memidx>` and a :ref:`constant <valid-constant>` :ref:`expression <syntax-expr>` defining an offset into that memory.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{data segment} & \\data &::=&\n     \\{ \\DINIT~\\vec(\\byte), \\DMODE~\\datamode \\} \\\\\n   \\production{data segment mode} & \\datamode &::=&\n     \\DPASSIVE \\\\&&|&\n     \\DACTIVE~\\{ \\DMEM~\\memidx, \\DOFFSET~\\expr \\} \\\\\n   \\end{array}\n\nData segments are referenced through :ref:`data indices <syntax-dataidx>`.\n\n.. note::\n   In the current version of WebAssembly, at most one memory is allowed in a module.\n   Consequently, the only valid |memidx| is :math:`0`.\n\n\n.. index:: ! start function, function, function index, table, memory, instantiation\n   pair: abstract syntax; start function\n.. _syntax-start:\n\nStart Function\n~~~~~~~~~~~~~~\n\nThe |MSTART| component of a module declares the :ref:`function index <syntax-funcidx>` of a *start function* that is automatically invoked when the module is :ref:`instantiated <exec-instantiation>`, after :ref:`tables <syntax-table>` and :ref:`memories <syntax-mem>` have been initialized.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{start function} & \\start &::=&\n     \\{ \\SFUNC~\\funcidx \\} \\\\\n   \\end{array}\n\n.. note::\n   The start function is intended for initializing the state of a module.\n   The module and its exports are not accessible before this initialization has completed.\n\n\n.. index:: ! export, name, index, function index, table index, memory index, global index, function, table, memory, global, instantiation\n   pair: abstract syntax; export\n   single: function; export\n   single: table; export\n   single: memory; export\n   single: global; export\n.. _syntax-exportdesc:\n.. _syntax-export:\n\nExports\n~~~~~~~\n\nThe |MEXPORTS| component of a module defines a set of *exports* that become accessible to the host environment once the module has been :ref:`instantiated <exec-instantiation>`.\n\n.. math::\n   \\begin{array}{llcl}\n   \\production{export} & \\export &::=&\n     \\{ \\ENAME~\\name, \\EDESC~\\exportdesc \\} \\\\\n   \\production{export description} & \\exportdesc &::=&\n     \\EDFUNC~\\funcidx \\\\&&|&\n     \\EDTABLE~\\tableidx \\\\&&|&\n     \\EDMEM~\\memidx \\\\&&|&\n     \\EDGLOBAL~\\globalidx \\\\\n   \\end{array}\n\nEach export is labeled by a unique :ref:`name <syntax-name>`.\nExportable definitions are :ref:`functions <syntax-func>`, :ref:`tables <syntax-table>`, :ref:`memories <syntax-mem>`, and :ref:`globals <syntax-global>`,\nwhich are referenced through a respective descriptor.\n\n\nConventions\n...........\n\nThe following auxiliary notation is defined for sequences of exports, filtering out indices of a specific kind in an order-preserving fashion:\n\n* :math:`\\edfuncs(\\export^\\ast) = [\\funcidx ~|~ \\EDFUNC~\\funcidx \\in (\\export.\\EDESC)^\\ast]`\n\n* :math:`\\edtables(\\export^\\ast) = [\\tableidx ~|~ \\EDTABLE~\\tableidx \\in (\\export.\\EDESC)^\\ast]`\n\n* :math:`\\edmems(\\export^\\ast) = [\\memidx ~|~ \\EDMEM~\\memidx \\in (\\export.\\EDESC)^\\ast]`\n\n* :math:`\\edglobals(\\export^\\ast) = [\\globalidx ~|~ \\EDGLOBAL~\\globalidx \\in (\\export.\\EDESC)^\\ast]`\n\n\n.. index:: ! import, name, function type, table type, memory type, global type, index, index space, type index, function index, table index, memory index, global index, function, table, memory, global, instantiation\n   pair: abstract syntax; import\n   single: function; import\n   single: table; import\n   single: memory; import\n   single: global; import\n.. _syntax-importdesc:\n.. _syntax-import:\n\nImports\n~~~~~~~\n\nThe |MIMPORTS| component of a module defines a set of *imports* that are required for :ref:`instantiation <exec-instantiation>`.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{import} & \\import &::=&\n     \\{ \\IMODULE~\\name, \\INAME~\\name, \\IDESC~\\importdesc \\} \\\\\n   \\production{import description} & \\importdesc &::=&\n     \\IDFUNC~\\typeidx \\\\&&|&\n     \\IDTABLE~\\tabletype \\\\&&|&\n     \\IDMEM~\\memtype \\\\&&|&\n     \\IDGLOBAL~\\globaltype \\\\\n   \\end{array}\n\nEach import is labeled by a two-level :ref:`name <syntax-name>` space, consisting of a |IMODULE| name and a |INAME| for an entity within that module.\nImportable definitions are :ref:`functions <syntax-func>`, :ref:`tables <syntax-table>`, :ref:`memories <syntax-mem>`, and :ref:`globals <syntax-global>`.\nEach import is specified by a descriptor with a respective type that a definition provided during instantiation is required to match.\n\nEvery import defines an index in the respective :ref:`index space <syntax-index>`.\nIn each index space, the indices of imports go before the first index of any definition contained in the module itself.\n\n.. note::\n   Unlike export names, import names are not necessarily unique.\n   It is possible to import the same |IMODULE|/|INAME| pair multiple times;\n   such imports may even have different type descriptions, including different kinds of entities.\n   A module with such imports can still be instantiated depending on the specifics of how an :ref:`embedder <embedder>` allows resolving and supplying imports.\n   However, embedders are not required to support such overloading,\n   and a WebAssembly module itself cannot implement an overloaded name.\n"
  },
  {
    "path": "document/core/syntax/types.rst",
    "content": ".. index:: ! type, validation, instantiation, execution\n   pair: abstract syntax; type\n.. _syntax-type:\n\nTypes\n-----\n\nVarious entities in WebAssembly are classified by types.\nTypes are checked during :ref:`validation <valid>`, :ref:`instantiation <exec-instantiation>`, and possibly :ref:`execution <syntax-call_indirect>`.\n\n\n.. index:: ! number type, integer, floating-point, IEEE 754, bit width, memory\n   pair: abstract syntax; number type\n   pair: number; type\n.. _syntax-numtype:\n\nNumber Types\n~~~~~~~~~~~~\n\n*Number types* classify numeric values.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{number type} & \\numtype &::=&\n     \\I32 ~|~ \\I64 ~|~ \\F32 ~|~ \\F64 \\\\\n   \\end{array}\n\nThe types |I32| and |I64| classify 32 and 64 bit integers, respectively.\nIntegers are not inherently signed or unsigned, their interpretation is determined by individual operations.\n\nThe types |F32| and |F64| classify 32 and 64 bit floating-point data, respectively.\nThey correspond to the respective binary floating-point representations, also known as *single* and *double* precision, as defined by the |IEEE754|_ standard (Section 3.3).\n\nNumber types are *transparent*, meaning that their bit patterns can be observed.\nValues of number type can be stored in :ref:`memories <syntax-mem>`.\n\nConventions\n...........\n\n* The notation :math:`|t|` denotes the *bit width* of a number type :math:`t`.\n  That is, :math:`|\\I32| = |\\F32| = 32` and :math:`|\\I64| = |\\F64| = 64`.\n\n\n.. index:: ! reference type, reference, table, function, function type, null\n   pair: abstract syntax; reference type\n   pair: reference; type\n.. _syntax-reftype:\n\nReference Types\n~~~~~~~~~~~~~~~\n\n*Reference types* classify first-class references to objects in the runtime :ref:`store <store>`.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{reference type} & \\reftype &::=&\n     \\FUNCREF ~|~ \\EXTERNREF \\\\\n   \\end{array}\n\nThe type |FUNCREF| denotes the infinite union of all references to :ref:`functions <syntax-func>`, regardless of their :ref:`function types <syntax-functype>`.\n\nThe type |EXTERNREF| denotes the infinite union of all references to objects owned by the :ref:`embedder <embedder>` and that can be passed into WebAssembly under this type.\n\nReference types are *opaque*, meaning that neither their size nor their bit pattern can be observed.\nValues of reference type can be stored in :ref:`tables <syntax-table>`.\n\n\n.. index:: ! value type, number type, reference type\n   pair: abstract syntax; value type\n   pair: value; type\n.. _syntax-valtype:\n\nValue Types\n~~~~~~~~~~~\n\n*Value types* classify the individual values that WebAssembly code can compute with and the values that a variable accepts.\nThey are either :ref:`number types <syntax-numtype>` or :ref:`reference types <syntax-reftype>`.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{value type} & \\valtype &::=&\n     \\numtype ~|~ \\reftype \\\\\n   \\end{array}\n\nConventions\n...........\n\n* The meta variable :math:`t` ranges over value types or subclasses thereof where clear from context.\n\n\n.. index:: ! result type, value type, instruction, execution, function\n   pair: abstract syntax; result type\n   pair: result; type\n.. _syntax-resulttype:\n\nResult Types\n~~~~~~~~~~~~\n\n*Result types* classify the result of :ref:`executing <exec-instr>` :ref:`instructions <syntax-instr>` or :ref:`functions <syntax-func>`,\nwhich is a sequence of values, written with brackets.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{result type} & \\resulttype &::=&\n     [\\vec(\\valtype)] \\\\\n   \\end{array}\n\n\n.. index:: ! function type, value type, vector, function, parameter, result, result type\n   pair: abstract syntax; function type\n   pair: function; type\n.. _syntax-functype:\n\nFunction Types\n~~~~~~~~~~~~~~\n\n*Function types* classify the signature of :ref:`functions <syntax-func>`,\nmapping a vector of parameters to a vector of results.\nThey are also used to classify the inputs and outputs of :ref:`instructions <syntax-instr>`.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{function type} & \\functype &::=&\n     \\resulttype \\to \\resulttype \\\\\n   \\end{array}\n\n\n.. index:: ! limits, memory type, table type\n   pair: abstract syntax; limits\n   single: memory; limits\n   single: table; limits\n.. _syntax-limits:\n\nLimits\n~~~~~~\n\n*Limits* classify the size range of resizeable storage associated with :ref:`memory types <syntax-memtype>` and :ref:`table types <syntax-tabletype>`.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{limits} & \\limits &::=&\n     \\{ \\LMIN~\\u32, \\LMAX~\\u32^? \\} \\\\\n   \\end{array}\n\nIf no maximum is given, the respective storage can grow to any size.\n\n\n.. index:: ! memory type, limits, page size, memory\n   pair: abstract syntax; memory type\n   pair: memory; type\n   pair: memory; limits\n.. _syntax-memtype:\n\nMemory Types\n~~~~~~~~~~~~\n\n*Memory types* classify linear :ref:`memories <syntax-mem>` and their size range.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{memory type} & \\memtype &::=&\n     \\limits \\\\\n   \\end{array}\n\nThe limits constrain the minimum and optionally the maximum size of a memory.\nThe limits are given in units of :ref:`page size <page-size>`.\n\n\n.. index:: ! table type, reference type, limits, table, element\n   pair: abstract syntax; table type\n   pair: table; type\n   pair: table; limits\n.. _syntax-tabletype:\n\nTable Types\n~~~~~~~~~~~\n\n*Table types* classify :ref:`tables <syntax-table>` over elements of :ref:`reference type <syntax-reftype>` within a size range.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{table type} & \\tabletype &::=&\n     \\limits~\\reftype \\\\\n   \\end{array}\n\nLike memories, tables are constrained by limits for their minimum and optionally maximum size.\nThe limits are given in numbers of entries.\n\n.. note::\n   In future versions of WebAssembly, additional element types may be introduced.\n\n\n.. index:: ! global type, ! mutability, value type, global, mutability\n   pair: abstract syntax; global type\n   pair: abstract syntax; mutability\n   pair: global; type\n   pair: global; mutability\n.. _syntax-mut:\n.. _syntax-globaltype:\n\nGlobal Types\n~~~~~~~~~~~~\n\n*Global types* classify :ref:`global <syntax-global>` variables, which hold a value and can either be mutable or immutable.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{global type} & \\globaltype &::=&\n     \\mut~\\valtype \\\\\n   \\production{mutability} & \\mut &::=&\n     \\MCONST ~|~\n     \\MVAR \\\\\n   \\end{array}\n\n\n.. index:: ! external type, function type, table type, memory type, global type, import, external value\n   pair: abstract syntax; external type\n   pair: external; type\n.. _syntax-externtype:\n\nExternal Types\n~~~~~~~~~~~~~~\n\n*External types* classify :ref:`imports <syntax-import>` and :ref:`external values <syntax-externval>` with their respective types.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{external types} & \\externtype &::=&\n     \\ETFUNC~\\functype ~|~\n     \\ETTABLE~\\tabletype ~|~\n     \\ETMEM~\\memtype ~|~\n     \\ETGLOBAL~\\globaltype \\\\\n   \\end{array}\n\n\nConventions\n...........\n\nThe following auxiliary notation is defined for sequences of external types.\nIt filters out entries of a specific kind in an order-preserving fashion:\n\n* :math:`\\etfuncs(\\externtype^\\ast) = [\\functype ~|~ (\\ETFUNC~\\functype) \\in \\externtype^\\ast]`\n\n* :math:`\\ettables(\\externtype^\\ast) = [\\tabletype ~|~ (\\ETTABLE~\\tabletype) \\in \\externtype^\\ast]`\n\n* :math:`\\etmems(\\externtype^\\ast) = [\\memtype ~|~ (\\ETMEM~\\memtype) \\in \\externtype^\\ast]`\n\n* :math:`\\etglobals(\\externtype^\\ast) = [\\globaltype ~|~ (\\ETGLOBAL~\\globaltype) \\in \\externtype^\\ast]`\n"
  },
  {
    "path": "document/core/syntax/values.rst",
    "content": ".. index:: ! value\n   pair: abstract syntax; value\n.. _syntax-value:\n\nValues\n------\n\nWebAssembly programs operate on primitive numeric *values*.\nMoreover, in the definition of programs, immutable sequences of values occur to represent more complex data, such as text strings or other vectors.\n\n\n.. index:: ! byte\n   pair: abstract syntax; byte\n.. _syntax-byte:\n\nBytes\n~~~~~\n\nThe simplest form of value are raw uninterpreted *bytes*.\nIn the abstract syntax they are represented as hexadecimal literals.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{byte} & \\byte &::=&\n     \\hex{00} ~|~ \\dots ~|~ \\hex{FF} \\\\\n   \\end{array}\n\n\nConventions\n...........\n\n* The meta variable :math:`b` ranges over bytes.\n\n* Bytes are sometimes interpreted as natural numbers :math:`n < 256`.\n\n\n.. index:: ! integer, ! unsigned integer, ! signed integer, ! uninterpreted integer, bit width, two's complement\n   pair: abstract syntax; integer\n   pair: abstract syntax; unsigned integer\n   pair: abstract syntax; signed integer\n   pair: abstract syntax; uninterpreted integer\n   single: integer; unsigned\n   single: integer; signed\n   single: integer; uninterpreted\n.. _syntax-sint:\n.. _syntax-uint:\n.. _syntax-int:\n\nIntegers\n~~~~~~~~\n\nDifferent classes of *integers* with different value ranges are distinguished by their *bit width* :math:`N` and by whether they are *unsigned* or *signed*.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{unsigned integer} & \\uN &::=&\n     0 ~|~ 1 ~|~ \\dots ~|~ 2^N{-}1 \\\\\n   \\production{signed integer} & \\sN &::=&\n     -2^{N-1} ~|~ \\dots ~|~ {-}1 ~|~ 0 ~|~ 1 ~|~ \\dots ~|~ 2^{N-1}{-}1 \\\\\n   \\production{uninterpreted integer} & \\iN &::=&\n     \\uN \\\\\n   \\end{array}\n\nThe latter class defines *uninterpreted* integers, whose signedness interpretation can vary depending on context.\nIn the abstract syntax, they are represented as unsigned values.\nHowever, some operations :ref:`convert <aux-signed>` them to signed based on a two's complement interpretation.\n\n.. note::\n   The main integer types occurring in this specification are |u32|, |u64|, |s32|, |s64|, |i8|, |i16|, |i32|, |i64|.\n   However, other sizes occur as auxiliary constructions, e.g., in the definition of :ref:`floating-point <syntax-float>` numbers.\n\n\nConventions\n...........\n\n* The meta variables :math:`m, n, i` range over integers.\n\n* Numbers may be denoted by simple arithmetics, as in the grammar above.\n  In order to distinguish arithmetics like :math:`2^N` from sequences like :math:`(1)^N`, the latter is distinguished with parentheses.\n\n\n.. index:: ! floating-point, ! NaN, payload, significand, exponent, magnitude, canonical NaN, arithmetic NaN, bit width, IEEE 754\n   pair: abstract syntax; floating-point number\n   single: NaN; payload\n   single: NaN; canonical\n   single: NaN; arithmetic\n.. _syntax-nan:\n.. _syntax-payload:\n.. _syntax-float:\n\nFloating-Point\n~~~~~~~~~~~~~~\n\n*Floating-point* data represents 32 or 64 bit values that correspond to the respective binary formats of the |IEEE754|_ standard (Section 3.3).\n\nEvery value has a *sign* and a *magnitude*.\nMagnitudes can either be expressed as *normal* numbers of the form :math:`m_0.m_1m_2\\dots m_M \\cdot2^e`, where :math:`e` is the exponent and :math:`m` is the *significand* whose most signifcant bit :math:`m_0` is :math:`1`,\nor as a *subnormal* number where the exponent is fixed to the smallest possible value and :math:`m_0` is :math:`0`; among the subnormals are positive and negative zero values.\nSince the significands are binary values, normals are represented in the form :math:`(1 + m\\cdot 2^{-M}) \\cdot 2^e`, where :math:`M` is the bit width of :math:`m`; similarly for subnormals.\n\nPossible magnitudes also include the special values :math:`\\infty` (infinity) and |NAN| (*NaN*, not a number).\nNaN values have a *payload* that describes the mantissa bits in the underlying :ref:`binary representation <aux-fbits>`.\nNo distinction is made between signalling and quiet NaNs.\n\n.. math::\n   \\begin{array}{llcll}\n   \\production{floating-point value} & \\fN &::=&\n     {+} \\fNmag ~|~ {-} \\fNmag \\\\\n   \\production{floating-point magnitude} & \\fNmag &::=&\n     (1 + \\uM\\cdot 2^{-M}) \\cdot 2^e & (\\iff -2^{E-1}+2 \\leq e \\leq 2^{E-1}-1) \\\\ &&|&\n     (0 + \\uM\\cdot 2^{-M}) \\cdot 2^e & (\\iff e = -2^{E-1}+2) \\\\ &&|&\n     \\infty \\\\ &&|&\n     \\NAN(n) & (\\iff 1 \\leq n < 2^M) \\\\\n   \\end{array}\n\nwhere :math:`M = \\significand(N)` and :math:`E = \\exponent(N)` with\n\n.. _aux-significand:\n.. _aux-exponent:\n\n.. math::\n   \\begin{array}{lclllllcl}\n   \\significand(32) &=& 23 &&&&\n   \\exponent(32) &=& 8 \\\\\n   \\significand(64) &=& 52 &&&&\n   \\exponent(64) &=& 11 \\\\\n   \\end{array}\n\n.. _canonical-nan:\n.. _arithmetic-nan:\n.. _aux-canon:\n\nA *canonical NaN* is a floating-point value :math:`\\pm\\NAN(\\canon_N)` where :math:`\\canon_N` is a payload whose most significant bit is :math:`1` while all others are :math:`0`:\n\n.. math::\n   \\canon_N = 2^{\\significand(N)-1}\n\nAn *arithmetic NaN*  is a floating-point value :math:`\\pm\\NAN(n)` with :math:`n \\geq \\canon_N`, such that the most significant bit is :math:`1` while all others are arbitrary.\n\n.. note::\n   In the abstract syntax, subnormals are distinguished by the leading 0 of the significand. The exponent of subnormals has the same value as the smallest possible exponent of a normal number. Only in the :ref:`binary representation <binary-float>` the exponent of a subnormal is encoded differently than the exponent of any normal number.\n\nConventions\n...........\n\n* The meta variable :math:`z` ranges over floating-point values where clear from context.\n\n\n.. index:: ! name, byte, Unicode, UTF-8, character, binary format\n   pair: abstract syntax; name\n.. _syntax-char:\n.. _syntax-name:\n\nNames\n~~~~~\n\n*Names* are sequences of *characters*, which are *scalar values* as defined by |Unicode|_ (Section 2.4).\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{name} & \\name &::=&\n     \\char^\\ast \\qquad\\qquad (\\iff |\\utf8(\\char^\\ast)| < 2^{32}) \\\\\n   \\production{character} & \\char &::=&\n     \\unicode{00} ~|~ \\dots ~|~ \\unicode{D7FF} ~|~\n     \\unicode{E000} ~|~ \\dots ~|~ \\unicode{10FFFF} \\\\\n   \\end{array}\n\nDue to the limitations of the :ref:`binary format <binary-name>`,\nthe length of a name is bounded by the length of its :ref:`UTF-8 <binary-utf8>` encoding.\n\n\nConvention\n..........\n\n* Characters (Unicode scalar values) are sometimes used interchangeably with natural numbers :math:`n < 1114112`.\n"
  },
  {
    "path": "document/core/text/conventions.rst",
    "content": ".. index:: ! text format, Unicode, UTF-8, S-expression, identifier, file extension, abstract syntax\n\nConventions\n-----------\n\nThe textual format for WebAssembly :ref:`modules <module>` is a rendering of their :ref:`abstract syntax <syntax-module>` into |SExpressions|_.\n\nLike the :ref:`binary format <binary>`, the text format is defined by an *attribute grammar*.\nA text string is a well-formed description of a module if and only if it is generated by the grammar.\nEach production of this grammar has at most one synthesized attribute: the abstract syntax that the respective character sequence expresses.\nThus, the attribute grammar implicitly defines a *parsing* function.\nSome productions also take a :ref:`context <text-context>` as an inherited attribute\nthat records bound :ref:`identifers <text-id>`.\n\nExcept for a few exceptions, the core of the text grammar closely mirrors the grammar of the abstract syntax.\nHowever, it also defines a number of *abbreviations* that are \"syntactic sugar\" over the core syntax.\n\nThe recommended extension for files containing WebAssembly modules in text format is \":math:`\\T{.wat}`\".\nFiles with this extension are assumed to be encoded in UTF-8, as per |Unicode|_ (Section 2.5).\n\n\n.. index:: grammar notation, notation, Unicode\n   single: text format; grammar\n   pair: text format; notation\n.. _text-grammar:\n\nGrammar\n~~~~~~~\n\nThe following conventions are adopted in defining grammar rules of the text format.\nThey mirror the conventions used for :ref:`abstract syntax <grammar>` and for the :ref:`binary format <binary>`.\nIn order to distinguish symbols of the textual syntax from symbols of the abstract syntax, :math:`\\mathtt{typewriter}` font is adopted for the former.\n\n* Terminal symbols are either literal strings of characters enclosed in quotes\n  or expressed as |Unicode|_ scalar values: :math:`\\text{module}`, :math:`\\unicode{0A}`.\n  (All characters written literally are unambiguously drawn from the 7-bit |ASCII|_ subset of Unicode.)\n\n* Nonterminal symbols are written in typewriter font: :math:`\\T{valtype}, \\T{instr}`.\n\n* :math:`T^n` is a sequence of :math:`n\\geq 0` iterations  of :math:`T`.\n\n* :math:`T^\\ast` is a possibly empty sequence of iterations of :math:`T`.\n  (This is a shorthand for :math:`T^n` used where :math:`n` is not relevant.)\n\n* :math:`T^+` is a sequence of one or more iterations of :math:`T`.\n  (This is a shorthand for :math:`T^n` where :math:`n \\geq 1`.)\n\n* :math:`T^?` is an optional occurrence of :math:`T`.\n  (This is a shorthand for :math:`T^n` where :math:`n \\leq 1`.)\n\n* :math:`x{:}T` denotes the same language as the nonterminal :math:`T`, but also binds the variable :math:`x` to the attribute synthesized for :math:`T`.\n\n* Productions are written :math:`\\T{sym} ::= T_1 \\Rightarrow A_1 ~|~ \\dots ~|~ T_n \\Rightarrow A_n`, where each :math:`A_i` is the attribute that is synthesized for :math:`\\T{sym}` in the given case, usually from attribute variables bound in :math:`T_i`.\n\n* Some productions are augmented by side conditions in parentheses, which restrict the applicability of the production. They provide a shorthand for a combinatorial expansion of the production into many separate cases.\n\n* If the same meta variable or non-terminal symbol appears multiple times in a production (in the syntax or in an attribute), then all those occurrences must have the same instantiation.\n\n.. _text-syntactic:\n\n* A distinction is made between *lexical* and *syntactic* productions. For the latter, arbitrary :ref:`white space <text-space>` is allowed in any place where the grammar contains spaces. The productions defining :ref:`lexical syntax <text-lexical>` and the syntax of :Ref:`values <text-value>` are considered lexical, all others are syntactic.\n\n.. note::\n   For example, the :ref:`textual grammar <text-valtype>` for :ref:`value types <syntax-valtype>` is given as follows:\n\n   .. math::\n     \\begin{array}{llcll@{\\qquad\\qquad}l}\n     \\production{value types} & \\Tvaltype &::=&\n       \\text{i32} &\\Rightarrow& \\I32 \\\\ &&|&\n       \\text{i64} &\\Rightarrow& \\I64 \\\\ &&|&\n       \\text{f32} &\\Rightarrow& \\F32 \\\\ &&|&\n       \\text{f64} &\\Rightarrow& \\F64 \\\\\n     \\end{array}\n\n   The :ref:`textual grammar <text-limits>` for :ref:`limits <syntax-limits>` is defined as follows:   \n\n   .. math::\n      \\begin{array}{llclll}\n      \\production{limits} & \\Tlimits &::=&\n        n{:}\\Tu32 &\\Rightarrow& \\{ \\LMIN~n, \\LMAX~\\epsilon \\} \\\\ &&|&\n        n{:}\\Tu32~~m{:}\\Tu32 &\\Rightarrow& \\{ \\LMIN~n, \\LMAX~m \\} \\\\\n      \\end{array}\n\n   The variables :math:`n` and :math:`m` name the attributes of the respective |Tu32| nonterminals, which in this case are the actual :ref:`unsigned integers <syntax-uint>` those parse into.\n   The attribute of the complete production then is the abstract syntax for the limit, expressed in terms of the former values.\n\n\n.. index:: ! abbreviations, rewrite rule\n.. _text-abbreviations:\n\nAbbreviations\n~~~~~~~~~~~~~\n\nIn addition to the core grammar, which corresponds directly to the :ref:`abstract syntax <syntax>`, the textual syntax also defines a number of *abbreviations* that can be used for convenience and readability.\n\nAbbreviations are defined by *rewrite rules* specifying their expansion into the core syntax:\n\n.. math::\n   \\X{abbreviation~syntax} \\quad\\equiv\\quad \\X{expanded~syntax}\n\nThese expansions are assumed to be applied, recursively and in order of appearance, before applying the core grammar rules to construct the abstract syntax.\n\n\n.. index:: ! identifier context, identifier, index, index space\n.. _text-context-wf:\n.. _text-context:\n\nContexts\n~~~~~~~~\n\nThe text format allows the use of symbolic :ref:`identifiers <text-id>` in place of :ref:`indices <syntax-index>`.\nTo resolve these identifiers into concrete indices,\nsome grammar production are indexed by an *identifier context* :math:`I` as a synthesized attribute that records the declared identifiers in each :ref:`index space <syntax-index>`.\nIn addition, the context records the types defined in the module, so that :ref:`parameter <text-param>` indices can be computed for :ref:`functions <text-func>`.\n\nIt is convenient to define identifier contexts as :ref:`records <notation-record>` :math:`I` with abstract syntax as follows:\n\n.. math::\n   \\begin{array}{llll}\n   \\production{(identifier context)} & I &::=&\n     \\begin{array}[t]{l@{~}ll}\n     \\{ & \\ITYPES & (\\Tid^?)^\\ast, \\\\\n        & \\IFUNCS & (\\Tid^?)^\\ast, \\\\\n        & \\ITABLES & (\\Tid^?)^\\ast, \\\\\n        & \\IMEMS & (\\Tid^?)^\\ast, \\\\\n        & \\IGLOBALS & (\\Tid^?)^\\ast, \\\\\n        & \\IELEM & (\\Tid^?)^\\ast, \\\\\n        & \\IDATA & (\\Tid^?)^\\ast, \\\\\n        & \\ILOCALS & (\\Tid^?)^\\ast, \\\\\n        & \\ILABELS & (\\Tid^?)^\\ast, \\\\\n        & \\ITYPEDEFS & \\functype^\\ast ~\\} \\\\\n     \\end{array}\n   \\end{array}\n\nFor each index space, such a context contains the list of :ref:`identifiers <text-id>` assigned to the defined indices.\nUnnamed indices are associated with empty (:math:`\\epsilon`) entries in these lists.\n\nAn identifier context is *well-formed* if no index space contains duplicate identifiers.\n\n\nConventions\n...........\n\nTo avoid unnecessary clutter, empty components are omitted when writing out identifier contexts.\nFor example, the record :math:`\\{\\}` is shorthand for an :ref:`identifier context <text-context>` whose components are all empty.\n\n\n.. index:: vector\n   pair: text format; vector\n.. _text-vec:\n\nVectors\n~~~~~~~\n\n:ref:`Vectors <syntax-vec>` are written as plain sequences, but with a restriction on the length of these sequence.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{vector} & \\Tvec(\\T{A}) &::=&\n     (x{:}\\T{A})^n &\\Rightarrow& x^n & (\\iff n < 2^{32}) \\\\\n   \\end{array}\n"
  },
  {
    "path": "document/core/text/index.rst",
    "content": ".. _text:\n\nText Format\n===========\n\n.. toctree::\n   :maxdepth: 2\n\n   conventions\n   lexical\n   values\n   types\n   instructions\n   modules\n"
  },
  {
    "path": "document/core/text/instructions.rst",
    "content": ".. index:: instruction\n.. _text-instr:\n\nInstructions\n------------\n\nInstructions are syntactically distinguished into *plain* and *structured* instructions.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{instruction} & \\Tinstr_I &::=&\n     \\X{in}{:}\\Tplaininstr_I\n       &\\Rightarrow& \\X{in} \\\\ &&|&\n     \\X{in}{:}\\Tblockinstr_I\n       &\\Rightarrow& \\X{in} \\\\\n   \\end{array}\n\nIn addition, as a syntactic abbreviation, instructions can be written as S-expressions in :ref:`folded <text-foldedinstr>` form, to group them visually.\n\n\n.. index:: index, label index\n   pair: text format; label index\n.. _text-label:\n\nLabels\n~~~~~~\n\n:ref:`Structured control instructions <text-instr-control>` can be annotated with a symbolic :ref:`label identifier <text-id>`.\nThey are the only :ref:`symbolic identifiers <text-index>` that can be bound locally in an instruction sequence.\nThe following grammar handles the corresponding update to the :ref:`identifier context <text-context>` by :ref:`composing <notation-compose>` the context with an additional label entry.\n\n.. math::\n   \\begin{array}{llcllll}\n   \\production{label} & \\Tlabel_I &::=&\n     v{:}\\Tid &\\Rightarrow& \\{\\ILABELS~v\\} \\compose I\n       & (\\iff v \\notin I.\\ILABELS) \\\\ &&|&\n     \\epsilon &\\Rightarrow& \\{\\ILABELS~(\\epsilon)\\} \\compose I \\\\\n   \\end{array}\n\n.. note::\n   The new label entry is inserted at the *beginning* of the label list in the identifier context.\n   This effectively shifts all existing labels up by one,\n   mirroring the fact that control instructions are indexed relatively not absolutely.\n\n\n.. index:: control instructions, structured control, label, block, branch, result type, label index, function index, type index, vector, polymorphism\n   pair: text format; instruction\n.. _text-blockinstr:\n.. _text-plaininstr:\n.. _text-instr-control:\n\nControl Instructions\n~~~~~~~~~~~~~~~~~~~~\n\n.. _text-blocktype:\n.. _text-block:\n.. _text-loop:\n.. _text-if:\n.. _text-instr-block:\n\n:ref:`Structured control instructions <syntax-instr-control>` can bind an optional symbolic :ref:`label identifier <text-label>`.\nThe same label identifier may optionally be repeated after the corresponding :math:`\\T{end}` and :math:`\\T{else}` pseudo instructions, to indicate the matching delimiters.\n\nTheir :ref:`block type <syntax-blocktype>` is given as a :ref:`type use <text-typeuse>`, analogous to the type of :ref:`functions <text-func>`.\nHowever, the special case of a type use that is syntactically empty or consists of only a single :ref:`result <text-result>` is not regarded as an :ref:`abbreviation <text-typeuse-abbrev>` for an inline :ref:`function type <syntax-functype>`, but is parsed directly into an optional :ref:`value type <syntax-valtype>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{block type} & \\Tblocktype_I &\n   \\begin{array}[t]{@{}c@{}} ::= \\\\ | \\\\ \\end{array}\n   &\n   \\begin{array}[t]{@{}lcll@{}}\n     (t{:}\\Tresult)^? &\\Rightarrow& t^? \\\\\n     x,I'{:}\\Ttypeuse_I &\\Rightarrow& x & (\\iff I' = \\{\\}) \\\\\n   \\end{array} \\\\\n   \\production{block instruction} & \\Tblockinstr_I &::=&\n     \\text{block}~~I'{:}\\Tlabel_I~~\\X{bt}{:}\\Tblocktype~~(\\X{in}{:}\\Tinstr_{I'})^\\ast~~\\text{end}~~\\Tid^?\n       \\\\ &&&\\qquad \\Rightarrow\\quad \\BLOCK~\\X{bt}~\\X{in}^\\ast~\\END\n       \\qquad\\quad~~ (\\iff \\Tid^? = \\epsilon \\vee \\Tid^? = \\Tlabel) \\\\ &&|&\n     \\text{loop}~~I'{:}\\Tlabel_I~~\\X{bt}{:}\\Tblocktype~~(\\X{in}{:}\\Tinstr_{I'})^\\ast~~\\text{end}~~\\Tid^?\n       \\\\ &&&\\qquad \\Rightarrow\\quad \\LOOP~\\X{bt}~\\X{in}^\\ast~\\END\n       \\qquad\\qquad (\\iff \\Tid^? = \\epsilon \\vee \\Tid^? = \\Tlabel) \\\\ &&|&\n     \\text{if}~~I'{:}\\Tlabel_I~~\\X{bt}{:}\\Tblocktype~~(\\X{in}_1{:}\\Tinstr_{I'})^\\ast~~\n       \\text{else}~~\\Tid_1^?~~(\\X{in}_2{:}\\Tinstr_{I'})^\\ast~~\\text{end}~~\\Tid_2^?\n       \\\\ &&&\\qquad \\Rightarrow\\quad \\IF~\\X{bt}~\\X{in}_1^\\ast~\\ELSE~\\X{in}_2^\\ast~\\END\n       \\qquad (\\iff \\Tid_1^? = \\epsilon \\vee \\Tid_1^? = \\Tlabel, \\Tid_2^? = \\epsilon \\vee \\Tid_2^? = \\Tlabel) \\\\\n   \\end{array}\n\n.. note::\n   The side condition stating that the :ref:`identifier context <text-context>` :math:`I'` must be empty in the rule for |Ttypeuse| block types enforces that no identifier can be bound in any |Tparam| declaration for a block type.\n\n\n.. _text-nop:\n.. _text-unreachable:\n.. _text-br:\n.. _text-br_if:\n.. _text-br_table:\n.. _text-return:\n.. _text-call:\n.. _text-call_indirect:\n\nAll other control instruction are represented verbatim.\n\n.. math::\n   \\begin{array}{llcllll}\n   \\production{plain instruction} & \\Tplaininstr_I &::=&\n     \\text{unreachable} &\\Rightarrow& \\UNREACHABLE \\\\ &&|&\n     \\text{nop} &\\Rightarrow& \\NOP \\\\ &&|&\n     \\text{br}~~l{:}\\Tlabelidx_I &\\Rightarrow& \\BR~l \\\\ &&|&\n     \\text{br\\_if}~~l{:}\\Tlabelidx_I &\\Rightarrow& \\BRIF~l \\\\ &&|&\n     \\text{br\\_table}~~l^\\ast{:}\\Tvec(\\Tlabelidx_I)~~l_N{:}\\Tlabelidx_I\n       &\\Rightarrow& \\BRTABLE~l^\\ast~l_N \\\\ &&|&\n     \\text{return} &\\Rightarrow& \\RETURN \\\\ &&|&\n     \\text{call}~~x{:}\\Tfuncidx_I &\\Rightarrow& \\CALL~x \\\\ &&|&\n     \\text{call\\_indirect}~~x{:}\\Ttableidx~~y,I'{:}\\Ttypeuse_I &\\Rightarrow& \\CALLINDIRECT~x~y\n       & (\\iff I' = \\{\\}) \\\\\n   \\end{array}\n\n.. note::\n   The side condition stating that the :ref:`identifier context <text-context>` :math:`I'` must be empty in the rule for |CALLINDIRECT| enforces that no identifier can be bound in any |Tparam| declaration appearing in the type annotation.\n\n\nAbbreviations\n.............\n\nThe :math:`\\text{else}` keyword of an :math:`\\text{if}` instruction can be omitted if the following instruction sequence is empty.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{block instruction} &\n     \\text{if}~~\\Tlabel~~\\Tblocktype~~\\Tinstr^\\ast~~\\text{end}\n       &\\equiv&\n     \\text{if}~~\\Tlabel~~\\Tblocktype~~\\Tinstr^\\ast~~\\text{else}~~\\text{end}\n   \\end{array}\n\nAlso, for backwards compatibility, the table index to :math:`\\text{call\\_indirect}` can be omitted, defaulting to :math:`0`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{plain instruction} &\n     \\text{call\\_indirect}~~\\Ttypeuse\n       &\\equiv&\n     \\text{call\\_indirect}~~0~~\\Ttypeuse\n   \\end{array}\n\n\n.. index:: reference instruction\n   pair: text format; instruction\n.. _text-instr-ref:\n\nReference Instructions\n~~~~~~~~~~~~~~~~~~~~~~\n\n.. _text-ref.null:\n.. _text-ref.is_null:\n.. _text-ref.func:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{instruction} & \\Tplaininstr_I &::=& \\dots \\\\ &&|&\n     \\text{ref.null}~~t{:}\\Theaptype &\\Rightarrow& \\REFNULL~t \\\\ &&|&\n     \\text{ref.is\\_null} &\\Rightarrow& \\REFISNULL \\\\ &&|&\n     \\text{ref.func}~~x{:}\\Tfuncidx &\\Rightarrow& \\REFFUNC~x \\\\ &&|&\n   \\end{array}\n\n\n.. index:: parametric instruction, value type, polymorphism\n   pair: text format; instruction\n.. _text-instr-parametric:\n\nParametric Instructions\n~~~~~~~~~~~~~~~~~~~~~~~\n\n.. _text-drop:\n.. _text-select:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{instruction} & \\Tplaininstr_I &::=& \\dots \\\\ &&|&\n     \\text{drop} &\\Rightarrow& \\DROP \\\\ &&|&\n     \\text{select}~((t{:}\\Tresult)^\\ast)^? &\\Rightarrow& \\SELECT~(t^\\ast)^? \\\\\n   \\end{array}\n\n\n.. index:: variable instructions, local index, global index\n   pair: text format; instruction\n.. _text-instr-variable:\n\nVariable Instructions\n~~~~~~~~~~~~~~~~~~~~~\n\n.. _text-local.get:\n.. _text-local.set:\n.. _text-local.tee:\n.. _text-global.get:\n.. _text-global.set:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{instruction} & \\Tplaininstr_I &::=& \\dots \\\\ &&|&\n     \\text{local.get}~~x{:}\\Tlocalidx_I &\\Rightarrow& \\LOCALGET~x \\\\ &&|&\n     \\text{local.set}~~x{:}\\Tlocalidx_I &\\Rightarrow& \\LOCALSET~x \\\\ &&|&\n     \\text{local.tee}~~x{:}\\Tlocalidx_I &\\Rightarrow& \\LOCALTEE~x \\\\ &&|&\n     \\text{global.get}~~x{:}\\Tglobalidx_I &\\Rightarrow& \\GLOBALGET~x \\\\ &&|&\n     \\text{global.set}~~x{:}\\Tglobalidx_I &\\Rightarrow& \\GLOBALSET~x \\\\\n   \\end{array}\n\n\n.. index:: table instruction, table index\n   pair: text format; instruction\n.. _text-instr-table:\n\nTable Instructions\n~~~~~~~~~~~~~~~~~~\n\n.. _text-table.get:\n.. _text-table.set:\n.. _text-table.size:\n.. _text-table.grow:\n.. _text-table.fill:\n.. _text-table.copy:\n.. _text-table.init:\n.. _text-elem.drop:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{instruction} & \\Tplaininstr_I &::=& \\dots \\\\ &&|&\n     \\text{table.get}~~x{:}\\Ttableidx_I &\\Rightarrow& \\TABLEGET~x \\\\ &&|&\n     \\text{table.set}~~x{:}\\Ttableidx_I &\\Rightarrow& \\TABLESET~x \\\\ &&|&\n     \\text{table.size}~~x{:}\\Ttableidx_I &\\Rightarrow& \\TABLESIZE~x \\\\ &&|&\n     \\text{table.grow}~~x{:}\\Ttableidx_I &\\Rightarrow& \\TABLEGROW~x \\\\ &&|&\n     \\text{table.fill}~~x{:}\\Ttableidx_I &\\Rightarrow& \\TABLEFILL~x \\\\ &&|&\n     \\text{table.copy}~~x{:}\\Ttableidx_I~~y{:}\\Ttableidx_I &\\Rightarrow& \\TABLECOPY~x~y \\\\ &&|&\n     \\text{table.init}~~x{:}\\Ttableidx_I~~y{:}\\Telemidx_I &\\Rightarrow& \\TABLEINIT~x~y \\\\ &&|&\n     \\text{elem.drop}~~x{:}\\Telemidx_I &\\Rightarrow& \\ELEMDROP~x \\\\\n   \\end{array}\n\n\nAbbreviations\n.............\n\nFor backwards compatibility, all :math:`table indices <syntax-tableidx>` may be omitted from table instructions, defaulting to :math:`0`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{instruction} &\n     \\text{table.get} &\\equiv& \\text{table.get}~~\\text{0} \\\\ &&|&\n     \\text{table.set} &\\equiv& \\text{table.set}~~\\text{0} \\\\ &&|&\n     \\text{table.size} &\\equiv& \\text{table.size}~~\\text{0} \\\\ &&|&\n     \\text{table.grow} &\\equiv& \\text{table.grow}~~\\text{0} \\\\ &&|&\n     \\text{table.fill} &\\equiv& \\text{table.fill}~~\\text{0} \\\\ &&|&\n     \\text{table.copy} &\\equiv& \\text{table.copy}~~\\text{0}~~\\text{0} \\\\ &&|&\n     \\text{table.init}~~x{:}\\Telemidx_I &\\equiv& \\text{table.init}~~\\text{0}~~x{:}\\Telemidx_I \\\\ &&|&\n   \\end{array}\n\n\n.. index:: memory instruction, memory index\n   pair: text format; instruction\n.. _text-instr-memory:\n\nMemory Instructions\n~~~~~~~~~~~~~~~~~~~\n\n.. _text-memarg:\n.. _text-load:\n.. _text-loadn:\n.. _text-store:\n.. _text-storen:\n.. _text-memory.size:\n.. _text-memory.grow:\n.. _text-memory.fill:\n.. _text-memory.copy:\n.. _text-memory.init:\n.. _text-data.drop:\n\nThe offset and alignment immediates to memory instructions are optional.\nThe offset defaults to :math:`\\T{0}`, the alignment to the storage size of the respective memory access, which is its *natural alignment*.\nLexically, an |Toffset| or |Talign| phrase is considered a single :ref:`keyword token <text-keyword>`, so no :ref:`white space <text-space>` is allowed around the :math:`\\text{=}`.\n\n.. math::\n   \\begin{array}{llcllll}\n   \\production{memory argument} & \\Tmemarg_N &::=&\n     o{:}\\Toffset~~a{:}\\Talign_N &\\Rightarrow& \\{ \\ALIGN~n,~\\OFFSET~o \\} & (\\iff a = 2^n) \\\\\n   \\production{memory offset} & \\Toffset &::=&\n     \\text{offset{=}}o{:}\\Tu32 &\\Rightarrow& o \\\\ &&|&\n     \\epsilon &\\Rightarrow& 0 \\\\\n   \\production{memory alignment} & \\Talign_N &::=&\n     \\text{align{=}}a{:}\\Tu32 &\\Rightarrow& a \\\\ &&|&\n     \\epsilon &\\Rightarrow& N \\\\\n   \\production{instruction} & \\Tplaininstr_I &::=& \\dots \\\\ &&|&\n     \\text{i32.load}~~m{:}\\Tmemarg_4 &\\Rightarrow& \\I32.\\LOAD~m \\\\ &&|&\n     \\text{i64.load}~~m{:}\\Tmemarg_8 &\\Rightarrow& \\I64.\\LOAD~m \\\\ &&|&\n     \\text{f32.load}~~m{:}\\Tmemarg_4 &\\Rightarrow& \\F32.\\LOAD~m \\\\ &&|&\n     \\text{f64.load}~~m{:}\\Tmemarg_8 &\\Rightarrow& \\F64.\\LOAD~m \\\\ &&|&\n     \\text{i32.load8\\_s}~~m{:}\\Tmemarg_1 &\\Rightarrow& \\I32.\\LOAD\\K{8\\_s}~m \\\\ &&|&\n     \\text{i32.load8\\_u}~~m{:}\\Tmemarg_1 &\\Rightarrow& \\I32.\\LOAD\\K{8\\_u}~m \\\\ &&|&\n     \\text{i32.load16\\_s}~~m{:}\\Tmemarg_2 &\\Rightarrow& \\I32.\\LOAD\\K{16\\_s}~m \\\\ &&|&\n     \\text{i32.load16\\_u}~~m{:}\\Tmemarg_2 &\\Rightarrow& \\I32.\\LOAD\\K{16\\_u}~m \\\\ &&|&\n     \\text{i64.load8\\_s}~~m{:}\\Tmemarg_1 &\\Rightarrow& \\I64.\\LOAD\\K{8\\_s}~m \\\\ &&|&\n     \\text{i64.load8\\_u}~~m{:}\\Tmemarg_1 &\\Rightarrow& \\I64.\\LOAD\\K{8\\_u}~m \\\\ &&|&\n     \\text{i64.load16\\_s}~~m{:}\\Tmemarg_2 &\\Rightarrow& \\I64.\\LOAD\\K{16\\_s}~m \\\\ &&|&\n     \\text{i64.load16\\_u}~~m{:}\\Tmemarg_2 &\\Rightarrow& \\I64.\\LOAD\\K{16\\_u}~m \\\\ &&|&\n     \\text{i64.load32\\_s}~~m{:}\\Tmemarg_4 &\\Rightarrow& \\I64.\\LOAD\\K{32\\_s}~m \\\\ &&|&\n     \\text{i64.load32\\_u}~~m{:}\\Tmemarg_4 &\\Rightarrow& \\I64.\\LOAD\\K{32\\_u}~m \\\\ &&|&\n     \\text{i32.store}~~m{:}\\Tmemarg_4 &\\Rightarrow& \\I32.\\STORE~m \\\\ &&|&\n     \\text{i64.store}~~m{:}\\Tmemarg_8 &\\Rightarrow& \\I64.\\STORE~m \\\\ &&|&\n     \\text{f32.store}~~m{:}\\Tmemarg_4 &\\Rightarrow& \\F32.\\STORE~m \\\\ &&|&\n     \\text{f64.store}~~m{:}\\Tmemarg_8 &\\Rightarrow& \\F64.\\STORE~m \\\\ &&|&\n     \\text{i32.store8}~~m{:}\\Tmemarg_1 &\\Rightarrow& \\I32.\\STORE\\K{8}~m \\\\ &&|&\n     \\text{i32.store16}~~m{:}\\Tmemarg_2 &\\Rightarrow& \\I32.\\STORE\\K{16}~m \\\\ &&|&\n     \\text{i64.store8}~~m{:}\\Tmemarg_1 &\\Rightarrow& \\I64.\\STORE\\K{8}~m \\\\ &&|&\n     \\text{i64.store16}~~m{:}\\Tmemarg_2 &\\Rightarrow& \\I64.\\STORE\\K{16}~m \\\\ &&|&\n     \\text{i64.store32}~~m{:}\\Tmemarg_4 &\\Rightarrow& \\I64.\\STORE\\K{32}~m \\\\ &&|&\n     \\text{memory.size} &\\Rightarrow& \\MEMORYSIZE \\\\ &&|&\n     \\text{memory.grow} &\\Rightarrow& \\MEMORYGROW \\\\ &&|&\n     \\text{memory.fill} &\\Rightarrow& \\MEMORYFILL \\\\ &&|&\n     \\text{memory.copy} &\\Rightarrow& \\MEMORYCOPY \\\\ &&|&\n     \\text{memory.init}~~x{:}\\Tdataidx_I &\\Rightarrow& \\MEMORYINIT~x \\\\ &&|&\n     \\text{data.drop}~~x{:}\\Tdataidx_I &\\Rightarrow& \\DATADROP~x \\\\\n   \\end{array}\n\n\n.. index:: numeric instruction\n   pair: text format; instruction\n.. _text-instr-numeric:\n\nNumeric Instructions\n~~~~~~~~~~~~~~~~~~~~\n\n.. _text-const:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{instruction} & \\Tplaininstr_I &::=& \\dots \\\\&&|&\n     \\text{i32.const}~~n{:}\\Ti32 &\\Rightarrow& \\I32.\\CONST~n \\\\ &&|&\n     \\text{i64.const}~~n{:}\\Ti64 &\\Rightarrow& \\I64.\\CONST~n \\\\ &&|&\n     \\text{f32.const}~~z{:}\\Tf32 &\\Rightarrow& \\F32.\\CONST~z \\\\ &&|&\n     \\text{f64.const}~~z{:}\\Tf64 &\\Rightarrow& \\F64.\\CONST~z \\\\\n   \\end{array}\n\n.. _text-unop:\n.. _text-binop:\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Tplaininstr_I} &\\phantom{::=}& \\phantom{thisisenough} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\text{i32.clz} &\\Rightarrow& \\I32.\\CLZ \\\\ &&|&\n     \\text{i32.ctz} &\\Rightarrow& \\I32.\\CTZ \\\\ &&|&\n     \\text{i32.popcnt} &\\Rightarrow& \\I32.\\POPCNT \\\\ &&|&\n     \\text{i32.add} &\\Rightarrow& \\I32.\\ADD \\\\ &&|&\n     \\text{i32.sub} &\\Rightarrow& \\I32.\\SUB \\\\ &&|&\n     \\text{i32.mul} &\\Rightarrow& \\I32.\\MUL \\\\ &&|&\n     \\text{i32.div\\_s} &\\Rightarrow& \\I32.\\DIV\\K{\\_s} \\\\ &&|&\n     \\text{i32.div\\_u} &\\Rightarrow& \\I32.\\DIV\\K{\\_u} \\\\ &&|&\n     \\text{i32.rem\\_s} &\\Rightarrow& \\I32.\\REM\\K{\\_s} \\\\ &&|&\n     \\text{i32.rem\\_u} &\\Rightarrow& \\I32.\\REM\\K{\\_u} \\\\ &&|&\n     \\text{i32.and} &\\Rightarrow& \\I32.\\AND \\\\ &&|&\n     \\text{i32.or} &\\Rightarrow& \\I32.\\OR \\\\ &&|&\n     \\text{i32.xor} &\\Rightarrow& \\I32.\\XOR \\\\ &&|&\n     \\text{i32.shl} &\\Rightarrow& \\I32.\\SHL \\\\ &&|&\n     \\text{i32.shr\\_s} &\\Rightarrow& \\I32.\\SHR\\K{\\_s} \\\\ &&|&\n     \\text{i32.shr\\_u} &\\Rightarrow& \\I32.\\SHR\\K{\\_u} \\\\ &&|&\n     \\text{i32.rotl} &\\Rightarrow& \\I32.\\ROTL \\\\ &&|&\n     \\text{i32.rotr} &\\Rightarrow& \\I32.\\ROTR \\\\\n   \\end{array}\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Tplaininstr_I} &\\phantom{::=}& \\phantom{thisisenough} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\text{i64.clz} &\\Rightarrow& \\I64.\\CLZ \\\\ &&|&\n     \\text{i64.ctz} &\\Rightarrow& \\I64.\\CTZ \\\\ &&|&\n     \\text{i64.popcnt} &\\Rightarrow& \\I64.\\POPCNT \\\\ &&|&\n     \\text{i64.add} &\\Rightarrow& \\I64.\\ADD \\\\ &&|&\n     \\text{i64.sub} &\\Rightarrow& \\I64.\\SUB \\\\ &&|&\n     \\text{i64.mul} &\\Rightarrow& \\I64.\\MUL \\\\ &&|&\n     \\text{i64.div\\_s} &\\Rightarrow& \\I64.\\DIV\\K{\\_s} \\\\ &&|&\n     \\text{i64.div\\_u} &\\Rightarrow& \\I64.\\DIV\\K{\\_u} \\\\ &&|&\n     \\text{i64.rem\\_s} &\\Rightarrow& \\I64.\\REM\\K{\\_s} \\\\ &&|&\n     \\text{i64.rem\\_u} &\\Rightarrow& \\I64.\\REM\\K{\\_u} \\\\ &&|&\n     \\text{i64.and} &\\Rightarrow& \\I64.\\AND \\\\ &&|&\n     \\text{i64.or} &\\Rightarrow& \\I64.\\OR \\\\ &&|&\n     \\text{i64.xor} &\\Rightarrow& \\I64.\\XOR \\\\ &&|&\n     \\text{i64.shl} &\\Rightarrow& \\I64.\\SHL \\\\ &&|&\n     \\text{i64.shr\\_s} &\\Rightarrow& \\I64.\\SHR\\K{\\_s} \\\\ &&|&\n     \\text{i64.shr\\_u} &\\Rightarrow& \\I64.\\SHR\\K{\\_u} \\\\ &&|&\n     \\text{i64.rotl} &\\Rightarrow& \\I64.\\ROTL \\\\ &&|&\n     \\text{i64.rotr} &\\Rightarrow& \\I64.\\ROTR \\\\\n   \\end{array}\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Tplaininstr_I} &\\phantom{::=}& \\phantom{thisisenough} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\text{f32.abs} &\\Rightarrow& \\F32.\\ABS \\\\ &&|&\n     \\text{f32.neg} &\\Rightarrow& \\F32.\\NEG \\\\ &&|&\n     \\text{f32.ceil} &\\Rightarrow& \\F32.\\CEIL \\\\ &&|&\n     \\text{f32.floor} &\\Rightarrow& \\F32.\\FLOOR \\\\ &&|&\n     \\text{f32.trunc} &\\Rightarrow& \\F32.\\TRUNC \\\\ &&|&\n     \\text{f32.nearest} &\\Rightarrow& \\F32.\\NEAREST \\\\ &&|&\n     \\text{f32.sqrt} &\\Rightarrow& \\F32.\\SQRT \\\\ &&|&\n     \\text{f32.add} &\\Rightarrow& \\F32.\\ADD \\\\ &&|&\n     \\text{f32.sub} &\\Rightarrow& \\F32.\\SUB \\\\ &&|&\n     \\text{f32.mul} &\\Rightarrow& \\F32.\\MUL \\\\ &&|&\n     \\text{f32.div} &\\Rightarrow& \\F32.\\DIV \\\\ &&|&\n     \\text{f32.min} &\\Rightarrow& \\F32.\\FMIN \\\\ &&|&\n     \\text{f32.max} &\\Rightarrow& \\F32.\\FMAX \\\\ &&|&\n     \\text{f32.copysign} &\\Rightarrow& \\F32.\\COPYSIGN \\\\\n   \\end{array}\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Tplaininstr_I} &\\phantom{::=}& \\phantom{thisisenough} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\text{f64.abs} &\\Rightarrow& \\F64.\\ABS \\\\ &&|&\n     \\text{f64.neg} &\\Rightarrow& \\F64.\\NEG \\\\ &&|&\n     \\text{f64.ceil} &\\Rightarrow& \\F64.\\CEIL \\\\ &&|&\n     \\text{f64.floor} &\\Rightarrow& \\F64.\\FLOOR \\\\ &&|&\n     \\text{f64.trunc} &\\Rightarrow& \\F64.\\TRUNC \\\\ &&|&\n     \\text{f64.nearest} &\\Rightarrow& \\F64.\\NEAREST \\\\ &&|&\n     \\text{f64.sqrt} &\\Rightarrow& \\F64.\\SQRT \\\\ &&|&\n     \\text{f64.add} &\\Rightarrow& \\F64.\\ADD \\\\ &&|&\n     \\text{f64.sub} &\\Rightarrow& \\F64.\\SUB \\\\ &&|&\n     \\text{f64.mul} &\\Rightarrow& \\F64.\\MUL \\\\ &&|&\n     \\text{f64.div} &\\Rightarrow& \\F64.\\DIV \\\\ &&|&\n     \\text{f64.min} &\\Rightarrow& \\F64.\\FMIN \\\\ &&|&\n     \\text{f64.max} &\\Rightarrow& \\F64.\\FMAX \\\\ &&|&\n     \\text{f64.copysign} &\\Rightarrow& \\F64.\\COPYSIGN \\\\\n   \\end{array}\n\n.. _text-testop:\n.. _text-relop:\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Tplaininstr_I} &\\phantom{::=}& \\phantom{thisisenough} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\text{i32.eqz} &\\Rightarrow& \\I32.\\EQZ \\\\ &&|&\n     \\text{i32.eq} &\\Rightarrow& \\I32.\\EQ \\\\ &&|&\n     \\text{i32.ne} &\\Rightarrow& \\I32.\\NE \\\\ &&|&\n     \\text{i32.lt\\_s} &\\Rightarrow& \\I32.\\LT\\K{\\_s} \\\\ &&|&\n     \\text{i32.lt\\_u} &\\Rightarrow& \\I32.\\LT\\K{\\_u} \\\\ &&|&\n     \\text{i32.gt\\_s} &\\Rightarrow& \\I32.\\GT\\K{\\_s} \\\\ &&|&\n     \\text{i32.gt\\_u} &\\Rightarrow& \\I32.\\GT\\K{\\_u} \\\\ &&|&\n     \\text{i32.le\\_s} &\\Rightarrow& \\I32.\\LE\\K{\\_s} \\\\ &&|&\n     \\text{i32.le\\_u} &\\Rightarrow& \\I32.\\LE\\K{\\_u} \\\\ &&|&\n     \\text{i32.ge\\_s} &\\Rightarrow& \\I32.\\GE\\K{\\_s} \\\\ &&|&\n     \\text{i32.ge\\_u} &\\Rightarrow& \\I32.\\GE\\K{\\_u} \\\\\n   \\end{array}\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Tplaininstr_I} &\\phantom{::=}& \\phantom{thisisenough} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\text{i64.eqz} &\\Rightarrow& \\I64.\\EQZ \\\\ &&|&\n     \\text{i64.eq} &\\Rightarrow& \\I64.\\EQ \\\\ &&|&\n     \\text{i64.ne} &\\Rightarrow& \\I64.\\NE \\\\ &&|&\n     \\text{i64.lt\\_s} &\\Rightarrow& \\I64.\\LT\\K{\\_s} \\\\ &&|&\n     \\text{i64.lt\\_u} &\\Rightarrow& \\I64.\\LT\\K{\\_u} \\\\ &&|&\n     \\text{i64.gt\\_s} &\\Rightarrow& \\I64.\\GT\\K{\\_s} \\\\ &&|&\n     \\text{i64.gt\\_u} &\\Rightarrow& \\I64.\\GT\\K{\\_u} \\\\ &&|&\n     \\text{i64.le\\_s} &\\Rightarrow& \\I64.\\LE\\K{\\_s} \\\\ &&|&\n     \\text{i64.le\\_u} &\\Rightarrow& \\I64.\\LE\\K{\\_u} \\\\ &&|&\n     \\text{i64.ge\\_s} &\\Rightarrow& \\I64.\\GE\\K{\\_s} \\\\ &&|&\n     \\text{i64.ge\\_u} &\\Rightarrow& \\I64.\\GE\\K{\\_u} \\\\\n   \\end{array}\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Tplaininstr_I} &\\phantom{::=}& \\phantom{thisisenough} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\text{f32.eq} &\\Rightarrow& \\F32.\\EQ \\\\ &&|&\n     \\text{f32.ne} &\\Rightarrow& \\F32.\\NE \\\\ &&|&\n     \\text{f32.lt} &\\Rightarrow& \\F32.\\LT \\\\ &&|&\n     \\text{f32.gt} &\\Rightarrow& \\F32.\\GT \\\\ &&|&\n     \\text{f32.le} &\\Rightarrow& \\F32.\\LE \\\\ &&|&\n     \\text{f32.ge} &\\Rightarrow& \\F32.\\GE \\\\\n   \\end{array}\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Tplaininstr_I} &\\phantom{::=}& \\phantom{thisisenough} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\text{f64.eq} &\\Rightarrow& \\F64.\\EQ \\\\ &&|&\n     \\text{f64.ne} &\\Rightarrow& \\F64.\\NE \\\\ &&|&\n     \\text{f64.lt} &\\Rightarrow& \\F64.\\LT \\\\ &&|&\n     \\text{f64.gt} &\\Rightarrow& \\F64.\\GT \\\\ &&|&\n     \\text{f64.le} &\\Rightarrow& \\F64.\\LE \\\\ &&|&\n     \\text{f64.ge} &\\Rightarrow& \\F64.\\GE \\\\\n   \\end{array}\n\n.. _text-cvtop:\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Tplaininstr_I} &\\phantom{::=}& \\phantom{thisisenough} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\text{i32.wrap\\_i64} &\\Rightarrow& \\I32.\\WRAP\\K{\\_}\\I64 \\\\ &&|&\n     \\text{i32.trunc\\_f32\\_s} &\\Rightarrow& \\I32.\\TRUNC\\K{\\_}\\F32\\K{\\_s} \\\\ &&|&\n     \\text{i32.trunc\\_f32\\_u} &\\Rightarrow& \\I32.\\TRUNC\\K{\\_}\\F32\\K{\\_u} \\\\ &&|&\n     \\text{i32.trunc\\_f64\\_s} &\\Rightarrow& \\I32.\\TRUNC\\K{\\_}\\F64\\K{\\_s} \\\\ &&|&\n     \\text{i32.trunc\\_f64\\_u} &\\Rightarrow& \\I32.\\TRUNC\\K{\\_}\\F64\\K{\\_u} \\\\ &&|&\n     \\text{i32.trunc\\_sat\\_f32\\_s} &\\Rightarrow& \\I32.\\TRUNC\\K{\\_sat\\_}\\F32\\K{\\_s} \\\\ &&|&\n     \\text{i32.trunc\\_sat\\_f32\\_u} &\\Rightarrow& \\I32.\\TRUNC\\K{\\_sat\\_}\\F32\\K{\\_u} \\\\ &&|&\n     \\text{i32.trunc\\_sat\\_f64\\_s} &\\Rightarrow& \\I32.\\TRUNC\\K{\\_sat\\_}\\F64\\K{\\_s} \\\\ &&|&\n     \\text{i32.trunc\\_sat\\_f64\\_u} &\\Rightarrow& \\I32.\\TRUNC\\K{\\_sat\\_}\\F64\\K{\\_u} \\\\ &&|&\n     \\text{i64.extend\\_i32\\_s} &\\Rightarrow& \\I64.\\EXTEND\\K{\\_}\\I32\\K{\\_s} \\\\ &&|&\n     \\text{i64.extend\\_i32\\_u} &\\Rightarrow& \\I64.\\EXTEND\\K{\\_}\\I32\\K{\\_u} \\\\ &&|&\n     \\text{i64.trunc\\_f32\\_s} &\\Rightarrow& \\I64.\\TRUNC\\K{\\_}\\F32\\K{\\_s} \\\\ &&|&\n     \\text{i64.trunc\\_f32\\_u} &\\Rightarrow& \\I64.\\TRUNC\\K{\\_}\\F32\\K{\\_u} \\\\ &&|&\n     \\text{i64.trunc\\_f64\\_s} &\\Rightarrow& \\I64.\\TRUNC\\K{\\_}\\F64\\K{\\_s} \\\\ &&|&\n     \\text{i64.trunc\\_f64\\_u} &\\Rightarrow& \\I64.\\TRUNC\\K{\\_}\\F64\\K{\\_u} \\\\ &&|&\n     \\text{i64.trunc\\_sat\\_f32\\_s} &\\Rightarrow& \\I64.\\TRUNC\\K{\\_sat\\_}\\F32\\K{\\_s} \\\\ &&|&\n     \\text{i64.trunc\\_sat\\_f32\\_u} &\\Rightarrow& \\I64.\\TRUNC\\K{\\_sat\\_}\\F32\\K{\\_u} \\\\ &&|&\n     \\text{i64.trunc\\_sat\\_f64\\_s} &\\Rightarrow& \\I64.\\TRUNC\\K{\\_sat\\_}\\F64\\K{\\_s} \\\\ &&|&\n     \\text{i64.trunc\\_sat\\_f64\\_u} &\\Rightarrow& \\I64.\\TRUNC\\K{\\_sat\\_}\\F64\\K{\\_u} \\\\ &&|&\n     \\text{f32.convert\\_i32\\_s} &\\Rightarrow& \\F32.\\CONVERT\\K{\\_}\\I32\\K{\\_s} \\\\ &&|&\n     \\text{f32.convert\\_i32\\_u} &\\Rightarrow& \\F32.\\CONVERT\\K{\\_}\\I32\\K{\\_u} \\\\ &&|&\n     \\text{f32.convert\\_i64\\_s} &\\Rightarrow& \\F32.\\CONVERT\\K{\\_}\\I64\\K{\\_s} \\\\ &&|&\n     \\text{f32.convert\\_i64\\_u} &\\Rightarrow& \\F32.\\CONVERT\\K{\\_}\\I64\\K{\\_u} \\\\ &&|&\n     \\text{f32.demote\\_f64} &\\Rightarrow& \\F32.\\DEMOTE\\K{\\_}\\F64 \\\\ &&|&\n     \\text{f64.convert\\_i32\\_s} &\\Rightarrow& \\F64.\\CONVERT\\K{\\_}\\I32\\K{\\_s} \\\\ &&|&\n     \\text{f64.convert\\_i32\\_u} &\\Rightarrow& \\F64.\\CONVERT\\K{\\_}\\I32\\K{\\_u} \\\\ &&|&\n     \\text{f64.convert\\_i64\\_s} &\\Rightarrow& \\F64.\\CONVERT\\K{\\_}\\I64\\K{\\_s} \\\\ &&|&\n     \\text{f64.convert\\_i64\\_u} &\\Rightarrow& \\F64.\\CONVERT\\K{\\_}\\I64\\K{\\_u} \\\\ &&|&\n     \\text{f64.promote\\_f32} &\\Rightarrow& \\F64.\\PROMOTE\\K{\\_}\\F32 \\\\ &&|&\n     \\text{i32.reinterpret\\_f32} &\\Rightarrow& \\I32.\\REINTERPRET\\K{\\_}\\F32 \\\\ &&|&\n     \\text{i64.reinterpret\\_f64} &\\Rightarrow& \\I64.\\REINTERPRET\\K{\\_}\\F64 \\\\ &&|&\n     \\text{f32.reinterpret\\_i32} &\\Rightarrow& \\F32.\\REINTERPRET\\K{\\_}\\I32 \\\\ &&|&\n     \\text{f64.reinterpret\\_i64} &\\Rightarrow& \\F64.\\REINTERPRET\\K{\\_}\\I64 \\\\\n   \\end{array}\n\n.. math::\n   \\begin{array}{llclll}\n   \\phantom{\\production{instruction}} & \\phantom{\\Tplaininstr_I} &\\phantom{::=}& \\phantom{thisisenough} && \\phantom{thisshouldbeenough} \\\\[-2ex] &&|&\n     \\text{i32.extend8\\_s} &\\Rightarrow& \\I32.\\EXTEND\\K{8\\_s} \\\\ &&|&\n     \\text{i32.extend16\\_s} &\\Rightarrow& \\I32.\\EXTEND\\K{16\\_s} \\\\ &&|&\n     \\text{i64.extend8\\_s} &\\Rightarrow& \\I64.\\EXTEND\\K{8\\_s} \\\\ &&|&\n     \\text{i64.extend16\\_s} &\\Rightarrow& \\I64.\\EXTEND\\K{16\\_s} \\\\ &&|&\n     \\text{i64.extend32\\_s} &\\Rightarrow& \\I64.\\EXTEND\\K{32\\_s} \\\\\n   \\end{array}\n\n\n.. index:: ! folded instruction, S-expression\n.. _text-foldedinstr:\n\nFolded Instructions\n~~~~~~~~~~~~~~~~~~~\n\nInstructions can be written as S-expressions by grouping them into *folded* form. In that notation, an instruction is wrapped in parentheses and optionally includes nested folded instructions to indicate its operands.\n\nIn the case of :ref:`block instructions <text-instr-block>`, the folded form omits the :math:`\\text{end}` delimiter.\nFor |IF| instructions, both branches have to be wrapped into nested S-expressions, headed by the keywords :math:`\\text{then}` and :math:`\\text{else}`.\n\nThe set of all phrases defined by the following abbreviations recursively forms the auxiliary syntactic class |Tfoldedinstr|.\nSuch a folded instruction can appear anywhere a regular instruction can.\n\n.. MathJax doesn't handle LaTex multicolumns, thus the spacing hack in the following formula.\n\n.. math::\n   \\begin{array}{lllll}\n   \\production{instruction} & \n     \\text{(}~\\Tplaininstr~~\\Tfoldedinstr^\\ast~\\text{)}\n       &\\equiv\\quad \\Tfoldedinstr^\\ast~~\\Tplaininstr \\\\ &\n     \\text{(}~\\text{block}~~\\Tlabel~~\\Tblocktype~~\\Tinstr^\\ast~\\text{)}\n       &\\equiv\\quad \\text{block}~~\\Tlabel~~\\Tblocktype~~\\Tinstr^\\ast~~\\text{end} \\\\ &\n     \\text{(}~\\text{loop}~~\\Tlabel~~\\Tblocktype~~\\Tinstr^\\ast~\\text{)}\n       &\\equiv\\quad \\text{loop}~~\\Tlabel~~\\Tblocktype~~\\Tinstr^\\ast~~\\text{end} \\\\ &\n     \\text{(}~\\text{if}~~\\Tlabel~~\\Tblocktype~~\\Tfoldedinstr^\\ast\n       &\\hspace{-3ex} \\text{(}~\\text{then}~~\\Tinstr_1^\\ast~\\text{)}~~\\text{(}~\\text{else}~~\\Tinstr_2^\\ast~\\text{)}^?~~\\text{)}\n       \\quad\\equiv \\\\ &\\qquad\n         \\Tfoldedinstr^\\ast~~\\text{if}~~\\Tlabel~~\\Tblocktype &\\hspace{-1ex} \\Tinstr_1^\\ast~~\\text{else}~~(\\Tinstr_2^\\ast)^?~\\text{end} \\\\\n   \\end{array}\n\n.. note::\n   For example, the instruction sequence\n\n   .. math::\n      \\mathtt{(local.get~\\$x)~(i32.const~2)~i32.add~(i32.const~3)~i32.mul}\n\n   can be folded into\n\n   .. math::\n      \\mathtt{(i32.mul~(i32.add~(local.get~\\$x)~(i32.const~2))~(i32.const~3))}\n\n   Folded instructions are solely syntactic sugar,\n   no additional syntactic or type-based checking is implied.\n\n\n.. index:: expression\n   pair: text format; expression\n   single: expression; constant\n.. _text-expr:\n\nExpressions\n~~~~~~~~~~~\n\nExpressions are written as instruction sequences.\nNo explicit :math:`\\text{end}` keyword is included, since they only occur in bracketed positions.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{expression} & \\Texpr &::=&\n     (\\X{in}{:}\\Tinstr)^\\ast &\\Rightarrow& \\X{in}^\\ast~\\END \\\\\n   \\end{array}\n"
  },
  {
    "path": "document/core/text/lexical.rst",
    "content": ".. index:: lexical format\n.. _text-lexical:\n\nLexical Format\n--------------\n\n\n.. index:: ! character, Unicode, ASCII, character, ! source text\n   pair: text format; character\n.. _source:\n.. _text-source:\n.. _text-char:\n\nCharacters\n~~~~~~~~~~\n\nThe text format assigns meaning to *source text*, which consists of a sequence of *characters*.\nCharacters are assumed to be represented as valid |Unicode|_ (Section 2.4) *scalar values*.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{source} & \\Tsource &::=&\n     \\Tchar^\\ast \\\\\n   \\production{character} & \\Tchar &::=&\n     \\unicode{00} ~|~ \\dots ~|~ \\unicode{D7FF} ~|~ \\unicode{E000} ~|~ \\dots ~|~ \\unicode{10FFFF} \\\\\n   \\end{array}\n\n.. note::\n   While source text may contain any Unicode character in :ref:`comments <text-comment>` or :ref:`string <text-string>` literals,\n   the rest of the grammar is formed exclusively from the characters supported by the 7-bit |ASCII|_ subset of Unicode.\n\n\n.. index:: ! token, ! keyword, character, white space, comment, source text\n   single: text format; token\n.. _text-keyword:\n.. _text-reserved:\n.. _text-token:\n\nTokens\n~~~~~~\n\nThe character stream in the source text is divided, from left to right, into a sequence of *tokens*, as defined by the following grammar.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{token} & \\Ttoken &::=&\n     \\Tkeyword ~|~ \\TuN ~|~ \\TsN ~|~ \\TfN ~|~ \\Tstring ~|~ \\Tid ~|~\n     \\text{(} ~|~ \\text{)} ~|~ \\Treserved \\\\\n   \\production{keyword} & \\Tkeyword &::=&\n     (\\text{a} ~|~ \\dots ~|~ \\text{z})~\\Tidchar^\\ast\n     \\qquad (\\mbox{if occurring as a literal terminal in the grammar}) \\\\\n   \\production{reserved} & \\Treserved &::=&\n     \\Tidchar^+ \\\\\n   \\end{array}\n\nTokens are formed from the input character stream according to the *longest match* rule.\nThat is, the next token always consists of the longest possible sequence of characters that is recognized by the above lexical grammar.\nTokens can be separated by :ref:`white space <text-space>`,\nbut except for strings, they cannot themselves contain whitespace.\n\nThe set of *keyword* tokens is defined implicitly, by all occurrences of a :ref:`terminal symbol <text-grammar>` in literal form, such as :math:`\\text{keyword}`, in a :ref:`syntactic <text-syntactic>` production of this chapter.\n\nAny token that does not fall into any of the other categories is considered *reserved*, and cannot occur in source text.\n\n.. note::\n   The effect of defining the set of reserved tokens is that all tokens must be separated by either parentheses or :ref:`white space <text-space>`.\n   For example, :math:`\\text{0\\$x}` is a single reserved token.\n   Consequently, it is not recognized as two separate tokens :math:`\\text{0}` and :math:`\\text{\\$x}`, but instead disallowed.\n   This property of tokenization is not affected by the fact that the definition of reserved tokens overlaps with other token classes.\n\n\n.. index:: ! white space, character, ASCII\n   single: text format; white space\n.. _text-format:\n.. _text-space:\n\nWhite Space\n~~~~~~~~~~~\n\n*White space* is any sequence of literal space characters, formatting characters, or :ref:`comments <text-comment>`.\nThe allowed formatting characters correspond to a subset of the |ASCII|_ *format effectors*, namely, *horizontal tabulation* (:math:`\\unicode{09}`), *line feed* (:math:`\\unicode{0A}`), and *carriage return* (:math:`\\unicode{0D}`).\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{white space} & \\Tspace &::=&\n     (\\text{~~} ~|~ \\Tformat ~|~ \\Tcomment)^\\ast \\\\\n   \\production{format} & \\Tformat &::=&\n     \\unicode{09} ~|~ \\unicode{0A} ~|~ \\unicode{0D} \\\\\n   \\end{array}\n\nThe only relevance of white space is to separate :ref:`tokens <text-token>`. It is otherwise ignored.\n\n\n.. index:: ! comment, character\n   single: text format; comment\n.. _text-comment:\n\nComments\n~~~~~~~~\n\nA *comment* can either be a *line comment*, started with a double semicolon :math:`\\Tcommentd` and extending to the end of the line,\nor a *block comment*, enclosed in delimiters :math:`\\Tcommentl \\dots \\Tcommentr`.\nBlock comments can be nested.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{comment} & \\Tcomment &::=&\n     \\Tlinecomment ~|~ \\Tblockcomment \\\\\n   \\production{line comment} & \\Tlinecomment &::=&\n     \\Tcommentd~~\\Tlinechar^\\ast~~(\\unicode{0A} ~|~ \\T{eof}) \\\\\n   \\production{line character} & \\Tlinechar &::=&\n     c{:}\\Tchar & (\\iff c \\neq \\unicode{0A}) \\\\\n   \\production{block comment} & \\Tblockcomment &::=&\n     \\Tcommentl~~\\Tblockchar^\\ast~~\\Tcommentr \\\\\n   \\production{block character} & \\Tblockchar &::=&\n     c{:}\\Tchar & (\\iff c \\neq \\text{;} \\wedge c \\neq \\text{(}) \\\\ &&|&\n     \\text{;} & (\\iff~\\mbox{the next character is not}~\\text{)}) \\\\ &&|&\n     \\text{(} & (\\iff~\\mbox{the next character is not}~\\text{;}) \\\\ &&|&\n     \\Tblockcomment \\\\\n   \\end{array}\n\nHere, the pseudo token :math:`\\T{eof}` indicates the end of the input.\nThe *look-ahead* restrictions on the productions for |Tblockchar| disambiguate the grammar such that only well-bracketed uses of block comment delimiters are allowed.\n\n.. note::\n   Any formatting and control characters are allowed inside comments.\n"
  },
  {
    "path": "document/core/text/modules.rst",
    "content": "Modules\n-------\n\n\n.. index:: index, type index, function index, table index, memory index, global index, element index, data index, local index, label index\n   pair: text format; type index\n   pair: text format; function index\n   pair: text format; table index\n   pair: text format; memory index\n   pair: text format; global index\n   pair: text format; element index\n   pair: text format; data index\n   pair: text format; local index\n   pair: text format; label index\n.. _text-typeidx:\n.. _text-funcidx:\n.. _text-tableidx:\n.. _text-memidx:\n.. _text-globalidx:\n.. _text-localidx:\n.. _text-labelidx:\n.. _text-index:\n\nIndices\n~~~~~~~\n\n:ref:`Indices <syntax-index>` can be given either in raw numeric form or as symbolic :ref:`identifiers <text-id>` when bound by a respective construct.\nSuch identifiers are looked up in the suitable space of the :ref:`identifier context <text-context>` :math:`I`.\n\n.. math::\n   \\begin{array}{llcllllllll}\n   \\production{type index} & \\Ttypeidx_I &::=&\n     x{:}\\Tu32 &\\Rightarrow& x \\\\&&|&\n     v{:}\\Tid &\\Rightarrow& x & (\\iff I.\\ITYPES[x] = v) \\\\\n   \\production{function index} & \\Tfuncidx_I &::=&\n     x{:}\\Tu32 &\\Rightarrow& x \\\\&&|&\n     v{:}\\Tid &\\Rightarrow& x & (\\iff I.\\IFUNCS[x] = v) \\\\\n   \\production{table index} & \\Ttableidx_I &::=&\n     x{:}\\Tu32 &\\Rightarrow& x \\\\&&|&\n     v{:}\\Tid &\\Rightarrow& x & (\\iff I.\\ITABLES[x] = v) \\\\\n   \\production{memory index} & \\Tmemidx_I &::=&\n     x{:}\\Tu32 &\\Rightarrow& x \\\\&&|&\n     v{:}\\Tid &\\Rightarrow& x & (\\iff I.\\IMEMS[x] = v) \\\\\n   \\production{global index} & \\Tglobalidx_I &::=&\n     x{:}\\Tu32 &\\Rightarrow& x \\\\&&|&\n     v{:}\\Tid &\\Rightarrow& x & (\\iff I.\\IGLOBALS[x] = v) \\\\\n   \\production{element index} & \\Telemidx_I &::=&\n     x{:}\\Tu32 &\\Rightarrow& x \\\\&&|&\n     v{:}\\Tid &\\Rightarrow& x & (\\iff I.\\IELEM[x] = v) \\\\\n   \\production{data index} & \\Tdataidx_I &::=&\n     x{:}\\Tu32 &\\Rightarrow& x \\\\&&|&\n     v{:}\\Tid &\\Rightarrow& x & (\\iff I.\\IDATA[x] = v) \\\\\n   \\production{local index} & \\Tlocalidx_I &::=&\n     x{:}\\Tu32 &\\Rightarrow& x \\\\&&|&\n     v{:}\\Tid &\\Rightarrow& x & (\\iff I.\\ILOCALS[x] = v) \\\\\n   \\production{label index} & \\Tlabelidx_I &::=&\n     l{:}\\Tu32 &\\Rightarrow& l \\\\&&|&\n     v{:}\\Tid &\\Rightarrow& l & (\\iff I.\\ILABELS[l] = v) \\\\\n   \\end{array}\n\n\n.. index:: type definition, identifier\n   pair: text format; type definition\n.. _text-typedef:\n\nTypes\n~~~~~\n\nType definitions can bind a symbolic :ref:`type identifier <text-id>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{type definition} & \\Ttype &::=&\n     \\text{(}~\\text{type}~~\\Tid^?~~\\X{ft}{:}\\Tfunctype~\\text{)}\n       &\\Rightarrow& \\X{ft} \\\\\n   \\end{array}\n\n\n.. index:: type use\n   pair: text format; type use\n.. _text-typeuse:\n\nType Uses\n~~~~~~~~~\n\nA *type use* is a reference to a :ref:`type definition <text-type>`.\nIt may optionally be augmented by explicit inlined :ref:`parameter <text-param>` and :ref:`result <text-result>` declarations.\nThat allows binding symbolic :ref:`identifiers <text-id>` to name the :ref:`local indices <text-localidx>` of parameters.\nIf inline declarations are given, then their types must match the referenced :ref:`function type <text-type>`.\n\n.. math::\n   \\begin{array}{llcllll}\n   \\production{type use} & \\Ttypeuse_I &::=&\n     \\text{(}~\\text{type}~~x{:}\\Ttypeidx_I~\\text{)}\n       \\quad\\Rightarrow\\quad x, I' \\\\ &&& \\qquad\n       (\\iff \\begin{array}[t]{@{}l@{}}\n        I.\\ITYPEDEFS[x] = [t_1^n] \\to [t_2^\\ast] \\wedge\n        I' = \\{\\ILOCALS~(\\epsilon)^n\\}) \\\\\n        \\end{array} \\\\[1ex] &&|&\n     \\text{(}~\\text{type}~~x{:}\\Ttypeidx_I~\\text{)}\n     ~~(t_1{:}\\Tparam)^\\ast~~(t_2{:}\\Tresult)^\\ast\n       \\quad\\Rightarrow\\quad x, I' \\\\ &&& \\qquad\n       (\\iff \\begin{array}[t]{@{}l@{}}\n        I.\\ITYPEDEFS[x] = [t_1^\\ast] \\to [t_2^\\ast] \\wedge\n        I' = \\{\\ILOCALS~\\F{id}(\\Tparam)^\\ast\\} \\idcwellformed) \\\\\n        \\end{array} \\\\\n   \\end{array}\n\nThe synthesized attribute of a |Ttypeuse| is a pair consisting of both the used :ref:`type index <syntax-typeidx>` and the updated :ref:`identifier context <text-context>` including possible parameter identifiers.\nThe following auxiliary function extracts optional identifiers from parameters:\n\n.. math::\n   \\begin{array}{lcl@{\\qquad\\qquad}l}\n   \\F{id}(\\text{(}~\\text{param}~\\Tid^?~\\dots~\\text{)}) &=& \\Tid^? \\\\\n   \\end{array}\n\n.. note::\n   Both productions overlap for the case that the function type is :math:`[] \\to []`.\n   However, in that case, they also produce the same results, so that the choice is immaterial.\n\n   The :ref:`well-formedness <text-context-wf>` condition on :math:`I'` ensures that the parameters do not contain duplicate identifier.\n\n\n.. _text-typeuse-abbrev:\n\nAbbreviations\n.............\n\nA |Ttypeuse| may also be replaced entirely by inline :ref:`parameter <text-param>` and :ref:`result <text-result>` declarations.\nIn that case, a :ref:`type index <syntax-typeidx>` is automatically inserted:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{type use} &\n     (t_1{:}\\Tparam)^\\ast~~(t_2{:}\\Tresult)^\\ast &\\equiv&\n     \\text{(}~\\text{type}~~x~\\text{)}~~\\Tparam^\\ast~~\\Tresult^\\ast \\\\\n   \\end{array}\n\nwhere :math:`x` is the smallest existing :ref:`type index <syntax-typeidx>` whose definition in the current module is the :ref:`function type <syntax-functype>` :math:`[t_1^\\ast] \\to [t_2^\\ast]`.\nIf no such index exists, then a new :ref:`type definition <text-type>` of the form\n\n.. math::\n   \\text{(}~\\text{type}~~\\text{(}~\\text{func}~~\\Tparam^\\ast~~\\Tresult^\\ast~\\text{)}~\\text{)}\n\nis inserted at the end of the module.\n\nAbbreviations are expanded in the order they appear, such that previously inserted type definitions are reused by consecutive expansions.\n\n\n.. index:: import, name, function type, table type, memory type, global type\n   pair: text format; import\n.. _text-importdesc:\n.. _text-import:\n\nImports\n~~~~~~~\n\nThe descriptors in imports can bind a symbolic function, table, memory, or global :ref:`identifier <text-id>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{import} & \\Timport_I &::=&\n     \\text{(}~\\text{import}~~\\X{mod}{:}\\Tname~~\\X{nm}{:}\\Tname~~d{:}\\Timportdesc_I~\\text{)} \\\\ &&& \\qquad\n       \\Rightarrow\\quad \\{ \\IMODULE~\\X{mod}, \\INAME~\\X{nm}, \\IDESC~d \\} \\\\[1ex]\n   \\production{import description} & \\Timportdesc_I &::=&\n     \\text{(}~\\text{func}~~\\Tid^?~~x,I'{:}\\Ttypeuse_I~\\text{)}\n       &\\Rightarrow& \\IDFUNC~x \\\\ &&|&\n     \\text{(}~\\text{table}~~\\Tid^?~~\\X{tt}{:}\\Ttabletype~\\text{)}\n       &\\Rightarrow& \\IDTABLE~\\X{tt} \\\\ &&|&\n     \\text{(}~\\text{memory}~~\\Tid^?~~\\X{mt}{:}\\Tmemtype~\\text{)}\n       &\\Rightarrow& \\IDMEM~~\\X{mt} \\\\ &&|&\n     \\text{(}~\\text{global}~~\\Tid^?~~\\X{gt}{:}\\Tglobaltype~\\text{)}\n       &\\Rightarrow& \\IDGLOBAL~\\X{gt} \\\\\n   \\end{array}\n\n\nAbbreviations\n.............\n\nAs an abbreviation, imports may also be specified inline with :ref:`function <text-func>`, :ref:`table <text-table>`, :ref:`memory <text-mem>`, or :ref:`global <text-global>` definitions; see the respective sections.\n\n\n\n.. index:: function, type index, function type, identifier, local\n   pair: text format; function\n   pair: text format; local\n.. _text-local:\n.. _text-func:\n\nFunctions\n~~~~~~~~~\n\nFunction definitions can bind a symbolic :ref:`function identifier <text-id>`, and :ref:`local identifiers <text-id>` for its :ref:`parameters <text-typeuse>` and locals.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{function} & \\Tfunc_I &::=&\n     \\text{(}~\\text{func}~~\\Tid^?~~x,I'{:}\\Ttypeuse_I~~\n     (t{:}\\Tlocal)^\\ast~~(\\X{in}{:}\\Tinstr_{I''})^\\ast~\\text{)} \\\\ &&& \\qquad\n       \\Rightarrow\\quad \\{ \\FTYPE~x, \\FLOCALS~t^\\ast, \\FBODY~\\X{in}^\\ast~\\END \\} \\\\ &&& \\qquad\\qquad\\qquad\n       (\\iff I'' = I' \\compose \\{\\ILOCALS~\\F{id}(\\Tlocal)^\\ast\\} \\idcwellformed) \\\\[1ex]\n   \\production{local} & \\Tlocal &::=&\n     \\text{(}~\\text{local}~~\\Tid^?~~t{:}\\Tvaltype~\\text{)}\n       \\quad\\Rightarrow\\quad t \\\\\n   \\end{array}\n\nThe definition of the local :ref:`identifier context <text-context>` :math:`I''` uses the following auxiliary function to extract optional identifiers from locals:\n\n.. math::\n   \\begin{array}{lcl@{\\qquad\\qquad}l}\n   \\F{id}(\\text{(}~\\text{local}~\\Tid^?~\\dots~\\text{)}) &=& \\Tid^? \\\\\n   \\end{array}\n\n\n.. note::\n   The :ref:`well-formedness <text-context-wf>` condition on :math:`I''` ensures that parameters and locals do not contain duplicate identifiers.\n\n\n.. index:: import, name\n   pair: text format; import\n.. index:: export, name, index, function index\n   pair: text format; export\n.. _text-func-abbrev:\n\nAbbreviations\n.............\n\nMultiple anonymous locals may be combined into a single declaration:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{local} &\n     \\text{(}~~\\text{local}~~\\Tvaltype^\\ast~~\\text{)} &\\equiv&\n     (\\text{(}~~\\text{local}~~\\Tvaltype~~\\text{)})^\\ast \\\\\n   \\end{array}\n\nFunctions can be defined as :ref:`imports <text-import>` or :ref:`exports <text-export>` inline:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{module field} &\n     \\text{(}~\\text{func}~~\\Tid^?~~\\text{(}~\\text{import}~~\\Tname_1~~\\Tname_2~\\text{)}~~\\Ttypeuse~\\text{)} \\quad\\equiv \\\\ & \\qquad\n       \\text{(}~\\text{import}~~\\Tname_1~~\\Tname_2~~\\text{(}~\\text{func}~~\\Tid^?~~\\Ttypeuse~\\text{)}~\\text{)} \\\\[1ex] &\n     \\text{(}~\\text{func}~~\\Tid^?~~\\text{(}~\\text{export}~~\\Tname~\\text{)}~~\\dots~\\text{)} \\quad\\equiv \\\\ & \\qquad\n       \\text{(}~\\text{export}~~\\Tname~~\\text{(}~\\text{func}~~\\Tid'~\\text{)}~\\text{)}~~\n       \\text{(}~\\text{func}~~\\Tid'~~\\dots~\\text{)}\n       \\\\ & \\qquad\\qquad\n       (\\iff \\Tid' = \\Tid^? \\neq \\epsilon \\vee \\Tid' \\idfresh) \\\\\n   \\end{array}\n\nThe latter abbreviation can be applied repeatedly, with \":math:`\\dots`\" containing another import or export.\n\n\n.. index:: table, table type, identifier\n   pair: text format; table\n.. _text-table:\n\nTables\n~~~~~~\n\nTable definitions can bind a symbolic :ref:`table identifier <text-id>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{table} & \\Ttable_I &::=&\n     \\text{(}~\\text{table}~~\\Tid^?~~\\X{tt}{:}\\Ttabletype~\\text{)}\n       &\\Rightarrow& \\{ \\TTYPE~\\X{tt} \\} \\\\\n   \\end{array}\n\n\n.. index:: import, name\n   pair: text format; import\n.. index:: export, name, index, table index\n   pair: text format; export\n.. index:: element, table index, function index\n   pair: text format; element\n   single: table; element\n   single: element; segment\n.. _text-table-abbrev:\n\nAbbreviations\n.............\n\nAn :ref:`element segment <text-elem>` can be given inline with a table definition, in which case its offset is :math:`0` and the :ref:`limits <text-limits>` of the :ref:`table type <text-tabletype>` are inferred from the length of the given segment:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{module field} &\n     \\text{(}~\\text{table}~~\\Tid^?~~\\Treftype~~\\text{(}~\\text{elem}~~\\Telemlist~\\text{)} \\quad\\equiv \\\\ & \\qquad\n       \\text{(}~\\text{table}~~\\Tid'~~n~~n~~\\Treftype~\\text{)}~~\n       \\text{(}~\\text{elem}~~\\text{(}~\\text{table}~~\\Tid'~\\text{)}~~\\text{(}~\\text{i32.const}~~\\text{0}~\\text{)}~~\\Telemlist~\\text{)}\n       \\\\ & \\qquad\\qquad\n       (\\iff \\Tid' = \\Tid^? \\neq \\epsilon \\vee \\Tid' \\idfresh) \\\\\n   \\end{array}\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{module field} &\n     \\text{(}~\\text{table}~~\\Tid^?~~\\Treftype~~\\text{(}~\\text{elem}~~x^n{:}\\Tvec(\\Texpr)~\\text{)}~~\\text{)} \\quad\\equiv \\\\ & \\qquad\n       \\text{(}~\\text{table}~~\\Tid'~~n~~n~~\\Treftype~\\text{)}~~\n       \\text{(}~\\text{elem}~~\\Tid'~~\\text{(}~\\text{i32.const}~~\\text{0}~\\text{)}~~\\Tvec(\\Texpr)~\\text{)}\n       \\\\ & \\qquad\\qquad\n       (\\iff \\Tid' = \\Tid^? \\neq \\epsilon \\vee \\Tid' \\idfresh) \\\\\n   \\end{array}\n\nTables can be defined as :ref:`imports <text-import>` or :ref:`exports <text-export>` inline:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{module field} &\n     \\text{(}~\\text{table}~~\\Tid^?~~\\text{(}~\\text{import}~~\\Tname_1~~\\Tname_2~\\text{)}~~\\Ttabletype~\\text{)} \\quad\\equiv \\\\ & \\qquad\n       \\text{(}~\\text{import}~~\\Tname_1~~\\Tname_2~~\\text{(}~\\text{table}~~\\Tid^?~~\\Ttabletype~\\text{)}~\\text{)} \\\\[1ex] &\n     \\text{(}~\\text{table}~~\\Tid^?~~\\text{(}~\\text{export}~~\\Tname~\\text{)}~~\\dots~\\text{)} \\quad\\equiv \\\\ & \\qquad\n       \\text{(}~\\text{export}~~\\Tname~~\\text{(}~\\text{table}~~\\Tid'~\\text{)}~\\text{)}~~\n       \\text{(}~\\text{table}~~\\Tid'~~\\dots~\\text{)}\n       \\\\ & \\qquad\\qquad\n       (\\iff \\Tid' = \\Tid^? \\neq \\epsilon \\vee \\Tid' \\idfresh) \\\\\n   \\end{array}\n\nThe latter abbreviation can be applied repeatedly, with \":math:`\\dots`\" containing another import or export or an inline elements segment.\n\n\n.. index:: memory, memory type, identifier\n   pair: text format; memory\n.. _text-mem:\n\nMemories\n~~~~~~~~\n\nMemory definitions can bind a symbolic :ref:`memory identifier <text-id>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{memory} & \\Tmem_I &::=&\n     \\text{(}~\\text{memory}~~\\Tid^?~~\\X{mt}{:}\\Tmemtype~\\text{)}\n       &\\Rightarrow& \\{ \\MTYPE~\\X{mt} \\} \\\\\n   \\end{array}\n\n\n.. index:: import, name\n   pair: text format; import\n.. index:: export, name, index, memory index\n   pair: text format; export\n.. index:: data, memory, memory index, expression, byte, page size\n   pair: text format; data\n   single: memory; data\n   single: data; segment\n.. _text-mem-abbrev:\n\nAbbreviations\n.............\n\nA :ref:`data segment <text-data>` can be given inline with a memory definition, in which case its offset is :math:`0` the :ref:`limits <text-limits>` of the :ref:`memory type <text-memtype>` are inferred from the length of the data, rounded up to :ref:`page size <page-size>`:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{module field} &\n     \\text{(}~\\text{memory}~~\\Tid^?~~\\text{(}~\\text{data}~~b^n{:}\\Tdatastring~\\text{)}~~\\text{)} \\quad\\equiv \\\\ & \\qquad\n       \\text{(}~\\text{memory}~~\\Tid'~~m~~m~\\text{)}~~\n       \\text{(}~\\text{data}~~\\text{(}~\\text{memory}~~\\Tid'~\\text{)}~~\\text{(}~\\text{i32.const}~~\\text{0}~\\text{)}~~\\Tdatastring~\\text{)}\n       \\\\ & \\qquad\\qquad\n       (\\iff \\Tid' = \\Tid^? \\neq \\epsilon \\vee \\Tid' \\idfresh, m = \\F{ceil}(n / 64\\F{Ki})) \\\\\n   \\end{array}\n\nMemories can be defined as :ref:`imports <text-import>` or :ref:`exports <text-export>` inline:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{module field} &\n     \\text{(}~\\text{memory}~~\\Tid^?~~\\text{(}~\\text{import}~~\\Tname_1~~\\Tname_2~\\text{)}~~\\Tmemtype~\\text{)} \\quad\\equiv \\\\ & \\qquad\n       \\text{(}~\\text{import}~~\\Tname_1~~\\Tname_2~~\\text{(}~\\text{memory}~~\\Tid^?~~\\Tmemtype~\\text{)}~\\text{)}\n       \\\\[1ex] &\n     \\text{(}~\\text{memory}~~\\Tid^?~~\\text{(}~\\text{export}~~\\Tname~\\text{)}~~\\dots~\\text{)} \\quad\\equiv \\\\ & \\qquad\n       \\text{(}~\\text{export}~~\\Tname~~\\text{(}~\\text{memory}~~\\Tid'~\\text{)}~\\text{)}~~\n       \\text{(}~\\text{memory}~~\\Tid'~~\\dots~\\text{)}\n       \\\\ & \\qquad\\qquad\n       (\\iff \\Tid' = \\Tid^? \\neq \\epsilon \\vee \\Tid' \\idfresh) \\\\\n   \\end{array}\n\nThe latter abbreviation can be applied repeatedly, with \":math:`\\dots`\" containing another import or export or an inline data segment.\n\n\n.. index:: global, global type, identifier, expression\n   pair: text format; global\n.. _text-global:\n\nGlobals\n~~~~~~~\n\nGlobal definitions can bind a symbolic :ref:`global identifier <text-id>`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{global} & \\Tglobal_I &::=&\n     \\text{(}~\\text{global}~~\\Tid^?~~\\X{gt}{:}\\Tglobaltype~~e{:}\\Texpr_I~\\text{)}\n       &\\Rightarrow& \\{ \\GTYPE~\\X{gt}, \\GINIT~e \\} \\\\\n   \\end{array}\n\n\n.. index:: import, name\n   pair: text format; import\n.. index:: export, name, index, global index\n   pair: text format; export\n.. _text-global-abbrev:\n\nAbbreviations\n.............\n\nGlobals can be defined as :ref:`imports <text-import>` or :ref:`exports <text-export>` inline:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{module field} &\n     \\text{(}~\\text{global}~~\\Tid^?~~\\text{(}~\\text{import}~~\\Tname_1~~\\Tname_2~\\text{)}~~\\Tglobaltype~\\text{)} \\quad\\equiv \\\\ & \\qquad\n       \\text{(}~\\text{import}~~\\Tname_1~~\\Tname_2~~\\text{(}~\\text{global}~~\\Tid^?~~\\Tglobaltype~\\text{)}~\\text{)}\n       \\\\[1ex] &\n     \\text{(}~\\text{global}~~\\Tid^?~~\\text{(}~\\text{export}~~\\Tname~\\text{)}~~\\dots~\\text{)} \\quad\\equiv \\\\ & \\qquad\n       \\text{(}~\\text{export}~~\\Tname~~\\text{(}~\\text{global}~~\\Tid'~\\text{)}~\\text{)}~~\n       \\text{(}~\\text{global}~~\\Tid'~~\\dots~\\text{)}\n       \\\\ & \\qquad\\qquad\n       (\\iff \\Tid' = \\Tid^? \\neq \\epsilon \\vee \\Tid' \\idfresh) \\\\\n   \\end{array}\n\nThe latter abbreviation can be applied repeatedly, with \":math:`\\dots`\" containing another import or export.\n\n\n.. index:: export, name, index, function index, table index, memory index, global index\n   pair: text format; export\n.. _text-exportdesc:\n.. _text-export:\n\nExports\n~~~~~~~\n\nThe syntax for exports mirrors their :ref:`abstract syntax <syntax-export>` directly.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{export} & \\Texport_I &::=&\n     \\text{(}~\\text{export}~~\\X{nm}{:}\\Tname~~d{:}\\Texportdesc_I~\\text{)}\n       &\\Rightarrow& \\{ \\ENAME~\\X{nm}, \\EDESC~d \\} \\\\\n   \\production{export description} & \\Texportdesc_I &::=&\n     \\text{(}~\\text{func}~~x{:}\\Tfuncidx_I~\\text{)}\n       &\\Rightarrow& \\EDFUNC~x \\\\ &&|&\n     \\text{(}~\\text{table}~~x{:}\\Ttableidx_I~\\text{)}\n       &\\Rightarrow& \\EDTABLE~x \\\\ &&|&\n     \\text{(}~\\text{memory}~~x{:}\\Tmemidx_I~\\text{)}\n       &\\Rightarrow& \\EDMEM~x \\\\ &&|&\n     \\text{(}~\\text{global}~~x{:}\\Tglobalidx_I~\\text{)}\n       &\\Rightarrow& \\EDGLOBAL~x \\\\\n   \\end{array}\n\n\nAbbreviations\n.............\n\nAs an abbreviation, exports may also be specified inline with :ref:`function <text-func>`, :ref:`table <text-table>`, :ref:`memory <text-mem>`, or :ref:`global <text-global>` definitions; see the respective sections.\n\n\n.. index:: start function, function index\n   pair: text format; start function\n.. _text-start:\n\nStart Function\n~~~~~~~~~~~~~~\n\nA :ref:`start function <syntax-start>` is defined in terms of its index.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{start function} & \\Tstart_I &::=&\n     \\text{(}~\\text{start}~~x{:}\\Tfuncidx_I~\\text{)}\n       &\\Rightarrow& \\{ \\SFUNC~x \\} \\\\\n   \\end{array}\n\n.. note::\n   At most one start function may occur in a module,\n   which is ensured by a suitable side condition on the |Tmodule| grammar.\n\n\n\n.. index:: element, table index, expression, function index\n   pair: text format; element\n   single: table; element\n   single: element; segment\n.. _text-elem:\n.. _text-elemlist:\n.. _text-elemexpr:\n.. _text-tableuse:\n\nElement Segments\n~~~~~~~~~~~~~~~~\n\nElement segments allow for an optional :ref:`table index <text-tableidx>` to identify the table to initialize.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{element segment} & \\Telem_I &::=&\n     \\text{(}~\\text{elem}~~\\Tid^?~~(et, y^\\ast){:}\\Telemlist~\\text{)} \\\\ &&& \\qquad\n       \\Rightarrow\\quad \\{ \\ETYPE~et, \\EINIT~y^\\ast, \\EMODE~\\EPASSIVE \\} \\\\ &&|&\n     \\text{(}~\\text{elem}~~\\Tid^?~~x{:}\\Ttableuse_I~~\\text{(}~\\text{offset}~~e{:}\\Texpr_I~\\text{)}~~(et, y^\\ast){:}\\Telemlist~\\text{)} \\\\ &&& \\qquad\n       \\Rightarrow\\quad \\{ \\ETYPE~et, \\EINIT~y^\\ast, \\EMODE~\\EACTIVE~\\{ \\ETABLE~x, \\EOFFSET~e \\} \\} \\\\ &&&\n     \\text{(}~\\text{elem}~~\\Tid^?~~\\text{declare}~~(et, y^\\ast){:}\\Telemlist~\\text{)} \\\\ &&& \\qquad\n       \\Rightarrow\\quad \\{ \\ETYPE~et, \\EINIT~y^\\ast, \\EMODE~\\EDECLARATIVE \\} \\\\\n   \\production{element list} & \\Telemlist &::=&\n     t{:}\\Treftype~~y^\\ast{:}\\Tvec(\\Telemexpr_I) \\qquad\\Rightarrow\\quad ( \\ETYPE~t, \\EINIT~y^\\ast ) \\\\\n   \\production{element expression} & \\Telemexpr &::=&\n     \\text{(}~\\text{item}~~e{:}\\Texpr~\\text{)}\n       \\quad\\Rightarrow\\quad e \\\\\n   \\production{table use} & \\Ttableuse_I &::=&\n     \\text{(}~\\text{table}~~x{:}\\Ttableidx_I ~\\text{)}\n       \\quad\\Rightarrow\\quad x \\\\\n   \\end{array}\n\n\nAbbreviations\n.............\n\nAs an abbreviation, a single instruction may occur in place of the offset of an active element segment or as an element expression:\n\n.. math::\n   \\begin{array}{llcll}\n   \\production{element offset} &\n     \\Tinstr &\\equiv&\n     \\text{(}~\\text{offset}~~\\Tinstr~\\text{)} \\\\\n   \\production{element item} &\n     \\Tinstr &\\equiv&\n     \\text{(}~\\text{item}~~\\Tinstr~\\text{)} \\\\\n   \\end{array}\n\nAlso, the element list may be written as just a sequence of :ref:`function indices <text-funcidx>`:\n\n.. math::\n   \\begin{array}{llcll}\n   \\production{element list} &\n     \\text{func}~~\\Tvec(\\Tfuncidx_I) &\\equiv&\n     \\text{funcref}~~\\Tvec(\\text{(}~\\text{ref.func}~~\\Tfuncidx_I~\\text{)})\n   \\end{array}\n\nA table use can be omitted, defaulting to :math:`\\T{0}`.\nFurthermore, for backwards compatibility with earlier versions of WebAssembly, if the table use is omitted, the :math:`\\text{func}` keyword can be omitted as well.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{table use} &\n     \\epsilon &\\equiv& \\text{(}~\\text{table}~~\\text{0}~\\text{)} \\\\\n   \\production{element segment} &\n     \\text{(}~\\text{elem}~~\\Tid^?~~\\text{(}~\\text{offset}~~\\Texpr_I~\\text{)}~~\\Tvec(\\Tfuncidx_I)~\\text{)}\n       &\\equiv&\n     \\text{(}~\\text{elem}~~\\Tid^?~~\\text{(}~\\text{table}~~\\text{0}~\\text{)}~~\\text{(}~\\text{offset}~~\\Texpr_I~\\text{)}~~\\text{func}~~\\Tvec(\\Tfuncidx_I)~\\text{)}\n   \\end{array}\n\nAs another abbreviation, element segments may also be specified inline with :ref:`table <text-table>` definitions; see the respective section.\n\n\n.. index:: data, memory, memory index, expression, byte\n   pair: text format; data\n   single: memory; data\n   single: data; segment\n.. _text-datastring:\n.. _text-data:\n.. _test-memuse:\n\nData Segments\n~~~~~~~~~~~~~\n\nData segments allow for an optional :ref:`memory index <text-memidx>` to identify the memory to initialize.\nThe data is written as a :ref:`string <text-string>`, which may be split up into a possibly empty sequence of individual string literals.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{data segment} & \\Tdata_I &::=&\n     \\text{(}~\\text{data}~~\\Tid^?~~b^\\ast{:}\\Tdatastring~\\text{)} \\\\ &&& \\qquad\n       \\Rightarrow\\quad \\{ \\DINIT~b^\\ast, \\DMODE~\\DPASSIVE \\} \\\\ &&|&\n     \\text{(}~\\text{data}~~\\Tid^?~~x{:}\\Tmemuse_I~~\\text{(}~\\text{offset}~~e{:}\\Texpr_I~\\text{)}~~b^\\ast{:}\\Tdatastring~\\text{)} \\\\ &&& \\qquad\n       \\Rightarrow\\quad \\{ \\DINIT~b^\\ast, \\DMODE~\\DACTIVE~\\{ \\DMEM~x', \\DOFFSET~e \\} \\} \\\\\n   \\production{data string} & \\Tdatastring &::=&\n     (b^\\ast{:}\\Tstring)^\\ast \\quad\\Rightarrow\\quad \\concat((b^\\ast)^\\ast) \\\\\n   \\production{memory use} & \\Tmemuse_I &::=&\n     \\text{(}~\\text{memory}~~x{:}\\Tmemidx_I ~\\text{)}\n       \\quad\\Rightarrow\\quad x \\\\\n   \\end{array}\n\n.. note::\n   In the current version of WebAssembly, the only valid memory index is 0\n   or a symbolic :ref:`memory identifier <text-id>` resolving to the same value.\n\n\nAbbreviations\n.............\n\nAs an abbreviation, a single instruction may occur in place of the offset of an active data segment:\n\n.. math::\n   \\begin{array}{llcll}\n   \\production{data offset} &\n     \\Tinstr &\\equiv&\n     \\text{(}~\\text{offset}~~\\Tinstr~\\text{)}\n   \\end{array}\n\nAlso, a memory use can be omitted, defaulting to :math:`\\T{0}`.\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{memory use} &\n     \\epsilon &\\equiv& \\text{(}~\\text{memory}~~\\text{0}~\\text{)} \\\\\n   \\end{array}\n\nAs another abbreviation, data segments may also be specified inline with :ref:`memory <text-mem>` definitions; see the respective section.\n\n\n.. index:: module, type definition, function type, function, table, memory, global, element, data, start function, import, export, identifier context, identifier, name section\n   pair: text format; module\n   single: section; name\n.. _text-modulefield:\n.. _text-module:\n\nModules\n~~~~~~~\n\nA module consists of a sequence of fields that can occur in any order.\nAll definitions and their respective bound :ref:`identifiers <text-id>` scope over the entire module, including the text preceding them.\n\nA module may optionally bind an :ref:`identifier <text-id>` that names the module.\nThe name serves a documentary role only.\n\n.. note::\n   Tools may include the module name in the :ref:`name section <binary-namesec>` of the :ref:`binary format <binary>`.\n\n.. math::\n   \\begin{array}{lll}\n   \\production{module} & \\Tmodule &\n   \\begin{array}[t]{@{}cllll}\n   ::=&\n     \\text{(}~\\text{module}~~\\Tid^?~~(m{:}\\Tmodulefield_I)^\\ast~\\text{)}\n       \\quad\\Rightarrow\\quad \\bigcompose m^\\ast \\\\\n       &\\qquad (\\iff I = \\bigcompose \\F{idc}(\\Tmodulefield)^\\ast \\idcwellformed) \\\\\n   \\end{array} \\\\[1ex]\n   \\production{module field} & \\Tmodulefield_I &\n   \\begin{array}[t]{@{}clll}\n   ::=&\n     \\X{ty}{:}\\Ttype &\\Rightarrow& \\{\\MTYPES~\\X{ty}\\} \\\\ |&\n     \\X{im}{:}\\Timport_I &\\Rightarrow& \\{\\MIMPORTS~\\X{im}\\} \\\\ |&\n     \\X{fn}{:}\\Tfunc_I &\\Rightarrow& \\{\\MFUNCS~\\X{fn}\\} \\\\ |&\n     \\X{ta}{:}\\Ttable_I &\\Rightarrow& \\{\\MTABLES~\\X{ta}\\} \\\\ |&\n     \\X{me}{:}\\Tmem_I &\\Rightarrow& \\{\\MMEMS~\\X{me}\\} \\\\ |&\n     \\X{gl}{:}\\Tglobal_I &\\Rightarrow& \\{\\MGLOBALS~\\X{gl}\\} \\\\ |&\n     \\X{ex}{:}\\Texport_I &\\Rightarrow& \\{\\MEXPORTS~\\X{ex}\\} \\\\ |&\n     \\X{st}{:}\\Tstart_I &\\Rightarrow& \\{\\MSTART~\\X{st}\\} \\\\ |&\n     \\X{el}{:}\\Telem_I &\\Rightarrow& \\{\\MELEMS~\\X{el}\\} \\\\ |&\n     \\X{da}{:}\\Tdata_I &\\Rightarrow& \\{\\MDATAS~\\X{da}\\} \\\\\n   \\end{array}\n   \\end{array}\n\nThe following restrictions are imposed on the composition of :ref:`modules <syntax-module>`: :math:`m_1 \\compose m_2` is defined if and only if\n\n* :math:`m_1.\\MSTART = \\epsilon \\vee m_2.\\MSTART = \\epsilon`\n\n* :math:`m_1.\\MFUNCS = m_1.\\MTABLES = m_1.\\MMEMS = m_1.\\MGLOBALS = \\epsilon \\vee m_2.\\MIMPORTS = \\epsilon`\n\n.. note::\n   The first condition ensures that there is at most one start function.\n   The second condition enforces that all :ref:`imports <text-import>` must occur before any regular definition of a :ref:`function <text-func>`, :ref:`table <text-table>`, :ref:`memory <text-mem>`, or :ref:`global <text-global>`,\n   thereby maintaining the ordering of the respective :ref:`index spaces <syntax-index>`.\n\n   The :ref:`well-formedness <text-context-wf>` condition on :math:`I` in the grammar for |Tmodule| ensures that no namespace contains duplicate identifiers.\n\nThe definition of the initial :ref:`identifier context <text-context>` :math:`I` uses the following auxiliary definition which maps each relevant definition to a singular context with one (possibly empty) identifier:\n\n.. math::\n   \\begin{array}{@{}lcl@{\\qquad\\qquad}l}\n   \\F{idc}(\\text{(}~\\text{type}~\\Tid^?~\\X{ft}{:}\\Tfunctype~\\text{)}) &=&\n     \\{\\ITYPES~(\\Tid^?), \\ITYPEDEFS~\\X{ft}\\} \\\\\n   \\F{idc}(\\text{(}~\\text{func}~\\Tid^?~\\dots~\\text{)}) &=&\n     \\{\\IFUNCS~(\\Tid^?)\\} \\\\\n   \\F{idc}(\\text{(}~\\text{table}~\\Tid^?~\\dots~\\text{)}) &=&\n     \\{\\ITABLES~(\\Tid^?)\\} \\\\\n   \\F{idc}(\\text{(}~\\text{memory}~\\Tid^?~\\dots~\\text{)}) &=&\n     \\{\\IMEMS~(\\Tid^?)\\} \\\\\n   \\F{idc}(\\text{(}~\\text{global}~\\Tid^?~\\dots~\\text{)}) &=&\n     \\{\\IGLOBALS~(\\Tid^?)\\} \\\\\n   \\F{idc}(\\text{(}~\\text{elem}~\\Tid^?~\\dots~\\text{)}) &=&\n     \\{\\IELEM~(\\Tid^?)\\} \\\\\n   \\F{idc}(\\text{(}~\\text{data}~\\Tid^?~\\dots~\\text{)}) &=&\n     \\{\\IDATA~(\\Tid^?)\\} \\\\\n   \\F{idc}(\\text{(}~\\text{import}~\\dots~\\text{(}~\\text{func}~\\Tid^?~\\dots~\\text{)}~\\text{)}) &=&\n     \\{\\IFUNCS~(\\Tid^?)\\} \\\\\n   \\F{idc}(\\text{(}~\\text{import}~\\dots~\\text{(}~\\text{table}~\\Tid^?~\\dots~\\text{)}~\\text{)}) &=&\n     \\{\\ITABLES~(\\Tid^?)\\} \\\\\n   \\F{idc}(\\text{(}~\\text{import}~\\dots~\\text{(}~\\text{memory}~\\Tid^?~\\dots~\\text{)}~\\text{)}) &=&\n     \\{\\IMEMS~(\\Tid^?)\\} \\\\\n   \\F{idc}(\\text{(}~\\text{import}~\\dots~\\text{(}~\\text{global}~\\Tid^?~\\dots~\\text{)}~\\text{)}) &=&\n     \\{\\IGLOBALS~(\\Tid^?)\\} \\\\\n   \\F{idc}(\\text{(}~\\dots~\\text{)}) &=&\n     \\{\\} \\\\\n   \\end{array}\n\n\nAbbreviations\n.............\n\nIn a source file, the toplevel :math:`\\T{(module}~\\dots\\T{)}` surrounding the module body may be omitted.\n\n.. math::\n   \\begin{array}{llcll}\n   \\production{module} &\n     \\Tmodulefield^\\ast &\\equiv&\n     \\text{(}~\\text{module}~~\\Tmodulefield^\\ast~\\text{)}\n   \\end{array}\n"
  },
  {
    "path": "document/core/text/types.rst",
    "content": ".. index:: type\n   pair: text format; type\n.. _text-type:\n\nTypes\n-----\n\n.. index:: number type\n   pair: text format; number type\n.. _text-numtype:\n\nNumber Types\n~~~~~~~~~~~~\n\n.. math::\n   \\begin{array}{llcll@{\\qquad\\qquad}l}\n   \\production{number type} & \\Tnumtype &::=&\n     \\text{i32} &\\Rightarrow& \\I32 \\\\ &&|&\n     \\text{i64} &\\Rightarrow& \\I64 \\\\ &&|&\n     \\text{f32} &\\Rightarrow& \\F32 \\\\ &&|&\n     \\text{f64} &\\Rightarrow& \\F64 \\\\\n   \\end{array}\n\n\n.. index:: reference type\n   pair: text format; reference type\n.. _text-reftype:\n.. _text-heaptype:\n\nReference Types\n~~~~~~~~~~~~~~~\n\n.. math::\n   \\begin{array}{llcll@{\\qquad\\qquad}l}\n   \\production{reference type} & \\Treftype &::=&\n     \\text{funcref} &\\Rightarrow& \\FUNCREF \\\\ &&|&\n     \\text{externref} &\\Rightarrow& \\EXTERNREF \\\\\n   \\production{heap type} & \\Theaptype &::=&\n     \\text{func} &\\Rightarrow& \\FUNCREF \\\\ &&|&\n     \\text{extern} &\\Rightarrow& \\EXTERNREF \\\\\n   \\end{array}\n\n\n.. index:: value type, number type, reference type\n   pair: text format; value type\n.. _text-valtype:\n\nValue Types\n~~~~~~~~~~~\n\n.. math::\n   \\begin{array}{llcll@{\\qquad\\qquad}l}\n   \\production{value type} & \\Tvaltype &::=&\n     t{:}\\Tnumtype &\\Rightarrow& t \\\\ &&|&\n     t{:}\\Treftype &\\Rightarrow& t \\\\\n   \\end{array}\n\n\n.. index:: function type, value type, result type\n   pair: text format; function type\n.. _text-param:\n.. _text-result:\n.. _text-functype:\n\nFunction Types\n~~~~~~~~~~~~~~\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{function type} & \\Tfunctype &::=&\n     \\text{(}~\\text{func}~~t_1^\\ast{:\\,}\\Tvec(\\Tparam)~~t_2^\\ast{:\\,}\\Tvec(\\Tresult)~\\text{)}\n       &\\Rightarrow& [t_1^\\ast] \\to [t_2^\\ast] \\\\\n   \\production{parameter} & \\Tparam &::=&\n     \\text{(}~\\text{param}~~\\Tid^?~~t{:}\\Tvaltype~\\text{)}\n       &\\Rightarrow& t \\\\\n   \\production{result} & \\Tresult &::=&\n     \\text{(}~\\text{result}~~t{:}\\Tvaltype~\\text{)}\n       &\\Rightarrow& t \\\\\n   \\end{array}\n\n\nAbbreviations\n.............\n\nMultiple anonymous parameters or results may be combined into a single declaration:\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{parameter} &\n     \\text{(}~~\\text{param}~~\\Tvaltype^\\ast~~\\text{)} &\\equiv&\n     (\\text{(}~~\\text{param}~~\\Tvaltype~~\\text{)})^\\ast \\\\\n   \\production{result} &\n     \\text{(}~~\\text{result}~~\\Tvaltype^\\ast~~\\text{)} &\\equiv&\n     (\\text{(}~~\\text{result}~~\\Tvaltype~~\\text{)})^\\ast \\\\\n   \\end{array}\n\n\n.. index:: limits\n   pair: text format; limits\n.. _text-limits:\n\nLimits\n~~~~~~\n\n.. math::\n    \\begin{array}{llclll}\n    \\production{limits} & \\Tlimits &::=&\n      n{:}\\Tu32 &\\Rightarrow& \\{ \\LMIN~n, \\LMAX~\\epsilon \\} \\\\ &&|&\n      n{:}\\Tu32~~m{:}\\Tu32 &\\Rightarrow& \\{ \\LMIN~n, \\LMAX~m \\} \\\\\n    \\end{array}\n\n\n.. index:: memory type, limits, page size\n   pair: text format; memory type\n.. _text-memtype:\n\nMemory Types\n~~~~~~~~~~~~\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{memory type} & \\Tmemtype &::=&\n     \\X{lim}{:}\\Tlimits &\\Rightarrow& \\X{lim} \\\\\n   \\end{array}\n\n\n.. index:: table type, reference type, limits\n   pair: text format; table type\n.. _text-tabletype:\n\nTable Types\n~~~~~~~~~~~\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{table type} & \\Ttabletype &::=&\n     \\X{lim}{:}\\Tlimits~~\\X{et}{:}\\Treftype &\\Rightarrow& \\X{lim}~\\X{et} \\\\\n   \\end{array}\n\n\n.. index:: global type, mutability, value type\n   pair: text format; global type\n   pair: text format; mutability\n.. _text-globaltype:\n\nGlobal Types\n~~~~~~~~~~~~\n\n.. math::\n   \\begin{array}{llclll}\n   \\production{global type} & \\Tglobaltype &::=&\n     t{:}\\Tvaltype &\\Rightarrow& \\MCONST~t \\\\ &&|&\n     \\text{(}~\\text{mut}~~t{:}\\Tvaltype~\\text{)} &\\Rightarrow& \\MVAR~t \\\\\n   \\end{array}\n"
  },
  {
    "path": "document/core/text/values.rst",
    "content": ".. index:: value\n   pair: text format; value\n.. _text-value:\n\nValues\n------\n\nThe grammar productions in this section define *lexical syntax*,\nhence no :ref:`white space <text-space>` is allowed.\n\n\n.. index:: integer, unsigned integer, signed integer, uninterpreted integer\n   pair: text format; integer\n   pair: text format; unsigned integer\n   pair: text format; signed integer\n   pair: text format; uninterpreted integer\n.. _text-sign:\n.. _text-digit:\n.. _text-hexdigit:\n.. _text-num:\n.. _text-hexnum:\n.. _text-sint:\n.. _text-uint:\n.. _text-int:\n\nIntegers\n~~~~~~~~\n\nAll :ref:`integers <syntax-int>` can be written in either decimal or hexadecimal notation.\nIn both cases, digits can optionally be separated by underscores.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad}l}\n   \\production{sign} & \\Tsign &::=&\n     \\epsilon \\Rightarrow {+} ~~|~~\n     \\text{+} \\Rightarrow {+} ~~|~~\n     \\text{-} \\Rightarrow {-} \\\\\n   \\production{decimal digit} & \\Tdigit &::=&\n     \\text{0} \\Rightarrow 0 ~~|~~ \\dots ~~|~~ \\text{9} \\Rightarrow 9 \\\\\n   \\production{hexadecimal digit} & \\Thexdigit &::=&\n     d{:}\\Tdigit \\Rightarrow d \\\\ &&|&\n     \\text{A} \\Rightarrow 10 ~~|~~ \\dots ~~|~~ \\text{F} \\Rightarrow 15 \\\\ &&|&\n     \\text{a} \\Rightarrow 10 ~~|~~ \\dots ~~|~~ \\text{f} \\Rightarrow 15\n   \\\\[1ex]\n   \\production{decimal number} & \\Tnum &::=&\n     d{:}\\Tdigit &\\Rightarrow& d \\\\ &&|&\n     n{:}\\Tnum~~\\text{\\_}^?~~d{:}\\Tdigit &\\Rightarrow& 10\\cdot n + d \\\\\n   \\production{hexadecimal number} & \\Thexnum &::=&\n     h{:}\\Thexdigit &\\Rightarrow& h \\\\ &&|&\n     n{:}\\Thexnum~~\\text{\\_}^?~~h{:}\\Thexdigit &\\Rightarrow& 16\\cdot n + h \\\\\n   \\end{array}\n\nThe allowed syntax for integer literals depends on size and signedness.\nMoreover, their value must lie within the range of the respective type.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad}l}\n   \\production{unsigned integer} & \\TuN &::=&\n     n{:}\\Tnum &\\Rightarrow& n & (\\iff n < 2^N) \\\\ &&|&\n     \\text{0x}~~n{:}\\Thexnum &\\Rightarrow& n & (\\iff n < 2^N) \\\\\n   \\production{signed integer} & \\TsN &::=&\n     {\\pm}{:}\\Tsign~~n{:}\\Tnum &\\Rightarrow& \\pm n & (\\iff -2^{N-1} \\leq \\pm n < 2^{N-1}) \\\\ &&|&\n     {\\pm}{:}\\Tsign~~\\text{0x}~~n{:}\\Thexnum &\\Rightarrow& \\pm n & (\\iff -2^{N-1} \\leq \\pm n < 2^{N-1}) \\\\\n   \\end{array}\n\n:ref:`Uninterpreted integers <syntax-int>` can be written as either signed or unsigned, and are normalized to unsigned in the abstract syntax.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{uninterpreted integers} & \\TiN &::=&\n     n{:}\\TuN &\\Rightarrow& n \\\\ &&|&\n     i{:}\\TsN &\\Rightarrow& n & (\\iff i = \\signed(n)) \\\\\n   \\end{array}\n\n\n.. index:: floating-point number\n   pair: text format; floating-point number\n.. _text-frac:\n.. _text-hexfrac:\n.. _text-hexfloat:\n.. _text-float:\n\nFloating-Point\n~~~~~~~~~~~~~~\n\n:ref:`Floating-point <syntax-float>` values can be represented in either decimal or hexadecimal notation.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{decimal floating-point fraction} & \\Tfrac &::=&\n     d{:}\\Tdigit &\\Rightarrow& d/10 \\\\ &&|&\n     d{:}\\Tdigit~~\\text{\\_}^?~~p{:}\\Tfrac &\\Rightarrow& (d+p/10)/10 \\\\\n   \\production{hexadecimal floating-point fraction} & \\Thexfrac &::=&\n     h{:}\\Thexdigit &\\Rightarrow& h/16 \\\\ &&|&\n     h{:}\\Thexdigit~~\\text{\\_}^?~~p{:}\\Thexfrac &\\Rightarrow& (h+p/16)/16 \\\\\n   \\production{decimal floating-point number} & \\Tfloat &::=&\n     p{:}\\Tnum~\\text{.}^?\n       &\\Rightarrow& p \\\\ &&|&\n     p{:}\\Tnum~\\text{.}~q{:}\\Tfrac\n       &\\Rightarrow& p+q \\\\ &&|&\n     p{:}\\Tnum~\\text{.}^?~(\\text{E}~|~\\text{e})~{\\pm}{:}\\Tsign~e{:}\\Tnum\n       &\\Rightarrow& p\\cdot 10^{\\pm e} \\\\ &&|&\n     p{:}\\Tnum~\\text{.}~q{:}\\Tfrac~(\\text{E}~|~\\text{e})~{\\pm}{:}\\Tsign~e{:}\\Tnum\n       &\\Rightarrow& (p+q)\\cdot 10^{\\pm e} \\\\\n   \\production{hexadecimal floating-point number} & \\Thexfloat &::=&\n     \\text{0x}~p{:}\\Thexnum~\\text{.}^?\n       &\\Rightarrow& p \\\\ &&|&\n     \\text{0x}~p{:}\\Thexnum~\\text{.}~q{:}\\Thexfrac\n       &\\Rightarrow& p+q \\\\ &&|&\n     \\text{0x}~p{:}\\Thexnum~\\text{.}^?~(\\text{P}~|~\\text{p})~{\\pm}{:}\\Tsign~e{:}\\Tnum\n       &\\Rightarrow& p\\cdot 2^{\\pm e} \\\\ &&|&\n     \\text{0x}~p{:}\\Thexnum~\\text{.}~q{:}\\Thexfrac~(\\text{P}~|~\\text{p})~{\\pm}{:}\\Tsign~e{:}\\Tnum\n       &\\Rightarrow& (p+q)\\cdot 2^{\\pm e}\n   \\end{array}\n\nThe value of a literal must not lie outside the representable range of the corresponding |IEEE754|_ type\n(that is, a numeric value must not overflow to :math:`\\pm\\mbox{infinity}`),\nbut it may be :ref:`rounded <aux-ieee>` to the nearest representable value.\n\n.. note::\n   Rounding can be prevented by using hexadecimal notation with no more significant bits than supported by the required type.\n\nFloating-point values may also be written as constants for *infinity* or *canonical NaN* (*not a number*).\nFurthermore, arbitrary NaN values may be expressed by providing an explicit payload value.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{floating-point value} & \\TfN &::=&\n     {\\pm}{:}\\Tsign~z{:}\\TfNmag &\\Rightarrow& \\pm z \\\\\n   \\production{floating-point magnitude} & \\TfNmag &::=&\n     z{:}\\Tfloat &\\Rightarrow& \\ieee_N(z) & (\\iff \\ieee_N(z) \\neq \\pm \\infty) \\\\ &&|&\n     z{:}\\Thexfloat &\\Rightarrow& \\ieee_N(z) & (\\iff \\ieee_N(z) \\neq \\pm \\infty) \\\\ &&|&\n     \\text{inf} &\\Rightarrow& \\infty \\\\ &&|&\n     \\text{nan} &\\Rightarrow& \\NAN(2^{\\significand(N)-1}) \\\\ &&|&\n     \\text{nan{:}0x}~n{:}\\Thexnum &\\Rightarrow& \\NAN(n) & (\\iff 1 \\leq n < 2^{\\significand(N)}) \\\\\n   \\end{array}\n\n\n.. index:: ! string, byte, character, ASCII, Unicode, UTF-8\n   pair: text format; byte\n   pair: text format; string\n.. _text-byte:\n.. _text-string:\n\nStrings\n~~~~~~~\n\n*Strings* denote sequences of bytes that can represent both textual and binary data.\nThey are enclosed in quotation marks\nand may contain any character other than |ASCII|_ control characters, quotation marks (:math:`\\text{\"}`), or backslash (:math:`\\text{\\backslash}`),\nexcept when expressed with an *escape sequence*.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{string} & \\Tstring &::=&\n     \\text{\"}~(b^\\ast{:}\\Tstringelem)^\\ast~\\text{\"}\n       &\\Rightarrow& \\concat((b^\\ast)^\\ast)\n       & (\\iff |\\concat((b^\\ast)^\\ast)| < 2^{32}) \\\\\n   \\production{string element} & \\Tstringelem &::=&\n     c{:}\\Tstringchar &\\Rightarrow& \\utf8(c) \\\\ &&|&\n     \\text{\\backslash}~n{:}\\Thexdigit~m{:}\\Thexdigit\n       &\\Rightarrow& 16\\cdot n+m \\\\\n   \\end{array}\n\nEach character in a string literal represents the byte sequence corresponding to its UTF-8 |Unicode|_ (Section 2.5) encoding,\nexcept for hexadecimal escape sequences :math:`\\textl\\backslash hh\\textr`, which represent raw bytes of the respective value.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad\\qquad}l}\n   \\production{string character} & \\Tstringchar &::=&\n     c{:}\\Tchar &\\Rightarrow& c \\qquad\n       & (\\iff c \\geq \\unicode{20} \\wedge c \\neq \\unicode{7F} \\wedge c \\neq \\text{\"} \\wedge c \\neq \\text{\\backslash}) \\\\ &&|&\n     \\text{\\backslash t} &\\Rightarrow& \\unicode{09} \\\\ &&|&\n     \\text{\\backslash n} &\\Rightarrow& \\unicode{0A} \\\\ &&|&\n     \\text{\\backslash r} &\\Rightarrow& \\unicode{0D} \\\\ &&|&\n     \\text{\\backslash{\"}} &\\Rightarrow& \\unicode{22} \\\\ &&|&\n     \\text{\\backslash{'}} &\\Rightarrow& \\unicode{27} \\\\ &&|&\n     \\text{\\backslash\\backslash} &\\Rightarrow& \\unicode{5C} \\\\ &&|&\n     \\text{\\backslash u\\{}~n{:}\\Thexnum~\\text{\\}}\n       &\\Rightarrow& \\unicode{(n)} & (\\iff n < \\hex{D800} \\vee \\hex{E000} \\leq n < \\hex{110000}) \\\\\n   \\end{array}\n\n\n.. index:: name, byte, character, character\n   pair: text format; name\n.. _text-name:\n\nNames\n~~~~~\n\n:ref:`Names <syntax-name>` are strings denoting a literal character sequence. \nA name string must form a valid UTF-8 encoding as defined by |Unicode|_ (Section 2.5) and is interpreted as a string of Unicode scalar values.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad}l}\n   \\production{name} & \\Tname &::=&\n     b^\\ast{:}\\Tstring &\\Rightarrow& c^\\ast & (\\iff b^\\ast = \\utf8(c^\\ast)) \\\\\n   \\end{array}\n\n.. note::\n   Presuming the source text is itself encoded correctly,\n   strings that do not contain any uses of hexadecimal byte escapes are always valid names.\n\n\n.. index:: ! identifiers\n   pair: text format; identifiers\n.. _text-idchar:\n.. _text-id:\n\nIdentifiers\n~~~~~~~~~~~\n\n:ref:`Indices <syntax-index>` can be given in both numeric and symbolic form.\nSymbolic *identifiers* that stand in lieu of indices start with :math:`\\text{\\$}`, followed by any sequence of printable |ASCII|_ characters that does not contain a space, quotation mark, comma, semicolon, or bracket.\n\n.. math::\n   \\begin{array}{llclll@{\\qquad}l}\n   \\production{identifier} & \\Tid &::=&\n     \\text{\\$}~\\Tidchar^+ \\\\\n   \\production{identifier character} & \\Tidchar &::=&\n     \\text{0} ~~|~~ \\dots ~~|~~ \\text{9} \\\\ &&|&\n     \\text{A} ~~|~~ \\dots ~~|~~ \\text{Z} \\\\ &&|&\n     \\text{a} ~~|~~ \\dots ~~|~~ \\text{z} \\\\ &&|&\n     \\text{!} ~~|~~\n     \\text{\\#} ~~|~~\n     \\text{\\$} ~~|~~\n     \\text{\\%} ~~|~~\n     \\text{\\&} ~~|~~\n     \\text{'} ~~|~~\n     \\text{*} ~~|~~\n     \\text{+} ~~|~~\n     \\text{-} ~~|~~\n     \\text{.} ~~|~~\n     \\text{/} \\\\ &&|&\n     \\text{:} ~~|~~\n     \\text{<} ~~|~~\n     \\text{=} ~~|~~\n     \\text{>} ~~|~~\n     \\text{?} ~~|~~\n     \\text{@} ~~|~~\n     \\text{\\backslash} ~~|~~\n     \\text{\\hat{~~}} ~~|~~\n     \\text{\\_} ~~|~~\n     \\text{\\grave{~~}} ~~|~~\n     \\text{|} ~~|~~\n     \\text{\\tilde{~~}} \\\\\n   \\end{array}\n\n.. _text-id-fresh:\n\nConventions\n...........\n\nThe expansion rules of some abbreviations require insertion of a *fresh* identifier.\nThat may be any syntactically valid identifier that does not already occur in the given source text.\n"
  },
  {
    "path": "document/core/util/README.htmldiff.pl",
    "content": "This file is a copy of the HTML diff script found here:\nhttps://dev.w3.org/cvsweb/2009/htmldiff/\n"
  },
  {
    "path": "document/core/util/bikeshed/conf.py",
    "content": "# -*- coding: utf-8 -*-\n#\n# WebAssembly documentation build configuration file, created by\n# sphinx-quickstart on Mon Nov 21 11:32:49 2016.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\nimport os\nimport sys\npwd = os.path.abspath('../..')\nsys.path.insert(0, pwd + '/util')\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\nneeds_sphinx = '1.4'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n  'sphinx.ext.todo',\n  'sphinx.ext.coverage',\n  'sphinx.ext.mathjax',\n  'sphinx.ext.ifconfig',\n  'sphinx.ext.githubpages',\n  'mathdefbs',\n  'pseudo-lexer'\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\nsource_suffix = ['.rst']\n\n# The encoding of source files.\n#\n# source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nname = 'WebAssembly'\nproject = u'WebAssembly'\ntitle = u'WebAssembly Specification'\ncopyright = u'2017, WebAssembly Community Group'\nauthor = u'WebAssembly Community Group'\nlogo = 'static/webassembly.png'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nversion = u'1.0'\n# The full version, including alpha/beta/rc tags.\nrelease = version + ''\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#\n# today = ''\n#\n# Else, today_fmt is used as the format for a strftime call.\n#\n# today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This patterns also effect to html_static_path and html_extra_path\nexclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']\n\n# The reST default role (used for this markup: `text`) to use for all\n# documents.\n#\n# default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#\n# add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#\n# add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#\n# show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n# modindex_common_prefix = []\n\n# If true, keep warnings as \"system message\" paragraphs in the built documents.\n# keep_warnings = False\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = True\n\n\n# -- Options for HTML output ----------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = 'classic'\nhtml_add_permalinks = None\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#\nhtml_theme_options = {\n  'nosidebar': True,\n}\n\nhtml_sidebars = {\n  '**': [\n    # 'about.html',\n    'navigation.html',\n    # 'relations.html',\n    'searchbox.html',\n  ]\n}\n\n\n# Add any paths that contain custom themes here, relative to this directory.\n# html_theme_path = []\n\n# The name for this set of Sphinx documents.\n# \"<project> v<release> documentation\" by default.\n#\nhtml_title = project + u' ' + release\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n#\n# html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#\nhtml_logo = logo\n\n# The name of an image file (relative to this directory) to use as a favicon of\n# the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n#\n# html_favicon = None\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static', 'static/custom.css']\n\n# Add any extra paths that contain custom files (such as robots.txt or\n# .htaccess) here, relative to this directory. These files are copied\n# directly to the root of the documentation.\n#\n# html_extra_path = []\n\n# If not None, a 'Last updated on:' timestamp is inserted at every page\n# bottom, using the given strftime format.\n# The empty string is equivalent to '%b %d, %Y'.\n#\n# html_last_updated_fmt = None\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#\n# html_use_smartypants = True\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#\n# html_additional_pages = {}\n\n# If false, no module index is generated.\n#\nhtml_domain_indices = False\n\n# If false, no index is generated.\n#\nhtml_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#\nhtml_split_index = False\n\n# If true, the reST sources are included in the HTML build as _sources/name. The default is True.\n#\nhtml_copy_source = False\n\n# If true, links to the reST sources are added to the pages.\n#\nhtml_show_sourcelink = False\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#\nhtml_show_sphinx = False\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n#\nhtml_show_copyright = False\n\n# If this is not None, a ‘Last updated on:’ timestamp is inserted at every\n# page bottom, using the given strftime() format.\n#\nhtml_last_updated_fmt = None\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n#\n# html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n#\n# html_file_suffix = None\n\n# Language to be used for generating the HTML full-text search index.\n# Sphinx supports the following languages:\n#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'\n#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'\n#\n# html_search_language = 'en'\n\n# A dictionary with options for the search language support, empty by default.\n# 'ja' uses this config value.\n# 'zh' user can custom change `jieba` dictionary path.\n#\n# html_search_options = {'type': 'default'}\n\n# The name of a javascript file (relative to the configuration directory) that\n# implements a search results scorer. If empty, the default will be used.\n#\n# html_search_scorer = 'scorer.js'\n\n# Output file base name for HTML help builder.\n#\nhtmlhelp_basename = 'WebAssemblydoc'\n\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n   # The paper size ('a4paper' or 'letterpaper').\n  'papersize': 'a4paper',\n\n   # The font size ('10pt', '11pt' or '12pt').\n  'pointsize': '10pt',\n\n   # Additional stuff for the LaTeX preamble.\n   'preamble': '',\n\n   # Latex figure (float) alignment\n  'figure_align': 'htbp',\n\n   # Fancy chapters [Bjarne, Sonny, Lenny, Glenn, Conny, Rejne]\n   'fncychap': '\\\\usepackage[Sonny]{fncychap}',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n  ( master_doc,\n    name + '.tex',\n    title,\n    author,\n    'manual'\n  ),\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#\nlatex_logo = logo\n\n# For \"manual\" documents [part, chapter, or section].\n#\nlatex_toplevel_sectioning = 'chapter'\n\n# If true, show page references after internal links.\n#\nlatex_show_pagerefs = False\n\n# How to show URL addresses after external links [no, footnote, inline].\n#\nlatex_show_urls = 'footnote'\n\n# Documents to append as an appendix to all manuals.\n#\n# latex_appendices = []\n\n# It false, will not define \\strong, \\code, \\titleref, \\crossref ... but only\n# \\sphinxstrong, ..., \\sphinxtitleref, ... To help avoid clash with user added\n# packages.\n#\n# latex_keep_old_macro_names = True\n\n# If false, no module index is generated.\n#\nlatex_domain_indices = False\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n  ( master_doc,\n    name,\n    title,\n    [author],\n    1\n  )\n]\n\n# If true, show URL addresses after external links.\n#\n# man_show_urls = False\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n  ( master_doc,\n    name,\n    title,\n    author,\n    name,\n    'A portable low-level execution format.',\n    'Virtual Machine'\n  ),\n]\n\n# Documents to append as an appendix to all manuals.\n#\n# texinfo_appendices = []\n\n# If false, no module index is generated.\n#\ntexinfo_domain_indices = False\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#\n# texinfo_show_urls = 'footnote'\n\n# If true, do not generate a @detailmenu in the \"Top\" node's menu.\n#\n# texinfo_no_detailmenu = False\n\n\n# -- Options for Epub output ----------------------------------------------\n\n# Bibliographic Dublin Core info.\nepub_title = project\nepub_author = author\nepub_publisher = author\nepub_copyright = copyright\n\n# The basename for the epub file. It defaults to the project name.\n# epub_basename = project\n\n# The HTML theme for the epub output. Since the default themes are not\n# optimized for small screen space, using the same theme for HTML and epub\n# output is usually not wise. This defaults to 'epub', a theme designed to save\n# visual space.\n#\n# epub_theme = 'epub'\n\n# The language of the text. It defaults to the language option\n# or 'en' if the language is not set.\n#\n# epub_language = ''\n\n# The scheme of the identifier. Typical schemes are ISBN or URL.\n# epub_scheme = ''\n\n# The unique identifier of the text. This can be a ISBN number\n# or the project homepage.\n#\n# epub_identifier = ''\n\n# A unique identification for the text.\n#\n# epub_uid = ''\n\n# A tuple containing the cover image and cover page html template filenames.\n#\n# epub_cover = ()\n\n# A sequence of (type, uri, title) tuples for the guide element of content.opf.\n#\n# epub_guide = ()\n\n# HTML files that should be inserted before the pages created by sphinx.\n# The format is a list of tuples containing the path and title.\n#\n# epub_pre_files = []\n\n# HTML files that should be inserted after the pages created by sphinx.\n# The format is a list of tuples containing the path and title.\n#\n# epub_post_files = []\n\n# A list of files that should not be packed into the epub file.\nepub_exclude_files = ['search.html']\n\n# The depth of the table of contents in toc.ncx.\n#\n# epub_tocdepth = 3\n\n# Allow duplicate toc entries.\n#\n# epub_tocdup = True\n\n# Choose between 'default' and 'includehidden'.\n#\n# epub_tocscope = 'default'\n\n# Fix unsupported image types using the Pillow.\n#\n# epub_fix_images = False\n\n# Scale large images.\n#\n# epub_max_image_width = 0\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#\n# epub_show_urls = 'inline'\n\n# If false, no index is generated.\n#\n# epub_use_index = True\n\n# Macros\nrst_prolog = \"\"\"\n.. include:: /\"\"\" + pwd + \"\"\"/util/macros.def\n\"\"\"\n"
  },
  {
    "path": "document/core/util/bikeshed_fixup.py",
    "content": "#! /usr/bin/env python3\n# -*- coding: latin-1 -*-\n\nimport os\nimport sys\n\n\nSCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))\n\n\ndef Main():\n  data = open(sys.argv[1]).read()\n\n  # Don't add more than 3 levels to TOC.\n  data = data.replace('<h5>', '<h5 class=\"no-toc\">')\n\n  # TODO(bradnelson/tabatkins): Fix when bikeshed can do letters.\n  # Don't number the Appendix.\n  data = data.replace(\n      '<h2>Appendix</h2>',\n      '<h2 class=\"no-num\">A Appendix</h2>')\n  number = 1\n  for section in [\n      'Embedding',\n      'Implementation Limitations',\n      'Validation Algorithm',\n      'Custom Sections',\n      'Soundness',\n      'Index of Types',\n      'Index of Instructions',\n      'Index of Semantic Rules']:\n    data = data.replace(\n        '<h3>' + section + '</h3>',\n        '<h3>A.' + str(number) + ' ' + section + '</h3>')\n    number += 1\n\n\n  # Drop spurious navigation.\n  data = data.replace(\n\"\"\"\n    <div class=\"related\" role=\"navigation\" aria-label=\"related navigation\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"nav-item nav-item-0\"><a href=\"index.html#document-index\">WebAssembly 1.0</a> &#187;</li> \n      </ul>\n    </div>\"\"\", '')\n\n  # Use bikeshed biblio references for unicode and IEEE754\n  data = data.replace(\n      \"\"\"<a class=\"reference external\" href=\"http://www.unicode.org/versions/latest/\">Unicode</a>\"\"\",\n      \"[[!UNICODE]]\"\n  )\n\n  data = data.replace(\n      \"\"\"<a class=\"reference external\" href=\"https://ieeexplore.ieee.org/document/8766229\">IEEE 754-2019</a>\"\"\",\n      \"[[!IEEE-754-2019]]\"\n  )\n\n  sys.stdout.write(data)\n\nMain()\n"
  },
  {
    "path": "document/core/util/katex_fix.patch",
    "content": "123c123,126\n<   font: normal 1.21em KaTeX_Main, Times New Roman, serif;\n---\n>   /* font: normal 1.21em KaTeX_Main, Times New Roman, serif; */\n>   font-weight: normal;\n>   font-size: 1.21em;\n>   font-family: KaTeX_Main, Times New Roman, serif;\n126d128\n<   text-rendering: auto;\n989c991\n< .katex-display {\n---\n> div > .katex-display {\n994c996\n< .katex-display > .katex {\n---\n> div > .katex-display > .katex {\n999c1001\n< .katex-display > .katex > .katex-html {\n---\n> div > .katex-display > .katex > .katex-html {\n1003c1005\n< .katex-display > .katex > .katex-html > .tag {\n---\n> div > .katex-display > .katex > .katex-html > .tag {\n1007c1009,1022\n< \n---\n> /* Force borders on tables */\n> table {\n>   border-collapse: collapse;\n> }\n> .docutils th, td {\n>   border: 1px solid;\n>   padding: .4em;\n> }\n> .footnote td {\n>   border: 0;\n> }\n> .codepre {\n>   white-space: pre;\n> }\n"
  },
  {
    "path": "document/core/util/macros.def",
    "content": ".. LINK MACROS\n\n.. External Standards\n.. ------------------\n\n.. |WasmDraft| replace:: https://webassembly.github.io/reference-types/core/\n.. _WasmDraft: https://webassembly.github.io/reference-types/core/\n\n.. |WasmIssues| replace:: https://github.com/webassembly/reference-types/issues/\n.. _WasmIssues: https://github.com/webassembly/reference-types/issues/\n\n.. |IEEE754| replace:: IEEE 754-2019\n.. _IEEE754: https://ieeexplore.ieee.org/document/8766229\n\n.. |Unicode| replace:: Unicode\n.. _Unicode: https://www.unicode.org/versions/latest/\n\n.. |ASCII| replace:: ASCII\n.. _ASCII: https://webstore.ansi.org/RecordDetail.aspx?sku=INCITS+4-1986%5bR2012%5d\n\n\n.. External Definitions\n.. --------------------\n\n.. |LittleEndian| replace:: little endian\n.. _LittleEndian: https://en.wikipedia.org/wiki/Endianness#Little-endian\n\n.. |LEB128| replace:: LEB128\n.. _LEB128: https://en.wikipedia.org/wiki/LEB128\n.. |UnsignedLEB128| replace:: unsigned LEB128\n.. _UnsignedLEB128: https://en.wikipedia.org/wiki/LEB128#Unsigned_LEB128\n.. |SignedLEB128| replace:: signed LEB128\n.. _SignedLEB128: https://en.wikipedia.org/wiki/LEB128#Signed_LEB128\n\n.. |SExpressions| replace:: S-expressions\n.. _SExpressions: https://en.wikipedia.org/wiki/S-expression\n\n.. |MediaType| replace:: Media Type\n.. _MediaType: https://www.iana.org/assignments/media-types/media-types.xhtml\n\n.. Literature\n.. ----------\n\n.. |PLDI2017| replace:: Bringing the Web up to Speed with WebAssembly\n.. _PLDI2017: https://dl.acm.org/citation.cfm?doid=3062341.3062363\n\n.. |CPP2018| replace:: Mechanising and Verifying the WebAssembly Specification\n.. _CPP2018: https://dl.acm.org/citation.cfm?id=3167082\n\n.. |TAPL| replace:: Types and Programming Languages\n.. _TAPL: https://www.cis.upenn.edu/~bcpierce/tapl/\n\n\n\n.. MATH MACROS\n\n\n.. Generic Stuff\n.. -------------\n\n.. To comment out stuff\n\n.. |void#1| mathdef:: {}\n\n\n.. Type-setting of names\n.. X - (multi-letter) variables / non-terminals\n.. F - functions\n.. K - keywords / terminals\n.. B - binary grammar non-terminals\n.. T - textual grammar non-terminals\n\n.. |X| mathdef:: \\mathit\n.. |F| mathdef:: \\mathrm\n.. |K| mathdef:: \\mathsf\n.. |B| mathdef:: \\mathtt\n.. |T| mathdef:: \\mathtt\n\n\n.. Notation\n\n.. |mod| mathdef:: \\mathbin{\\F{mod}}\n\n.. |iff| mathdef:: \\mathrel{\\mbox{if}}\n.. |otherwise| mathdef:: \\mathrel{\\mbox{otherwise}}\n.. |where| mathdef:: \\mathrel{\\mbox{where}}\n\n\n\n.. Grammar & Syntax Notation\n.. -------------------------\n\n.. Notation for grammars\n\n.. |production| mathdef:: \\void\n\n\n.. Notation for Sequences & Records\n\n.. |slice| mathdef:: \\xref{syntax/conventions}{notation-slice}{\\mathrel{\\mathbf{:}}}\n.. |with| mathdef:: \\xref{syntax/conventions}{notation-replace}{\\mathrel{\\mbox{with}}}\n.. |concat| mathdef:: \\xref{syntax/conventions}{notation-concat}{\\F{concat}}\n.. |compose| mathdef:: \\xref{syntax/conventions}{notation-compose}{\\oplus}\n.. |bigcompose| mathdef:: \\xref{syntax/conventions}{notation-compose}{\\bigoplus}\n\n\n\n.. Abstract Syntax\n.. ---------------\n\n.. Auxiliary productions\n\n.. |vec| mathdef:: \\xref{syntax/conventions}{syntax-vec}{\\X{vec}}\n\n\n.. Values, terminals\n\n.. |hex#1| mathdef:: \\mathtt{0x#1}\n.. |unicode#1| mathdef:: \\mathrm{U{+}#1}\n\n.. |NAN| mathdef:: \\xref{syntax/values}{syntax-float}{\\K{nan}}\n\n\n.. Values, non-terminals\n\n.. |byte| mathdef:: \\xref{syntax/values}{syntax-byte}{\\X{byte}}\n\n.. |uX#1| mathdef:: {\\X{u#1}}\n.. |sX#1| mathdef:: {\\X{s#1}}\n.. |iX#1| mathdef:: {\\X{i#1}}\n.. |fX#1| mathdef:: {\\X{f#1}}\n\n.. |uN| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{u}N}\n.. |uM| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{u}M}\n.. |u1| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{u1}}\n.. |u8| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{u8}}\n.. |u16| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{u16}}\n.. |u32| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{u32}}\n.. |u64| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{u64}}\n\n.. |sN| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{s}N}\n.. |s8| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{s8}}\n.. |s16| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{s16}}\n.. |s32| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{s32}}\n.. |s64| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{s64}}\n\n.. |iN| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{i}N}\n.. |i8| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{i8}}\n.. |i16| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{i16}}\n.. |i32| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{i32}}\n.. |i64| mathdef:: \\xref{syntax/values}{syntax-int}{\\X{i64}}\n\n.. |fN| mathdef:: \\xref{syntax/values}{syntax-float}{\\X{f}N}\n.. |fNmag| mathdef:: \\xref{syntax/values}{syntax-float}{\\X{f}\\X{Nmag}}\n.. |f32| mathdef:: \\xref{syntax/values}{syntax-float}{\\X{f32}}\n.. |f64| mathdef:: \\xref{syntax/values}{syntax-float}{\\X{f64}}\n\n.. |name| mathdef:: \\xref{syntax/values}{syntax-name}{\\X{name}}\n.. |char| mathdef:: \\xref{syntax/values}{syntax-name}{\\X{char}}\n\n\n.. Values, meta functions\n\n.. |canon| mathdef:: \\xref{syntax/values}{aux-canon}{\\F{canon}}\n.. |significand| mathdef:: \\xref{syntax/values}{aux-significand}{\\F{signif}}\n.. |exponent| mathdef:: \\xref{syntax/values}{aux-exponent}{\\F{expon}}\n\n\n.. Types, terminals\n\n.. |to| mathdef:: \\xref{syntax/types}{syntax-functype}{\\rightarrow}\n\n.. |I8| mathdef:: \\xref{exec/runtime}{syntax-storagetype}{\\K{i8}}\n.. |I16| mathdef:: \\xref{exec/runtime}{syntax-storagetype}{\\K{i16}}\n.. |I32| mathdef:: \\xref{syntax/types}{syntax-valtype}{\\K{i32}}\n.. |I64| mathdef:: \\xref{syntax/types}{syntax-valtype}{\\K{i64}}\n.. |F32| mathdef:: \\xref{syntax/types}{syntax-valtype}{\\K{f32}}\n.. |F64| mathdef:: \\xref{syntax/types}{syntax-valtype}{\\K{f64}}\n\n.. |FUNCREF| mathdef:: \\xref{syntax/types}{syntax-reftype}{\\K{funcref}}\n.. |EXTERNREF| mathdef:: \\xref{syntax/types}{syntax-reftype}{\\K{externref}}\n\n.. |MVAR| mathdef:: \\xref{syntax/types}{syntax-mut}{\\K{var}}\n.. |MCONST| mathdef:: \\xref{syntax/types}{syntax-mut}{\\K{const}}\n\n.. |LMIN| mathdef:: \\xref{syntax/types}{syntax-limits}{\\K{min}}\n.. |LMAX| mathdef:: \\xref{syntax/types}{syntax-limits}{\\K{max}}\n\n.. |ETFUNC| mathdef:: \\xref{syntax/types}{syntax-externtype}{\\K{func}}\n.. |ETTABLE| mathdef:: \\xref{syntax/types}{syntax-externtype}{\\K{table}}\n.. |ETMEM| mathdef:: \\xref{syntax/types}{syntax-externtype}{\\K{mem}}\n.. |ETGLOBAL| mathdef:: \\xref{syntax/types}{syntax-externtype}{\\K{global}}\n\n\n.. Types, non-terminals\n\n.. |numtype| mathdef:: \\xref{syntax/types}{syntax-numtype}{\\X{numtype}}\n.. |reftype| mathdef:: \\xref{syntax/types}{syntax-reftype}{\\X{reftype}}\n.. |valtype| mathdef:: \\xref{syntax/types}{syntax-valtype}{\\X{valtype}}\n.. |resulttype| mathdef:: \\xref{syntax/types}{syntax-resulttype}{\\X{resulttype}}\n.. |functype| mathdef:: \\xref{syntax/types}{syntax-functype}{\\X{functype}}\n\n.. |globaltype| mathdef:: \\xref{syntax/types}{syntax-globaltype}{\\X{globaltype}}\n.. |tabletype| mathdef:: \\xref{syntax/types}{syntax-tabletype}{\\X{tabletype}}\n.. |memtype| mathdef:: \\xref{syntax/types}{syntax-memtype}{\\X{memtype}}\n\n.. |limits| mathdef:: \\xref{syntax/types}{syntax-limits}{\\X{limits}}\n.. |mut| mathdef:: \\xref{syntax/types}{syntax-mut}{\\X{mut}}\n\n.. |externtype| mathdef:: \\xref{syntax/types}{syntax-externtype}{\\X{externtype}}\n\n.. |stacktype| mathdef:: \\xref{syntax/types}{syntax-stacktype}{\\X{stacktype}}\n.. |opdtype| mathdef:: \\xref{syntax/types}{syntax-opdtype}{\\X{opdtype}}\n\n\n.. Types, meta functions\n\n.. |etfuncs| mathdef:: \\xref{syntax/types}{syntax-externtype}{\\F{funcs}}\n.. |ettables| mathdef:: \\xref{syntax/types}{syntax-externtype}{\\F{tables}}\n.. |etmems| mathdef:: \\xref{syntax/types}{syntax-externtype}{\\F{mems}}\n.. |etglobals| mathdef:: \\xref{syntax/types}{syntax-externtype}{\\F{globals}}\n\n\n.. Indices, non-terminals\n\n.. |typeidx| mathdef:: \\xref{syntax/modules}{syntax-typeidx}{\\X{typeidx}}\n.. |funcidx| mathdef:: \\xref{syntax/modules}{syntax-funcidx}{\\X{funcidx}}\n.. |tableidx| mathdef:: \\xref{syntax/modules}{syntax-tableidx}{\\X{tableidx}}\n.. |memidx| mathdef:: \\xref{syntax/modules}{syntax-memidx}{\\X{memidx}}\n.. |globalidx| mathdef:: \\xref{syntax/modules}{syntax-globalidx}{\\X{globalidx}}\n.. |elemidx| mathdef:: \\xref{syntax/modules}{syntax-elemidx}{\\X{elemidx}}\n.. |dataidx| mathdef:: \\xref{syntax/modules}{syntax-dataidx}{\\X{dataidx}}\n.. |localidx| mathdef:: \\xref{syntax/modules}{syntax-localidx}{\\X{localidx}}\n.. |labelidx| mathdef:: \\xref{syntax/modules}{syntax-labelidx}{\\X{labelidx}}\n\n\n.. Indices, meta functions\n\n.. |freetypeidx| mathdef:: \\xref{syntax/modules}{syntax-typeidx}{\\F{typeidx}}\n.. |freefuncidx| mathdef:: \\xref{syntax/modules}{syntax-funcidx}{\\F{funcidx}}\n.. |freetableidx| mathdef:: \\xref{syntax/modules}{syntax-tableidx}{\\F{tableidx}}\n.. |freememidx| mathdef:: \\xref{syntax/modules}{syntax-memidx}{\\F{memidx}}\n.. |freeglobalidx| mathdef:: \\xref{syntax/modules}{syntax-globalidx}{\\F{globalidx}}\n.. |freeelemidx| mathdef:: \\xref{syntax/modules}{syntax-elemidx}{\\F{elemidx}}\n.. |freedataidx| mathdef:: \\xref{syntax/modules}{syntax-dataidx}{\\F{dataidx}}\n.. |freelocalidx| mathdef:: \\xref{syntax/modules}{syntax-localidx}{\\F{localidx}}\n.. |freelabelidx| mathdef:: \\xref{syntax/modules}{syntax-labelidx}{\\F{labelidx}}\n\n\n.. Modules, terminals\n\n.. |MTYPES| mathdef:: \\xref{syntax/modules}{syntax-module}{\\K{types}}\n.. |MFUNCS| mathdef:: \\xref{syntax/modules}{syntax-module}{\\K{funcs}}\n.. |MTABLES| mathdef:: \\xref{syntax/modules}{syntax-module}{\\K{tables}}\n.. |MMEMS| mathdef:: \\xref{syntax/modules}{syntax-module}{\\K{mems}}\n.. |MGLOBALS| mathdef:: \\xref{syntax/modules}{syntax-module}{\\K{globals}}\n.. |MIMPORTS| mathdef:: \\xref{syntax/modules}{syntax-module}{\\K{imports}}\n.. |MEXPORTS| mathdef:: \\xref{syntax/modules}{syntax-module}{\\K{exports}}\n.. |MDATAS| mathdef:: \\xref{syntax/modules}{syntax-module}{\\K{datas}}\n.. |MELEMS| mathdef:: \\xref{syntax/modules}{syntax-module}{\\K{elems}}\n.. |MSTART| mathdef:: \\xref{syntax/modules}{syntax-module}{\\K{start}}\n\n.. |FTYPE| mathdef:: \\xref{syntax/modules}{syntax-func}{\\K{type}}\n.. |FLOCALS| mathdef:: \\xref{syntax/modules}{syntax-func}{\\K{locals}}\n.. |FBODY| mathdef:: \\xref{syntax/modules}{syntax-func}{\\K{body}}\n\n.. |TTYPE| mathdef:: \\xref{syntax/modules}{syntax-table}{\\K{type}}\n\n.. |MTYPE| mathdef:: \\xref{syntax/modules}{syntax-mem}{\\K{type}}\n\n.. |GTYPE| mathdef:: \\xref{syntax/modules}{syntax-global}{\\K{type}}\n.. |GINIT| mathdef:: \\xref{syntax/modules}{syntax-global}{\\K{init}}\n\n.. |ETYPE| mathdef:: \\xref{syntax/modules}{syntax-elem}{\\K{type}}\n.. |EINIT| mathdef:: \\xref{syntax/modules}{syntax-elem}{\\K{init}}\n.. |EMODE| mathdef:: \\xref{syntax/modules}{syntax-elem}{\\K{mode}}\n.. |EPASSIVE| mathdef:: \\xref{syntax/modules}{syntax-elemmode}{\\K{passive}}\n.. |EACTIVE| mathdef:: \\xref{syntax/modules}{syntax-elemmode}{\\K{active}}\n.. |EDECLARATIVE| mathdef:: \\xref{syntax/modules}{syntax-elemmode}{\\K{declarative}}\n.. |ETABLE| mathdef:: \\xref{syntax/modules}{syntax-elem}{\\K{table}}\n.. |EOFFSET| mathdef:: \\xref{syntax/modules}{syntax-elem}{\\K{offset}}\n\n.. |DINIT| mathdef:: \\xref{syntax/modules}{syntax-data}{\\K{init}}\n.. |DMODE| mathdef:: \\xref{syntax/modules}{syntax-data}{\\K{mode}}\n.. |DPASSIVE| mathdef:: \\xref{syntax/modules}{syntax-data}{\\K{passive}}\n.. |DACTIVE| mathdef:: \\xref{syntax/modules}{syntax-data}{\\K{active}}\n.. |DMEM| mathdef:: \\xref{syntax/modules}{syntax-data}{\\K{memory}}\n.. |DOFFSET| mathdef:: \\xref{syntax/modules}{syntax-data}{\\K{offset}}\n\n.. |SFUNC| mathdef:: \\xref{syntax/modules}{syntax-start}{\\K{func}}\n\n.. |ENAME| mathdef:: \\xref{syntax/modules}{syntax-export}{\\K{name}}\n.. |EDESC| mathdef:: \\xref{syntax/modules}{syntax-export}{\\K{desc}}\n.. |EDFUNC| mathdef:: \\xref{syntax/modules}{syntax-exportdesc}{\\K{func}}\n.. |EDTABLE| mathdef:: \\xref{syntax/modules}{syntax-exportdesc}{\\K{table}}\n.. |EDMEM| mathdef:: \\xref{syntax/modules}{syntax-exportdesc}{\\K{mem}}\n.. |EDGLOBAL| mathdef:: \\xref{syntax/modules}{syntax-exportdesc}{\\K{global}}\n\n.. |IMODULE| mathdef:: \\xref{syntax/modules}{syntax-import}{\\K{module}}\n.. |INAME| mathdef:: \\xref{syntax/modules}{syntax-import}{\\K{name}}\n.. |IDESC| mathdef:: \\xref{syntax/modules}{syntax-import}{\\K{desc}}\n.. |IDFUNC| mathdef:: \\xref{syntax/modules}{syntax-importdesc}{\\K{func}}\n.. |IDTABLE| mathdef:: \\xref{syntax/modules}{syntax-importdesc}{\\K{table}}\n.. |IDMEM| mathdef:: \\xref{syntax/modules}{syntax-importdesc}{\\K{mem}}\n.. |IDGLOBAL| mathdef:: \\xref{syntax/modules}{syntax-importdesc}{\\K{global}}\n\n\n.. Modules, non-terminals\n\n.. |module| mathdef:: \\xref{syntax/modules}{syntax-module}{\\X{module}}\n.. |type| mathdef:: \\xref{syntax/modules}{syntax-typedef}{\\X{type}}\n.. |func| mathdef:: \\xref{syntax/modules}{syntax-func}{\\X{func}}\n.. |table| mathdef:: \\xref{syntax/modules}{syntax-table}{\\X{table}}\n.. |mem| mathdef:: \\xref{syntax/modules}{syntax-mem}{\\X{mem}}\n.. |global| mathdef:: \\xref{syntax/modules}{syntax-global}{\\X{global}}\n.. |import| mathdef:: \\xref{syntax/modules}{syntax-import}{\\X{import}}\n.. |export| mathdef:: \\xref{syntax/modules}{syntax-export}{\\X{export}}\n.. |importdesc| mathdef:: \\xref{syntax/modules}{syntax-importdesc}{\\X{importdesc}}\n.. |exportdesc| mathdef:: \\xref{syntax/modules}{syntax-exportdesc}{\\X{exportdesc}}\n.. |elem| mathdef:: \\xref{syntax/modules}{syntax-elem}{\\X{elem}}\n.. |elemmode| mathdef:: \\xref{syntax/modules}{syntax-elemmode}{\\X{elemmode}}\n.. |data| mathdef:: \\xref{syntax/modules}{syntax-data}{\\X{data}}\n.. |datamode| mathdef:: \\xref{syntax/modules}{syntax-datamode}{\\X{datamode}}\n.. |start| mathdef:: \\xref{syntax/modules}{syntax-start}{\\X{start}}\n\n\n.. Modules, meta functions\n\n.. |edfuncs| mathdef:: \\xref{syntax/modules}{syntax-exportdesc}{\\F{funcs}}\n.. |edtables| mathdef:: \\xref{syntax/modules}{syntax-exportdesc}{\\F{tables}}\n.. |edmems| mathdef:: \\xref{syntax/modules}{syntax-exportdesc}{\\F{mems}}\n.. |edglobals| mathdef:: \\xref{syntax/modules}{syntax-exportdesc}{\\F{globals}}\n\n\n.. Instructions, terminals\n\n.. |OFFSET| mathdef:: \\xref{syntax/instructions}{syntax-instr-memory}{\\K{offset}}\n.. |ALIGN| mathdef:: \\xref{syntax/instructions}{syntax-instr-memory}{\\K{align}}\n\n.. |UNREACHABLE| mathdef:: \\xref{syntax/instructions}{syntax-instr-control}{\\K{unreachable}}\n.. |NOP| mathdef:: \\xref{syntax/instructions}{syntax-instr-control}{\\K{nop}}\n.. |BLOCK| mathdef:: \\xref{syntax/instructions}{syntax-instr-control}{\\K{block}}\n.. |LOOP| mathdef:: \\xref{syntax/instructions}{syntax-instr-control}{\\K{loop}}\n.. |IF| mathdef:: \\xref{syntax/instructions}{syntax-instr-control}{\\K{if}}\n.. |ELSE| mathdef:: \\xref{syntax/instructions}{syntax-instr-control}{\\K{else}}\n.. |END| mathdef:: \\xref{syntax/instructions}{syntax-instr-control}{\\K{end}}\n.. |BR| mathdef:: \\xref{syntax/instructions}{syntax-instr-control}{\\K{br}}\n.. |BRIF| mathdef:: \\xref{syntax/instructions}{syntax-instr-control}{\\K{br\\_if}}\n.. |BRTABLE| mathdef:: \\xref{syntax/instructions}{syntax-instr-control}{\\K{br\\_table}}\n.. |RETURN| mathdef:: \\xref{syntax/instructions}{syntax-instr-control}{\\K{return}}\n.. |CALL| mathdef:: \\xref{syntax/instructions}{syntax-instr-control}{\\K{call}}\n.. |CALLINDIRECT| mathdef:: \\xref{syntax/instructions}{syntax-instr-control}{\\K{call\\_indirect}}\n\n.. |DROP| mathdef:: \\xref{syntax/instructions}{syntax-instr-parametric}{\\K{drop}}\n.. |SELECT| mathdef:: \\xref{syntax/instructions}{syntax-instr-parametric}{\\K{select}}\n\n.. |LOCALGET| mathdef:: \\xref{syntax/instructions}{syntax-instr-variable}{\\K{local.get}}\n.. |LOCALSET| mathdef:: \\xref{syntax/instructions}{syntax-instr-variable}{\\K{local.set}}\n.. |LOCALTEE| mathdef:: \\xref{syntax/instructions}{syntax-instr-variable}{\\K{local.tee}}\n.. |GLOBALGET| mathdef:: \\xref{syntax/instructions}{syntax-instr-variable}{\\K{global.get}}\n.. |GLOBALSET| mathdef:: \\xref{syntax/instructions}{syntax-instr-variable}{\\K{global.set}}\n\n.. |TABLEGET| mathdef:: \\xref{syntax/instructions}{syntax-instr-table}{\\K{table.get}}\n.. |TABLESET| mathdef:: \\xref{syntax/instructions}{syntax-instr-table}{\\K{table.set}}\n.. |TABLESIZE| mathdef:: \\xref{syntax/instructions}{syntax-instr-table}{\\K{table.size}}\n.. |TABLEGROW| mathdef:: \\xref{syntax/instructions}{syntax-instr-table}{\\K{table.grow}}\n.. |TABLEFILL| mathdef:: \\xref{syntax/instructions}{syntax-instr-table}{\\K{table.fill}}\n.. |TABLECOPY| mathdef:: \\xref{syntax/instructions}{syntax-instr-table}{\\K{table.copy}}\n.. |TABLEINIT| mathdef:: \\xref{syntax/instructions}{syntax-instr-table}{\\K{table.init}}\n.. |ELEMDROP| mathdef:: \\xref{syntax/instructions}{syntax-instr-table}{\\K{elem.drop}}\n\n.. |LOAD| mathdef:: \\xref{syntax/instructions}{syntax-instr-memory}{\\K{load}}\n.. |STORE| mathdef:: \\xref{syntax/instructions}{syntax-instr-memory}{\\K{store}}\n.. |MEMORYSIZE| mathdef:: \\xref{syntax/instructions}{syntax-instr-memory}{\\K{memory.size}}\n.. |MEMORYGROW| mathdef:: \\xref{syntax/instructions}{syntax-instr-memory}{\\K{memory.grow}}\n.. |MEMORYFILL| mathdef:: \\xref{syntax/instructions}{syntax-instr-memory}{\\K{memory.fill}}\n.. |MEMORYCOPY| mathdef:: \\xref{syntax/instructions}{syntax-instr-memory}{\\K{memory.copy}}\n.. |MEMORYINIT| mathdef:: \\xref{syntax/instructions}{syntax-instr-memory}{\\K{memory.init}}\n.. |DATADROP| mathdef:: \\xref{syntax/instructions}{syntax-instr-memory}{\\K{data.drop}}\n\n.. |REFNULL| mathdef:: \\xref{syntax/instructions}{syntax-instr-ref}{\\K{ref{.}null}}\n.. |REFISNULL| mathdef:: \\xref{syntax/instructions}{syntax-instr-ref}{\\K{ref{.}is\\_null}}\n.. |REFFUNC| mathdef:: \\xref{syntax/instructions}{syntax-instr-ref}{\\K{ref{.}func}}\n\n.. |CONST| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{const}}\n.. |EQZ| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{eqz}}\n.. |EQ| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{eq}}\n.. |NE| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{ne}}\n.. |LT| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{lt}}\n.. |GT| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{gt}}\n.. |LE| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{le}}\n.. |GE| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{ge}}\n.. |CLZ| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{clz}}\n.. |CTZ| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{ctz}}\n.. |POPCNT| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{popcnt}}\n.. |ABS| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{abs}}\n.. |NEG| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{neg}}\n.. |CEIL| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{ceil}}\n.. |FLOOR| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{floor}}\n.. |TRUNC| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{trunc}}\n.. |NEAREST| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{nearest}}\n.. |SQRT| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{sqrt}}\n.. |ADD| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{add}}\n.. |SUB| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{sub}}\n.. |MUL| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{mul}}\n.. |DIV| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{div}}\n.. |REM| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{rem}}\n.. |FMIN| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{min}}\n.. |FMAX| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{max}}\n.. |AND| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{and}}\n.. |OR| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{or}}\n.. |XOR| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{xor}}\n.. |SHL| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{shl}}\n.. |SHR| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{shr}}\n.. |ROTL| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{rotl}}\n.. |ROTR| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{rotr}}\n.. |COPYSIGN| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{copysign}}\n\n.. |CONVERT| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{convert}}\n.. |EXTEND| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{extend}}\n.. |WRAP| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{wrap}}\n.. |PROMOTE| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{promote}}\n.. |DEMOTE| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{demote}}\n.. |REINTERPRET| mathdef:: \\xref{syntax/instructions}{syntax-instr-numeric}{\\K{reinterpret}}\n\n\n.. Instructions, non-terminals\n\n.. |unop| mathdef:: \\xref{syntax/instructions}{syntax-unop}{\\X{unop}}\n.. |binop| mathdef:: \\xref{syntax/instructions}{syntax-binop}{\\X{binop}}\n.. |testop| mathdef:: \\xref{syntax/instructions}{syntax-testop}{\\X{testop}}\n.. |relop| mathdef:: \\xref{syntax/instructions}{syntax-relop}{\\X{relop}}\n.. |cvtop| mathdef:: \\xref{syntax/instructions}{syntax-cvtop}{\\X{cvtop}}\n\n.. |iunop| mathdef:: \\xref{syntax/instructions}{syntax-iunop}{\\X{iunop}}\n.. |ibinop| mathdef:: \\xref{syntax/instructions}{syntax-ibinop}{\\X{ibinop}}\n.. |itestop| mathdef:: \\xref{syntax/instructions}{syntax-itestop}{\\X{itestop}}\n.. |irelop| mathdef:: \\xref{syntax/instructions}{syntax-irelop}{\\X{irelop}}\n\n.. |funop| mathdef:: \\xref{syntax/instructions}{syntax-funop}{\\X{funop}}\n.. |fbinop| mathdef:: \\xref{syntax/instructions}{syntax-fbinop}{\\X{fbinop}}\n.. |ftestop| mathdef:: \\xref{syntax/instructions}{syntax-ftestop}{\\X{ftestop}}\n.. |frelop| mathdef:: \\xref{syntax/instructions}{syntax-frelop}{\\X{frelop}}\n\n.. |sx| mathdef:: \\xref{syntax/instructions}{syntax-sx}{\\X{sx}}\n.. |memarg| mathdef:: \\xref{syntax/instructions}{syntax-memarg}{\\X{memarg}}\n\n.. |blocktype| mathdef:: \\xref{syntax/instructions}{syntax-blocktype}{\\X{blocktype}}\n\n.. |instr| mathdef:: \\xref{syntax/instructions}{syntax-instr}{\\X{instr}}\n.. |expr| mathdef:: \\xref{syntax/instructions}{syntax-expr}{\\X{expr}}\n\n\n\n.. Binary Format\n.. -------------\n\n.. Auxiliary productions\n\n.. |Bvec| mathdef:: \\xref{binary/conventions}{binary-vec}{\\B{vec}}\n\n\n.. Values, non-terminals\n\n.. |Bbyte| mathdef:: \\xref{binary/values}{binary-byte}{\\B{byte}}\n\n.. |BuX#1| mathdef:: {\\B{u}#1}\n.. |BsX#1| mathdef:: {\\B{s}#1}\n.. |BiX#1| mathdef:: {\\B{i}#1}\n.. |BfX#1| mathdef:: {\\B{f}#1}\n\n.. |BuN| mathdef:: \\xref{binary/values}{binary-int}{\\BuX{N}}\n.. |Bu1| mathdef:: \\xref{binary/values}{binary-int}{\\BuX{\\B{1}}}\n.. |Bu8| mathdef:: \\xref{binary/values}{binary-int}{\\BuX{\\B{8}}}\n.. |Bu16| mathdef:: \\xref{binary/values}{binary-int}{\\BuX{\\B{16}}}\n.. |Bu32| mathdef:: \\xref{binary/values}{binary-int}{\\BuX{\\B{32}}}\n.. |Bu64| mathdef:: \\xref{binary/values}{binary-int}{\\BuX{\\B{64}}}\n\n.. |BsN| mathdef:: \\xref{binary/values}{binary-int}{\\BsX{N}}\n.. |Bs7| mathdef:: \\xref{binary/values}{binary-int}{\\BsX{\\B{7}}}\n.. |Bs32| mathdef:: \\xref{binary/values}{binary-int}{\\BsX{\\B{32}}}\n.. |Bs33| mathdef:: \\xref{binary/values}{binary-int}{\\BsX{\\B{33}}}\n.. |Bs64| mathdef:: \\xref{binary/values}{binary-int}{\\BsX{\\B{64}}}\n\n.. |BiN| mathdef:: \\xref{binary/values}{binary-int}{\\BiX{N}}\n.. |Bi32| mathdef:: \\xref{binary/values}{binary-int}{\\BiX{\\B{32}}}\n.. |Bi64| mathdef:: \\xref{binary/values}{binary-int}{\\BiX{\\B{64}}}\n\n.. |BfN| mathdef:: \\xref{binary/values}{binary-float}{\\BfX{N}}\n.. |Bf32| mathdef:: \\xref{binary/values}{binary-float}{\\BfX{\\B{32}}}\n.. |Bf64| mathdef:: \\xref{binary/values}{binary-float}{\\BfX{\\B{64}}}\n\n.. |Bname| mathdef:: \\xref{binary/values}{binary-name}{\\B{name}}\n\n\n.. Values, meta functions\n\n.. |utf8| mathdef:: \\xref{binary/values}{binary-utf8}{\\F{utf8}}\n\n\n.. Types, non-terminals\n\n.. |Bnumtype| mathdef:: \\xref{binary/types}{binary-numtype}{\\B{numtype}}\n.. |Breftype| mathdef:: \\xref{binary/types}{binary-reftype}{\\B{reftype}}\n.. |Bvaltype| mathdef:: \\xref{binary/types}{binary-valtype}{\\B{valtype}}\n.. |Bresulttype| mathdef:: \\xref{binary/types}{binary-resulttype}{\\B{resulttype}}\n.. |Bfunctype| mathdef:: \\xref{binary/types}{binary-functype}{\\B{functype}}\n.. |Bglobaltype| mathdef:: \\xref{binary/types}{binary-globaltype}{\\B{globaltype}}\n.. |Btabletype| mathdef:: \\xref{binary/types}{binary-tabletype}{\\B{tabletype}}\n.. |Bmemtype| mathdef:: \\xref{binary/types}{binary-memtype}{\\B{memtype}}\n.. |Blimits| mathdef:: \\xref{binary/types}{binary-limits}{\\B{limits}}\n.. |Bmut| mathdef:: \\xref{binary/types}{binary-mut}{\\B{mut}}\n\n\n.. Indices, non-terminals\n\n.. |Bidx| mathdef:: \\xref{binary/modules}{binary-index}{\\B{idx}}\n.. |Btypeidx| mathdef:: \\xref{binary/modules}{binary-typeidx}{\\B{typeidx}}\n.. |Bfuncidx| mathdef:: \\xref{binary/modules}{binary-funcidx}{\\B{funcidx}}\n.. |Btableidx| mathdef:: \\xref{binary/modules}{binary-tableidx}{\\B{tableidx}}\n.. |Bmemidx| mathdef:: \\xref{binary/modules}{binary-memidx}{\\B{memidx}}\n.. |Bglobalidx| mathdef:: \\xref{binary/modules}{binary-globalidx}{\\B{globalidx}}\n.. |Belemidx| mathdef:: \\xref{binary/modules}{binary-elemidx}{\\B{elemidx}}\n.. |Bdataidx| mathdef:: \\xref{binary/modules}{binary-dataidx}{\\B{dataidx}}\n.. |Blocalidx| mathdef:: \\xref{binary/modules}{binary-localidx}{\\B{localidx}}\n.. |Blabelidx| mathdef:: \\xref{binary/modules}{binary-labelidx}{\\B{labelidx}}\n\n\n.. Modules, non-terminals\n\n.. |Bmagic| mathdef:: \\xref{binary/modules}{binary-magic}{\\B{magic}}\n.. |Bversion| mathdef:: \\xref{binary/modules}{binary-version}{\\B{version}}\n.. |Bmodule| mathdef:: \\xref{binary/modules}{binary-module}{\\B{module}}\n\n.. |Bsection| mathdef:: \\xref{binary/modules}{binary-section}{\\B{section}}\n.. |Bcustomsec| mathdef:: \\xref{binary/modules}{binary-customsec}{\\B{customsec}}\n.. |Btypesec| mathdef:: \\xref{binary/modules}{binary-typesec}{\\B{typesec}}\n.. |Bfuncsec| mathdef:: \\xref{binary/modules}{binary-funcsec}{\\B{funcsec}}\n.. |Bcodesec| mathdef:: \\xref{binary/modules}{binary-codesec}{\\B{codesec}}\n.. |Btablesec| mathdef:: \\xref{binary/modules}{binary-tablesec}{\\B{tablesec}}\n.. |Bmemsec| mathdef:: \\xref{binary/modules}{binary-memsec}{\\B{memsec}}\n.. |Bglobalsec| mathdef:: \\xref{binary/modules}{binary-globalsec}{\\B{globalsec}}\n.. |Bimportsec| mathdef:: \\xref{binary/modules}{binary-importsec}{\\B{importsec}}\n.. |Bexportsec| mathdef:: \\xref{binary/modules}{binary-exportsec}{\\B{exportsec}}\n.. |Belemsec| mathdef:: \\xref{binary/modules}{binary-elemsec}{\\B{elemsec}}\n.. |Bdatasec| mathdef:: \\xref{binary/modules}{binary-datasec}{\\B{datasec}}\n.. |Bstartsec| mathdef:: \\xref{binary/modules}{binary-startsec}{\\B{startsec}}\n.. |Bdatacountsec| mathdef:: \\xref{binary/modules}{binary-datacountsec}{\\B{datacountsec}}\n\n.. |Bcustom| mathdef:: \\xref{binary/modules}{binary-customsec}{\\B{custom}}\n.. |Btype| mathdef:: \\xref{binary/modules}{binary-typedef}{\\B{type}}\n.. |Bfunc| mathdef:: \\xref{binary/modules}{binary-func}{\\B{func}}\n.. |Btable| mathdef:: \\xref{binary/modules}{binary-table}{\\B{table}}\n.. |Bmem| mathdef:: \\xref{binary/modules}{binary-mem}{\\B{mem}}\n.. |Bglobal| mathdef:: \\xref{binary/modules}{binary-global}{\\B{global}}\n.. |Bimport| mathdef:: \\xref{binary/modules}{binary-import}{\\B{import}}\n.. |Bexport| mathdef:: \\xref{binary/modules}{binary-export}{\\B{export}}\n.. |Bimportdesc| mathdef:: \\xref{binary/modules}{binary-importdesc}{\\B{importdesc}}\n.. |Bexportdesc| mathdef:: \\xref{binary/modules}{binary-exportdesc}{\\B{exportdesc}}\n.. |Belem| mathdef:: \\xref{binary/modules}{binary-elem}{\\B{elem}}\n.. |Belemkind| mathdef:: \\xref{binary/modules}{binary-elemkind}{\\B{elemkind}}\n.. |Bcode| mathdef:: \\xref{binary/modules}{binary-code}{\\B{code}}\n.. |Blocal| mathdef:: \\xref{binary/modules}{binary-local}{\\B{local}}\n.. |Blocals| mathdef:: \\xref{binary/modules}{binary-local}{\\B{locals}}\n.. |Bdata| mathdef:: \\xref{binary/modules}{binary-data}{\\B{data}}\n.. |Bstart| mathdef:: \\xref{binary/modules}{binary-start}{\\B{start}}\n\n\n.. Instructions, non-terminals\n\n.. |Bmemarg| mathdef:: \\xref{binary/instructions}{binary-memarg}{\\B{memarg}}\n.. |Bblocktype| mathdef:: \\xref{binary/instructions}{binary-blocktype}{\\B{blocktype}}\n\n.. |Binstr| mathdef:: \\xref{binary/instructions}{binary-instr}{\\B{instr}}\n.. |Bexpr| mathdef:: \\xref{binary/instructions}{binary-expr}{\\B{expr}}\n\n\n\n.. Text Format\n.. -----------\n\n.. Auxiliary productions\n\n.. |Tvec| mathdef:: \\xref{text/conventions}{text-vec}{\\T{vec}}\n\n\n.. Lexical grammar, terminals\n\n.. |textl| mathdef:: \\mbox{‘}\n.. |textr| mathdef:: \\mbox{’}\n.. |text#1| mathdef:: \\textl\\mathtt{#1}\\textr\n\n.. |Tcommentl| mathdef:: \\text{{(}{;}}\n.. |Tcommentr| mathdef:: \\text{{;}{)}}\n.. |Tcommentd| mathdef:: \\text{{;}{;}}\n\n\n.. Lexical grammar, non-terminals\n\n.. |Tsource| mathdef:: \\xref{text/lexical}{text-source}{\\T{source}}\n.. |Tchar| mathdef:: \\xref{text/lexical}{text-char}{\\T{char}}\n.. |Tspace| mathdef:: \\xref{text/lexical}{text-space}{\\T{space}}\n.. |Tformat| mathdef:: \\xref{text/lexical}{text-format}{\\T{format}}\n\n.. |Ttoken| mathdef:: \\xref{text/lexical}{text-token}{\\T{token}}\n.. |Tkeyword| mathdef:: \\xref{text/lexical}{text-keyword}{\\T{keyword}}\n.. |Treserved| mathdef:: \\xref{text/lexical}{text-reserved}{\\T{reserved}}\n\n.. |Tcomment| mathdef:: \\xref{text/lexical}{text-comment}{\\T{comment}}\n.. |Tlinecomment| mathdef:: \\xref{text/lexical}{text-comment}{\\T{linecomment}}\n.. |Tblockcomment| mathdef:: \\xref{text/lexical}{text-comment}{\\T{blockcomment}}\n.. |Tlinechar| mathdef:: \\xref{text/lexical}{text-comment}{\\T{linechar}}\n.. |Tblockchar| mathdef:: \\xref{text/lexical}{text-comment}{\\T{blockchar}}\n\n\n.. Values, non-terminals\n\n.. |Tsign| mathdef:: \\xref{text/values}{text-sign}{\\T{sign}}\n.. |Tdigit| mathdef:: \\xref{text/values}{text-digit}{\\T{digit}}\n.. |Thexdigit| mathdef:: \\xref{text/values}{text-hexdigit}{\\T{hexdigit}}\n.. |Tnum| mathdef:: \\xref{text/values}{text-num}{\\T{num}}\n.. |Thexnum| mathdef:: \\xref{text/values}{text-hexnum}{\\T{hexnum}}\n.. |Tfrac| mathdef:: \\xref{text/values}{text-frac}{\\T{frac}}\n.. |Thexfrac| mathdef:: \\xref{text/values}{text-hexfrac}{\\T{hexfrac}}\n.. |Tfloat| mathdef:: \\xref{text/values}{text-float}{\\T{float}}\n.. |Thexfloat| mathdef:: \\xref{text/values}{text-hexfloat}{\\T{hexfloat}}\n\n.. |TuX#1| mathdef:: {\\T{u}#1}\n.. |TsX#1| mathdef:: {\\T{s}#1}\n.. |TiX#1| mathdef:: {\\T{i}#1}\n.. |TfX#1| mathdef:: {\\T{f}#1}\n\n.. |TuN| mathdef:: \\xref{text/values}{text-int}{\\TuX{N}}\n.. |Tu1| mathdef:: \\xref{text/values}{text-int}{\\TuX{\\T{1}}}\n.. |Tu8| mathdef:: \\xref{text/values}{text-int}{\\TuX{\\T{8}}}\n.. |Tu16| mathdef:: \\xref{text/values}{text-int}{\\TuX{\\T{16}}}\n.. |Tu32| mathdef:: \\xref{text/values}{text-int}{\\TuX{\\T{32}}}\n.. |Tu64| mathdef:: \\xref{text/values}{text-int}{\\TuX{\\T{64}}}\n\n.. |TsN| mathdef:: \\xref{text/values}{text-int}{\\TsX{N}}\n.. |Ts32| mathdef:: \\xref{text/values}{text-int}{\\TsX{\\T{32}}}\n.. |Ts64| mathdef:: \\xref{text/values}{text-int}{\\TsX{\\T{64}}}\n\n.. |TiN| mathdef:: \\xref{text/values}{text-int}{\\TiX{N}}\n.. |Ti32| mathdef:: \\xref{text/values}{text-int}{\\TiX{\\T{32}}}\n.. |Ti64| mathdef:: \\xref{text/values}{text-int}{\\TiX{\\T{64}}}\n\n.. |TfN| mathdef:: \\xref{text/values}{text-float}{\\TfX{N}}\n.. |TfNmag| mathdef:: \\xref{text/values}{text-float}{\\TfX{N}\\T{mag}}\n.. |Tf32| mathdef:: \\xref{text/values}{text-float}{\\TfX{\\T{32}}}\n.. |Tf64| mathdef:: \\xref{text/values}{text-float}{\\TfX{\\T{64}}}\n\n.. |Tstring| mathdef:: \\xref{text/values}{text-string}{\\T{string}}\n.. |Tstringelem| mathdef:: \\xref{text/values}{text-string}{\\T{stringelem}}\n.. |Tstringchar| mathdef:: \\xref{text/values}{text-string}{\\T{stringchar}}\n.. |Tname| mathdef:: \\xref{text/values}{text-name}{\\T{name}}\n\n.. |Tid| mathdef:: \\xref{text/values}{text-id}{\\T{id}}\n.. |Tidchar| mathdef:: \\xref{text/values}{text-idchar}{\\T{idchar}}\n\n\n.. Types, non-terminals\n\n.. |Tnumtype| mathdef:: \\xref{text/types}{text-numtype}{\\T{numtype}}\n.. |Treftype| mathdef:: \\xref{text/types}{text-reftype}{\\T{reftype}}\n.. |Theaptype| mathdef:: \\xref{text/types}{text-heaptype}{\\T{heaptype}}\n.. |Tvaltype| mathdef:: \\xref{text/types}{text-valtype}{\\T{valtype}}\n.. |Tfunctype| mathdef:: \\xref{text/types}{text-functype}{\\T{functype}}\n\n.. |Tglobaltype| mathdef:: \\xref{text/types}{text-globaltype}{\\T{globaltype}}\n.. |Ttabletype| mathdef:: \\xref{text/types}{text-tabletype}{\\T{tabletype}}\n.. |Tmemtype| mathdef:: \\xref{text/types}{text-memtype}{\\T{memtype}}\n.. |Tlimits| mathdef:: \\xref{text/types}{text-limits}{\\T{limits}}\n\n.. |Tparam| mathdef:: \\xref{text/types}{text-functype}{\\T{param}}\n.. |Tresult| mathdef:: \\xref{text/types}{text-functype}{\\T{result}}\n\n\n.. Indices, non-terminals\n\n.. |Ttypeidx| mathdef:: \\xref{text/modules}{text-typeidx}{\\T{typeidx}}\n.. |Tfuncidx| mathdef:: \\xref{text/modules}{text-funcidx}{\\T{funcidx}}\n.. |Ttableidx| mathdef:: \\xref{text/modules}{text-tableidx}{\\T{tableidx}}\n.. |Tmemidx| mathdef:: \\xref{text/modules}{text-memidx}{\\T{memidx}}\n.. |Tglobalidx| mathdef:: \\xref{text/modules}{text-globalidx}{\\T{globalidx}}\n.. |Telemidx| mathdef:: \\xref{text/modules}{text-elemidx}{\\T{elemidx}}\n.. |Tdataidx| mathdef:: \\xref{text/modules}{text-dataidx}{\\T{dataidx}}\n.. |Tlocalidx| mathdef:: \\xref{text/modules}{text-localidx}{\\T{localidx}}\n.. |Tlabelidx| mathdef:: \\xref{text/modules}{text-labelidx}{\\T{labelidx}}\n\n.. |Ttypebind| mathdef:: \\xref{text/modules}{text-typebind}{\\T{typebind}}\n.. |Tfuncbind| mathdef:: \\xref{text/modules}{text-funcbind}{\\T{funcbind}}\n.. |Ttablebind| mathdef:: \\xref{text/modules}{text-tablebind}{\\T{tablebind}}\n.. |Tmembind| mathdef:: \\xref{text/modules}{text-membind}{\\T{membind}}\n.. |Tglobalbind| mathdef:: \\xref{text/modules}{text-globalbind}{\\T{globalbind}}\n.. |Tlocalbind| mathdef:: \\xref{text/modules}{text-localbind}{\\T{localbind}}\n.. |Tlabelbind| mathdef:: \\xref{text/modules}{text-labelbind}{\\T{labelbind}}\n\n\n.. Modules, non-terminals\n\n.. |Tmodule| mathdef:: \\xref{text/modules}{text-module}{\\T{module}}\n.. |Tmodulebody| mathdef:: \\xref{text/modules}{text-modulebody}{\\T{modulebody}}\n.. |Tmodulefield| mathdef:: \\xref{text/modules}{text-modulefield}{\\T{modulefield}}\n.. |Ttype| mathdef:: \\xref{text/modules}{text-typedef}{\\T{type}}\n.. |Ttypeuse| mathdef:: \\xref{text/modules}{text-typeuse}{\\T{typeuse}}\n.. |Tfunc| mathdef:: \\xref{text/modules}{text-func}{\\T{func}}\n.. |Ttable| mathdef:: \\xref{text/modules}{text-table}{\\T{table}}\n.. |Tmem| mathdef:: \\xref{text/modules}{text-mem}{\\T{mem}}\n.. |Tglobal| mathdef:: \\xref{text/modules}{text-global}{\\T{global}}\n.. |Timport| mathdef:: \\xref{text/modules}{text-import}{\\T{import}}\n.. |Texport| mathdef:: \\xref{text/modules}{text-export}{\\T{export}}\n.. |Timportdesc| mathdef:: \\xref{text/modules}{text-importdesc}{\\T{importdesc}}\n.. |Texportdesc| mathdef:: \\xref{text/modules}{text-exportdesc}{\\T{exportdesc}}\n.. |Telem| mathdef:: \\xref{text/modules}{text-elem}{\\T{elem}}\n.. |Telemlist| mathdef:: \\xref{text/modules}{text-elemlist}{\\T{elemlist}}\n.. |Telemexpr| mathdef:: \\xref{text/modules}{text-elemexpr}{\\X{elemexpr}}\n.. |Ttableuse| mathdef:: \\xref{text/modules}{text-tableuse}{\\T{tableuse}}\n.. |Tcode| mathdef:: \\xref{text/modules}{text-code}{\\T{code}}\n.. |Tlocal| mathdef:: \\xref{text/modules}{text-local}{\\T{local}}\n.. |Tlocals| mathdef:: \\xref{text/modules}{text-local}{\\T{locals}}\n.. |Tdata| mathdef:: \\xref{text/modules}{text-data}{\\T{data}}\n.. |Tdatastring| mathdef:: \\xref{text/modules}{text-datastring}{\\T{datastring}}\n.. |Tmemuse| mathdef:: \\xref{text/modules}{text-memuse}{\\T{memuse}}\n.. |Tstart| mathdef:: \\xref{text/modules}{text-start}{\\T{start}}\n\n\n.. Instructions, non-terminals\n\n.. |Tmemarg| mathdef:: \\xref{text/instructions}{text-memarg}{\\T{memarg}}\n.. |Talign| mathdef:: \\xref{text/instructions}{text-memarg}{\\T{align}}\n.. |Toffset| mathdef:: \\xref{text/instructions}{text-memarg}{\\T{offset}}\n\n.. |Tblocktype| mathdef:: \\xref{text/instructions}{text-blocktype}{\\T{blocktype}}\n\n.. |Tlabel| mathdef:: \\xref{text/instructions}{text-label}{\\T{label}}\n.. |Tinstr| mathdef:: \\xref{text/instructions}{text-instr}{\\T{instr}}\n.. |Tplaininstr| mathdef:: \\xref{text/instructions}{text-plaininstr}{\\T{plaininstr}}\n.. |Tblockinstr| mathdef:: \\xref{text/instructions}{text-blockinstr}{\\T{blockinstr}}\n.. |Tfoldedinstr| mathdef:: \\xref{text/instructions}{text-foldedinstr}{\\T{foldedinstr}}\n.. |Texpr| mathdef:: \\xref{text/instructions}{text-expr}{\\T{expr}}\n\n\n\n.. Parsing\n.. -------\n\n.. Contexts\n\n.. |ITYPEDEFS| mathdef:: \\xref{text/conventions}{text-context}{\\K{typedefs}}\n.. |ITYPES| mathdef:: \\xref{text/conventions}{text-context}{\\K{types}}\n.. |IFUNCS| mathdef:: \\xref{text/conventions}{text-context}{\\K{funcs}}\n.. |ITABLES| mathdef:: \\xref{text/conventions}{text-context}{\\K{tables}}\n.. |IMEMS| mathdef:: \\xref{text/conventions}{text-context}{\\K{mems}}\n.. |IGLOBALS| mathdef:: \\xref{text/conventions}{text-context}{\\K{globals}}\n.. |IELEM| mathdef:: \\xref{text/conventions}{text-context}{\\K{elem}}\n.. |IDATA| mathdef:: \\xref{text/conventions}{text-context}{\\K{data}}\n.. |ILOCALS| mathdef:: \\xref{text/conventions}{text-context}{\\K{locals}}\n.. |ILABELS| mathdef:: \\xref{text/conventions}{text-context}{\\K{labels}}\n\n\n.. Meta Functions\n\n.. |idfresh| mathdef:: ~\\xref{text/values}{text-id-fresh}{\\mbox{fresh}}\n.. |idcwellformed| mathdef:: ~\\xref{text/conventions}{text-context-wf}{\\mbox{well-formed}}\n\n\n\n\n.. Validation\n.. ----------\n\n.. Notation\n\n.. |ok| mathdef:: \\mathrel{\\mbox{ok}}\n.. |const| mathdef:: \\xref{valid/instructions}{valid-constant}{\\mathrel{\\mbox{const}}}\n\n\n.. Contexts\n\n.. |CTYPES| mathdef:: \\xref{valid/conventions}{context}{\\K{types}}\n.. |CFUNCS| mathdef:: \\xref{valid/conventions}{context}{\\K{funcs}}\n.. |CTABLES| mathdef:: \\xref{valid/conventions}{context}{\\K{tables}}\n.. |CMEMS| mathdef:: \\xref{valid/conventions}{context}{\\K{mems}}\n.. |CGLOBALS| mathdef:: \\xref{valid/conventions}{context}{\\K{globals}}\n.. |CELEMS| mathdef:: \\xref{valid/conventions}{context}{\\K{elems}}\n.. |CDATAS| mathdef:: \\xref{valid/conventions}{context}{\\K{datas}}\n.. |CLOCALS| mathdef:: \\xref{valid/conventions}{context}{\\K{locals}}\n.. |CLABELS| mathdef:: \\xref{valid/conventions}{context}{\\K{labels}}\n.. |CRETURN| mathdef:: \\xref{valid/conventions}{context}{\\K{return}}\n.. |CREFS| mathdef:: \\xref{valid/conventions}{context}{\\K{refs}}\n\n\n.. Judgments\n\n.. |vdashlimits| mathdef:: \\xref{valid/types}{valid-limits}{\\vdash}\n.. |vdashblocktype| mathdef:: \\xref{valid/types}{valid-blocktype}{\\vdash}\n.. |vdashfunctype| mathdef:: \\xref{valid/types}{valid-functype}{\\vdash}\n.. |vdashtabletype| mathdef:: \\xref{valid/types}{valid-tabletype}{\\vdash}\n.. |vdashmemtype| mathdef:: \\xref{valid/types}{valid-memtype}{\\vdash}\n.. |vdashglobaltype| mathdef:: \\xref{valid/types}{valid-globaltype}{\\vdash}\n.. |vdashexterntype| mathdef:: \\xref{valid/types}{valid-externtype}{\\vdash}\n\n.. |vdashinstr| mathdef:: \\xref{valid/instructions}{valid-instr}{\\vdash}\n.. |vdashinstrseq| mathdef:: \\xref{valid/instructions}{valid-instr-seq}{\\vdash}\n.. |vdashexpr| mathdef:: \\xref{valid/instructions}{valid-expr}{\\vdash}\n.. |vdashexprconst| mathdef:: \\xref{valid/instructions}{valid-constant}{\\vdash}\n.. |vdashinstrconst| mathdef:: \\xref{valid/instructions}{valid-constant}{\\vdash}\n\n.. |vdashfunc| mathdef:: \\xref{valid/modules}{valid-func}{\\vdash}\n.. |vdashtable| mathdef:: \\xref{valid/modules}{valid-table}{\\vdash}\n.. |vdashmem| mathdef:: \\xref{valid/modules}{valid-mem}{\\vdash}\n.. |vdashglobal| mathdef:: \\xref{valid/modules}{valid-global}{\\vdash}\n.. |vdashelem| mathdef:: \\xref{valid/modules}{valid-elem}{\\vdash}\n.. |vdashelemmode| mathdef:: \\xref{valid/modules}{valid-elemmode}{\\vdash}\n.. |vdashdata| mathdef:: \\xref{valid/modules}{valid-data}{\\vdash}\n.. |vdashdatamode| mathdef:: \\xref{valid/modules}{valid-datamode}{\\vdash}\n.. |vdashstart| mathdef:: \\xref{valid/modules}{valid-start}{\\vdash}\n.. |vdashexport| mathdef:: \\xref{valid/modules}{valid-export}{\\vdash}\n.. |vdashexportdesc| mathdef:: \\xref{valid/modules}{valid-exportdesc}{\\vdash}\n.. |vdashimport| mathdef:: \\xref{valid/modules}{valid-import}{\\vdash}\n.. |vdashimportdesc| mathdef:: \\xref{valid/modules}{valid-importdesc}{\\vdash}\n.. |vdashmodule| mathdef:: \\xref{valid/modules}{valid-module}{\\vdash}\n\n\n.. Execution\n.. ---------\n\n.. Notation\n\n.. |stepto| mathdef:: \\xref{exec/conventions}{formal-notation}{\\hookrightarrow}\n.. |extendsto| mathdef:: \\xref{appendix/properties}{extend}{\\preceq}\n.. |matchesexterntype| mathdef:: \\xref{exec/modules}{match-externtype}{\\leq}\n.. |matcheslimits| mathdef:: \\xref{exec/modules}{match-limits}{\\leq}\n\n\n.. Allocation\n\n.. |allocfunc| mathdef:: \\xref{exec/modules}{alloc-func}{\\F{allocfunc}}\n.. |allochostfunc| mathdef:: \\xref{exec/modules}{alloc-hostfunc}{\\F{allochostfunc}}\n.. |alloctable| mathdef:: \\xref{exec/modules}{alloc-table}{\\F{alloctable}}\n.. |allocmem| mathdef:: \\xref{exec/modules}{alloc-mem}{\\F{allocmem}}\n.. |allocglobal| mathdef:: \\xref{exec/modules}{alloc-global}{\\F{allocglobal}}\n.. |allocelem| mathdef:: \\xref{exec/modules}{alloc-elem}{\\F{allocelem}}\n.. |allocdata| mathdef:: \\xref{exec/modules}{alloc-data}{\\F{allocdata}}\n.. |allocmodule| mathdef:: \\xref{exec/modules}{alloc-module}{\\F{allocmodule}}\n\n.. |growtable| mathdef:: \\xref{exec/modules}{grow-table}{\\F{growtable}}\n.. |growmem| mathdef:: \\xref{exec/modules}{grow-mem}{\\F{growmem}}\n\n\n.. Addresses, non-terminals\n\n.. |addr| mathdef:: \\xref{exec/runtime}{syntax-addr}{\\X{addr}}\n.. |funcaddr| mathdef:: \\xref{exec/runtime}{syntax-funcaddr}{\\X{funcaddr}}\n.. |tableaddr| mathdef:: \\xref{exec/runtime}{syntax-tableaddr}{\\X{tableaddr}}\n.. |memaddr| mathdef:: \\xref{exec/runtime}{syntax-memaddr}{\\X{memaddr}}\n.. |globaladdr| mathdef:: \\xref{exec/runtime}{syntax-globaladdr}{\\X{globaladdr}}\n.. |elemaddr| mathdef:: \\xref{exec/runtime}{syntax-elemaddr}{\\X{elemaddr}}\n.. |dataaddr| mathdef:: \\xref{exec/runtime}{syntax-dataaddr}{\\X{dataaddr}}\n.. |externaddr| mathdef:: \\xref{exec/runtime}{syntax-externaddr}{\\X{externaddr}}\n\n.. Instances, terminals\n\n.. |FITYPE| mathdef:: \\xref{exec/runtime}{syntax-funcinst}{\\K{type}}\n.. |FIMODULE| mathdef:: \\xref{exec/runtime}{syntax-funcinst}{\\K{module}}\n.. |FICODE| mathdef:: \\xref{exec/runtime}{syntax-funcinst}{\\K{code}}\n.. |FIHOSTCODE| mathdef:: \\xref{exec/runtime}{syntax-funcinst}{\\K{hostcode}}\n\n.. |TITYPE| mathdef:: \\xref{exec/runtime}{syntax-tableinst}{\\K{type}}\n.. |TIELEM| mathdef:: \\xref{exec/runtime}{syntax-tableinst}{\\K{elem}}\n\n.. |MITYPE| mathdef:: \\xref{exec/runtime}{syntax-meminst}{\\K{type}}\n.. |MIDATA| mathdef:: \\xref{exec/runtime}{syntax-meminst}{\\K{data}}\n\n.. |GITYPE| mathdef:: \\xref{exec/runtime}{syntax-globalinst}{\\K{type}}\n.. |GIVALUE| mathdef:: \\xref{exec/runtime}{syntax-globalinst}{\\K{value}}\n\n.. |EITYPE| mathdef:: \\xref{exec/runtime}{syntax-eleminst}{\\K{type}}\n.. |EIELEM| mathdef:: \\xref{exec/runtime}{syntax-eleminst}{\\K{elem}}\n\n.. |DIDATA| mathdef:: \\xref{exec/runtime}{syntax-datainst}{\\K{data}}\n\n.. |EINAME| mathdef:: \\xref{exec/runtime}{syntax-exportinst}{\\K{name}}\n.. |EIVALUE| mathdef:: \\xref{exec/runtime}{syntax-exportinst}{\\K{value}}\n\n.. |EVFUNC| mathdef:: \\xref{exec/runtime}{syntax-externval}{\\K{func}}\n.. |EVTABLE| mathdef:: \\xref{exec/runtime}{syntax-externval}{\\K{table}}\n.. |EVMEM| mathdef:: \\xref{exec/runtime}{syntax-externval}{\\K{mem}}\n.. |EVGLOBAL| mathdef:: \\xref{exec/runtime}{syntax-externval}{\\K{global}}\n\n.. |MITYPES| mathdef:: \\xref{exec/runtime}{syntax-moduleinst}{\\K{types}}\n.. |MIFUNCS| mathdef:: \\xref{exec/runtime}{syntax-moduleinst}{\\K{funcaddrs}}\n.. |MITABLES| mathdef:: \\xref{exec/runtime}{syntax-moduleinst}{\\K{tableaddrs}}\n.. |MIMEMS| mathdef:: \\xref{exec/runtime}{syntax-moduleinst}{\\K{memaddrs}}\n.. |MIGLOBALS| mathdef:: \\xref{exec/runtime}{syntax-moduleinst}{\\K{globaladdrs}}\n.. |MIELEMS| mathdef:: \\xref{exec/runtime}{syntax-moduleinst}{\\K{elemaddrs}}\n.. |MIDATAS| mathdef:: \\xref{exec/runtime}{syntax-moduleinst}{\\K{dataaddrs}}\n.. |MIEXPORTS| mathdef:: \\xref{exec/runtime}{syntax-moduleinst}{\\K{exports}}\n\n\n.. Instances, non-terminals\n\n.. |externval| mathdef:: \\xref{exec/runtime}{syntax-externval}{\\X{externval}}\n\n.. |moduleinst| mathdef:: \\xref{exec/runtime}{syntax-moduleinst}{\\X{moduleinst}}\n.. |funcinst| mathdef:: \\xref{exec/runtime}{syntax-funcinst}{\\X{funcinst}}\n.. |tableinst| mathdef:: \\xref{exec/runtime}{syntax-tableinst}{\\X{tableinst}}\n.. |meminst| mathdef:: \\xref{exec/runtime}{syntax-meminst}{\\X{meminst}}\n.. |globalinst| mathdef:: \\xref{exec/runtime}{syntax-globalinst}{\\X{globalinst}}\n.. |eleminst| mathdef:: \\xref{exec/runtime}{syntax-eleminst}{\\X{eleminst}}\n.. |datainst| mathdef:: \\xref{exec/runtime}{syntax-datainst}{\\X{datainst}}\n.. |exportinst| mathdef:: \\xref{exec/runtime}{syntax-exportinst}{\\X{exportinst}}\n\n.. |hostfunc| mathdef:: \\xref{exec/runtime}{syntax-hostfunc}{\\X{hostfunc}}\n\n\n.. Instances, meta functions\n\n.. |evfuncs| mathdef:: \\xref{exec/runtime}{syntax-externval}{\\F{funcs}}\n.. |evtables| mathdef:: \\xref{exec/runtime}{syntax-externval}{\\F{tables}}\n.. |evmems| mathdef:: \\xref{exec/runtime}{syntax-externval}{\\F{mems}}\n.. |evglobals| mathdef:: \\xref{exec/runtime}{syntax-externval}{\\F{globals}}\n\n\n.. Store, terminals\n\n.. |SFUNCS| mathdef:: \\xref{exec/runtime}{syntax-store}{\\K{funcs}}\n.. |STABLES| mathdef:: \\xref{exec/runtime}{syntax-store}{\\K{tables}}\n.. |SMEMS| mathdef:: \\xref{exec/runtime}{syntax-store}{\\K{mems}}\n.. |SGLOBALS| mathdef:: \\xref{exec/runtime}{syntax-store}{\\K{globals}}\n.. |SELEMS| mathdef:: \\xref{exec/runtime}{syntax-store}{\\K{elems}}\n.. |SDATAS| mathdef:: \\xref{exec/runtime}{syntax-store}{\\K{datas}}\n\n.. Store, non-terminals\n\n.. |store| mathdef:: \\xref{exec/runtime}{syntax-store}{\\X{store}}\n\n\n.. Stack, terminals\n\n.. |LABEL| mathdef:: \\xref{exec/runtime}{syntax-label}{\\K{label}}\n.. |FRAME| mathdef:: \\xref{exec/runtime}{syntax-frame}{\\K{frame}}\n\n.. |ALOCALS| mathdef:: \\xref{exec/runtime}{syntax-frame}{\\K{locals}}\n.. |AMODULE| mathdef:: \\xref{exec/runtime}{syntax-frame}{\\K{module}}\n\n\n.. Stack, non-terminals\n\n.. |label| mathdef:: \\xref{exec/runtime}{syntax-label}{\\X{label}}\n.. |frame| mathdef:: \\xref{exec/runtime}{syntax-frame}{\\X{frame}}\n\n\n.. Stack, meta functions\n\n.. |expand| mathdef:: \\xref{exec/runtime}{exec-expand}{\\F{expand}}\n\n\n.. Administrative Instructions, terminals\n\n.. |REFFUNCADDR| mathdef:: \\xref{exec/runtime}{syntax-ref}{\\K{ref}}\n.. |REFEXTERNADDR| mathdef:: \\xref{exec/runtime}{syntax-ref.extern}{\\K{ref{.}extern}}\n.. |TRAP| mathdef:: \\xref{exec/runtime}{syntax-trap}{\\K{trap}}\n.. |INVOKE| mathdef:: \\xref{exec/runtime}{syntax-invoke}{\\K{invoke}}\n\n\n.. Values & Results, non-terminals\n\n.. |num| mathdef:: \\xref{exec/runtime}{syntax-num}{\\X{num}}\n.. |reff| mathdef:: \\xref{exec/runtime}{syntax-ref}{\\X{ref}}\n.. |val| mathdef:: \\xref{exec/runtime}{syntax-val}{\\X{val}}\n.. |result| mathdef:: \\xref{exec/runtime}{syntax-result}{\\X{result}}\n\n\n.. Values, meta-functions\n\n.. |default| mathdef:: \\xref{exec/runtime}{default-val}{\\F{default}}\n\n\n.. Administrative Instructions, non-terminals\n\n.. |XB| mathdef:: \\xref{exec/runtime}{syntax-ctxt-block}{B}\n\n\n.. Configurations, non-terminals\n\n.. |config| mathdef:: \\xref{exec/runtime}{syntax-config}{\\X{config}}\n.. |thread| mathdef:: \\xref{exec/runtime}{syntax-thread}{\\X{thread}}\n\n\n.. Numerics, operators\n\n.. |iadd| mathdef:: \\xref{exec/numerics}{op-iadd}{\\F{iadd}}\n.. |isub| mathdef:: \\xref{exec/numerics}{op-isub}{\\F{isub}}\n.. |imul| mathdef:: \\xref{exec/numerics}{op-imul}{\\F{imul}}\n.. |idivu| mathdef:: \\xref{exec/numerics}{op-idiv_u}{\\F{idiv\\_u}}\n.. |idivs| mathdef:: \\xref{exec/numerics}{op-idiv_s}{\\F{idiv\\_s}}\n.. |iremu| mathdef:: \\xref{exec/numerics}{op-irem_u}{\\F{irem\\_u}}\n.. |irems| mathdef:: \\xref{exec/numerics}{op-irem_s}{\\F{irem\\_s}}\n.. |iand| mathdef:: \\xref{exec/numerics}{op-iand}{\\F{iand}}\n.. |ior| mathdef:: \\xref{exec/numerics}{op-ior}{\\F{ior}}\n.. |ixor| mathdef:: \\xref{exec/numerics}{op-ixor}{\\F{ixor}}\n.. |ishl| mathdef:: \\xref{exec/numerics}{op-ishl}{\\F{ishl}}\n.. |ishru| mathdef:: \\xref{exec/numerics}{op-ishr_u}{\\F{ishr\\_u}}\n.. |ishrs| mathdef:: \\xref{exec/numerics}{op-ishr_s}{\\F{ishr\\_s}}\n.. |irotl| mathdef:: \\xref{exec/numerics}{op-irotl}{\\F{irotl}}\n.. |irotr| mathdef:: \\xref{exec/numerics}{op-irotr}{\\F{irotr}}\n.. |iclz| mathdef:: \\xref{exec/numerics}{op-iclz}{\\F{iclz}}\n.. |ictz| mathdef:: \\xref{exec/numerics}{op-ictz}{\\F{ictz}}\n.. |ipopcnt| mathdef:: \\xref{exec/numerics}{op-ipopcnt}{\\F{ipopcnt}}\n.. |ieqz| mathdef:: \\xref{exec/numerics}{op-ieqz}{\\F{ieqz}}\n.. |ieq| mathdef:: \\xref{exec/numerics}{op-ieq}{\\F{ieq}}\n.. |ine| mathdef:: \\xref{exec/numerics}{op-ine}{\\F{ine}}\n.. |iltu| mathdef:: \\xref{exec/numerics}{op-ilt_u}{\\F{ilt\\_u}}\n.. |ilts| mathdef:: \\xref{exec/numerics}{op-ilt_s}{\\F{ilt\\_s}}\n.. |igtu| mathdef:: \\xref{exec/numerics}{op-igt_u}{\\F{igt\\_u}}\n.. |igts| mathdef:: \\xref{exec/numerics}{op-igt_s}{\\F{igt\\_s}}\n.. |ileu| mathdef:: \\xref{exec/numerics}{op-ile_u}{\\F{ile\\_u}}\n.. |iles| mathdef:: \\xref{exec/numerics}{op-ile_s}{\\F{ile\\_s}}\n.. |igeu| mathdef:: \\xref{exec/numerics}{op-ige_u}{\\F{ige\\_u}}\n.. |iges| mathdef:: \\xref{exec/numerics}{op-ige_s}{\\F{ige\\_s}}\n.. |iextendMs| mathdef:: \\xref{exec/numerics}{op-iextendn_s}{\\F{iextend}M\\F{\\_s}}\n\n.. |fadd| mathdef:: \\xref{exec/numerics}{op-fadd}{\\F{fadd}}\n.. |fsub| mathdef:: \\xref{exec/numerics}{op-fsub}{\\F{fsub}}\n.. |fmul| mathdef:: \\xref{exec/numerics}{op-fmul}{\\F{fmul}}\n.. |fdiv| mathdef:: \\xref{exec/numerics}{op-fdiv}{\\F{fdiv}}\n.. |fmin| mathdef:: \\xref{exec/numerics}{op-fmin}{\\F{fmin}}\n.. |fmax| mathdef:: \\xref{exec/numerics}{op-fmax}{\\F{fmax}}\n.. |fcopysign| mathdef:: \\xref{exec/numerics}{op-fcopysign}{\\F{fcopysign}}\n.. |fabs| mathdef:: \\xref{exec/numerics}{op-fabs}{\\F{fabs}}\n.. |fneg| mathdef:: \\xref{exec/numerics}{op-fneg}{\\F{fneg}}\n.. |fsqrt| mathdef:: \\xref{exec/numerics}{op-fsqrt}{\\F{fsqrt}}\n.. |fceil| mathdef:: \\xref{exec/numerics}{op-fceil}{\\F{fceil}}\n.. |ffloor| mathdef:: \\xref{exec/numerics}{op-ffloor}{\\F{ffloor}}\n.. |ftrunc| mathdef:: \\xref{exec/numerics}{op-ftrunc}{\\F{ftrunc}}\n.. |fnearest| mathdef:: \\xref{exec/numerics}{op-fnearest}{\\F{fnearest}}\n.. |feq| mathdef:: \\xref{exec/numerics}{op-feq}{\\F{feq}}\n.. |fne| mathdef:: \\xref{exec/numerics}{op-fne}{\\F{fne}}\n.. |flt| mathdef:: \\xref{exec/numerics}{op-flt}{\\F{flt}}\n.. |fgt| mathdef:: \\xref{exec/numerics}{op-fgt}{\\F{fgt}}\n.. |fle| mathdef:: \\xref{exec/numerics}{op-fle}{\\F{fle}}\n.. |fge| mathdef:: \\xref{exec/numerics}{op-fge}{\\F{fge}}\n\n.. |extend| mathdef:: \\xref{exec/numerics}{op-extend_u}{\\F{extend}}\n.. |extendu| mathdef:: \\xref{exec/numerics}{op-extend_u}{\\F{extend}^{\\K{u}}}\n.. |extends| mathdef:: \\xref{exec/numerics}{op-extend_s}{\\F{extend}^{\\K{s}}}\n.. |wrap| mathdef:: \\xref{exec/numerics}{op-wrap}{\\F{wrap}}\n.. |truncu| mathdef:: \\xref{exec/numerics}{op-trunc_u}{\\F{trunc}^{\\K{u}}}\n.. |truncs| mathdef:: \\xref{exec/numerics}{op-trunc_s}{\\F{trunc}^{\\K{s}}}\n.. |truncsatu| mathdef:: \\xref{exec/numerics}{op-trunc_sat_u}{\\F{trunc\\_sat\\_u}}\n.. |truncsats| mathdef:: \\xref{exec/numerics}{op-trunc_sat_s}{\\F{trunc\\_sat\\_s}}\n.. |promote| mathdef:: \\xref{exec/numerics}{op-promote}{\\F{promote}}\n.. |demote| mathdef:: \\xref{exec/numerics}{op-demote}{\\F{demote}}\n.. |convertu| mathdef:: \\xref{exec/numerics}{op-convert_u}{\\F{convert}^{\\K{u}}}\n.. |converts| mathdef:: \\xref{exec/numerics}{op-convert_s}{\\F{convert}^{\\K{s}}}\n.. |reinterpret| mathdef:: \\xref{exec/numerics}{op-reinterpret}{\\F{reinterpret}}\n\n\n.. Numerics, meta functions\n\n.. |bits| mathdef:: \\xref{exec/numerics}{aux-bits}{\\F{bits}}\n.. |ibits| mathdef:: \\xref{exec/numerics}{aux-ibits}{\\F{ibits}}\n.. |fbits| mathdef:: \\xref{exec/numerics}{aux-fbits}{\\F{fbits}}\n.. |fsign| mathdef:: \\xref{exec/numerics}{aux-fsign}{\\F{fsign}}\n.. |fbias| mathdef:: \\xref{exec/numerics}{aux-fbias}{\\F{fbias}}\n.. |bytes| mathdef:: \\xref{exec/numerics}{aux-bytes}{\\F{bytes}}\n.. |littleendian| mathdef:: \\xref{exec/numerics}{aux-littleendian}{\\F{littleendian}}\n.. |signed| mathdef:: \\xref{exec/numerics}{aux-signed}{\\F{signed}}\n.. |bool| mathdef:: \\xref{exec/numerics}{aux-bool}{\\F{bool}}\n\n.. |ieee| mathdef:: \\xref{exec/numerics}{aux-ieee}{\\F{float}}\n.. |nans| mathdef:: \\xref{exec/numerics}{aux-nans}{\\F{nans}}\n.. |trunc| mathdef:: \\xref{exec/numerics}{aux-trunc}{\\F{trunc}}\n\n\n.. Other meta functions\n\n.. |instantiate| mathdef:: \\xref{exec/modules}{exec-instantiation}{\\F{instantiate}}\n.. |invoke| mathdef:: \\xref{exec/modules}{exec-invocation}{\\F{invoke}}\n\n\n.. Judgements\n\n.. |vdashexternval| mathdef:: \\xref{exec/modules}{valid-externval}{\\vdash}\n\n.. |vdashlimitsmatch| mathdef:: \\xref{exec/modules}{match-limits}{\\vdash}\n.. |vdashexterntypematch| mathdef:: \\xref{exec/modules}{match-externtype}{\\vdash}\n\n\n.. Soundness\n.. ---------\n\n.. Judgements\n\n.. |vdashadmininstr| mathdef:: \\xref{appendix/properties}{valid-instr-admin}{\\vdash}\n\n.. |vdashval| mathdef:: \\xref{appendix/properties}{valid-val}{\\vdash}\n.. |vdashresult| mathdef:: \\xref{appendix/properties}{valid-result}{\\vdash}\n\n.. |vdashfuncinst| mathdef:: \\xref{appendix/properties}{valid-funcinst}{\\vdash}\n.. |vdashtableinst| mathdef:: \\xref{appendix/properties}{valid-tableinst}{\\vdash}\n.. |vdashmeminst| mathdef:: \\xref{appendix/properties}{valid-meminst}{\\vdash}\n.. |vdashglobalinst| mathdef:: \\xref{appendix/properties}{valid-globalinst}{\\vdash}\n.. |vdasheleminst| mathdef:: \\xref{appendix/properties}{valid-eleminst}{\\vdash}\n.. |vdashdatainst| mathdef:: \\xref{appendix/properties}{valid-datainst}{\\vdash}\n.. |vdashexportinst| mathdef:: \\xref{appendix/properties}{valid-exportinst}{\\vdash}\n.. |vdashmoduleinst| mathdef:: \\xref{appendix/properties}{valid-moduleinst}{\\vdash}\n\n.. |vdashstore| mathdef:: \\xref{appendix/properties}{valid-store}{\\vdash}\n.. |vdashconfig| mathdef:: \\xref{appendix/properties}{valid-config}{\\vdash}\n.. |vdashthread| mathdef:: \\xref{appendix/properties}{valid-thread}{\\vdash}\n.. |vdashframe| mathdef:: \\xref{appendix/properties}{valid-frame}{\\vdash}\n\n.. |vdashfuncinstextends| mathdef:: \\xref{appendix/properties}{extend-funcinst}{\\vdash}\n.. |vdashtableinstextends| mathdef:: \\xref{appendix/properties}{extend-tableinst}{\\vdash}\n.. |vdashmeminstextends| mathdef:: \\xref{appendix/properties}{extend-meminst}{\\vdash}\n.. |vdashglobalinstextends| mathdef:: \\xref{appendix/properties}{extend-globalinst}{\\vdash}\n.. |vdasheleminstextends| mathdef:: \\xref{appendix/properties}{extend-eleminst}{\\vdash}\n.. |vdashdatainstextends| mathdef:: \\xref{appendix/properties}{extend-datainst}{\\vdash}\n.. |vdashstoreextends| mathdef:: \\xref{appendix/properties}{extend-store}{\\vdash}\n\n\n.. Custom Sections\n.. ---------------\n\n.. Name section, non-terminals\n\n.. |Bnamesec| mathdef:: \\xref{appendix/custom}{binary-namesubsection}{\\B{namesec}}\n.. |Bnamedata| mathdef:: \\xref{appendix/custom}{binary-namesubsection}{\\B{namedata}}\n.. |Bnamesubsection| mathdef:: \\xref{appendix/custom}{binary-namesubsection}{\\B{namesubsection}}\n\n.. |Bnamemap| mathdef:: \\xref{appendix/custom}{binary-namemap}{\\B{namemap}}\n.. |Bnameassoc| mathdef:: \\xref{appendix/custom}{binary-namemap}{\\B{nameassoc}}\n.. |Bindirectnamemap| mathdef:: \\xref{appendix/custom}{binary-indirectnamemap}{\\B{indirectnamemap}}\n.. |Bindirectnameassoc| mathdef:: \\xref{appendix/custom}{binary-indirectnamemap}{\\B{indirectnameassoc}}\n\n.. |Bmodulenamesubsec| mathdef:: \\xref{appendix/custom}{binary-modulenamesec}{\\B{modulenamesubsec}}\n.. |Bfuncnamesubsec| mathdef:: \\xref{appendix/custom}{binary-funcnamesec}{\\B{funcnamesubsec}}\n.. |Blocalnamesubsec| mathdef:: \\xref{appendix/custom}{binary-localnamesec}{\\B{localnamesubsec}}\n\n\n.. Embedding\n.. ---------\n\n.. |error| mathdef:: \\xref{appendix/embedding}{embed-error}{\\X{error}}\n.. |ERROR| mathdef:: \\xref{appendix/embedding}{embed-error}{\\K{error}}\n"
  },
  {
    "path": "document/core/util/mathdef.py",
    "content": "from sphinx.ext.mathbase import math\nfrom sphinx.ext.mathbase import MathDirective\nfrom sphinx.util.texescape import tex_replace_map\nfrom sphinx.writers.html5 import HTML5Translator\nfrom sphinx.writers.latex import LaTeXTranslator\nfrom docutils import nodes\nfrom docutils.parsers.rst.directives.misc import Replace\nfrom six import text_type\nimport re\n\n\n# Transform \\xref in math nodes\n\nxref_re = re.compile('\\\\\\\\xref\\{([^}]*)\\}\\{([^}]*)\\}', re.M)\n\ndef html_hyperlink(file, id):\n  return '\\\\href{../%s.html#%s}' % (file, id.replace('_', '-'))\n\ndef html_transform_math_xref(node):\n  new_text = xref_re.sub(lambda m: html_hyperlink(m.group(1), m.group(2)), node.astext())\n  node.children[0] = nodes.Text(new_text)\n\n# Mirrors sphinx/writers/latex\ndef latex_hyperlink(file, id):\n  id = text_type(id).translate(tex_replace_map).\\\n    encode('ascii', 'backslashreplace').decode('ascii').\\\n    replace('_', '-').replace('\\\\', '_')\n  return '\\\\hyperref[%s:%s]' % (file, id)\n\ndef latex_transform_math_xref(node):\n  new_text = xref_re.sub(lambda m: latex_hyperlink(m.group(1), m.group(2)), node.astext())\n  node.children[0] = nodes.Text(new_text)\n\n# Expand mathdef names in math roles and directives\n\ndef_re = re.compile('\\\\\\\\[A-Za-z][0-9A-Za-z]*', re.M)\n\nauxcounter = 0\n\ndef lookup_mathdef(defs, name):\n  if name in defs:\n    [arity, s] = defs[name]\n    if arity > 0:\n      global auxcounter\n      auxcounter = auxcounter + 1\n      name = \"\\\\mathdef%d\" % auxcounter\n      s = \"\\\\def%s#%d{%s}%s\" % (name, arity, s, name)\n    return s\n  return name\n\ndef replace_mathdefs(doc, s):\n  if not hasattr(doc, 'mathdefs'):\n    return s\n  return def_re.sub(lambda m: lookup_mathdef(doc.mathdefs, m.group(0)), s)\n\ndef ext_math_role(role, raw, text, line, inliner, options = {}, content = []):\n  text = replace_mathdefs(inliner.document, raw.split('`')[1])\n  return [math(raw, text)], []\n\nclass ExtMathDirective(MathDirective):\n  def run(self):\n    doc = self.state.document\n    for i, s in enumerate(self.content):\n      self.content[i] = replace_mathdefs(doc, s)\n    for i, s in enumerate(self.arguments):\n      self.arguments[i] = replace_mathdefs(doc, s)\n    return super().run()\n\nclass MathdefDirective(Replace):\n  def run(self):\n    name = '\\\\' + self.state.parent.rawsource.split('|')[1]\n    name = name.split('#')\n    if len(name) > 1:\n      arity = int(name[1])\n    else:\n      arity = 0\n    name = name[0]\n    doc = self.state.document\n    if not hasattr(doc, 'mathdefs'):\n      doc.mathdefs = {}\n    # TODO: we don't ever hit the case where len(self.content) > 1\n    for i, s in enumerate(self.content):\n      self.content[i] = replace_mathdefs(doc, s)\n    doc.mathdefs[name] = [arity, ''.join(self.content)]\n    self.content[0] = ':math:`' + self.content[0]\n    self.content[-1] = self.content[-1] + '`'\n    return super().run()\n\nclass WebAssemblyHTML5Translator(HTML5Translator):\n  \"\"\"\n  Customize HTML5Translator.\n  Convert xref in math and math block nodes to hrefs.\n  \"\"\"\n  def visit_math(self, node, math_env = ''):\n    html_transform_math_xref(node)\n    super().visit_math(node, math_env)\n\n  def visit_math_block(self, node, math_env  = ''):\n    html_transform_math_xref(node)\n    super().visit_math_block(node, math_env)\n\nclass WebAssemblyLaTeXTranslator(LaTeXTranslator):\n  \"\"\"\n  Customize LaTeXTranslator.\n  Convert xref in math and math block nodes to hyperrefs.\n  \"\"\"\n  def visit_math(self, node):\n    latex_transform_math_xref(node)\n    super().visit_math(node)\n\n  def visit_math_block(self, node):\n    latex_transform_math_xref(node)\n    super().visit_math_block(node)\n\n# Setup\n\ndef setup(app):\n  app.set_translator('html', WebAssemblyHTML5Translator)\n  app.set_translator('latex', WebAssemblyLaTeXTranslator)\n  app.add_role('math', ext_math_role)\n  app.add_directive('math', ExtMathDirective, override = True)\n  app.add_directive('mathdef', MathdefDirective)\n"
  },
  {
    "path": "document/core/util/mathdefbs.py",
    "content": "# Version of mathdef.py for bikeshed build.\n# Tweaked to generate single page links.\n# TODO(bradnelson): Figure out a way to merge this back into\n# mathdef.py controlled by buildername.\n\nfrom sphinx.ext.mathbase import math\nfrom sphinx.ext.mathbase import MathDirective\nfrom sphinx.ext.mathjax import html_visit_math\nfrom sphinx.ext.mathjax import html_visit_displaymath\nfrom sphinx.writers.html5 import HTML5Translator\nfrom docutils import nodes\nfrom docutils.parsers.rst.directives.misc import Replace\nimport re\n\n\n# Transform \\xref in math nodes\n\nxref_re = re.compile('\\\\\\\\xref\\{([^}]*)\\}\\{([^}]*)\\}', re.M)\n\ndef html_hyperlink(file, id):\n  return '\\\\href{#%s}' % (id.replace('_', '-'))\n\ndef html_transform_math_xref(node):\n  new_text = xref_re.sub(lambda m: html_hyperlink(m.group(1), m.group(2)), node.astext())\n  node.children[0] = nodes.Text(new_text)\n\n# Expand mathdef names in math roles and directives\n\ndef_re = re.compile('\\\\\\\\[A-Za-z][0-9A-Za-z]*', re.M)\n\nauxcounter = 0\n\ndef lookup_mathdef(defs, name):\n  if name in defs:\n    [arity, s] = defs[name]\n    if arity > 0:\n      global auxcounter\n      auxcounter = auxcounter + 1\n      name = \"\\\\mathdef%d\" % auxcounter\n      s = \"\\\\def%s#%d{%s}%s\" % (name, arity, s, name)\n    return s\n  return name\n\ndef replace_mathdefs(doc, s):\n  if not hasattr(doc, 'mathdefs'):\n    return s\n  return def_re.sub(lambda m: lookup_mathdef(doc.mathdefs, m.group(0)), s)\n\ndef ext_math_role(role, raw, text, line, inliner, options = {}, content = []):\n  text = replace_mathdefs(inliner.document, raw.split('`')[1])\n  return [math(raw, text)], []\n\nclass ExtMathDirective(MathDirective):\n  def run(self):\n    doc = self.state.document\n    for i, s in enumerate(self.content):\n      self.content[i] = replace_mathdefs(doc, s)\n    for i, s in enumerate(self.arguments):\n      self.arguments[i] = replace_mathdefs(doc, s)\n    return super(ExtMathDirective, self).run()\n\nclass MathdefDirective(Replace):\n  def run(self):\n    name = '\\\\' + self.state.parent.rawsource.split('|')[1]\n    name = name.split('#')\n    if len(name) > 1:\n      arity = int(name[1])\n    else:\n      arity = 0\n    name = name[0]\n    doc = self.state.document\n    if not hasattr(doc, 'mathdefs'):\n      doc.mathdefs = {}\n    for i, s in enumerate(self.content):\n      self.content[i] = replace_mathdefs(doc, s)\n    doc.mathdefs[name] = [arity, ''.join(self.content)]\n    self.content[0] = ':math:`' + self.content[0]\n    self.content[-1] = self.content[-1] + '`'\n    return super(MathdefDirective, self).run()\n\nclass WebAssemblyHTML5Translator(HTML5Translator):\n  \"\"\"\n  Customize HTML5Translator.\n  Convert xref in math and math block nodes to hrefs.\n  \"\"\"\n  def visit_math(self, node, math_env = ''):\n    html_transform_math_xref(node)\n    super().visit_math(node, math_env)\n\n  def visit_math_block(self, node, math_env  = ''):\n    html_transform_math_xref(node)\n    super().visit_math_block(node, math_env)\n\n# Setup\n\ndef setup(app):\n  app.set_translator('singlehtml', WebAssemblyHTML5Translator)\n  app.add_role('math', ext_math_role)\n  app.add_directive('math', ExtMathDirective, override = True)\n  app.add_directive('mathdef', MathdefDirective)\n"
  },
  {
    "path": "document/core/util/mathjax2katex.py",
    "content": "#! /usr/bin/env python3\n# -*- coding: latin-1 -*-\n\nimport queue\nimport os\nimport re\nimport shelve\nimport subprocess\nimport sys\nimport threading\n\n\nSCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))\n# Update this to invalidate the cache; e.g. when updating katex.\nCACHE_VERSION = 2\n\n\ndef FindMatching(data, prefix):\n  start = data.find(prefix)\n  if start < 0:\n    return (None, None)\n  end = start + 1\n  total = 0\n  while True:\n    if data[end] == '{':\n      total += 1\n    elif data[end] == '}':\n      total -= 1\n      if total == 0:\n        end += 1\n        break\n    end += 1\n  return (start, end)\n\n\ndef HasBalancedTags(s):\n  tt = re.findall(r'(</?\\w+|/>)', s)\n  tags = []\n  for tag in tt:\n    if tag == '/>':\n      # self-closing tag.\n      tags.pop\n    elif tag[0] == '</':\n      # closing tag\n      tag = tag[2:]\n      if len(tags) == 0 or tag != tags[-1]:\n        expected = '\"%s\"' % tags[-1] if len(tags) else 'empty tag stack'\n        sys.stderr.write('expected %s, got \"%s\"\\n' % (expected, tag))\n        sys.stderr.write('tags: %s\\n' % tt)\n        sys.stderr.write('tag stack: %s\\n' % tags)\n        sys.stderr.write('string: %s\\n' % s)\n        return False\n\n      tags.pop()\n    else:\n      # opening tag\n      tags.append(tag[1:])\n  return True\n\n\ndef ReplaceMath(cache, data):\n  old = data\n  data = data.replace('\\\\\\\\', '\\\\DOUBLESLASH')\n  data = data.replace('\\\\(', '')\n  data = data.replace('\\\\)', '')\n  data = data.replace('\\\\[', '')\n  data = data.replace('\\\\]', '')\n  data = data.replace('\\\\DOUBLESLASH', '\\\\\\\\')\n  data = data.replace('’', '\\\\text{’}')\n  data = data.replace('‘', '\\\\text{‘}')\n  data = data.replace('\\\\hfill', '')\n  data = data.replace('\\\\mbox', '\\\\text')\n  data = data.replace('\\\\begin{split}', '\\\\begin{aligned}')\n  data = data.replace('\\\\end{split}', '\\\\end{aligned}')\n  data = data.replace('&amp;', '&')\n  data = data.replace('&lt;', '<')\n  data = data.replace('&gt;', '>')\n  data = data.replace('{array}[t]', '{array}')\n  data = data.replace('{array}[b]', '{array}')\n  data = data.replace('@{~}', '')\n  data = data.replace('@{}', '')\n  data = data.replace('@{\\\\qquad}', '')\n  data = data.replace('@{\\\\qquad\\\\qquad}', '')\n  data = re.sub('([^\\\\\\\\])[$]', '\\\\1', data)\n  data = '\\\\mathrm{' + data + '}'\n\n  if data in cache:\n    return cache[data]\n\n  macros = {}\n  while True:\n    start, end = FindMatching(data, '\\\\def\\\\')\n    if start is None:\n      break\n    parts = data[start:end]\n    name_end = parts.find('#')\n    assert name_end > 0\n    name = parts[len('\\\\def'):name_end]\n    value = parts[name_end+len('#1'):end]\n    macros[name] = value\n    data = data[:start] + data[end:]\n  for k, v in macros.items():\n    while True:\n      start, end = FindMatching(data, k + '{')\n      if start is None:\n        break\n      data = data[:start] + v.replace('#1', data[start+len(k):end]) + data[end:]\n  p = subprocess.Popen(\n      ['node', os.path.join(SCRIPT_DIR, 'katex/cli.js'), '--display-mode'],\n      stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True)\n  ret = p.communicate(input=data)[0]\n  if p.returncode != 0:\n    sys.stderr.write('BEFORE:\\n' + old + '\\n')\n    sys.stderr.write('AFTER:\\n' + data + '\\n')\n    raise Exception()\n  ret = ret.strip()\n  ret = ret[ret.find('<span class=\"katex-html\"'):]\n  ret = '<span class=\"katex-display\"><span class=\"katex\">' + ret\n  # w3c validator does not like negative em.\n  ret = re.sub('height:[-][0-9][.][0-9]+em', 'height:0em', ret)\n  # Fix ahref -> a href bug (fixed in next release).\n  ret = ret.replace('<ahref=\"<a', '<a href=\"')\n  # Fix stray spans that come out of katex.\n  ret = re.sub('[<]span class=\"vlist\" style=\"height:[0-9.]+em;\"[>]',\n               '<span class=\"vlist\">', ret)\n  assert HasBalancedTags(ret)\n\n  cache[data] = ret\n  return ret\n\n\ndef Main():\n  fixups = []\n\n  # TODO(bradnelson, tabatkins): Fix bikeshed to not muck up <pre>.\n  def StripParas(match):\n    ret = match.group(1)\n    ret = ret.replace('\\n<p><span class=\"k\">case', '\\n   <span class=\"k\">case')\n    ret = ret.replace('<p>', '')\n    ret = ret.replace('</p>', '')\n    return ret\n\n  def ExtractMath(match):\n    fixups.append(\n        (match.group(1), match.group(2), match.group(3), match.group(4),\n         match.start(), match.end()))\n    return 'x' * len(match.group())\n\n  data = open(sys.argv[1]).read()\n  cache = shelve.open('%s.%d.cache' % (sys.argv[1], CACHE_VERSION))\n  # Drop index + search links.\n  data = data.replace(\n      '<link href=\"genindex.html\" rel=\"index\" title=\"Index\">', '')\n  data = data.replace(\n      '<link href=\"search.html\" rel=\"search\" title=\"Search\">', '')\n  # Drop Navigation.\n  data = data.replace(\n      '<h3 class=\"heading settled\" id=\"navigation\">'\n      '<span class=\"content\">Navigation</span></h3>', '')\n  data = data.replace(\n      '<li class=\"nav-item nav-item-0\"><a href=\"index.html#document-index\">'\n      'WebAssembly 1.0</a> »', '')\n  # Drop Index links.\n  data = data.replace(\n      '<li><a class=\"reference internal\" href=\"index.html#index-type\">'\n      '<span class=\"std std-ref\">Index of Types</span></a>', '')\n  data = data.replace(\n      '<li><a class=\"reference internal\" href=\"index.html#index-instr\">'\n      '<span class=\"std std-ref\">Index of Instructions</span></a>', '')\n  data = data.replace(\n      '<li><a class=\"reference internal\" href=\"index.html#index-rules\">'\n      '<span class=\"std std-ref\">Index of Semantic Rules</span></a>', '')\n  data = data.replace(\n      '<li><a class=\"reference internal\" href=\"genindex.html\">'\n      '<span class=\"std std-ref\">Index</span></a>', '')\n  # Drop sphinx css.\n  data = data.replace(\n      '<link href=\"_static/classic.css\" rel=\"stylesheet\" type=\"text/css\">', '')\n  # Fix sphinx css\n  data = data.replace(\n      '<link href=\"_static/pygments.css\" rel=\"stylesheet\" type=\"text/css\">',\n      '<link href=\"pygments.css\" rel=\"stylesheet\" type=\"text/css\">')\n  # Bad duplicate meta.\n  data = ''.join(data.rsplit(\n      '<meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\">', 1))\n  # Drop several scripts.\n  data = re.sub('<script[^>]*text/javascript[^>]*>[^<]*</script>', '', data)\n  data = data.replace(\n      '<head>\\n', '<head>\\n<link rel=\"stylesheet\" href=\"katex/dist/katex.css\">')\n  # Drop duplicate title.\n  data = data.replace(\n      '<title>WebAssembly 1.0</title>', '')\n  # valign=\"top\"/\"bottom\" fails w3c validator.\n  data = data.replace(' valign=\"top\"', '')\n  data = data.replace(' valign=\"bottom\"', '')\n  # frame=\"void\" fails w3c validator.\n  data = data.replace(' frame=\"void\"', '')\n  # rules=\"none\" fails w3c validator.\n  data = data.replace(' rules=\"none\"', '')\n  # width=\"*\" angers w3c validator.\n  data = re.sub(' width=\"[0-9]+%\"', '', data)\n  # border=\"1\" angers w3c validator.\n  data = data.replace(' border=\"1\"', '')\n  # Get rid of gray bars.\n  data = data.replace(\n      '<blockquote>', '<blockquote style=\"border-color: transparent\">')\n  # Strip <p> in <pre>\n  data = re.sub('(<pre>.*?</pre>)', StripParas, data, 0, re.DOTALL)\n\n  # Work around W3C forcing links to have underline for math fragments.\n  data = data.replace('<style>',\n\"\"\"<style>/* mathjax2katex fixes */\n.katex-display a[href] {\n  border-bottom: 0;\n}\n</style>\n<style>\"\"\" , 1)\n\n  # Pull out math fragments.\n  data = re.sub(\n      'class=\"([^\"]*)math([^\"]*)\"[^>]*>'\n      '((?:[ ]*<span[^>]*>[^<]*</span>)*)([^<]*)<',\n      ExtractMath, data)\n\n  sys.stderr.write('Processing %d fragments.\\n' % len(fixups))\n\n  done_fixups = []\n  success = True\n\n  def Worker():\n    nonlocal success\n    while True:\n      cls_before, cls_after, spans, mth, start, end = q.get()\n      try:\n        fixed = ('class=\"' + cls_before + ' ' + cls_after + '\">' +\n                 spans + ReplaceMath(cache, mth) + '<')\n        done_fixups.append((start, end, fixed))\n      except Exception:\n        success = False\n\n      q.task_done()\n      sys.stderr.write('.')\n\n  q = queue.Queue()\n  for i in range(len(os.sched_getaffinity(0))):\n    t = threading.Thread(target=Worker)\n    t.daemon = True\n    t.start()\n\n  for item in fixups:\n    q.put(item)\n  q.join()\n\n  if not success:\n      sys.stderr.write('\\n!!! Error processing fragments\\n')\n      cache.close()\n      sys.exit(1)\n\n  result = []\n  last = 0\n  for start, end, value in sorted(done_fixups):\n    result.append(data[last:start])\n    result.append(value)\n    last = end\n  result.append(data[last:])\n\n  sys.stderr.write('\\nProcessing Done.\\n')\n  sys.stdout.write(''.join(result))\n  cache.close()\n\n\nMain()\n"
  },
  {
    "path": "document/core/util/pseudo-lexer.py",
    "content": "from pygments.lexer import RegexLexer\nfrom pygments.token import *\nfrom sphinx.highlighting import lexers\n\nclass PseudoLexer(RegexLexer):\n  name = 'Pseudo'\n  aliases = ['pseudo']\n  filenames = ['*.pseudo']\n\n  tokens = {\n      'root': [\n          (r\"(?<![(])\\btype\\b\", Keyword),\n          (r\"(?<![(])\\bvar\\b\", Keyword),\n          (r\"\\bfunc\\b\", Keyword),\n          (r\"(?<![(])\\breturn\\b\", Keyword),\n          (r\"\\blet\\b\", Keyword),\n          (r\"\\bswitch\\b\", Keyword),\n          (r\"\\bcase\\b\", Keyword),\n          (r\"(?<![(])\\bif\\b\", Keyword),\n          (r\"\\bforeach\\b\", Keyword),\n          (r\"\\bin\\b\", Keyword),\n          (r\"(?<=type[ ])[_a-zA-Z0-9]+\", Name.Function),\n          (r\"(?<=func[ ])[_a-zA-Z0-9]+\", Name.Function),\n          (r\"(?<=var[ ])[_a-zA-Z0-9]+\", Name.Function),\n          (r\"(?<=let[ ])[_a-zA-Z0-9]+\", Name.Function),\n          (r\"[_a-zA-Z0-9]+(?=[ ][:][ ])\", Name.Function),\n          (r\".\", Text),\n      ]\n  }\n\ndef setup(app):\n  lexers['pseudo'] = PseudoLexer()\n"
  },
  {
    "path": "document/core/valid/conventions.rst",
    "content": ".. index:: ! validation, ! type system, function type, table type, memory type, globaltype, valtype, resulttype, index space, instantiation. module\n.. _type-system:\n\nConventions\n-----------\n\nValidation checks that a WebAssembly module is well-formed.\nOnly valid modules can be :ref:`instantiated <exec-instantiation>`.\n\nValidity is defined by a *type system* over the :ref:`abstract syntax <syntax>` of a :ref:`module <syntax-module>` and its contents.\nFor each piece of abstract syntax, there is a typing rule that specifies the constraints that apply to it.\nAll rules are given in two *equivalent* forms:\n\n1. In *prose*, describing the meaning in intuitive form.\n2. In *formal notation*, describing the rule in mathematical form. [#cite-pldi2017]_\n\n.. note::\n   The prose and formal rules are equivalent,\n   so that understanding of the formal notation is *not* required to read this specification.\n   The formalism offers a more concise description in notation that is used widely in programming languages semantics and is readily amenable to mathematical proof.\n\nIn both cases, the rules are formulated in a *declarative* manner.\nThat is, they only formulate the constraints, they do not define an algorithm.\nThe skeleton of a sound and complete algorithm for type-checking instruction sequences according to this specification is provided in the :ref:`appendix <algo-valid>`.\n\n\n.. index:: ! context, function type, table type, memory type, global type, value type, result type, index space, module, function\n.. _context:\n\nContexts\n~~~~~~~~\n\nValidity of an individual definition is specified relative to a *context*,\nwhich collects relevant information about the surrounding :ref:`module <syntax-module>` and the definitions in scope:\n\n* *Types*: the list of types defined in the current module.\n* *Functions*: the list of functions declared in the current module, represented by their function type.\n* *Tables*: the list of tables declared in the current module, represented by their table type.\n* *Memories*: the list of memories declared in the current module, represented by their memory type.\n* *Globals*: the list of globals declared in the current module, represented by their global type.\n* *Element Segments*: the list of element segments declared in the current module, represented by their element type.\n* *Data Segments*: the list of data segments declared in the current module, each represented by an |ok| entry.\n* *Locals*: the list of locals declared in the current function (including parameters), represented by their value type.\n* *Labels*: the stack of labels accessible from the current position, represented by their result type.\n* *Return*: the return type of the current function, represented as an optional result type that is absent when no return is allowed, as in free-standing expressions.\n* *References*: the list of :ref:`function indices <syntax-funcidx>` that occur in the module outside functions and can hence be used to form references inside them.\n\nIn other words, a context contains a sequence of suitable :ref:`types <syntax-type>` for each :ref:`index space <syntax-index>`,\ndescribing each defined entry in that space.\nLocals, labels and return type are only used for validating :ref:`instructions <syntax-instr>` in :ref:`function bodies <syntax-func>`, and are left empty elsewhere.\nThe label stack is the only part of the context that changes as validation of an instruction sequence proceeds.\n\nMore concretely, contexts are defined as :ref:`records <notation-record>` :math:`C` with abstract syntax:\n\n.. math::\n   \\begin{array}{llll}\n   \\production{(context)} & C &::=&\n     \\begin{array}[t]{l@{~}ll}\n     \\{ & \\CTYPES & \\functype^\\ast, \\\\\n        & \\CFUNCS & \\functype^\\ast, \\\\\n        & \\CTABLES & \\tabletype^\\ast, \\\\\n        & \\CMEMS & \\memtype^\\ast, \\\\\n        & \\CGLOBALS & \\globaltype^\\ast, \\\\\n        & \\CELEMS & \\reftype^\\ast, \\\\\n        & \\CDATAS & {\\ok}^\\ast, \\\\\n        & \\CLOCALS & \\valtype^\\ast, \\\\\n        & \\CLABELS & \\resulttype^\\ast, \\\\\n        & \\CRETURN & \\resulttype^?, \\\\\n        & \\CREFS & \\funcidx^\\ast ~\\} \\\\\n     \\end{array}\n   \\end{array}\n\n.. _notation-extend:\n\nIn addition to field access written :math:`C.\\K{field}` the following notation is adopted for manipulating contexts:\n\n* When spelling out a context, empty fields are omitted.\n\n* :math:`C,\\K{field}\\,A^\\ast` denotes the same context as :math:`C` but with the elements :math:`A^\\ast` prepended to its :math:`\\K{field}` component sequence.\n\n.. note::\n   We use :ref:`indexing notation <notation-index>` like :math:`C.\\CLABELS[i]` to look up indices in their respective :ref:`index space <syntax-index>` in the context.\n   Context extension notation :math:`C,\\K{field}\\,A` is primarily used to locally extend *relative* index spaces, such as :ref:`label indices <syntax-labelidx>`.\n   Accordingly, the notation is defined to append at the *front* of the respective sequence, introducing a new relative index :math:`0` and shifting the existing ones.\n\n\n.. _valid-notation-textual:\n\nProse Notation\n~~~~~~~~~~~~~~\n\nValidation is specified by stylised rules for each relevant part of the :ref:`abstract syntax <syntax>`.\nThe rules not only state constraints defining when a phrase is valid,\nthey also classify it with a type.\nThe following conventions are adopted in stating these rules.\n\n* A phrase :math:`A` is said to be \"valid with type :math:`T`\"\n  if and only if all constraints expressed by the respective rules are met.\n  The form of :math:`T` depends on what :math:`A` is.\n\n  .. note::\n     For example, if :math:`A` is a :ref:`function <syntax-func>`,\n     then  :math:`T` is a :ref:`function type <syntax-functype>`;\n     for an :math:`A` that is a :ref:`global <syntax-global>`,\n     :math:`T` is a :ref:`global type <syntax-globaltype>`;\n     and so on.\n\n* The rules implicitly assume a given :ref:`context <context>` :math:`C`.\n\n* In some places, this context is locally extended to a context :math:`C'` with additional entries.\n  The formulation \"Under context :math:`C'`, ... *statement* ...\" is adopted to express that the following statement must apply under the assumptions embodied in the extended context.\n\n\n.. index:: ! typing rules\n.. _valid-notation:\n\nFormal Notation\n~~~~~~~~~~~~~~~\n\n.. note::\n   This section gives a brief explanation of the notation for specifying typing rules formally.\n   For the interested reader, a more thorough introduction can be found in respective text books. [#cite-tapl]_\n\nThe proposition that a phrase :math:`A` has a respective type :math:`T` is written :math:`A : T`.\nIn general, however, typing is dependent on a context :math:`C`.\nTo express this explicitly, the complete form is a *judgement* :math:`C \\vdash A : T`,\nwhich says that :math:`A : T` holds under the assumptions encoded in :math:`C`.\n\nThe formal typing rules use a standard approach for specifying type systems, rendering them into *deduction rules*.\nEvery rule has the following general form:\n\n.. math::\n   \\frac{\n     \\X{premise}_1 \\qquad \\X{premise}_2 \\qquad \\dots \\qquad \\X{premise}_n\n   }{\n     \\X{conclusion}\n   }\n\nSuch a rule is read as a big implication: if all premises hold, then the conclusion holds.\nSome rules have no premises; they are *axioms* whose conclusion holds unconditionally.\nThe conclusion always is a judgment :math:`C \\vdash A : T`,\nand there is one respective rule for each relevant construct :math:`A` of the abstract syntax.\n\n.. note::\n   For example, the typing rule for the :math:`\\I32.\\ADD` instruction can be given as an axiom:\n\n   .. math::\n      \\frac{\n      }{\n        C \\vdash \\I32.\\ADD : [\\I32~\\I32] \\to [\\I32]\n      }\n\n   The instruction is always valid with type :math:`[\\I32~\\I32] \\to [\\I32`]\n   (saying that it consumes two |I32| values and produces one),\n   independent of any side conditions.\n\n   An instruction like |LOCALGET| can be typed as follows:\n\n   .. math::\n      \\frac{\n        C.\\CLOCALS[x] = t\n      }{\n        C \\vdash \\LOCALGET~x : [] \\to [t]\n      }\n\n   Here, the premise enforces that the immediate :ref:`local index <syntax-localidx>` :math:`x` exists in the context.\n   The instruction produces a value of its respective type :math:`t`\n   (and does not consume any values).\n   If :math:`C.\\CLOCALS[x]` does not exist then the premise does not hold,\n   and the instruction is ill-typed.\n\n   Finally, a :ref:`structured <syntax-instr-control>` instruction requires\n   a recursive rule, where the premise is itself a typing judgement:\n\n   .. math::\n      \\frac{\n        C \\vdash \\blocktype : [t_1^\\ast] \\to [t_2^\\ast]\n        \\qquad\n        C,\\LABEL\\,[t_2^\\ast] \\vdash \\instr^\\ast : [t_1^\\ast] \\to [t_2^\\ast]\n      }{\n        C \\vdash \\BLOCK~\\blocktype~\\instr^\\ast~\\END : [t_1^\\ast] \\to [t_2^\\ast]\n      }\n\n   A |BLOCK| instruction is only valid when the instruction sequence in its body is.\n   Moreover, the result type must match the block's annotation :math:`\\blocktype`.\n   If so, then the |BLOCK| instruction has the same type as the body.\n   Inside the body an additional label of the corresponding result type is available,\n   which is expressed by extending the context :math:`C` with the additional label information for the premise.\n\n\n.. [#cite-pldi2017]\n   The semantics is derived from the following article:\n   Andreas Haas, Andreas Rossberg, Derek Schuff, Ben Titzer, Dan Gohman, Luke Wagner, Alon Zakai, JF Bastien, Michael Holman. |PLDI2017|_. Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2017). ACM 2017.\n\n.. [#cite-tapl]\n   For example: Benjamin Pierce. |TAPL|_. The MIT Press 2002\n"
  },
  {
    "path": "document/core/valid/index.rst",
    "content": ".. _valid:\n\nValidation\n==========\n\n.. toctree::\n   :maxdepth: 2\n\n   conventions\n   types\n   instructions\n   modules\n"
  },
  {
    "path": "document/core/valid/instructions.rst",
    "content": ".. index:: instruction, function type, context, value, operand stack, ! polymorphism, ! bottom type\n.. _valid-instr:\n.. _syntax-stacktype:\n.. _syntax-opdtype:\n\nInstructions\n------------\n\n:ref:`Instructions <syntax-instr>` are classified by *stack types* :math:`[t_1^\\ast] \\to [t_2^\\ast]` that describe how instructions manipulate the :ref:`operand stack <stack>`.\n\n.. math::\n   \\begin{array}{llll}\n   \\production{stack type} & \\stacktype &::=&\n     [\\opdtype^\\ast] \\to [\\opdtype^\\ast] \\\\\n   \\production{operand type} & \\opdtype &::=&\n     \\valtype ~|~ \\bot \\\\\n   \\end{array}\n\nThe types describe the required input stack with *operand types* :math:`t_1^\\ast` that an instruction pops off\nand the provided output stack with result values of types :math:`t_2^\\ast` that it pushes back.\nStack types are akin to :ref:`function types <syntax-functype>`,\nexcept that they allow individual operands to be classified as :math:`\\bot` (*bottom*), indicating that the type is unconstrained.\nAs an auxiliary notion, an operand type :math:`t_1` *matches* another operand type :math:`t_2`, if :math:`t_1` is either :math:`\\bot` or equal to :math:`t_2`.\n\n.. _match-opdtype:\n\n.. math::\n   \\frac{\n   }{\n     \\vdash t \\leq t\n   }\n   \\qquad\n   \\frac{\n   }{\n     \\vdash \\bot \\leq t\n   }\n\n.. note::\n   For example, the instruction :math:`\\I32.\\ADD` has type :math:`[\\I32~\\I32] \\to [\\I32]`,\n   consuming two |I32| values and producing one.\n\nTyping extends to :ref:`instruction sequences <valid-instr-seq>` :math:`\\instr^\\ast`.\nSuch a sequence has a :ref:`function type <syntax-functype>` :math:`[t_1^\\ast] \\to [t_2^\\ast]` if the accumulative effect of executing the instructions is consuming values of types :math:`t_1^\\ast` off the operand stack and pushing new values of types :math:`t_2^\\ast`.\n\n.. _polymorphism:\n\nFor some instructions, the typing rules do not fully constrain the type,\nand therefore allow for multiple types.\nSuch instructions are called *polymorphic*.\nTwo degrees of polymorphism can be distinguished:\n\n* *value-polymorphic*:\n  the :ref:`value type <syntax-valtype>` :math:`t` of one or several individual operands is unconstrained.\n  That is the case for all :ref:`parametric instructions <valid-instr-parametric>` like |DROP| and |SELECT|.\n\n\n* *stack-polymorphic*:\n  the entire (or most of the) :ref:`function type <syntax-functype>` :math:`[t_1^\\ast] \\to [t_2^\\ast]` of the instruction is unconstrained.\n  That is the case for all :ref:`control instructions <valid-instr-control>` that perform an *unconditional control transfer*, such as |UNREACHABLE|, |BR|, |BRTABLE|, and |RETURN|.\n\nIn both cases, the unconstrained types or type sequences can be chosen arbitrarily, as long as they meet the constraints imposed for the surrounding parts of the program.\n\n.. note::\n   For example, the |SELECT| instruction is valid with type :math:`[t~t~\\I32] \\to [t]`, for any possible :ref:`number type <syntax-numtype>` :math:`t`.   Consequently, both instruction sequences\n\n   .. math::\n      (\\I32.\\CONST~1)~~(\\I32.\\CONST~2)~~(\\I32.\\CONST~3)~~\\SELECT{}\n\n   and\n\n   .. math::\n      (\\F64.\\CONST~1.0)~~(\\F64.\\CONST~2.0)~~(\\I32.\\CONST~3)~~\\SELECT{}\n\n   are valid, with :math:`t` in the typing of |SELECT| being instantiated to |I32| or |F64|, respectively.\n\n   The |UNREACHABLE| instruction is valid with type :math:`[t_1^\\ast] \\to [t_2^\\ast]` for any possible sequences of value types :math:`t_1^\\ast` and :math:`t_2^\\ast`.\n   Consequently,\n\n   .. math::\n      \\UNREACHABLE~~\\I32.\\ADD\n\n   is valid by assuming type :math:`[] \\to [\\I32~\\I32]` for the |UNREACHABLE| instruction.\n   In contrast,\n\n   .. math::\n      \\UNREACHABLE~~(\\I64.\\CONST~0)~~\\I32.\\ADD\n\n   is invalid, because there is no possible type to pick for the |UNREACHABLE| instruction that would make the sequence well-typed.\n\nThe :ref:`Appendix <algo-valid>` describes a type checking :ref:`algorithm <algo-valid>` that efficiently implements validation of instruction sequences as prescribed by the rules given here.\n\n\n.. index:: numeric instruction\n   pair: validation; instruction\n   single: abstract syntax; instruction\n.. _valid-instr-numeric:\n\nNumeric Instructions\n~~~~~~~~~~~~~~~~~~~~\n\n.. _valid-const:\n\n:math:`t\\K{.}\\CONST~c`\n......................\n\n* The instruction is valid with type :math:`[] \\to [t]`.\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashinstr t\\K{.}\\CONST~c : [] \\to [t]\n   }\n\n\n.. _valid-unop:\n\n:math:`t\\K{.}\\unop`\n...................\n\n* The instruction is valid with type :math:`[t] \\to [t]`.\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashinstr t\\K{.}\\unop : [t] \\to [t]\n   }\n\n\n.. _valid-binop:\n\n:math:`t\\K{.}\\binop`\n....................\n\n* The instruction is valid with type :math:`[t~t] \\to [t]`.\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashinstr t\\K{.}\\binop : [t~t] \\to [t]\n   }\n\n\n.. _valid-testop:\n\n:math:`t\\K{.}\\testop`\n.....................\n\n* The instruction is valid with type :math:`[t] \\to [\\I32]`.\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashinstr t\\K{.}\\testop : [t] \\to [\\I32]\n   }\n\n\n.. _valid-relop:\n\n:math:`t\\K{.}\\relop`\n....................\n\n* The instruction is valid with type :math:`[t~t] \\to [\\I32]`.\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashinstr t\\K{.}\\relop : [t~t] \\to [\\I32]\n   }\n\n\n.. _valid-cvtop:\n\n:math:`t_2\\K{.}\\cvtop\\K{\\_}t_1\\K{\\_}\\sx^?`\n..........................................\n\n* The instruction is valid with type :math:`[t_1] \\to [t_2]`.\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashinstr t_2\\K{.}\\cvtop\\K{\\_}t_1\\K{\\_}\\sx^? : [t_1] \\to [t_2]\n   }\n\n\n.. index:: reference instructions, reference type\n   pair: validation; instruction\n   single: abstract syntax; instruction\n.. _valid-instr-ref:\n\nReference Instructions\n~~~~~~~~~~~~~~~~~~~~~~\n\n.. _valid-ref.null:\n\n:math:`\\REFNULL~t`\n..................\n\n* The instruction is valid with type :math:`[] \\to [t]`.\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashinstr \\REFNULL~t : [] \\to [t]\n   }\n\n.. note::\n   In future versions of WebAssembly, there may be reference types for which no null reference is allowed.\n\n.. _valid-ref.is_null:\n\n:math:`\\REFISNULL`\n..................\n\n* The instruction is valid with type :math:`[t] \\to [\\I32]`, for any :ref:`reference type <syntax-reftype>` :math:`t`.\n\n.. math::\n   \\frac{\n     t = \\reftype\n   }{\n     C \\vdashinstr \\REFISNULL : [t] \\to [\\I32]\n   }\n\n.. _valid-ref.func:\n\n:math:`\\REFFUNC~x`\n..................\n\n* The function :math:`C.\\CFUNCS[x]` must be defined in the context.\n\n* The :ref:`function index <syntax-funcidx>` :math:`x` must be contained in :math:`C.\\CREFS`.\n\n* The instruction is valid with type :math:`[] \\to [\\FUNCREF]`.\n\n.. math::\n   \\frac{\n     C.\\CFUNCS[x] = \\functype\n     \\qquad\n     x \\in C.\\CREFS\n   }{\n     C \\vdashinstr \\REFFUNC~x : [] \\to [\\FUNCREF]\n   }\n\n\n.. index:: parametric instructions, value type, polymorphism\n   pair: validation; instruction\n   single: abstract syntax; instruction\n.. _valid-instr-parametric:\n\nParametric Instructions\n~~~~~~~~~~~~~~~~~~~~~~~\n\n.. _valid-drop:\n\n:math:`\\DROP`\n.............\n\n* The instruction is valid with type :math:`[t] \\to []`, for any :ref:`value type <syntax-valtype>` :math:`t`.\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashinstr \\DROP : [t] \\to []\n   }\n\n.. note::\n   Both |DROP| and |SELECT| without annotation are :ref:`value-polymorphic <polymorphism>` instructions.\n\n\n\n.. _valid-select:\n\n:math:`\\SELECT~(t^\\ast)^?`\n..........................\n\n* If :math:`t^\\ast` is present, then:\n\n  * The length of :math:`t^\\ast` must be :math:`1`.\n\n  * Then the instruction is valid with type :math:`[t^\\ast~t^\\ast~\\I32] \\to [t^\\ast]`.\n\n* Else:\n\n  * The instruction is valid with type :math:`[t~t~\\I32] \\to [t]`, for any :ref:`operand type <syntax-opdtype>` :math:`t` that :ref:`matches <match-opdtype>` some :ref:`number type <syntax-numtype>`.\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashinstr \\SELECT~t : [t~t~\\I32] \\to [t]\n   }\n   \\qquad\n   \\frac{\n     \\vdash t \\leq \\numtype\n   }{\n     C \\vdashinstr \\SELECT : [t~t~\\I32] \\to [t]\n   }\n\n.. note::\n   In future versions of WebAssembly, |SELECT| may allow more than one value per choice.\n\n\n.. index:: variable instructions, local index, global index, context\n   pair: validation; instruction\n   single: abstract syntax; instruction\n.. _valid-instr-variable:\n\nVariable Instructions\n~~~~~~~~~~~~~~~~~~~~~\n\n.. _valid-local.get:\n\n:math:`\\LOCALGET~x`\n...................\n\n* The local :math:`C.\\CLOCALS[x]` must be defined in the context.\n\n* Let :math:`t` be the :ref:`value type <syntax-valtype>` :math:`C.\\CLOCALS[x]`.\n\n* Then the instruction is valid with type :math:`[] \\to [t]`.\n\n.. math::\n   \\frac{\n     C.\\CLOCALS[x] = t\n   }{\n     C \\vdashinstr \\LOCALGET~x : [] \\to [t]\n   }\n\n\n.. _valid-local.set:\n\n:math:`\\LOCALSET~x`\n...................\n\n* The local :math:`C.\\CLOCALS[x]` must be defined in the context.\n\n* Let :math:`t` be the :ref:`value type <syntax-valtype>` :math:`C.\\CLOCALS[x]`.\n\n* Then the instruction is valid with type :math:`[t] \\to []`.\n\n.. math::\n   \\frac{\n     C.\\CLOCALS[x] = t\n   }{\n     C \\vdashinstr \\LOCALSET~x : [t] \\to []\n   }\n\n\n.. _valid-local.tee:\n\n:math:`\\LOCALTEE~x`\n...................\n\n* The local :math:`C.\\CLOCALS[x]` must be defined in the context.\n\n* Let :math:`t` be the :ref:`value type <syntax-valtype>` :math:`C.\\CLOCALS[x]`.\n\n* Then the instruction is valid with type :math:`[t] \\to [t]`.\n\n.. math::\n   \\frac{\n     C.\\CLOCALS[x] = t\n   }{\n     C \\vdashinstr \\LOCALTEE~x : [t] \\to [t]\n   }\n\n\n.. _valid-global.get:\n\n:math:`\\GLOBALGET~x`\n....................\n\n* The global :math:`C.\\CGLOBALS[x]` must be defined in the context.\n\n* Let :math:`\\mut~t` be the :ref:`global type <syntax-globaltype>` :math:`C.\\CGLOBALS[x]`.\n\n* Then the instruction is valid with type :math:`[] \\to [t]`.\n\n.. math::\n   \\frac{\n     C.\\CGLOBALS[x] = \\mut~t\n   }{\n     C \\vdashinstr \\GLOBALGET~x : [] \\to [t]\n   }\n\n\n.. _valid-global.set:\n\n:math:`\\GLOBALSET~x`\n....................\n\n* The global :math:`C.\\CGLOBALS[x]` must be defined in the context.\n\n* Let :math:`\\mut~t` be the :ref:`global type <syntax-globaltype>` :math:`C.\\CGLOBALS[x]`.\n\n* The mutability :math:`\\mut` must be |MVAR|.\n\n* Then the instruction is valid with type :math:`[t] \\to []`.\n\n.. math::\n   \\frac{\n     C.\\CGLOBALS[x] = \\MVAR~t\n   }{\n     C \\vdashinstr \\GLOBALSET~x : [t] \\to []\n   }\n\n\n.. index:: table instruction, table index, context\n   pair: validation; instruction\n   single: abstract syntax; instruction\n.. _valid-instr-table:\n\nTable Instructions\n~~~~~~~~~~~~~~~~~~\n\n.. _valid-table.get:\n\n:math:`\\TABLEGET~x`\n...................\n\n* The table :math:`C.\\CTABLES[x]` must be defined in the context.\n\n* Let :math:`\\limits~t` be the :ref:`table type <syntax-tabletype>` :math:`C.\\CTABLES[x]`.\n\n* Then the instruction is valid with type :math:`[\\I32] \\to [t]`.\n\n.. math::\n   \\frac{\n     C.\\CTABLES[x] = \\limits~t\n   }{\n     C \\vdashinstr \\TABLEGET~x : [\\I32] \\to [t]\n   }\n\n\n.. _valid-table.set:\n\n:math:`\\TABLESET~x`\n...................\n\n* The table :math:`C.\\CTABLES[x]` must be defined in the context.\n\n* Let :math:`\\limits~t` be the :ref:`table type <syntax-tabletype>` :math:`C.\\CTABLES[x]`.\n\n* Then the instruction is valid with type :math:`[\\I32~t] \\to []`.\n\n.. math::\n   \\frac{\n     C.\\CTABLES[x] = t\n   }{\n     C \\vdashinstr \\TABLESET~x : [\\I32~t] \\to []\n   }\n\n\n.. _valid-table.size:\n\n:math:`\\TABLESIZE~x`\n....................\n\n* The table :math:`C.\\CTABLES[x]` must be defined in the context.\n\n* Then the instruction is valid with type :math:`[] \\to [\\I32]`.\n\n.. math::\n   \\frac{\n     C.\\CTABLES[x] = \\tabletype\n   }{\n     C \\vdashinstr \\TABLESIZE~x : [] \\to [\\I32]\n   }\n\n\n.. _valid-table.grow:\n\n:math:`\\TABLEGROW~x`\n....................\n\n* The table :math:`C.\\CTABLES[x]` must be defined in the context.\n\n* Let :math:`\\limits~t` be the :ref:`table type <syntax-tabletype>` :math:`C.\\CTABLES[x]`.\n\n* Then the instruction is valid with type :math:`[t~\\I32] \\to [\\I32]`.\n\n.. math::\n   \\frac{\n     C.\\CTABLES[x] = \\limits~t\n   }{\n     C \\vdashinstr \\TABLEGROW~x : [t~\\I32] \\to [\\I32]\n   }\n\n\n.. _valid-table.fill:\n\n:math:`\\TABLEFILL~x`\n....................\n\n* The table :math:`C.\\CTABLES[x]` must be defined in the context.\n\n* Let :math:`\\limits~t` be the :ref:`table type <syntax-tabletype>` :math:`C.\\CTABLES[x]`.\n\n* Then the instruction is valid with type :math:`[\\I32~t~\\I32] \\to []`.\n\n.. math::\n   \\frac{\n     C.\\CTABLES[x] = \\limits~t\n   }{\n     C \\vdashinstr \\TABLEFILL~x : [\\I32~t~\\I32] \\to []\n   }\n\n\n.. _valid-table.copy:\n\n:math:`\\TABLECOPY~x~y`\n......................\n\n* The table :math:`C.\\CTABLES[x]` must be defined in the context.\n\n* Let :math:`\\limits_1~t_1` be the :ref:`table type <syntax-tabletype>` :math:`C.\\CTABLES[x]`.\n\n* The table :math:`C.\\CTABLES[y]` must be defined in the context.\n\n* Let :math:`\\limits_2~t_2` be the :ref:`table type <syntax-tabletype>` :math:`C.\\CTABLES[y]`.\n\n* The :ref:`reference type <syntax-reftype>` :math:`t_1` must be the same as :math:`t_2`.\n\n* Then the instruction is valid with type :math:`[\\I32~\\I32~\\I32] \\to []`.\n\n.. math::\n   \\frac{\n     C.\\CTABLES[x] = \\limits_1~t\n     \\qquad\n     C.\\CTABLES[x] = \\limits_2~t\n   }{\n     C \\vdashinstr \\TABLECOPY~x~y : [\\I32~\\I32~\\I32] \\to []\n   }\n\n\n.. _valid-table.init:\n\n:math:`\\TABLEINIT~x~y`\n......................\n\n* The table :math:`C.\\CTABLES[x]` must be defined in the context.\n\n* Let :math:`\\limits~t_1` be the :ref:`table type <syntax-tabletype>` :math:`C.\\CTABLES[x]`.\n\n* The element segment :math:`C.\\CELEMS[y]` must be defined in the context.\n\n* Let :math:`t_2` be the :ref:`reference type <syntax-reftype>` :math:`C.\\CELEMS[y]`.\n\n* The :ref:`reference type <syntax-reftype>` :math:`t_1` must be the same as :math:`t_2`.\n\n* Then the instruction is valid with type :math:`[\\I32~\\I32~\\I32] \\to []`.\n\n.. math::\n   \\frac{\n     C.\\CTABLES[x] = \\limits_1~t\n     \\qquad\n     C.\\CELEMS[y] = t\n   }{\n     C \\vdashinstr \\TABLEINIT~x~y : [\\I32~\\I32~\\I32] \\to []\n   }\n\n\n.. _valid-elem.drop:\n\n:math:`\\ELEMDROP~x`\n...................\n\n* The element segment :math:`C.\\CELEMS[x]` must be defined in the context.\n\n* Then the instruction is valid with type :math:`[] \\to []`.\n\n.. math::\n   \\frac{\n     C.\\CELEMS[x] = t\n   }{\n     C \\vdashinstr \\ELEMDROP~x : [] \\to []\n   }\n\n\n.. index:: memory instruction, memory index, context\n   pair: validation; instruction\n   single: abstract syntax; instruction\n.. _valid-memarg:\n.. _valid-instr-memory:\n\nMemory Instructions\n~~~~~~~~~~~~~~~~~~~\n\n.. _valid-load:\n\n:math:`t\\K{.}\\LOAD~\\memarg`\n...........................\n\n* The memory :math:`C.\\CMEMS[0]` must be defined in the context.\n\n* The alignment :math:`2^{\\memarg.\\ALIGN}` must not be larger than the :ref:`bit width <syntax-valtype>` of :math:`t` divided by :math:`8`.\n\n* Then the instruction is valid with type :math:`[\\I32] \\to [t]`.\n\n.. math::\n   \\frac{\n     C.\\CMEMS[0] = \\memtype\n     \\qquad\n     2^{\\memarg.\\ALIGN} \\leq |t|/8\n   }{\n     C \\vdashinstr t\\K{.load}~\\memarg : [\\I32] \\to [t]\n   }\n\n\n.. _valid-loadn:\n\n:math:`t\\K{.}\\LOAD{N}\\K{\\_}\\sx~\\memarg`\n.......................................\n\n* The memory :math:`C.\\CMEMS[0]` must be defined in the context.\n\n* The alignment :math:`2^{\\memarg.\\ALIGN}` must not be larger than :math:`N/8`.\n\n* Then the instruction is valid with type :math:`[\\I32] \\to [t]`.\n\n.. math::\n   \\frac{\n     C.\\CMEMS[0] = \\memtype\n     \\qquad\n     2^{\\memarg.\\ALIGN} \\leq N/8\n   }{\n     C \\vdashinstr t\\K{.load}N\\K{\\_}\\sx~\\memarg : [\\I32] \\to [t]\n   }\n\n\n:math:`t\\K{.}\\STORE~\\memarg`\n............................\n\n* The memory :math:`C.\\CMEMS[0]` must be defined in the context.\n\n* The alignment :math:`2^{\\memarg.\\ALIGN}` must not be larger than the :ref:`bit width <syntax-valtype>` of :math:`t` divided by :math:`8`.\n\n* Then the instruction is valid with type :math:`[\\I32~t] \\to []`.\n\n.. math::\n   \\frac{\n     C.\\CMEMS[0] = \\memtype\n     \\qquad\n     2^{\\memarg.\\ALIGN} \\leq |t|/8\n   }{\n     C \\vdashinstr t\\K{.store}~\\memarg : [\\I32~t] \\to []\n   }\n\n\n.. _valid-storen:\n\n:math:`t\\K{.}\\STORE{N}~\\memarg`\n...............................\n\n* The memory :math:`C.\\CMEMS[0]` must be defined in the context.\n\n* The alignment :math:`2^{\\memarg.\\ALIGN}` must not be larger than :math:`N/8`.\n\n* Then the instruction is valid with type :math:`[\\I32~t] \\to []`.\n\n.. math::\n   \\frac{\n     C.\\CMEMS[0] = \\memtype\n     \\qquad\n     2^{\\memarg.\\ALIGN} \\leq N/8\n   }{\n     C \\vdashinstr t\\K{.store}N~\\memarg : [\\I32~t] \\to []\n   }\n\n\n.. _valid-memory.size:\n\n:math:`\\MEMORYSIZE`\n...................\n\n* The memory :math:`C.\\CMEMS[0]` must be defined in the context.\n\n* Then the instruction is valid with type :math:`[] \\to [\\I32]`.\n\n.. math::\n   \\frac{\n     C.\\CMEMS[0] = \\memtype\n   }{\n     C \\vdashinstr \\MEMORYSIZE : [] \\to [\\I32]\n   }\n\n\n.. _valid-memory.grow:\n\n:math:`\\MEMORYGROW`\n...................\n\n* The memory :math:`C.\\CMEMS[0]` must be defined in the context.\n\n* Then the instruction is valid with type :math:`[\\I32] \\to [\\I32]`.\n\n.. math::\n   \\frac{\n     C.\\CMEMS[0] = \\memtype\n   }{\n     C \\vdashinstr \\MEMORYGROW : [\\I32] \\to [\\I32]\n   }\n\n\n.. _valid-memory.fill:\n\n:math:`\\MEMORYFILL`\n...................\n\n* The memory :math:`C.\\CMEMS[0]` must be defined in the context.\n\n* Then the instruction is valid with type :math:`[\\I32~\\I32~\\I32] \\to []`.\n\n.. math::\n   \\frac{\n     C.\\CMEMS[0] = \\memtype\n   }{\n     C \\vdashinstr \\MEMORYFILL : [\\I32~\\I32~\\I32] \\to []\n   }\n\n\n.. _valid-memory.copy:\n\n:math:`\\MEMORYCOPY`\n...................\n\n* The memory :math:`C.\\CMEMS[0]` must be defined in the context.\n\n* Then the instruction is valid with type :math:`[\\I32~\\I32~\\I32] \\to []`.\n\n.. math::\n   \\frac{\n     C.\\CMEMS[0] = \\memtype\n   }{\n     C \\vdashinstr \\MEMORYCOPY : [\\I32~\\I32~\\I32] \\to []\n   }\n\n\n.. _valid-memory.init:\n\n:math:`\\MEMORYINIT~x`\n.....................\n\n* The memory :math:`C.\\CMEMS[0]` must be defined in the context.\n\n* The data segment :math:`C.\\CDATAS[x]` must be defined in the context.\n\n* Then the instruction is valid with type :math:`[\\I32~\\I32~\\I32] \\to []`.\n\n.. math::\n   \\frac{\n     C.\\CMEMS[0] = \\memtype\n     \\qquad\n     C.\\CDATAS[x] = {\\ok}\n   }{\n     C \\vdashinstr \\MEMORYINIT~x : [\\I32~\\I32~\\I32] \\to []\n   }\n\n\n.. _valid-data.drop:\n\n:math:`\\DATADROP~x`\n...................\n\n* The data segment :math:`C.\\CDATAS[x]` must be defined in the context.\n\n* Then the instruction is valid with type :math:`[] \\to []`.\n\n.. math::\n   \\frac{\n     C.\\CDATAS[x] = {\\ok}\n   }{\n     C \\vdashinstr \\DATADROP~x : [] \\to []\n   }\n\n\n.. index:: control instructions, structured control, label, block, branch, block type, label index, function index, type index, vector, polymorphism, context\n   pair: validation; instruction\n   single: abstract syntax; instruction\n.. _valid-label:\n.. _valid-instr-control:\n\nControl Instructions\n~~~~~~~~~~~~~~~~~~~~\n\n.. _valid-nop:\n\n:math:`\\NOP`\n............\n\n* The instruction is valid with type :math:`[] \\to []`.\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashinstr \\NOP : [] \\to []\n   }\n\n\n.. _valid-unreachable:\n\n:math:`\\UNREACHABLE`\n....................\n\n* The instruction is valid with type :math:`[t_1^\\ast] \\to [t_2^\\ast]`, for any sequences of :ref:`value types <syntax-valtype>` :math:`t_1^\\ast` and :math:`t_2^\\ast`.\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashinstr \\UNREACHABLE : [t_1^\\ast] \\to [t_2^\\ast]\n   }\n\n.. note::\n   The |UNREACHABLE| instruction is :ref:`stack-polymorphic <polymorphism>`.\n\n\n.. _valid-block:\n\n:math:`\\BLOCK~\\blocktype~\\instr^\\ast~\\END`\n..........................................\n\n* The :ref:`block type <syntax-blocktype>` must be :ref:`valid <valid-blocktype>` as some :ref:`function type <syntax-functype>` :math:`[t_1^\\ast] \\to [t_2^\\ast]`.\n\n* Let :math:`C'` be the same :ref:`context <context>` as :math:`C`, but with the :ref:`result type <syntax-resulttype>` :math:`[t_2^\\ast]` prepended to the |CLABELS| vector.\n\n* Under context :math:`C'`,\n  the instruction sequence :math:`\\instr^\\ast` must be :ref:`valid <valid-instr-seq>` with type :math:`[t_1^\\ast] \\to [t_2^\\ast]`.\n\n* Then the compound instruction is valid with type :math:`[t_1^\\ast] \\to [t_2^\\ast]`.\n\n.. math::\n   \\frac{\n     C \\vdashblocktype \\blocktype : [t_1^\\ast] \\to [t_2^\\ast]\n     \\qquad\n     C,\\CLABELS\\,[t_2^\\ast] \\vdashinstrseq \\instr^\\ast : [t_1^\\ast] \\to [t_2^\\ast]\n   }{\n     C \\vdashinstr \\BLOCK~\\blocktype~\\instr^\\ast~\\END : [t_1^\\ast] \\to [t_2^\\ast]\n   }\n\n.. note::\n   The :ref:`notation <notation-extend>` :math:`C,\\CLABELS\\,[t^\\ast]` inserts the new label type at index :math:`0`, shifting all others.\n\n\n.. _valid-loop:\n\n:math:`\\LOOP~\\blocktype~\\instr^\\ast~\\END`\n.........................................\n\n* The :ref:`block type <syntax-blocktype>` must be :ref:`valid <valid-blocktype>` as some :ref:`function type <syntax-functype>` :math:`[t_1^\\ast] \\to [t_2^\\ast]`.\n\n* Let :math:`C'` be the same :ref:`context <context>` as :math:`C`, but with the :ref:`result type <syntax-resulttype>` :math:`[t_1^\\ast]` prepended to the |CLABELS| vector.\n\n* Under context :math:`C'`,\n  the instruction sequence :math:`\\instr^\\ast` must be :ref:`valid <valid-instr-seq>` with type :math:`[t_1^\\ast] \\to [t_2^\\ast]`.\n\n* Then the compound instruction is valid with type :math:`[t_1^\\ast] \\to [t_2^\\ast]`.\n\n.. math::\n   \\frac{\n     C \\vdashblocktype \\blocktype : [t_1^\\ast] \\to [t_2^\\ast]\n     \\qquad\n     C,\\CLABELS\\,[t_1^\\ast] \\vdashinstrseq \\instr^\\ast : [t_1^\\ast] \\to [t_2^\\ast]\n   }{\n     C \\vdashinstr \\LOOP~\\blocktype~\\instr^\\ast~\\END : [t_1^\\ast] \\to [t_2^\\ast]\n   }\n\n.. note::\n   The :ref:`notation <notation-extend>` :math:`C,\\CLABELS\\,[t^\\ast]` inserts the new label type at index :math:`0`, shifting all others.\n\n\n.. _valid-if:\n\n:math:`\\IF~\\blocktype~\\instr_1^\\ast~\\ELSE~\\instr_2^\\ast~\\END`\n.............................................................\n\n* The :ref:`block type <syntax-blocktype>` must be :ref:`valid <valid-blocktype>` as some :ref:`function type <syntax-functype>` :math:`[t_1^\\ast] \\to [t_2^\\ast]`.\n\n* Let :math:`C'` be the same :ref:`context <context>` as :math:`C`, but with the :ref:`result type <syntax-resulttype>` :math:`[t_2^\\ast]` prepended to the |CLABELS| vector.\n\n* Under context :math:`C'`,\n  the instruction sequence :math:`\\instr_1^\\ast` must be :ref:`valid <valid-instr-seq>` with type :math:`[t_1^\\ast] \\to [t_2^\\ast]`.\n\n* Under context :math:`C'`,\n  the instruction sequence :math:`\\instr_2^\\ast` must be :ref:`valid <valid-instr-seq>` with type :math:`[t_1^\\ast] \\to [t_2^\\ast]`.\n\n* Then the compound instruction is valid with type :math:`[t_1^\\ast~\\I32] \\to [t_2^\\ast]`.\n\n.. math::\n   \\frac{\n     C \\vdashblocktype \\blocktype : [t_1^\\ast] \\to [t_2^\\ast]\n     \\qquad\n     C,\\CLABELS\\,[t_2^\\ast] \\vdashinstrseq \\instr_1^\\ast : [t_1^\\ast] \\to [t_2^\\ast]\n     \\qquad\n     C,\\CLABELS\\,[t_2^\\ast] \\vdashinstrseq \\instr_2^\\ast : [t_1^\\ast] \\to [t_2^\\ast]\n   }{\n     C \\vdashinstr \\IF~\\blocktype~\\instr_1^\\ast~\\ELSE~\\instr_2^\\ast~\\END : [t_1^\\ast~\\I32] \\to [t_2^\\ast]\n   }\n\n.. note::\n   The :ref:`notation <notation-extend>` :math:`C,\\CLABELS\\,[t^\\ast]` inserts the new label type at index :math:`0`, shifting all others.\n\n\n.. _valid-br:\n\n:math:`\\BR~l`\n.............\n\n* The label :math:`C.\\CLABELS[l]` must be defined in the context.\n\n* Let :math:`[t^\\ast]` be the :ref:`result type <syntax-resulttype>` :math:`C.\\CLABELS[l]`.\n\n* Then the instruction is valid with type :math:`[t_1^\\ast~t^\\ast] \\to [t_2^\\ast]`, for any sequences of :ref:`value types <syntax-valtype>` :math:`t_1^\\ast` and :math:`t_2^\\ast`.\n\n.. math::\n   \\frac{\n     C.\\CLABELS[l] = [t^\\ast]\n   }{\n     C \\vdashinstr \\BR~l : [t_1^\\ast~t^\\ast] \\to [t_2^\\ast]\n   }\n\n.. note::\n   The :ref:`label index <syntax-labelidx>` space in the :ref:`context <context>` :math:`C` contains the most recent label first, so that :math:`C.\\CLABELS[l]` performs a relative lookup as expected.\n\n   The |BR| instruction is :ref:`stack-polymorphic <polymorphism>`.\n\n\n.. _valid-br_if:\n\n:math:`\\BRIF~l`\n...............\n\n* The label :math:`C.\\CLABELS[l]` must be defined in the context.\n\n* Let :math:`[t^\\ast]` be the :ref:`result type <syntax-resulttype>` :math:`C.\\CLABELS[l]`.\n\n* Then the instruction is valid with type :math:`[t^\\ast~\\I32] \\to [t^\\ast]`.\n\n.. math::\n   \\frac{\n     C.\\CLABELS[l] = [t^\\ast]\n   }{\n     C \\vdashinstr \\BRIF~l : [t^\\ast~\\I32] \\to [t^\\ast]\n   }\n\n.. note::\n   The :ref:`label index <syntax-labelidx>` space in the :ref:`context <context>` :math:`C` contains the most recent label first, so that :math:`C.\\CLABELS[l]` performs a relative lookup as expected.\n\n\n.. _valid-br_table:\n\n:math:`\\BRTABLE~l^\\ast~l_N`\n...........................\n\n* The label :math:`C.\\CLABELS[l_N]` must be defined in the context.\n\n* Let :math:`[t^\\ast]` be the :ref:`result type <syntax-resulttype>` :math:`C.\\CLABELS[l_N]`.\n\n* For all :math:`l_i` in :math:`l^\\ast`,\n  the label :math:`C.\\CLABELS[l_i]` must be defined in the context.\n\n* For all :math:`l_i` in :math:`l^\\ast`,\n  :math:`C.\\CLABELS[l_i]` must be :math:`[t^\\ast]`.\n\n* Then the instruction is valid with type :math:`[t_1^\\ast~t^\\ast~\\I32] \\to [t_2^\\ast]`, for any sequences of :ref:`value types <syntax-valtype>` :math:`t_1^\\ast` and :math:`t_2^\\ast`.\n\n.. math::\n   \\frac{\n     (C.\\CLABELS[l] = [t^\\ast])^\\ast\n     \\qquad\n     C.\\CLABELS[l_N] = [t^\\ast]\n   }{\n     C \\vdashinstr \\BRTABLE~l^\\ast~l_N : [t_1^\\ast~t^\\ast~\\I32] \\to [t_2^\\ast]\n   }\n\n.. note::\n   The :ref:`label index <syntax-labelidx>` space in the :ref:`context <context>` :math:`C` contains the most recent label first, so that :math:`C.\\CLABELS[l_i]` performs a relative lookup as expected.\n\n   The |BRTABLE| instruction is :ref:`stack-polymorphic <polymorphism>`.\n\n\n.. _valid-return:\n\n:math:`\\RETURN`\n...............\n\n* The return type :math:`C.\\CRETURN` must not be absent in the context.\n\n* Let :math:`[t^\\ast]` be the :ref:`result type <syntax-resulttype>` of :math:`C.\\CRETURN`.\n\n* Then the instruction is valid with type :math:`[t_1^\\ast~t^\\ast] \\to [t_2^\\ast]`, for any sequences of :ref:`value types <syntax-valtype>` :math:`t_1^\\ast` and :math:`t_2^\\ast`.\n\n.. math::\n   \\frac{\n     C.\\CRETURN = [t^\\ast]\n   }{\n     C \\vdashinstr \\RETURN : [t_1^\\ast~t^\\ast] \\to [t_2^\\ast]\n   }\n\n.. note::\n   The |RETURN| instruction is :ref:`stack-polymorphic <polymorphism>`.\n\n   :math:`C.\\CRETURN` is absent (set to :math:`\\epsilon`) when validating an :ref:`expression <valid-expr>` that is not a function body.\n   This differs from it being set to the empty result type (:math:`[\\epsilon]`),\n   which is the case for functions not returning anything.\n\n\n.. _valid-call:\n\n:math:`\\CALL~x`\n...............\n\n* The function :math:`C.\\CFUNCS[x]` must be defined in the context.\n\n* Then the instruction is valid with type :math:`C.\\CFUNCS[x]`.\n\n.. math::\n   \\frac{\n     C.\\CFUNCS[x] = [t_1^\\ast] \\to [t_2^\\ast]\n   }{\n     C \\vdashinstr \\CALL~x : [t_1^\\ast] \\to [t_2^\\ast]\n   }\n\n\n.. _valid-call_indirect:\n\n:math:`\\CALLINDIRECT~x~y`\n.........................\n\n* The table :math:`C.\\CTABLES[x]` must be defined in the context.\n\n* Let :math:`\\limits~t` be the :ref:`table type <syntax-tabletype>` :math:`C.\\CTABLES[x]`.\n\n* The :ref:`reference type <syntax-reftype>` :math:`t` must be |FUNCREF|.\n\n* The type :math:`C.\\CTYPES[y]` must be defined in the context.\n\n* Let :math:`[t_1^\\ast] \\to [t_2^\\ast]` be the :ref:`function type <syntax-functype>` :math:`C.\\CTYPES[y]`.\n\n* Then the instruction is valid with type :math:`[t_1^\\ast~\\I32] \\to [t_2^\\ast]`.\n\n.. math::\n   \\frac{\n     C.\\CTABLES[x] = \\limits~\\FUNCREF\n     \\qquad\n     C.\\CTYPES[y] = [t_1^\\ast] \\to [t_2^\\ast]\n   }{\n     C \\vdashinstr \\CALLINDIRECT~x~y : [t_1^\\ast~\\I32] \\to [t_2^\\ast]\n   }\n\n\n.. index:: instruction, instruction sequence\n.. _valid-instr-seq:\n\nInstruction Sequences\n~~~~~~~~~~~~~~~~~~~~~\n\nTyping of instruction sequences is defined recursively.\n\n\nEmpty Instruction Sequence: :math:`\\epsilon`\n............................................\n\n* The empty instruction sequence is valid with type :math:`[t^\\ast] \\to [t^\\ast]`,\n  for any sequence of :ref:`operand types <syntax-opdtype>` :math:`t^\\ast`.\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashinstrseq \\epsilon : [t^\\ast] \\to [t^\\ast]\n   }\n\n\nNon-empty Instruction Sequence: :math:`\\instr^\\ast~\\instr_N`\n............................................................\n\n* The instruction sequence :math:`\\instr^\\ast` must be valid with type :math:`[t_1^\\ast] \\to [t_2^\\ast]`,\n  for some sequences of :ref:`value types <syntax-valtype>` :math:`t_1^\\ast` and :math:`t_2^\\ast`.\n\n* The instruction :math:`\\instr_N` must be valid with type :math:`[t^\\ast] \\to [t_3^\\ast]`,\n  for some sequences of :ref:`value types <syntax-valtype>` :math:`t^\\ast` and :math:`t_3^\\ast`.\n\n* There must be a sequence of :ref:`value types <syntax-valtype>` :math:`t_0^\\ast`,\n  such that :math:`t_2^\\ast = t_0^\\ast~{t'}^\\ast` where the type sequence :math:`{t'}^\\ast` is as long as :math:`t^\\ast`.\n\n* For each :ref:`operand type <syntax-opdtype>` :math:`t'_i` in :math:`{t'}^\\ast` and corresponding type :math:`t_i` in :math:`t^\\ast`, :math:`t'_i` :ref:`matches <match-opdtype>` :math:`t_i`.\n\n* Then the combined instruction sequence is valid with type :math:`[t_1^\\ast] \\to [t_0^\\ast~t_3^\\ast]`.\n\n.. math::\n   \\frac{\n     C \\vdashinstrseq \\instr^\\ast : [t_1^\\ast] \\to [t_0^\\ast~{t'}^\\ast]\n     \\qquad\n     (\\vdash t' \\leq t)^\\ast\n     \\qquad\n     C \\vdashinstr \\instr_N : [t^\\ast] \\to [t_3^\\ast]\n   }{\n     C \\vdashinstrseq \\instr^\\ast~\\instr_N : [t_1^\\ast] \\to [t_0^\\ast~t_3^\\ast]\n   }\n\n\n.. index:: expression, result type\n   pair: validation; expression\n   single: abstract syntax; expression\n   single: expression; constant\n.. _valid-expr:\n\nExpressions\n~~~~~~~~~~~\n\nExpressions :math:`\\expr` are classified by :ref:`result types <syntax-resulttype>` of the form :math:`[t^\\ast]`.\n\n\n:math:`\\instr^\\ast~\\END`\n........................\n\n* The instruction sequence :math:`\\instr^\\ast` must be :ref:`valid <valid-instr-seq>` with some :ref:`stack type <syntax-stacktype>` :math:`[] \\to [t'^\\ast]`.\n\n* For each :ref:`operand type <syntax-opdtype>` :math:`t'_i` in :math:`{t'}^\\ast` and corresponding :ref:`value type <syntax-valtype>` type :math:`t_i` in :math:`t^\\ast`, :math:`t'_i` :ref:`matches <match-opdtype>` :math:`t_i`.\n\n* Then the expression is valid with :ref:`result type <syntax-resulttype>` :math:`[t^\\ast]`.\n\n.. math::\n   \\frac{\n     C \\vdashinstrseq \\instr^\\ast : [] \\to [{t'}^\\ast]\n     \\qquad\n     (\\vdash t' \\leq t)^\\ast\n   }{\n     C \\vdashexpr \\instr^\\ast~\\END : [t^\\ast]\n   }\n\n\n.. index:: ! constant\n.. _valid-constant:\n\nConstant Expressions\n....................\n\n* In a *constant* expression :math:`\\instr^\\ast~\\END` all instructions in :math:`\\instr^\\ast` must be constant.\n\n* A constant instruction :math:`\\instr` must be:\n\n  * either of the form :math:`t.\\CONST~c`,\n\n  * or of the form :math:`\\REFNULL`,\n\n  * or of the form :math:`\\REFFUNC~x`,\n\n  * or of the form :math:`\\GLOBALGET~x`, in which case :math:`C.\\CGLOBALS[x]` must be a :ref:`global type <syntax-globaltype>` of the form :math:`\\CONST~t`.\n\n.. math::\n   \\frac{\n     (C \\vdashinstrconst \\instr \\const)^\\ast\n   }{\n     C \\vdashexprconst \\instr^\\ast~\\END \\const\n   }\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashinstrconst t.\\CONST~c \\const\n   }\n   \\qquad\n   \\frac{\n   }{\n     C \\vdashinstrconst \\REFNULL \\const\n   }\n   \\qquad\n   \\frac{\n   }{\n     C \\vdashinstrconst \\REFFUNC~x \\const\n   }\n\n.. math::\n   \\frac{\n     C.\\CGLOBALS[x] = \\CONST~t\n   }{\n     C \\vdashinstrconst \\GLOBALGET~x \\const\n   }\n\n.. note::\n   Currently, constant expressions occurring as initializers of :ref:`globals <syntax-global>` are further constrained in that contained |GLOBALGET| instructions are only allowed to refer to *imported* globals.\n   This is enforced in the :ref:`validation rule for modules <valid-module>` by constraining the context :math:`C` accordingly.\n\n   The definition of constant expression may be extended in future versions of WebAssembly.\n"
  },
  {
    "path": "document/core/valid/modules.rst",
    "content": "Modules\n-------\n\n:ref:`Modules <syntax-module>` are valid when all the components they contain are valid.\nFurthermore, most definitions are themselves classified with a suitable type.\n\n\n.. index:: function, local, function index, local index, type index, function type, value type, expression, import\n   pair: abstract syntax; function\n   single: abstract syntax; function\n.. _valid-local:\n.. _valid-func:\n\nFunctions\n~~~~~~~~~\n\nFunctions :math:`\\func` are classified by :ref:`function types <syntax-functype>` of the form :math:`[t_1^\\ast] \\to [t_2^\\ast]`.\n\n\n:math:`\\{ \\FTYPE~x, \\FLOCALS~t^\\ast, \\FBODY~\\expr \\}`\n.....................................................\n\n* The type :math:`C.\\CTYPES[x]` must be defined in the context.\n\n* Let :math:`[t_1^\\ast] \\to [t_2^\\ast]` be the :ref:`function type <syntax-functype>` :math:`C.\\CTYPES[x]`.\n\n* Let :math:`C'` be the same :ref:`context <context>` as :math:`C`,\n  but with:\n\n  * |CLOCALS| set to the sequence of :ref:`value types <syntax-valtype>` :math:`t_1^\\ast~t^\\ast`, concatenating parameters and locals,\n\n  * |CLABELS| set to the singular sequence containing only :ref:`result type <syntax-resulttype>` :math:`[t_2^\\ast]`.\n\n  * |CRETURN| set to the :ref:`result type <syntax-resulttype>` :math:`[t_2^\\ast]`.\n\n* Under the context :math:`C'`,\n  the expression :math:`\\expr` must be valid with type :math:`[t_2^\\ast]`.\n\n* Then the function definition is valid with type :math:`[t_1^\\ast] \\to [t_2^\\ast]`.\n\n.. math::\n   \\frac{\n     C.\\CTYPES[x] = [t_1^\\ast] \\to [t_2^\\ast]\n     \\qquad\n     C,\\CLOCALS\\,t_1^\\ast~t^\\ast,\\CLABELS~[t_2^\\ast],\\CRETURN~[t_2^\\ast] \\vdashexpr \\expr : [t_2^\\ast]\n   }{\n     C \\vdashfunc \\{ \\FTYPE~x, \\FLOCALS~t^\\ast, \\FBODY~\\expr \\} : [t_1^\\ast] \\to [t_2^\\ast]\n   }\n\n\n.. index:: table, table type\n   pair: validation; table\n   single: abstract syntax; table\n.. _valid-table:\n\nTables\n~~~~~~\n\nTables :math:`\\table` are classified by :ref:`table types <syntax-tabletype>`.\n\n:math:`\\{ \\TTYPE~\\tabletype \\}`\n...............................\n\n* The :ref:`table type <syntax-tabletype>` :math:`\\tabletype` must be :ref:`valid <valid-tabletype>`.\n\n* Then the table definition is valid with type :math:`\\tabletype`.\n\n.. math::\n   \\frac{\n     \\vdashtabletype \\tabletype \\ok\n   }{\n     C \\vdashtable \\{ \\TTYPE~\\tabletype \\} : \\tabletype\n   }\n\n\n.. index:: memory, memory type\n   pair: validation; memory\n   single: abstract syntax; memory\n.. _valid-mem:\n\nMemories\n~~~~~~~~\n\nMemories :math:`\\mem` are classified by :ref:`memory types <syntax-memtype>`.\n\n:math:`\\{ \\MTYPE~\\memtype \\}`\n.............................\n\n* The :ref:`memory type <syntax-memtype>` :math:`\\memtype` must be :ref:`valid <valid-memtype>`.\n\n* Then the memory definition is valid with type :math:`\\memtype`.\n\n.. math::\n   \\frac{\n     \\vdashmemtype \\memtype \\ok\n   }{\n     C \\vdashmem \\{ \\MTYPE~\\memtype \\} : \\memtype\n   }\n\n\n.. index:: global, global type, expression\n   pair: validation; global\n   single: abstract syntax; global\n.. _valid-global:\n\nGlobals\n~~~~~~~\n\nGlobals :math:`\\global` are classified by :ref:`global types <syntax-globaltype>` of the form :math:`\\mut~t`.\n\n\n:math:`\\{ \\GTYPE~\\mut~t, \\GINIT~\\expr \\}`\n.........................................\n\n* The :ref:`global type <syntax-globaltype>` :math:`\\mut~t` must be :ref:`valid <valid-globaltype>`.\n\n* The expression :math:`\\expr` must be :ref:`valid <valid-expr>` with :ref:`result type <syntax-resulttype>` :math:`[t]`.\n\n* The expression :math:`\\expr` must be :ref:`constant <valid-constant>`.\n\n* Then the global definition is valid with type :math:`\\mut~t`.\n\n.. math::\n   \\frac{\n     \\vdashglobaltype \\mut~t \\ok\n     \\qquad\n     C \\vdashexpr \\expr : [t]\n     \\qquad\n     C \\vdashexprconst \\expr \\const\n   }{\n     C \\vdashglobal \\{ \\GTYPE~\\mut~t, \\GINIT~\\expr \\} : \\mut~t\n   }\n\n\n.. index:: element, table, table index, expression, function index\n   pair: validation; element\n   single: abstract syntax; element\n   single: table; element\n   single: element; segment\n.. _valid-elem:\n\nElement Segments\n~~~~~~~~~~~~~~~~\n\nElement segments :math:`\\elem` are classified by the :ref:`reference type <syntax-reftype>` of their elements.\n\n:math:`\\{ \\ETYPE~t, \\EINIT~e^\\ast, \\EMODE~\\elemmode \\}`\n.......................................................\n\n* For each :math:`e_i` in :math:`e^\\ast`,\n\n  * The expression :math:`e_i` must be :ref:`valid <valid-expr>`.\n\n  * The expression :math:`e_i` must be :ref:`constant <valid-const>`.\n\n* The element mode :math:`\\elemmode` must be valid with :ref:`reference type <syntax-reftype>` :math:`t`.\n\n* Then the element segment is valid with :ref:`reference type <syntax-reftype>` :math:`t`.\n\n\n.. math::\n   \\frac{\n     (C \\vdashexpr e \\ok)^\\ast\n     \\qquad\n     (C \\vdashexprconst e \\const)^\\ast\n     \\qquad\n     C \\vdashelemmode \\elemmode : t\n   }{\n     C \\vdashelem \\{ \\ETYPE~t, \\EINIT~e^\\ast, \\EMODE~\\elemmode \\} : t\n   }\n\n\n.. _valid-elemmode:\n\n:math:`\\EPASSIVE`\n.................\n\n* The element mode is valid with any :ref:`reference type <syntax-reftype>`.\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashelemmode \\EPASSIVE : \\reftype\n   }\n\n\n:math:`\\EACTIVE~\\{ \\ETABLE~x, \\EOFFSET~\\expr \\}`\n................................................\n\n* The table :math:`C.\\CTABLES[x]` must be defined in the context.\n\n* Let :math:`\\limits~t` be the :ref:`table type <syntax-tabletype>` :math:`C.\\CTABLES[x]`.\n\n* The expression :math:`\\expr` must be :ref:`valid <valid-expr>` with :ref:`result type <syntax-resulttype>` :math:`[\\I32]`.\n\n* The expression :math:`\\expr` must be :ref:`constant <valid-constant>`.\n\n* Then the element mode is valid with :ref:`reference type <syntax-reftype>` :math:`t`.\n\n.. math::\n   \\frac{\n     \\begin{array}{@{}c@{}}\n     C.\\CTABLES[x] = \\limits~t\n     \\\\\n     C \\vdashexpr \\expr : [\\I32]\n     \\qquad\n     C \\vdashexprconst \\expr \\const\n     \\end{array}\n   }{\n     C \\vdashelemmode \\EACTIVE~\\{ \\ETABLE~x, \\EOFFSET~\\expr \\} : t\n   }\n\n:math:`\\EDECLARATIVE`\n.....................\n\n* The element mode is valid with any :ref:`reference type <syntax-reftype>`.\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashelemmode \\EDECLARATIVE : \\reftype\n   }\n\n\n\n.. index:: data, memory, memory index, expression, byte\n   pair: validation; data\n   single: abstract syntax; data\n   single: memory; data\n   single: data; segment\n.. _valid-data:\n\nData Segments\n~~~~~~~~~~~~~\n\nData segments :math:`\\data` are not classified by any type but merely checked for well-formedness.\n\n:math:`\\{ \\DINIT~b^\\ast, \\DMODE~\\datamode \\}`\n....................................................\n\n* The data mode :math:`\\datamode` must be valid.\n\n* Then the data segment is valid.\n\n.. math::\n   \\frac{\n     C \\vdashdatamode \\datamode \\ok\n   }{\n     C \\vdashdata \\{ \\DINIT~b^\\ast, \\DMODE~\\datamode \\} \\ok\n   }\n\n\n.. _valid-datamode:\n\n:math:`\\DPASSIVE`\n.................\n\n* The data mode is valid.\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashdatamode \\DPASSIVE \\ok\n   }\n\n\n:math:`\\DACTIVE~\\{ \\DMEM~x, \\DOFFSET~\\expr \\}`\n..............................................\n\n* The memory :math:`C.\\CMEMS[x]` must be defined in the context.\n\n* The expression :math:`\\expr` must be :ref:`valid <valid-expr>` with :ref:`result type <syntax-resulttype>` :math:`[\\I32]`.\n\n* The expression :math:`\\expr` must be :ref:`constant <valid-constant>`.\n\n* Then the data mode is valid.\n\n.. math::\n   \\frac{\n     C.\\CMEMS[x] = \\limits\n     \\qquad\n     C \\vdashexpr \\expr : [\\I32]\n     \\qquad\n     C \\vdashexprconst \\expr \\const\n   }{\n     C \\vdashdatamode \\DACTIVE~\\{ \\DMEM~x, \\DOFFSET~\\expr \\} \\ok\n   }\n\n\n.. index:: start function, function index\n   pair: validation; start function\n   single: abstract syntax; start function\n.. _valid-start:\n\nStart Function\n~~~~~~~~~~~~~~\n\nStart function declarations :math:`\\start` are not classified by any type.\n\n:math:`\\{ \\SFUNC~x \\}`\n......................\n\n* The function :math:`C.\\CFUNCS[x]` must be defined in the context.\n\n* The type of :math:`C.\\CFUNCS[x]` must be :math:`[] \\to []`.\n\n* Then the start function is valid.\n\n\n.. math::\n   \\frac{\n     C.\\CFUNCS[x] = [] \\to []\n   }{\n     C \\vdashstart \\{ \\SFUNC~x \\} \\ok\n   }\n\n\n.. index:: export, name, index, function index, table index, memory index, global index\n   pair: validation; export\n   single: abstract syntax; export\n.. _valid-exportdesc:\n.. _valid-export:\n\nExports\n~~~~~~~\n\nExports :math:`\\export` and export descriptions :math:`\\exportdesc` are classified by their :ref:`external type <syntax-externtype>`.\n\n\n:math:`\\{ \\ENAME~\\name, \\EDESC~\\exportdesc \\}`\n..............................................\n\n* The export description :math:`\\exportdesc` must be valid with :ref:`external type <syntax-externtype>` :math:`\\externtype`.\n\n* Then the export is valid with :ref:`external type <syntax-externtype>` :math:`\\externtype`.\n\n.. math::\n   \\frac{\n     C \\vdashexportdesc \\exportdesc : \\externtype\n   }{\n     C \\vdashexport \\{ \\ENAME~\\name, \\EDESC~\\exportdesc \\} : \\externtype\n   }\n\n\n:math:`\\EDFUNC~x`\n.................\n\n* The function :math:`C.\\CFUNCS[x]` must be defined in the context.\n\n* Then the export description is valid with :ref:`external type <syntax-externtype>` :math:`\\ETFUNC~C.\\CFUNCS[x]`.\n\n.. math::\n   \\frac{\n     C.\\CFUNCS[x] = \\functype\n   }{\n     C \\vdashexportdesc \\EDFUNC~x : \\ETFUNC~\\functype\n   }\n\n\n:math:`\\EDTABLE~x`\n..................\n\n* The table :math:`C.\\CTABLES[x]` must be defined in the context.\n\n* Then the export description is valid with :ref:`external type <syntax-externtype>` :math:`\\ETTABLE~C.\\CTABLES[x]`.\n\n.. math::\n   \\frac{\n     C.\\CTABLES[x] = \\tabletype\n   }{\n     C \\vdashexportdesc \\EDTABLE~x : \\ETTABLE~\\tabletype\n   }\n\n\n:math:`\\EDMEM~x`\n................\n\n* The memory :math:`C.\\CMEMS[x]` must be defined in the context.\n\n* Then the export description is valid with :ref:`external type <syntax-externtype>` :math:`\\ETMEM~C.\\CMEMS[x]`.\n\n.. math::\n   \\frac{\n     C.\\CMEMS[x] = \\memtype\n   }{\n     C \\vdashexportdesc \\EDMEM~x : \\ETMEM~\\memtype\n   }\n\n\n:math:`\\EDGLOBAL~x`\n...................\n\n* The global :math:`C.\\CGLOBALS[x]` must be defined in the context.\n\n* Then the export description is valid with :ref:`external type <syntax-externtype>` :math:`\\ETGLOBAL~C.\\CGLOBALS[x]`.\n\n.. math::\n   \\frac{\n     C.\\CGLOBALS[x] = \\globaltype\n   }{\n     C \\vdashexportdesc \\EDGLOBAL~x : \\ETGLOBAL~\\globaltype\n   }\n\n\n.. index:: import, name, function type, table type, memory type, global type\n   pair: validation; import\n   single: abstract syntax; import\n.. _valid-importdesc:\n.. _valid-import:\n\nImports\n~~~~~~~\n\nImports :math:`\\import` and import descriptions :math:`\\importdesc` are classified by :ref:`external types <syntax-externtype>`.\n\n\n:math:`\\{ \\IMODULE~\\name_1, \\INAME~\\name_2, \\IDESC~\\importdesc \\}`\n..................................................................\n\n* The import description :math:`\\importdesc` must be valid with type :math:`\\externtype`.\n\n* Then the import is valid with type :math:`\\externtype`.\n\n.. math::\n   \\frac{\n     C \\vdashimportdesc \\importdesc : \\externtype\n   }{\n     C \\vdashimport \\{ \\IMODULE~\\name_1, \\INAME~\\name_2, \\IDESC~\\importdesc \\} : \\externtype\n   }\n\n\n:math:`\\IDFUNC~x`\n.................\n\n* The function :math:`C.\\CTYPES[x]` must be defined in the context.\n\n* Let :math:`[t_1^\\ast] \\to [t_2^\\ast]` be the :ref:`function type <syntax-functype>` :math:`C.\\CTYPES[x]`.\n\n* Then the import description is valid with type :math:`\\ETFUNC~[t_1^\\ast] \\to [t_2^\\ast]`.\n\n.. math::\n   \\frac{\n     C.\\CTYPES[x] = [t_1^\\ast] \\to [t_2^\\ast]\n   }{\n     C \\vdashimportdesc \\IDFUNC~x : \\ETFUNC~[t_1^\\ast] \\to [t_2^\\ast]\n   }\n\n\n:math:`\\IDTABLE~\\tabletype`\n...........................\n\n* The table type :math:`\\tabletype` must be :ref:`valid <valid-tabletype>`.\n\n* Then the import description is valid with type :math:`\\ETTABLE~\\tabletype`.\n\n.. math::\n   \\frac{\n     \\vdashtable \\tabletype \\ok\n   }{\n     C \\vdashimportdesc \\IDTABLE~\\tabletype : \\ETTABLE~\\tabletype\n   }\n\n\n:math:`\\IDMEM~\\memtype`\n.......................\n\n* The memory type :math:`\\memtype` must be :ref:`valid <valid-memtype>`.\n\n* Then the import description is valid with type :math:`\\ETMEM~\\memtype`.\n\n.. math::\n   \\frac{\n     \\vdashmemtype \\memtype \\ok\n   }{\n     C \\vdashimportdesc \\IDMEM~\\memtype : \\ETMEM~\\memtype\n   }\n\n\n:math:`\\IDGLOBAL~\\globaltype`\n.............................\n\n* The global type :math:`\\globaltype` must be :ref:`valid <valid-globaltype>`.\n\n* Then the import description is valid with type :math:`\\ETGLOBAL~\\globaltype`.\n\n.. math::\n   \\frac{\n     \\vdashglobaltype \\globaltype \\ok\n   }{\n     C \\vdashimportdesc \\IDGLOBAL~\\globaltype : \\ETGLOBAL~\\globaltype\n   }\n\n\n.. index:: module, type definition, function type, function, table, memory, global, element, data, start function, import, export, context\n   pair: validation; module\n   single: abstract syntax; module\n.. _valid-module:\n\nModules\n~~~~~~~\n\nModules are classified by their mapping from the :ref:`external types <syntax-externtype>` of their :ref:`imports <syntax-import>` to those of their :ref:`exports <syntax-export>`.\n\nA module is entirely *closed*,\nthat is, its components can only refer to definitions that appear in the module itself.\nConsequently, no initial :ref:`context <context>` is required.\nInstead, the context :math:`C` for validation of the module's content is constructed from the definitions in the module.\n\n* Let :math:`\\module` be the module to validate.\n\n* Let :math:`C` be a :ref:`context <context>` where:\n\n  * :math:`C.\\CTYPES` is :math:`\\module.\\MTYPES`,\n\n  * :math:`C.\\CFUNCS` is :math:`\\etfuncs(\\X{it}^\\ast)` concatenated with :math:`\\X{ft}^\\ast`,\n    with the import's :ref:`external types <syntax-externtype>` :math:`\\X{it}^\\ast` and the internal :ref:`function types <syntax-functype>` :math:`\\X{ft}^\\ast` as determined below,\n\n  * :math:`C.\\CTABLES` is :math:`\\ettables(\\X{it}^\\ast)` concatenated with :math:`\\X{tt}^\\ast`,\n    with the import's :ref:`external types <syntax-externtype>` :math:`\\X{it}^\\ast` and the internal :ref:`table types <syntax-tabletype>` :math:`\\X{tt}^\\ast` as determined below,\n\n  * :math:`C.\\CMEMS` is :math:`\\etmems(\\X{it}^\\ast)` concatenated with :math:`\\X{mt}^\\ast`,\n    with the import's :ref:`external types <syntax-externtype>` :math:`\\X{it}^\\ast` and the internal :ref:`memory types <syntax-memtype>` :math:`\\X{mt}^\\ast` as determined below,\n\n  * :math:`C.\\CGLOBALS` is :math:`\\etglobals(\\X{it}^\\ast)` concatenated with :math:`\\X{gt}^\\ast`,\n    with the import's :ref:`external types <syntax-externtype>` :math:`\\X{it}^\\ast` and the internal :ref:`global types <syntax-globaltype>` :math:`\\X{gt}^\\ast` as determined below,\n\n  * :math:`C.\\CELEMS` is :math:`{\\X{rt}}^\\ast` as determined below,\n\n  * :math:`C.\\CDATAS` is :math:`{\\ok}^n`, where :math:`n` is the length of the vector :math:`\\module.\\MDATAS`,\n\n  * :math:`C.\\CLOCALS` is empty,\n\n  * :math:`C.\\CLABELS` is empty,\n\n  * :math:`C.\\CRETURN` is empty.\n\n  * :math:`C.\\CREFS` is the set :math:`\\freefuncidx(\\module \\with \\MFUNCS = \\epsilon \\with \\MSTART = \\epsilon)`, i.e., the set of :ref:`function indices <syntax-funcidx>` occurring in the module, except in its :ref:`functions <syntax-func>` or :ref:`start function <syntax-start>`.\n\n* Let :math:`C'` be the :ref:`context <context>` where:\n\n  * :math:`C'.\\CGLOBALS` is the sequence :math:`\\etglobals(\\X{it}^\\ast)`,\n\n  * :math:`C'.\\CFUNCS` is the same as :math:`C.\\CFUNCS`,\n\n  * :math:`C'.\\CREFS` is the same as :math:`C.\\CREFS`,\n\n  * all other fields are empty.\n\n* Under the context :math:`C`:\n\n  * For each :math:`\\functype_i` in :math:`\\module.\\MTYPES`,\n    the :ref:`function type <syntax-functype>` :math:`\\functype_i` must be :ref:`valid <valid-functype>`.\n\n  * For each :math:`\\func_i` in :math:`\\module.\\MFUNCS`,\n    the definition :math:`\\func_i` must be :ref:`valid <valid-func>` with a :ref:`function type <syntax-functype>` :math:`\\X{ft}_i`.\n\n  * For each :math:`\\table_i` in :math:`\\module.\\MTABLES`,\n    the definition :math:`\\table_i` must be :ref:`valid <valid-table>` with a :ref:`table type <syntax-tabletype>` :math:`\\X{tt}_i`.\n\n  * For each :math:`\\mem_i` in :math:`\\module.\\MMEMS`,\n    the definition :math:`\\mem_i` must be :ref:`valid <valid-mem>` with a :ref:`memory type <syntax-memtype>` :math:`\\X{mt}_i`.\n\n  * For each :math:`\\global_i` in :math:`\\module.\\MGLOBALS`:\n\n    * Under the context :math:`C'`,\n      the definition :math:`\\global_i` must be :ref:`valid <valid-global>` with a :ref:`global type <syntax-globaltype>` :math:`\\X{gt}_i`.\n\n  * For each :math:`\\elem_i` in :math:`\\module.\\MELEMS`,\n    the segment :math:`\\elem_i` must be :ref:`valid <valid-elem>` with :ref:`reference type <syntax-reftype>` :math:`\\X{rt}_i`.\n\n  * For each :math:`\\data_i` in :math:`\\module.\\MDATAS`,\n    the segment :math:`\\data_i` must be :ref:`valid <valid-data>`.\n\n  * If :math:`\\module.\\MSTART` is non-empty,\n    then :math:`\\module.\\MSTART` must be :ref:`valid <valid-start>`.\n\n  * For each :math:`\\import_i` in :math:`\\module.\\MIMPORTS`,\n    the segment :math:`\\import_i` must be :ref:`valid <valid-import>` with an :ref:`external type <syntax-externtype>` :math:`\\X{it}_i`.\n\n  * For each :math:`\\export_i` in :math:`\\module.\\MEXPORTS`,\n    the segment :math:`\\export_i` must be :ref:`valid <valid-export>` with :ref:`external type <syntax-externtype>` :math:`\\X{et}_i`.\n\n* The length of :math:`C.\\CMEMS` must not be larger than :math:`1`.\n\n* All export names :math:`\\export_i.\\ENAME` must be different.\n\n* Let :math:`\\X{ft}^\\ast` be the concatenation of the internal :ref:`function types <syntax-functype>` :math:`\\X{ft}_i`, in index order.\n\n* Let :math:`\\X{tt}^\\ast` be the concatenation of the internal :ref:`table types <syntax-tabletype>` :math:`\\X{tt}_i`, in index order.\n\n* Let :math:`\\X{mt}^\\ast` be the concatenation of the internal :ref:`memory types <syntax-memtype>` :math:`\\X{mt}_i`, in index order.\n\n* Let :math:`\\X{gt}^\\ast` be the concatenation of the internal :ref:`global types <syntax-globaltype>` :math:`\\X{gt}_i`, in index order.\n\n* Let :math:`\\X{rt}^\\ast` be the concatenation of the :ref:`reference types <syntax-reftype>` :math:`\\X{rt}_i`, in index order.\n\n* Let :math:`\\X{it}^\\ast` be the concatenation of :ref:`external types <syntax-externtype>` :math:`\\X{it}_i` of the imports, in index order.\n\n* Let :math:`\\X{et}^\\ast` be the concatenation of :ref:`external types <syntax-externtype>` :math:`\\X{et}_i` of the exports, in index order.\n\n* Then the module is valid with :ref:`external types <syntax-externtype>` :math:`\\X{it}^\\ast \\to \\X{et}^\\ast`.\n\n.. math::\n   \\frac{\n     \\begin{array}{@{}c@{}}\n     (\\vdashfunctype \\type \\ok)^\\ast\n     \\quad\n     (C \\vdashfunc \\func : \\X{ft})^\\ast\n     \\quad\n     (C \\vdashtable \\table : \\X{tt})^\\ast\n     \\quad\n     (C \\vdashmem \\mem : \\X{mt})^\\ast\n     \\quad\n     (C' \\vdashglobal \\global : \\X{gt})^\\ast\n     \\\\\n     (C \\vdashelem \\elem : \\X{rt})^\\ast\n     \\quad\n     (C \\vdashdata \\data \\ok)^n\n     \\quad\n     (C \\vdashstart \\start \\ok)^?\n     \\quad\n     (C \\vdashimport \\import : \\X{it})^\\ast\n     \\quad\n     (C \\vdashexport \\export : \\X{et})^\\ast\n     \\\\\n     \\X{ift}^\\ast = \\etfuncs(\\X{it}^\\ast)\n     \\qquad\n     \\X{itt}^\\ast = \\ettables(\\X{it}^\\ast)\n     \\qquad\n     \\X{imt}^\\ast = \\etmems(\\X{it}^\\ast)\n     \\qquad\n     \\X{igt}^\\ast = \\etglobals(\\X{it}^\\ast)\n     \\\\\n     x^\\ast = \\freefuncidx(\\module \\with \\MFUNCS = \\epsilon \\with \\MSTART = \\epsilon)\n     \\\\\n     C = \\{ \\CTYPES~\\type^\\ast, \\CFUNCS~\\X{ift}^\\ast\\,\\X{ft}^\\ast, \\CTABLES~\\X{itt}^\\ast\\,\\X{tt}^\\ast, \\CMEMS~\\X{imt}^\\ast\\,\\X{mt}^\\ast, \\CGLOBALS~\\X{igt}^\\ast\\,\\X{gt}^\\ast, \\CELEMS~\\X{rt}^\\ast, \\CDATAS~{\\ok}^n, \\CREFS~x^\\ast \\}\n     \\\\\n     C' = \\{ \\CGLOBALS~\\X{igt}^\\ast, \\CFUNCS~(C.\\CFUNCS), \\CREFS~(C.\\CREFS) \\}\n     \\qquad\n     |C.\\CMEMS| \\leq 1\n     \\qquad\n     (\\export.\\ENAME)^\\ast ~\\F{disjoint}\n     \\\\\n     \\module = \\{\n       \\begin{array}[t]{@{}l@{}}\n         \\MTYPES~\\type^\\ast,\n         \\MFUNCS~\\func^\\ast,\n         \\MTABLES~\\table^\\ast,\n         \\MMEMS~\\mem^\\ast,\n         \\MGLOBALS~\\global^\\ast, \\\\\n         \\MELEMS~\\elem^\\ast,\n         \\MDATAS~\\data^n,\n         \\MSTART~\\start^?,\n         \\MIMPORTS~\\import^\\ast,\n         \\MEXPORTS~\\export^\\ast \\}\n       \\end{array}\n     \\end{array}\n   }{\n     \\vdashmodule \\module : \\X{it}^\\ast \\to \\X{et}^\\ast\n   }\n\n.. note::\n   Most definitions in a module -- particularly functions -- are mutually recursive.\n   Consequently, the definition of the :ref:`context <context>` :math:`C` in this rule is recursive:\n   it depends on the outcome of validation of the function, table, memory, and global definitions contained in the module,\n   which itself depends on :math:`C`.\n   However, this recursion is just a specification device.\n   All types needed to construct :math:`C` can easily be determined from a simple pre-pass over the module that does not perform any actual validation.\n\n   Globals, however, are not recursive.\n   The effect of defining the limited context :math:`C'` for validating the module's globals is that their initialization expressions can only access functions and imported globals and nothing else.\n\n.. note::\n   The restriction on the number of memories may be lifted in future versions of WebAssembly.\n"
  },
  {
    "path": "document/core/valid/types.rst",
    "content": "Types\n-----\n\nMost :ref:`types <syntax-type>` are universally valid.\nHowever, restrictions apply to :ref:`limits <syntax-limits>`, which must be checked during validation.\nMoreover, :ref:`block types <syntax-blocktype>` are converted to plain :ref:`function types <syntax-functype>` for ease of processing.\n\n\n.. index:: limits\n   pair: validation; limits\n   single: abstract syntax; limits\n.. _valid-limits:\n\nLimits\n~~~~~~\n\n:ref:`Limits <syntax-limits>` must have meaningful bounds that are within a given range.\n\n:math:`\\{ \\LMIN~n, \\LMAX~m^? \\}`\n................................\n\n* The value of :math:`n` must not be larger than :math:`k`.\n\n* If the maximum :math:`m^?` is not empty, then:\n\n  * Its value must not be larger than :math:`k`.\n\n  * Its value must not be smaller than :math:`n`.\n\n* Then the limit is valid within range :math:`k`.\n\n.. math::\n   \\frac{\n     n \\leq k\n     \\qquad\n     (m \\leq k)^?\n     \\qquad\n     (n \\leq m)^?\n   }{\n     \\vdashlimits \\{ \\LMIN~n, \\LMAX~m^? \\} : k\n   }\n\n\n.. index:: block type\n   pair: validation; block type\n   single: abstract syntax; block type\n.. _valid-blocktype:\n\nBlock Types\n~~~~~~~~~~~\n\n:ref:`Block types <syntax-blocktype>` may be expressed in one of two forms, both of which are converted to plain :ref:`function types <syntax-functype>` by the following rules.\n\n:math:`\\typeidx`\n................\n\n* The type :math:`C.\\CTYPES[\\typeidx]` must be defined in the context.\n\n* Then the block type is valid as :ref:`function type <syntax-functype>` :math:`C.\\CTYPES[\\typeidx]`.\n\n.. math::\n   \\frac{\n     C.\\CTYPES[\\typeidx] = \\functype\n   }{\n     C \\vdashblocktype \\typeidx : \\functype\n   }\n\n\n:math:`[\\valtype^?]`\n....................\n\n* The block type is valid as :ref:`function type <syntax-functype>` :math:`[] \\to [\\valtype^?]`.\n\n.. math::\n   \\frac{\n   }{\n     C \\vdashblocktype [\\valtype^?] : [] \\to [\\valtype^?]\n   }\n\n\n.. index:: function type\n   pair: validation; function type\n   single: abstract syntax; function type\n.. _valid-functype:\n\nFunction Types\n~~~~~~~~~~~~~~\n\n:ref:`Function types <syntax-functype>` are always valid.\n\n:math:`[t_1^n] \\to [t_2^m]`\n...........................\n\n* The function type is valid.\n\n.. math::\n   \\frac{\n   }{\n     \\vdashfunctype [t_1^\\ast] \\to [t_2^\\ast] \\ok\n   }\n\n\n.. index:: table type, reference type, limits\n   pair: validation; table type\n   single: abstract syntax; table type\n.. _valid-tabletype:\n\nTable Types\n~~~~~~~~~~~\n\n:math:`\\limits~\\reftype`\n........................\n\n* The limits :math:`\\limits` must be :ref:`valid <valid-limits>` within range :math:`2^{32}-1`.\n\n* Then the table type is valid.\n\n.. math::\n   \\frac{\n     \\vdashlimits \\limits : 2^{32} - 1\n   }{\n     \\vdashtabletype \\limits~\\reftype \\ok\n   }\n\n\n.. index:: memory type, limits\n   pair: validation; memory type\n   single: abstract syntax; memory type\n.. _valid-memtype:\n\nMemory Types\n~~~~~~~~~~~~\n\n:math:`\\limits`\n...............\n\n* The limits :math:`\\limits` must be :ref:`valid <valid-limits>` within range :math:`2^{16}`.\n\n* Then the memory type is valid.\n\n.. math::\n   \\frac{\n     \\vdashlimits \\limits : 2^{16}\n   }{\n     \\vdashmemtype \\limits \\ok\n   }\n\n\n.. index:: global type, value type, mutability\n   pair: validation; global type\n   single: abstract syntax; global type\n.. _valid-globaltype:\n\nGlobal Types\n~~~~~~~~~~~~\n\n:math:`\\mut~\\valtype`\n.....................\n\n* The global type is valid.\n\n.. math::\n   \\frac{\n   }{\n     \\vdashglobaltype \\mut~\\valtype \\ok\n   }\n\n\n.. index:: external type, function type, table type, memory type, global type\n   pair: validation; external type\n   single: abstract syntax; external type\n.. _valid-externtype:\n\nExternal Types\n~~~~~~~~~~~~~~\n\n:math:`\\ETFUNC~\\functype`\n.........................\n\n* The :ref:`function type <syntax-functype>` :math:`\\functype` must be :ref:`valid <valid-functype>`.\n\n* Then the external type is valid.\n\n.. math::\n   \\frac{\n     \\vdashfunctype \\functype \\ok\n   }{\n     \\vdashexterntype \\ETFUNC~\\functype \\ok\n   }\n\n:math:`\\ETTABLE~\\tabletype`\n...........................\n\n* The :ref:`table type <syntax-tabletype>` :math:`\\tabletype` must be :ref:`valid <valid-tabletype>`.\n\n* Then the external type is valid.\n\n.. math::\n   \\frac{\n     \\vdashtabletype \\tabletype \\ok\n   }{\n     \\vdashexterntype \\ETTABLE~\\tabletype \\ok\n   }\n\n:math:`\\ETMEM~\\memtype`\n.......................\n\n* The :ref:`memory type <syntax-memtype>` :math:`\\memtype` must be :ref:`valid <valid-memtype>`.\n\n* Then the external type is valid.\n\n.. math::\n   \\frac{\n     \\vdashmemtype \\memtype \\ok\n   }{\n     \\vdashexterntype \\ETMEM~\\memtype \\ok\n   }\n\n:math:`\\ETGLOBAL~\\globaltype`\n.............................\n\n* The :ref:`global type <syntax-globaltype>` :math:`\\globaltype` must be :ref:`valid <valid-globaltype>`.\n\n* Then the external type is valid.\n\n.. math::\n   \\frac{\n     \\vdashglobaltype \\globaltype \\ok\n   }{\n     \\vdashexterntype \\ETGLOBAL~\\globaltype \\ok\n   }\n\n\n.. index:: ! matching, external type\n.. _exec-import:\n.. _match:\n\nImport Subtyping\n~~~~~~~~~~~~~~~~\n\nWhen :ref:`instantiating <exec-module>` a module,\n:ref:`external values <syntax-externval>` must be provided whose :ref:`types <valid-externval>` are *matched* against the respective :ref:`external types <syntax-externtype>` classifying each import.\nIn some cases, this allows for a simple form of subtyping, as defined here.\n\n\n.. index:: limits\n.. _match-limits:\n\nLimits\n......\n\n:ref:`Limits <syntax-limits>` :math:`\\{ \\LMIN~n_1, \\LMAX~m_1^? \\}` match limits :math:`\\{ \\LMIN~n_2, \\LMAX~m_2^? \\}` if and only if:\n\n* :math:`n_1` is larger than or equal to :math:`n_2`.\n\n* Either:\n\n  * :math:`m_2^?` is empty.\n\n* Or:\n\n  * Both :math:`m_1^?` and :math:`m_2^?` are non-empty.\n\n  * :math:`m_1` is smaller than or equal to :math:`m_2`.\n\n.. math::\n   ~\\\\[-1ex]\n   \\frac{\n     n_1 \\geq n_2\n   }{\n     \\vdashlimitsmatch \\{ \\LMIN~n_1, \\LMAX~m_1^? \\} \\matcheslimits \\{ \\LMIN~n_2, \\LMAX~\\epsilon \\}\n   }\n   \\quad\n   \\frac{\n     n_1 \\geq n_2\n     \\qquad\n     m_1 \\leq m_2\n   }{\n     \\vdashlimitsmatch \\{ \\LMIN~n_1, \\LMAX~m_1 \\} \\matcheslimits \\{ \\LMIN~n_2, \\LMAX~m_2 \\}\n   }\n\n\n.. _match-externtype:\n\n.. index:: function type\n.. _match-functype:\n\nFunctions\n.........\n\nAn :ref:`external type <syntax-externtype>` :math:`\\ETFUNC~\\functype_1` matches :math:`\\ETFUNC~\\functype_2` if and only if:\n\n* Both :math:`\\functype_1` and :math:`\\functype_2` are the same.\n\n.. math::\n   ~\\\\[-1ex]\n   \\frac{\n   }{\n     \\vdashexterntypematch \\ETFUNC~\\functype \\matchesexterntype \\ETFUNC~\\functype\n   }\n\n\n.. index:: table type, limits, element type\n.. _match-tabletype:\n\nTables\n......\n\nAn :ref:`external type <syntax-externtype>` :math:`\\ETTABLE~(\\limits_1~\\reftype_1)` matches :math:`\\ETTABLE~(\\limits_2~\\reftype_2)` if and only if:\n\n* Limits :math:`\\limits_1` :ref:`match <match-limits>` :math:`\\limits_2`.\n\n* Both :math:`\\reftype_1` and :math:`\\reftype_2` are the same.\n\n.. math::\n   \\frac{\n     \\vdashlimitsmatch \\limits_1 \\matcheslimits \\limits_2\n   }{\n     \\vdashexterntypematch \\ETTABLE~(\\limits_1~\\reftype) \\matchesexterntype \\ETTABLE~(\\limits_2~\\reftype)\n   }\n\n\n.. index:: memory type, limits\n.. _match-memtype:\n\nMemories\n........\n\nAn :ref:`external type <syntax-externtype>` :math:`\\ETMEM~\\limits_1` matches :math:`\\ETMEM~\\limits_2` if and only if:\n\n* Limits :math:`\\limits_1` :ref:`match <match-limits>` :math:`\\limits_2`.\n\n.. math::\n   \\frac{\n     \\vdashlimitsmatch \\limits_1 \\matcheslimits \\limits_2\n   }{\n     \\vdashexterntypematch \\ETMEM~\\limits_1 \\matchesexterntype \\ETMEM~\\limits_2\n   }\n\n\n.. index:: global type, value type, mutability\n.. _match-globaltype:\n\nGlobals\n.......\n\nAn :ref:`external type <syntax-externtype>` :math:`\\ETGLOBAL~\\globaltype_1` matches :math:`\\ETGLOBAL~\\globaltype_2` if and only if:\n\n* Both :math:`\\globaltype_1` and :math:`\\globaltype_2` are the same.\n\n.. math::\n   ~\\\\[-1ex]\n   \\frac{\n   }{\n     \\vdashexterntypematch \\ETGLOBAL~\\globaltype \\matchesexterntype \\ETGLOBAL~\\globaltype\n   }\n"
  },
  {
    "path": "document/deploy.sh",
    "content": "#!/usr/bin/env bash\n\n# Adapted from+ https://github.com/X1011/git-directory-deploy/\n\nset -o errexit #abort if any command fails\nme=$(basename \"$0\")\n\nhelp_message=\"\\\nUsage: $me [-c FILE] [<options>]\nDeploy generated files to a git branch.\n\nOptions:\n\n  -h, --help               Show this help information.\n  -v, --verbose            Increase verbosity. Useful for debugging.\n  -e, --allow-empty        Allow deployment of an empty directory.\n  -m, --message MESSAGE    Specify the message used when committing on the\n                           deploy branch.\n  -n, --no-hash            Don't append the source commit's hash to the deploy\n                           commit's message.\n  -c, --config-file PATH   Override default & environment variables' values\n                           with those in set in the file at 'PATH'. Must be the\n                           first option specified.\n\nVariables:\n\n  GIT_DEPLOY_DIR      Folder path containing the files to deploy.\n  GIT_DEPLOY_SUBDIR   Subdirectory to deploy.\n  GIT_DEPLOY_BRANCH   Commit deployable files to this branch.\n  GIT_DEPLOY_REPO     Push the deploy branch to this repository.\n\nThese variables have default values defined in the script. The defaults can be\noverridden by environment variables. Any environment variables are overridden\nby values set in a '.env' file (if it exists), and in turn by those set in a\nfile specified by the '--config-file' option.\"\n\nparse_args() {\n\t# Set args from a local environment file.\n\tif [ -e \".env\" ]; then\n\t\tsource .env\n\tfi\n\n\t# Set args from file specified on the command-line.\n\tif [[ $1 = \"-c\" || $1 = \"--config-file\" ]]; then\n\t\tsource \"$2\"\n\t\tshift 2\n\tfi\n\n\t# Parse arg flags\n\t# If something is exposed as an environment variable, set/overwrite it\n\t# here. Otherwise, set/overwrite the internal variable instead.\n\twhile : ; do\n\t\tif [[ $1 = \"-h\" || $1 = \"--help\" ]]; then\n\t\t\techo \"$help_message\"\n\t\t\treturn 0\n\t\telif [[ $1 = \"-v\" || $1 = \"--verbose\" ]]; then\n\t\t\tverbose=true\n\t\t\tshift\n\t\telif [[ $1 = \"-e\" || $1 = \"--allow-empty\" ]]; then\n\t\t\tallow_empty=true\n\t\t\tshift\n\t\telif [[ ( $1 = \"-m\" || $1 = \"--message\" ) && -n $2 ]]; then\n\t\t\tcommit_message=$2\n\t\t\tshift 2\n\t\telif [[ $1 = \"-n\" || $1 = \"--no-hash\" ]]; then\n\t\t\tGIT_DEPLOY_APPEND_HASH=false\n\t\t\tshift\n\t\telse\n\t\t\tbreak\n\t\tfi\n\tdone\n\n\t# Set internal option vars from the environment and arg flags. All internal\n\t# vars should be declared here, with sane defaults if applicable.\n\n\t# Source directory & target branch.\n\tdeploy_directory=${GIT_DEPLOY_DIR:-dist}\n\tdeploy_subdirectory=${GIT_DEPLOY_SUBDIR:-}\n\tdeploy_branch=${GIT_DEPLOY_BRANCH:-gh-pages}\n\n\t#if no user identity is already set in the current git environment, use this:\n\tdefault_username=${GIT_DEPLOY_USERNAME:-deploy.sh}\n\tdefault_email=${GIT_DEPLOY_EMAIL:-}\n\n\t#repository to deploy to. must be readable and writable.\n\trepo=${GIT_DEPLOY_REPO:-origin}\n\n\t#append commit hash to the end of message by default\n\tappend_hash=${GIT_DEPLOY_APPEND_HASH:-true}\n}\n\nmain() {\n\tparse_args \"$@\"\n\n\tenable_expanded_output\n\n\tif ! git diff --exit-code --quiet --cached; then\n\t\techo Aborting due to uncommitted changes in the index >&2\n\t\treturn 1\n\tfi\n\n\tcommit_title=`git log -n 1 --format=\"%s\" HEAD`\n\tcommit_hash=` git log -n 1 --format=\"%H\" HEAD`\n\t\n\t#default commit message uses last title if a custom one is not supplied\n\tif [[ -z $commit_message ]]; then\n\t\tcommit_message=\"publish: $commit_title\"\n\tfi\n\t\n\t#append hash to commit message unless no hash flag was found\n\tif [ $append_hash = true ]; then\n\t\tcommit_message=\"$commit_message\"$'\\n\\n'\"generated from commit $commit_hash\"\n\tfi\n\t\t\n\tprevious_branch=`git rev-parse --abbrev-ref HEAD`\n\n\tif [ $previous_branch == $deploy_branch  ]; then\n\t\techo \"Deploy branch is current branch. Aborting.\" >&2\n\t\treturn 1\n\tfi\n\n\tif [ ! -d \"$deploy_directory\" ]; then\n\t\techo \"Deploy directory '$deploy_directory' does not exist. Aborting.\" >&2\n\t\treturn 1\n\tfi\n\t\n\t# must use short form of flag in ls for compatibility with OS X and BSD\n\tif [[ -z `ls -A \"$deploy_directory\" 2> /dev/null` && -z $allow_empty ]]; then\n\t\techo \"Deploy directory '$deploy_directory' is empty. Aborting. If you're sure you want to deploy an empty tree, use the --allow-empty / -e flag.\" >&2\n\t\treturn 1\n\tfi\n\n\tif git ls-remote --exit-code $repo \"refs/heads/$deploy_branch\" ; then\n\t\t# deploy_branch exists in $repo; make sure we have the latest version\n\n\t\techo ==== Fetch branch $deploy_branch from $repo\n\t\tdisable_expanded_output\n\t\tgit fetch --force $repo $deploy_branch:$deploy_branch\n\t\tenable_expanded_output\n\tfi\n\n\t# check if deploy_branch exists locally\n\tif git show-ref --verify --quiet \"refs/heads/$deploy_branch\"\n\tthen incremental_deploy\n\telse initial_deploy\n\tfi\n\n\trestore_head\n}\n\ninitial_deploy() {\n\techo ==== Initial deploy\n\n\tif [[ -z $deploy_subdirectory ]]; then\n\t\tgit --work-tree \"$deploy_directory\" checkout --orphan $deploy_branch\n\t\tgit --work-tree \"$deploy_directory\" add --all\n\t\tcommit_and_push\n\telse\n\t\techo \"Subdirectory '$deploy_subdirectory' does not exist. Aborting.\" >&2\n\t\treturn 1\n\tfi\n}\n\nincremental_deploy() {\n\techo ==== Incremental deploy\n\n\t#make deploy_branch the current branch\n\tgit symbolic-ref HEAD refs/heads/$deploy_branch\n\t#put the previously committed contents of deploy_branch into the index\n\tgit --work-tree \"$deploy_directory\" reset --mixed --quiet\n\tgit --work-tree \"$deploy_directory\" add --all $deploy_subdirectory\n\n\tset +o errexit\n\tdiff=$(git --work-tree \"$deploy_directory\" diff --exit-code --quiet HEAD --)$?\n\tset -o errexit\n\tcase $diff in\n\t\t0) echo No changes to files in $deploy_directory. Skipping commit.;;\n\t\t1) commit_and_push;;\n\t\t*)\n\t\t\techo git diff exited with code $diff. Aborting. Staying on branch $deploy_branch so you can debug. To switch back to master, use: git symbolic-ref HEAD refs/heads/master && git reset --mixed >&2\n\t\t\treturn $diff\n\t\t\t;;\n\tesac\n}\n\ncommit_and_push() {\n\techo ==== Commit\n\n\tset_user_id\n\tgit --work-tree \"$deploy_directory\" commit -m \"$commit_message\" || echo ==== Skip\n\n\techo ==== Push\n\tdisable_expanded_output\n\t#--quiet is important here to avoid outputting the repo URL, which may contain a secret token\n\tgit push --quiet $repo $deploy_branch\n\tenable_expanded_output\n}\n\n#echo expanded commands as they are executed (for debugging)\nenable_expanded_output() {\n\tif [ $verbose ]; then\n\t\tset -o xtrace\n\t\tset +o verbose\n\tfi\n}\n\n#this is used to avoid outputting the repo URL, which may contain a secret token\ndisable_expanded_output() {\n\tif [ $verbose ]; then\n\t\tset +o xtrace\n\t\tset -o verbose\n\tfi\n}\n\nset_user_id() {\n\tif [[ -z `git config user.name` ]]; then\n\t\tgit config user.name \"$default_username\"\n\tfi\n\tif [[ -z `git config user.email` ]]; then\n\t\tgit config user.email \"$default_email\"\n\tfi\n}\n\nrestore_head() {\n\tif [[ $previous_branch = \"HEAD\" ]]; then\n\t\t#we weren't on any branch before, so just set HEAD back to the commit it was on\n\t\tgit update-ref --no-deref HEAD $commit_hash $deploy_branch\n\telse\n\t\tgit symbolic-ref HEAD refs/heads/$previous_branch\n\tfi\n\t\n\tgit reset --mixed\n}\n\nfilter() {\n\tsed -e \"s|$repo|\\$repo|g\"\n}\n\n[[ $1 = --source-only ]] || main \"$@\"\n"
  },
  {
    "path": "document/index.html",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html>\n\n<head>\n  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n  <title>WebAssembly Specifications</title>\n\n  <link crossorigin=\"anonymous\" href=\"https://assets-cdn.github.com/assets/frameworks-c9193575f18b28be82c0a963e144ff6fa7a809dd8ae003a1d1e5979bed3f7f00.css\" integrity=\"sha256-yRk1dfGLKL6CwKlj4UT/b6eoCd2K4AOh0eWXm+0/fwA=\" media=\"all\" rel=\"stylesheet\">\n  <link crossorigin=\"anonymous\" href=\"https://assets-cdn.github.com/assets/github-8ffe4331a8d2d413bfa465c56c4cc7466b011bcb5a8f74aab9081362ee31f862.css\" integrity=\"sha256-j/5DMajS1BO/pGXFbEzHRmsBG8taj3SquQgTYu4x+GI=\" media=\"all\" rel=\"stylesheet\">\n</head>\n\n<body>\n<div id=\"readme\" class=\"readme blob isntapaper_body\">\n<article class=\"markdown-body entry-content\">\n\n<h1>WebAssembly Specifications</h1>\n\n<p>\nTo support the <em>embedding</em> of WebAssembly into different environments, its specification is split into <em>layers</em> that are specified in separate documents.\n</p>\n\n<h3>Core specification</h3>\n\n<p>Defines the semantics of WebAssembly modules independent from a concrete embedding.\n  The WebAssembly core is specified in a single document:</p>\n\n  <ul>\n    <li>\n      <p><b>WebAssembly</b>:\n      defines the structure of WebAssembly modules, their instruction set, and their representation\n      in binary and text format, as well as the semantics of validation,\n      instantiation, and execution.\n      </p>\n      <ul>\n        <li><a href=\"core/\">Browser version</a> (multi-page)</li>\n        <li><a href=\"core/bikeshed/\">W3C version</a> (single-page)</li>\n        <li><a href=\"core/_download/WebAssembly.pdf\">PDF version</a></li>\n        <!-- <li><a href=\"https://github.com/WebAssembly/spec/document/core/\">Sources</a></li> -->\n      </ul>\n    </li>\n  </ul>\n\n<h3>Embedder specifications</h3>\n\n<p>Define <em>application programming interfaces</em> (APIs) enabling the use of WebAssembly modules in concrete embedding environments.\n  Currently, two APIs are specified:</p>\n\n  <ul>\n  <li><p><b>JavaScript Embedding</b>: defines JavaScript classes and objects for accessing WebAssembly from within JavaScript, including methods for validation, compilation, instantiation, and classes for representing and manipulating imports and exports as JavaScript objects.</p>\n    <ul>\n      <li><a href=\"js-api/index.html\">W3C version</a></li>\n      <!-- <li><a href=\"https://github.com/WebAssembly/spec/document/js-api/\">Sources</a></li> -->\n    </ul>\n  </li>\n\n  <li><p><b>Web Embedding</b>: defines extensions to the JavaScript API made available specifically in web browsers, in particular, an interface for streaming compilation and instantiation from origin-bound <code>Response</code> types.</p>\n    <ul>\n      <li><a href=\"web-api/index.html\">W3C version</a></li>\n      <!-- <li><a href=\"https://github.com/WebAssembly/spec/document/web-api/\">Sources</a></li> -->\n    </ul>\n  </li>\n  </ul>\n\n<p>\n  Source for these documents is available\n  <a href=\"https://github.com/WebAssembly/spec/\">here</a>.\n</p>\n\n</article>\n</div>\n</body>\n\n</html>\n"
  },
  {
    "path": "document/js-api/Makefile",
    "content": "BUILDDIR      = _build\nSTATICDIR     = _static\nDOWNLOADDIR   = _download\nNAME          = WebAssembly\n\n.PHONY: all\nall:\n\tmkdir -p $(BUILDDIR)/html\n\tbikeshed spec index.bs $(BUILDDIR)/html/index.html\n\t@echo \"Build finished. The HTML pages are in `pwd`/$(BUILDDIR)/html.\"\n\n.PHONY: publish\npublish:\n\t(cd ..; make publish-js-api)\n\n.PHONY: clean\nclean:\n\trm -rf $(BUILDDIR)\n\trm -rf $(STATICDIR)\n\n.PHONY: diff\ndiff: all\n\t@echo \"Downloading the old single-file html spec...\"\n\tcurl `grep \"^TR\" index.bs | cut -d' ' -f2` -o $(BUILDDIR)/html/old.html\n\t@echo \"Done.\"\n\t@echo \"Diffing new against old...\"\n\tperl ../util/htmldiff.pl $(BUILDDIR)/html/old.html $(BUILDDIR)/html/index.html $(BUILDDIR)/html/diff.html\n\t@echo \"Done. The diff is at $(BUILDDIR)/html/diff.html\"\n\n.PHONY: WD-tar\nWD-tar:\n\tbikeshed echidna --just-tar index.bs $(BUILDDIR)/html/index.html\n\tmv test.tar $(BUILDDIR)/WD.tar\n\t@echo \"Built $(BUILDDIR)/WD.tar.\"\n\n.PHONY: WD-echidna\nWD-echidna:\n\t@if [ -z $(W3C_USERNAME) ] || \\\n\t    [ -z $(W3C_PASSWORD) ] || \\\n\t\t\t[ -z $(DECISION_URL) ] ; then \\\n\t\techo \"Must provide W3C_USERNAME, W3C_PASSWORD, and DECISION_URL environment variables\"; \\\n\t\texit 1; \\\n\tfi\n\tbikeshed echidna index.bs --u $(W3C_USERNAME) --p $(W3C_PASSWORD) --d $(DECISION_URL)\n"
  },
  {
    "path": "document/js-api/index.bs",
    "content": "<pre class='metadata'>\nTitle: WebAssembly JavaScript Interface\nShortname: wasm-js-api\nGroup: wasm\nStatus: ED\nLevel: 1\nTR: https://www.w3.org/TR/wasm-js-api-1/\nED: https://webassembly.github.io/spec/js-api/\nEditor: Ms2ger (Igalia)\nRepository: WebAssembly/spec\nMarkup Shorthands: css no, markdown yes\nAbstract: This document provides an explicit JavaScript API for interacting with WebAssembly.\nPrepare For TR: true\n</pre>\n\n<pre class='biblio'>\n{\n  \"WEBASSEMBLY\": {\n    \"href\": \"https://webassembly.github.io/spec/core/\",\n    \"title\": \"WebAssembly Core Specification\",\n    \"publisher\": \"W3C WebAssembly Community Group\",\n    \"status\": \"Draft\"\n  }\n}\n</pre>\n\n<pre class=\"anchors\">\nurlPrefix: https://tc39.github.io/ecma262/; spec: ECMASCRIPT\n    type: interface; for: ECMAScript\n        text: ArrayBuffer; url: sec-arraybuffer-objects\n    type: exception; for: ECMAScript\n        text: Error; url: sec-error-objects\n        text: NativeError; url: sec-nativeerror-constructors\n        text: TypeError; url: sec-native-error-types-used-in-this-standard-typeerror\n        text: RangeError; url: sec-native-error-types-used-in-this-standard-rangeerror\n    type: dfn\n        text: agent cluster; url: sec-agent-clusters\n        text: agent; url: agent\n        text: data block; url: sec-data-blocks\n        text: Bound Function; url: sec-bound-function-exotic-objects\n        text: NumericLiteral; url: sec-literals-numeric-literals\n        text: surrounding agent; url: surrounding-agent\n        text: ToNumber; url: sec-tonumber\n        text: ToInt32; url: sec-toint32\n        text: ToString; url: sec-tostring\n        url: sec-ecmascript-data-types-and-values\n            text: Type\n            text: Type(x)\n        url: sec-iscallable\n            text: IsCallable\n            text: callable; for: ECMAScript\n        url: sec-well-known-intrinsic-objects\n            text: %ErrorPrototype%\n        text: %ObjectPrototype%; url: sec-properties-of-the-object-prototype-object\n        text: %FunctionPrototype%; url: sec-properties-of-the-function-prototype-object\n        text: %Promise%; url: sec-promise-constructor\n        text: Property Descriptor; url: sec-property-descriptor-specification-type\n        text: array index; url: sec-array-exotic-objects\n        text: OrdinaryGetOwnProperty; url: sec-ordinarygetownproperty\n        text: OrdinaryDefineOwnProperty; url: sec-ordinarydefineownproperty\n        text: OrdinaryPreventExtensions; url: sec-ordinarypreventextensions\n        text: OrdinarySet; url: sec-ordinaryset\n        text: equally close values; url: sec-ecmascript-language-types-number-type\n        text: internal slot; url: sec-object-internal-methods-and-internal-slots\n        text: JavaScript execution context stack; url: execution-context-stack\n        text: running JavaScript execution context; url: running-execution-context\n        text: GetIterator; url: sec-getiterator\n        text: IteratorStep; url: sec-iteratorstep\n        text: NormalCompletion; url: sec-normalcompletion\n        text: IteratorValue; url: sec-iteratorvalue\n        url: sec-well-known-symbols\n            text: @@iterator\n            text: @@toStringTag\n        text: CreateDataProperty; url: sec-createdataproperty\n        text: DetachArrayBuffer; url: sec-detacharraybuffer\n        text: SetIntegrityLevel; url: sec-setintegritylevel\n        text: Call; url: sec-call\n        text: Get; url: sec-get-o-p\n        text: DefinePropertyOrThrow; url: sec-definepropertyorthrow\n        text: current Realm; url: current-realm\n        text: ObjectCreate; url: sec-objectcreate\n        text: CreateBuiltinFunction; url: sec-createbuiltinfunction\n        text: SetFunctionName; url: sec-setfunctionname\n        text: SetFunctionLength; url: sec-setfunctionlength\n        text: the Number value; url: sec-ecmascript-language-types-number-type\n        text: NumberToRawBytes; url: sec-numbertorawbytes\n        text: Built-in Function Objects; url: sec-built-in-function-objects\n        text: NativeError Object Structure; url: sec-nativeerror-object-structure\n        text: CreateArrayFromList; url: sec-createarrayfromlist\n        text: GetMethod; url: sec-getmethod\n        text: IterableToList; url: sec-iterabletolist\n        text: ToBigInt64; url: #sec-tobigint64\n        text: BigInt; url: #sec-ecmascript-language-types-bigint-type\n    type: abstract-op\n        text: CreateMethodProperty; url: sec-createmethodproperty\nurlPrefix: https://webassembly.github.io/reference-types/core/; spec: WebAssembly; type: dfn\n    url: valid/modules.html#valid-module\n        text: valid\n        text: WebAssembly module validation\n    text: module grammar; url: binary/modules.html#binary-module\n    text: custom section; url: binary/modules.html#custom-section\n    text: customsec; url: binary/modules.html#binary-customsec\n    text: memory instance; url: exec/runtime.html#memory-instances\n    text: table instance; url: exec/runtime.html#table-instances\n    text: global instance; url: exec/runtime.html#global-instances\n    text: trap; url: exec/runtime.html#syntax-trap\n    url: exec/runtime.html#values\n        text: WebAssembly value\n        text: i64.const\n        text: i32.const\n        text: f32.const\n        text: f64.const\n        text: ref.null\n        text: ref.func\n        text: ref.extern\n    text: function index; url: syntax/modules.html#syntax-funcidx\n    text: function instance; url: exec/runtime.html#function-instances\n    text: store_init; url: appendix/embedding.html#embed-store-init\n    text: module_decode; url: appendix/embedding.html#embed-module-decode\n    text: module_validate; url: appendix/embedding.html#embed-module-validate\n    text: module_instantiate; url: appendix/embedding.html#embed-module-instantiate\n    text: module_imports; url: appendix/embedding.html#embed-module-imports\n    text: module_exports; url: appendix/embedding.html#embed-module-exports\n    text: instance_export; url: appendix/embedding.html#embed-instance-export\n    text: func_alloc; url: appendix/embedding.html#embed-func-alloc\n    text: func_type; url: appendix/embedding.html#embed-func-type\n    text: func_invoke; url: appendix/embedding.html#embed-func-invoke\n    text: table_alloc; url: appendix/embedding.html#embed-table-alloc\n    text: table_type; url: appendix/embedding.html#embed-table-type\n    text: table_read; url: appendix/embedding.html#embed-table-read\n    text: table_write; url: appendix/embedding.html#embed-table-write\n    text: table_size; url: appendix/embedding.html#embed-table-size\n    text: table_grow; url: appendix/embedding.html#embed-table-grow\n    text: mem_alloc; url: appendix/embedding.html#embed-mem-alloc\n    text: mem_type; url: appendix/embedding.html#embed-mem-type\n    text: mem_read; url: appendix/embedding.html#embed-mem-read\n    text: mem_write; url: appendix/embedding.html#embed-mem-write\n    text: mem_size; url: appendix/embedding.html#embed-mem-size\n    text: mem_grow; url: appendix/embedding.html#embed-mem-grow\n    text: global_alloc; url: appendix/embedding.html#embed-global-alloc\n    text: global_type; url: appendix/embedding.html#embed-global-type\n    text: global_read; url: appendix/embedding.html#embed-global-read\n    text: global_write; url: appendix/embedding.html#embed-global-write\n    text: error; url: appendix/embedding.html#embed-error\n    text: store; url: exec/runtime.html#syntax-store\n    text: table type; url: syntax/types.html#syntax-tabletype\n    text: table address; url: exec/runtime.html#syntax-tableaddr\n    text: function address; url: exec/runtime.html#syntax-funcaddr\n    text: memory address; url: exec/runtime.html#syntax-memaddr\n    text: global address; url: exec/runtime.html#syntax-globaladdr\n    text: extern address; url: exec/runtime.html#syntax-externaddr\n    url: syntax/types.html#syntax-numtype\n        text: i32\n        text: i64\n        text: f32\n        text: f64\n    url: syntax/types.html#syntax-reftype\n        text: reftype\n        text: funcref\n        text: externref\n    text: function element; url: exec/runtime.html#syntax-funcelem\n    text: import component; url: syntax/modules.html#imports\n    text: external value; url: exec/runtime.html#syntax-externval\n    text: host function; url: exec/runtime.html#syntax-hostfunc\n    text: the instantiation algorithm; url: exec/modules.html#instantiation\n    text: module; url: syntax/modules.html#syntax-module\n    text: imports; url: syntax/modules.html#syntax-module\n    text: import; url: syntax/modules.html#syntax-import\n    url: syntax/types.html#external-types\n        text: external type\n        text: func\n        text: table\n        text: mem\n        text: global\n    text: global type; url: syntax/types.html#syntax-globaltype\n    url: syntax/types.html#syntax-mut\n        text: var\n        text: const\n    text: address; url: exec/runtime.html#addresses\n    text: signed_32; url: exec/numerics.html#aux-signed\n    text: memory.grow; url: exec/instructions.html#exec-memory-grow\n    text: current frame; url: exec/conventions.html#exec-notation-textual\n    text: module; for: frame; url: exec/runtime.html#syntax-frame\n    text: memaddrs; for: moduleinst; url: exec/runtime.html#syntax-moduleinst\n    text: signed_64; url: exec/numerics.html#aux-signed\n    text: sequence; url: syntax/conventions.html#grammar-notation\nurlPrefix: https://heycam.github.io/webidl/; spec: WebIDL\n    type: dfn\n        text: create a namespace object; url: create-a-namespace-object\n</pre>\n\n<pre class='link-defaults'>\nspec:infra; type:dfn; text:list\nspec:ecma-262; type:exception; for:ECMAScript; text:Error\nspec:ecmascript; type:exception; for:ECMAScript; text:TypeError\nspec:ecmascript; type:exception; for:ECMAScript; text:RangeError\nspec:ecmascript; type:interface; for:ECMAScript; text:ArrayBuffer\nspec:webidl; type:dfn; text:resolve\n</pre>\n\n<style>\nemu-const {\n    font-family: serif;\n}\n</style>\n\nThis API provides a way to access WebAssembly [[WEBASSEMBLY]] through a bridge to explicitly construct modules from JavaScript [[ECMASCRIPT]].\n\n<h2 id=\"sample\">Sample API Usage</h2>\n\n<p><em>This section is non-normative.</em></p>\n\nGiven `demo.wat` (encoded to `demo.wasm`):\n\n```lisp\n(module\n    (import \"js\" \"import1\" (func $i1))\n    (import \"js\" \"import2\" (func $i2))\n    (func $main (call $i1))\n    (start $main)\n    (func (export \"f\") (call $i2))\n)\n```\n\nand the following JavaScript, run in a browser:\n\n```javascript\nvar importObj = {js: {\n    import1: () => console.log(\"hello,\"),\n    import2: () => console.log(\"world!\")\n}};\nfetch('demo.wasm').then(response =>\n    response.arrayBuffer()\n).then(buffer =>\n    WebAssembly.instantiate(buffer, importObj)\n).then(({module, instance}) =>\n    instance.exports.f()\n);\n```\n\n<h2 id=\"notation\">Notation</h2>\n\nThis specification depends on the Infra Standard. [[INFRA]]\n\nThe WebAssembly [=sequence=] type is equivalent to the [=list=] type defined there; values of one\nare treated as values of the other transparently.\n\n<h2 id=\"webassembly-storage\">Internal storage</h2>\n\n<h3 id=\"store\">Interaction of the WebAssembly Store with JavaScript</h3>\n\nNote: WebAssembly semantics are defined in terms of an abstract [=store=], representing the state of the WebAssembly abstract machine. WebAssembly operations take a store and return an updated store.\n\nEach [=agent=] has an <dfn>associated store</dfn>. When a new agent is created, its associated store is set to the result of [=store_init=]().\n\nNote: In this specification, no WebAssembly-related objects, memory or addresses can be shared among agents in an [=agent cluster=]. In a future version of WebAssembly, this may change.\n\nElements of the WebAssembly store may be <dfn>identified with</dfn> JavaScript values. In particular, each WebAssembly [=memory instance=] with a corresponding {{Memory}} object is identified with a JavaScript [=Data Block=]; modifications to this Data Block are identified to updating the agent's store to a store which reflects those changes, and vice versa.\n\n<h3 id=\"object-caches\">WebAssembly JS Object Caches</h3>\n\nNote: There are several WebAssembly objects that may have a corresponding JavaScript object. The correspondence is stored in a per-agent mapping from WebAssembly [=address=]es to JavaScript objects.\nThis mapping is used to ensure that, for a given [=agent=], there exists at most one JavaScript object for a particular WebAssembly address. However, this property does not hold for shared objects.\n\nEach [=agent=] is associated with the following [=ordered map=]s:\n    * The <dfn>Memory object cache</dfn>, mapping [=memory address=]es to {{Memory}} objects.\n    * The <dfn>Table object cache</dfn>, mapping [=table address=]es to {{Table}} objects.\n    * The <dfn>Exported Function cache</dfn>, mapping [=function address=]es to [=Exported Function=] objects.\n    * The <dfn>Global object cache</dfn>, mapping [=global address=]es to {{Global}} objects.\n    * The <dfn>Extern value cache</dfn>, mapping [=extern address=]es to values.\n\n<h2 id=\"webassembly-namespace\">The WebAssembly Namespace</h2>\n\n<pre class=\"idl\">\ndictionary WebAssemblyInstantiatedSource {\n    required Module module;\n    required Instance instance;\n};\n\n[Exposed=(Window,Worker,Worklet)]\nnamespace WebAssembly {\n    boolean validate(BufferSource bytes);\n    Promise&lt;Module> compile(BufferSource bytes);\n\n    Promise&lt;WebAssemblyInstantiatedSource> instantiate(\n        BufferSource bytes, optional object importObject);\n\n    Promise&lt;Instance> instantiate(\n        Module moduleObject, optional object importObject);\n};\n</pre>\n\n<!--\nShould we include notes describing what the functions do, as the HTML spec does? It could look like this:\n\nNote:\n  WebAssembly.validate(|bytes|) synchronously validates bytes of WebAssembly, returning true if the validation was successful.\n  WebAssembly.compile(|bytes|) asynchronously validates and complies bytes of WebAssembly into a Module.\n  WebAssembly.instantiate(|bytes|, |importObject|) asynchronously compiles and instantiates a WebAssembly module from bytes of source.\n  The WebAssembly.instantiate(|moduleObject|, |importObject|) asynchronously instantiates a compiled module.\n-->\n\n<div algorithm>\n  To <dfn>compile a WebAssembly module</dfn> from source bytes |bytes|, perform the following steps:\n    1. Let |module| be [=module_decode=](|bytes|). If |module| is [=error=], return [=error=].\n    1. If [=module_validate=](|module|) is [=error=], return [=error=].\n    1. Return |module|.\n</div>\n\n<div algorithm>\n  The <dfn method for=\"WebAssembly\">validate(|bytes|)</dfn> method, when invoked, performs the following steps:\n    1. Let |stableBytes| be a [=get a copy of the buffer source|copy of the bytes held by the buffer=] |bytes|.\n    1. [=Compile a WebAssembly module|Compile=] |stableBytes| as a WebAssembly module and store the results as |module|.\n    1. If |module| is [=error=], return false.\n    1. Return true.\n</div>\n\nA {{Module}} object represents a single WebAssembly module. Each {{Module}} object has the following internal slots:\n\n    * \\[[Module]] : a WebAssembly [=/module=]\n    * \\[[Bytes]] : the source bytes of \\[[Module]].\n\n<div algorithm>\n  To <dfn>construct a WebAssembly module object</dfn> from a module |module| and source bytes |bytes|, perform the following steps:\n\n    1. Let |moduleObject| be a new {{Module}} object.\n    1. Set |moduleObject|.\\[[Module]] to |module|.\n    1. Set |moduleObject|.\\[[Bytes]] to |bytes|.\n    1. Return |moduleObject|.\n</div>\n\n<div algorithm>\n  To <dfn>asynchronously compile a WebAssembly module</dfn> from source bytes |bytes|, using optional [=task source=] |taskSource|, perform the following steps:\n\n    1. Let |promise| be [=a new promise=].\n    1. Run the following steps [=in parallel=]:\n        1. [=compile a WebAssembly module|Compile the WebAssembly module=] |bytes| and store the result as |module|.\n        1. [=Queue a task=] to perform the following steps. If |taskSource| was provided, queue the task on that task source.\n            1. If |module| is [=error=], reject |promise| with a {{CompileError}} exception.\n            1. Otherwise,\n                1. [=Construct a WebAssembly module object=] from |module| and |bytes|, and let |moduleObject| be the result.\n                1. [=Resolve=] |promise| with |moduleObject|.\n    1. Return |promise|.\n</div>\n\n<div algorithm>\n    The <dfn method for=\"WebAssembly\">compile(|bytes|)</dfn> method, when invoked, performs the following steps:\n    1. Let |stableBytes| be a [=get a copy of the buffer source|copy of the bytes held by the buffer=] |bytes|.\n    1. [=Asynchronously compile a WebAssembly module=] from |stableBytes| and return the result.\n</div>\n\n<div algorithm=\"read-the-imports\">\n  To <dfn>read the imports</dfn> from a WebAssembly module |module| from imports object |importObject|, perform the following steps:\n    1. If |module|.[=imports=] [=list/is empty|is not empty=], and |importObject| is undefined, throw a {{TypeError}} exception.\n    1. Let |imports| be « ».\n    1. [=list/iterate|For each=] (|moduleName|, |componentName|, |externtype|) of [=module_imports=](|module|),\n        1. Let |o| be ? [=Get=](|importObject|, |moduleName|).\n        1. If [=Type=](|o|) is not Object, throw a {{TypeError}} exception.\n        1. Let |v| be ? [=Get=](|o|, |componentName|).\n        1. If |externtype| is of the form [=func=] |functype|,\n            1. If [=IsCallable=](|v|) is false, throw a {{LinkError}} exception.\n            1. If |v| has a \\[[FunctionAddress]] internal slot, and therefore is an [=Exported Function=],\n                1. Let |funcaddr| be the value of |v|'s \\[[FunctionAddress]] internal slot.\n            1. Otherwise,\n                1. [=Create a host function=] from |v| and |functype|, and let |funcaddr| be the result.\n                1. Let |index| be the number of external functions in |imports|. This value |index| is known as the <dfn>index of the host function</dfn> |funcaddr|.\n            1. Let |externfunc| be the [=external value=] [=external value|func=] |funcaddr|.\n            1. [=list/Append=] |externfunc| to |imports|.\n        1. If |externtype| is of the form [=global=] <var ignore>mut</var> |valtype|,\n            1. If [=Type=](|v|) is Number or BigInt,\n                1. If |valtype| is [=i64=] and [=Type=](|v|) is Number,\n                    1. Throw a {{LinkError}} exception.\n                1. If |valtype| is not [=i64=] and [=Type=](|v|) is BigInt,\n                    1. Throw a {{LinkError}} exception.\n                1. Let |value| be [=ToWebAssemblyValue=](|v|, |valtype|).\n                1. Let |store| be the [=surrounding agent=]'s [=associated store=].\n                1. Let (|store|, |globaladdr|) be [=global_alloc=](|store|, [=const=] |valtype|, |value|).\n                1. Set the [=surrounding agent=]'s [=associated store=] to |store|.\n            1. Otherwise, if |v| [=implements=] {{Global}},\n                1. Let |globaladdr| be |v|.\\[[Global]].\n            1. Otherwise,\n                1. Throw a {{LinkError}} exception.\n            1. Let |externglobal| be [=external value|global=] |globaladdr|.\n            1. [=list/Append=] |externglobal| to |imports|.\n        1. If |externtype| is of the form [=mem=] <var ignore>memtype</var>,\n            1. If |v| does not [=implement=] {{Memory}}, throw a {{LinkError}} exception.\n            1. Let |externmem| be the [=external value=] [=external value|mem=] |v|.\\[[Memory]].\n            1. [=list/Append=] |externmem| to |imports|.\n        1. If |externtype| is of the form [=table=] <var ignore>tabletype</var>,\n            1. If |v| does not [=implement=] {{Table}}, throw a {{LinkError}} exception.\n            1. Let |tableaddr| be |v|.\\[[Table]].\n            1. Let |externtable| be the [=external value=] [=external value|table=] |tableaddr|.\n            1. [=list/Append=] |externtable| to |imports|.\n    1. Return |imports|.\n\nNote: This algorithm only verifies the right kind of JavaScript values are passed.\nThe verification of WebAssembly type requirements is deferred to the\n\"[=instantiate the core of a WebAssembly module=]\" algorithm.\n</div>\n\n<div algorithm>\n  To <dfn>create an exports object</dfn> from a WebAssembly module |module| and instance |instance|, perform the following steps:\n    1. Let |exportsObject| be ! [=ObjectCreate=](null).\n    1. [=list/iterate|For each=] (|name|, |externtype|) of [=module_exports=](|module|),\n        1. Let |externval| be [=instance_export=](|instance|, |name|).\n        1. Assert: |externval| is not [=error=].\n        1. If |externtype| is of the form [=func=] <var ignore>functype</var>,\n            1. Assert: |externval| is of the form [=external value|func=] |funcaddr|.\n            1. Let [=external value|func=] |funcaddr| be |externval|.\n            1. Let |func| be the result of creating [=a new Exported Function=] from |funcaddr|.\n            1. Let |value| be |func|.\n        1. If |externtype| is of the form [=global=] <var ignore>mut</var> <var ignore>globaltype</var>,\n            1. Assert: |externval| is of the form [=external value|global=] |globaladdr|.\n            1. Let [=external value|global=] |globaladdr| be |externval|.\n            1. Let |global| be [=create a global object|a new Global object=] created from |globaladdr|.\n            1. Let |value| be |global|.\n        1. If |externtype| is of the form [=mem=] <var ignore>memtype</var>,\n            1. Assert: |externval| is of the form [=external value|mem=] |memaddr|.\n            1. Let [=external value|mem=] |memaddr| be |externval|.\n            1. Let |memory| be [=create a memory object|a new Memory object=] created from |memaddr|.\n            1. Let |value| be |memory|.\n        1. If |externtype| is of the form [=table=] <var ignore>tabletype</var>,\n            1. Assert: |externval| is of the form [=external value|table=] |tableaddr|.\n            1. Let [=external value|table=] |tableaddr| be |externval|.\n            1. Let |table| be [=create a Table object|a new Table object=] created from |tableaddr|.\n            1. Let |value| be |table|.\n        1. Let |status| be ! [=CreateDataProperty=](|exportsObject|, |name|, |value|).\n        1. Assert: |status| is true.\n\n        Note: the validity and uniqueness checks performed during [=WebAssembly module validation=] ensure that each property name is valid and no properties are defined twice.\n    1. Perform ! [=SetIntegrityLevel=](|exportsObject|, `\"frozen\"`).\n    1. Return |exportsObject|.\n</div>\n\n<div algorithm>\n  To <dfn>initialize an instance object</dfn> |instanceObject| from a WebAssembly module |module| and instance |instance|, perform the following steps:\n\n    1. [=Create an exports object=] from |module| and |instance| and let |exportsObject| be the result.\n    1. Set |instanceObject|.\\[[Instance]] to |instance|.\n    1. Set |instanceObject|.\\[[Exports]] to |exportsObject|.\n</div>\n\n<div algorithm>\n  To <dfn>instantiate the core of a WebAssembly module</dfn> from a module |module| and imports |imports|, perform the following steps:\n    1. Let |store| be the [=surrounding agent=]'s [=associated store=].\n    1. Let |result| be [=module_instantiate=](|store|, |module|, |imports|).\n    1. If |result| is [=error=], throw an appropriate exception type:\n        * A {{LinkError}} exception for most cases which occur during linking.\n        * If the error came when running the start function, throw a {{RuntimeError}} for most errors which occur from WebAssembly, or the error object propagated from inner ECMAScript code.\n        * Another error type if appropriate, for example an out-of-memory exception, as documented in <a href=\"#errors\">the WebAssembly error mapping</a>.\n    1. Let (|store|, |instance|) be |result|.\n    1. Set the [=surrounding agent=]'s [=associated store=] to |store|.\n    1. Return |instance|.\n</div>\n\n<div algorithm>\n  To <dfn>asynchronously instantiate a WebAssembly module</dfn> from a {{Module}} |moduleObject| and imports |importObject|, perform the following steps:\n    1. Let |promise| be [=a new promise=].\n    1. Let |module| be |moduleObject|.\\[[Module]].\n    1. [=Read the imports=] of |module| with imports |importObject|, and let |imports| be the result.\n        If this operation throws an exception, catch it, [=reject=] |promise| with the exception, and return |promise|.\n    1. [=Queue a task=] to perform the following steps:\n        1.  [=Instantiate the core of a WebAssembly module=] |module| with |imports|, and let |instance| be the result.\n            If this throws an exception, catch it, [=reject=] |promise| with the exception, and terminate these substeps.\n        1.  Let |instanceObject| be a [=/new=] {{Instance}}.\n        1.  [=initialize an instance object|Initialize=] |instanceObject| from |module| and |instance|.\n            If this throws an exception, catch it, [=reject=] |promise| with the exception, and terminate these substeps.\n        1. [=Resolve=] |promise| with |instanceObject|.\n    1. Return |promise|.\n</div>\n\n<div algorithm=\"instantiate\">\n  To <dfn>instantiate a WebAssembly module</dfn> from a {{Module}} |moduleObject| and imports |importObject|, perform the following steps:\n    1. Let |module| be |moduleObject|.\\[[Module]].\n    1. [=Read the imports=] of |module| with imports |importObject|, and let |imports| be the result.\n    1. [=Instantiate the core of a WebAssembly module=] |module| with |imports|, and let |instance| be the result.\n    1. Let |instanceObject| be a [=/new=] {{Instance}}.\n    1. [=initialize an instance object|Initialize=] |instanceObject| from |module| and |instance|.\n    1. Return |instanceObject|.\n</div>\n\n<div algorithm>\n  To <dfn>instantiate a promise of a module</dfn> |promiseOfModule| with imports |importObject|, perform the following steps:\n\n    1. Let |promise| be [=a new promise=].\n    1. [=Upon fulfillment=] of |promiseOfModule| with value |module|:\n        1. [=instantiate a WebAssembly module|Instantiate the WebAssembly module=] |module| importing |importObject|, and let |instance| be the result.  If this throws an exception, catch it, [=reject=] |promise| with the exception, and abort these substeps.\n        1. Let |result| be the {{WebAssemblyInstantiatedSource}} value «[ \"{{WebAssemblyInstantiatedSource/module}}\" → |module|, \"{{WebAssemblyInstantiatedSource/instance}}\" → |instance| ]».\n        1. [=Resolve=] |promise| with |result|.\n    1. [=Upon rejection=] of |promiseOfModule| with reason |reason|:\n        1. [=Reject=] |promise| with |reason|.\n    1. Return |promise|.\n\n    Note: It would be valid to perform certain parts of the instantiation [=in parallel=], but several parts need to happen in the event loop, including JavaScript operations to access the |importObject| and execution of the start function.\n</div>\n\n<div algorithm>\n  The <dfn method for=\"WebAssembly\">instantiate(|bytes|, |importObject|)</dfn> method, when invoked, performs the following steps:\n    1. Let |stableBytes| be a [=get a copy of the buffer source|copy of the bytes held by the buffer=] |bytes|.\n    1. [=Asynchronously compile a WebAssembly module=] from |stableBytes| and let |promiseOfModule| be the result.\n    1. [=Instantiate a promise of a module|Instantiate=] |promiseOfModule| with imports |importObject| and return the result.\n</div>\n\n<div algorithm>\n  The <dfn method for=\"WebAssembly\">instantiate(|moduleObject|, |importObject|)</dfn> method, when invoked, performs the following steps:\n    1. [=asynchronously instantiate a WebAssembly module|Asynchronously instantiate the WebAssembly module=] |moduleObject| importing |importObject|, and return the result.\n</div>\n\nNote: A follow-on streaming API is documented in the <a href=\"https://webassembly.github.io/spec/web-api/index.html\">WebAssembly Web API</a>.\n\n<h3 id=\"modules\">Modules</h3>\n\n<pre class=\"idl\">\nenum ImportExportKind {\n  \"function\",\n  \"table\",\n  \"memory\",\n  \"global\"\n};\n\ndictionary ModuleExportDescriptor {\n  required USVString name;\n  required ImportExportKind kind;\n  // Note: Other fields such as signature may be added in the future.\n};\n\ndictionary ModuleImportDescriptor {\n  required USVString module;\n  required USVString name;\n  required ImportExportKind kind;\n};\n\n[LegacyNamespace=WebAssembly, Exposed=(Window,Worker,Worklet)]\ninterface Module {\n  constructor(BufferSource bytes);\n  static sequence&lt;ModuleExportDescriptor> exports(Module moduleObject);\n  static sequence&lt;ModuleImportDescriptor> imports(Module moduleObject);\n  static sequence&lt;ArrayBuffer> customSections(Module moduleObject, DOMString sectionName);\n};\n</pre>\n\n<div algorithm>\n  The <dfn>string value of the extern type</dfn> |type| is\n    * \"function\" if |type| is of the form [=func=] <var ignore>functype</var>\n    * \"table\" if |type| is of the form [=table=] <var ignore>tabletype</var>\n    * \"memory\" if |type| is of the form [=mem=] <var ignore>memtype</var>\n    * \"global\" if |type| is of the form [=global=] <var ignore>globaltype</var>\n</div>\n\n<div algorithm>\n    The <dfn method for=\"Module\">exports(|moduleObject|)</dfn> method, when invoked, performs the following steps:\n    1. Let |module| be |moduleObject|.\\[[Module]].\n    1. Let |exports| be « ».\n    1. [=list/iterate|For each=] (|name|, |type|) of [=module_exports=](|module|),\n        1. Let |kind| be the [=string value of the extern type=] |type|.\n        1. Let |obj| be «[ \"{{ModuleExportDescriptor/name}}\" → |name|, \"{{ModuleExportDescriptor/kind}}\" → |kind| ]».\n        1. [=list/Append=] |obj| to |exports|.\n    1. Return |exports|.\n</div>\n\n<div algorithm>\n    The <dfn method for=\"Module\">imports(|moduleObject|)</dfn> method, when invoked, performs the following steps:\n    1. Let |module| be |moduleObject|.\\[[Module]].\n    1. Let |imports| be « ».\n    1. [=list/iterate|For each=] (|moduleName|, |name|, |type|) of [=module_imports=](|module|),\n        1. Let |kind| be the [=string value of the extern type=] |type|.\n        1. Let |obj| be «[ \"{{ModuleImportDescriptor/module}}\" → |moduleName|, \"{{ModuleImportDescriptor/name}}\" → |name|, \"{{ModuleImportDescriptor/kind}}\" → |kind| ]».\n        1. [=list/Append=] |obj| to |imports|.\n    1. Return |imports|.\n</div>\n\n<div algorithm>\n    The <dfn method for=\"Module\">customSections(|moduleObject|, |sectionName|)</dfn> method, when invoked, performs the following steps:\n    1. Let |bytes| be |moduleObject|.\\[[Bytes]].\n    1. Let |customSections| be « ».\n    1. [=list/iterate|For each=] [=custom section=] |customSection| of |bytes|, interpreted according to the [=module grammar=],\n        1. Let |name| be the <code>name</code> of |customSection|, [=UTF-8 decode without BOM or fail|decoded as UTF-8=].\n        1. Assert: |name| is not failure (|moduleObject|.\\[[Module]] is [=valid=]).\n        1. If |name| equals |sectionName| as string values,\n            1. [=list/Append=] a new {{ArrayBuffer}} containing a copy of the bytes in |bytes| for the range matched by this [=customsec=] production to |customSections|.\n    1. Return |customSections|.\n</div>\n\n<div algorithm>\n    The <dfn constructor for=\"Module\">Module(|bytes|)</dfn> constructor, when invoked, performs the follwing steps:\n\n    1. Let |stableBytes| be a [=get a copy of the buffer source|copy of the bytes held by the buffer=] |bytes|.\n    1. [=Compile a WebAssembly module|Compile the WebAssembly module=] |stableBytes| and store the result as |module|.\n    1. If |module| is [=error=], throw a {{CompileError}} exception.\n    1. Set **this**.\\[[Module]] to |module|.\n    1. Set **this**.\\[[Bytes]] to |stableBytes|.\n</div>\n\n<h3 id=\"instances\">Instances</h3>\n\n<pre class=\"idl\">\n[LegacyNamespace=WebAssembly, Exposed=(Window,Worker,Worklet)]\ninterface Instance {\n  constructor(Module module, optional object importObject);\n  readonly attribute object exports;\n};\n</pre>\n\n<div algorithm>\n  The <dfn constructor for=\"Instance\">Instance(|module|, |importObject|)</dfn> constructor, when invoked, runs the following steps:\n    1. Let |module| be |module|.\\[[Module]].\n    1. [=Read the imports=] of |module| with imports |importObject|, and let |imports| be the result.\n    1. [=Instantiate the core of a WebAssembly module=] |module| with |imports|, and let |instance| be the result.\n    1. [=initialize an instance object|Initialize=] **this** from |module| and |instance|.\n</div>\n\n<div algorithm>\n    The getter of the <dfn attribute for=\"Instance\">exports</dfn> attribute of {{Instance}} returns **this**.\\[[Exports]].\n</div>\n\n<h3 id=\"memories\">Memories</h3>\n\n<pre class=\"idl\">\ndictionary MemoryDescriptor {\n  required [EnforceRange] unsigned long initial;\n  [EnforceRange] unsigned long maximum;\n};\n\n[LegacyNamespace=WebAssembly, Exposed=(Window,Worker,Worklet)]\ninterface Memory {\n  constructor(MemoryDescriptor descriptor);\n  unsigned long grow([EnforceRange] unsigned long delta);\n  readonly attribute ArrayBuffer buffer;\n};\n</pre>\n\nA {{Memory}} object represents a single [=memory instance=]\nwhich can be simultaneously referenced by multiple {{Instance}} objects. Each\n{{Memory}} object has the following internal slots:\n\n    * \\[[Memory]] : a [=memory address=]\n    * \\[[BufferObject]] : an {{ArrayBuffer}} whose [=Data Block=] is [=identified with=] the above memory address\n\n<div algorithm>\n    To <dfn>create a memory buffer</dfn> from a [=memory address=] |memaddr|, perform the following steps:\n\n    1. Let |block| be a [=Data Block=] which is [=identified with=] the underlying memory of |memaddr|.\n    1. Let |buffer| be a new {{ArrayBuffer}} whose \\[[ArrayBufferData]] is |block| and \\[[ArrayBufferByteLength]] is set to the length of |block|.\n    1. Set |buffer|.\\[[ArrayBufferDetachKey]] to \"WebAssembly.Memory\".\n    1. Return |buffer|.\n</div>\n\n<div algorithm>\n    To <dfn>initialize a memory object</dfn> |memory| from a [=memory address=] |memaddr|, perform the following steps:\n    1. Let |map| be the [=surrounding agent=]'s associated [=Memory object cache=].\n    1. Assert: |map|[|memaddr|] doesn't [=map/exist=].\n    1. Let |buffer| be the result of [=create a memory buffer|creating a memory buffer=] from |memaddr|.\n    1. Set |memory|.\\[[Memory]] to |memaddr|.\n    1. Set |memory|.\\[[BufferObject]] to |buffer|.\n    1. [=map/Set=] |map|[|memaddr|] to |memory|.\n</div>\n\n<div algorithm>\n    To <dfn>create a memory object</dfn> from a [=memory address=] |memaddr|, perform the following steps:\n\n    1. Let |map| be the [=surrounding agent=]'s associated [=Memory object cache=].\n    1. If |map|[|memaddr|] [=map/exists=],\n        1. Return |map|[|memaddr|].\n    1. Let |memory| be a [=/new=] {{Memory}}.\n    1. [=initialize a memory object|Initialize=] |memory| from |memaddr|.\n    1. Return |memory|.\n</div>\n\n<div algorithm>\n    The <dfn constructor for=\"Memory\">Memory(|descriptor|)</dfn> constructor, when invoked, performs the following steps:\n    1. Let |initial| be |descriptor|[\"initial\"].\n    1. If |descriptor|[\"maximum\"] [=map/exists=], let |maximum| be |descriptor|[\"maximum\"]; otherwise, let |maximum| be empty.\n    1. If |maximum| is not empty and |maximum| &lt; |initial|, throw a {{RangeError}} exception.\n    1. Let |memtype| be { min |initial|, max |maximum| }.\n    1. Let |store| be the [=surrounding agent=]'s [=associated store=].\n    1. Let (|store|, |memaddr|) be [=mem_alloc=](|store|, |memtype|). If allocation fails, throw a {{RangeError}} exception.\n    1. Set the [=surrounding agent=]'s [=associated store=] to |store|.\n    1. [=initialize a memory object|Initialize=] **this** from |memaddr|.\n</div>\n\n<div algorithm>\n    To <dfn>reset the Memory buffer</dfn> of |memaddr|, perform the following steps:\n\n    1. Let |map| be the [=surrounding agent=]'s associated [=Memory object cache=].\n    1. Assert: |map|[|memaddr|] [=map/exists=].\n    1. Let |memory| be |map|[|memaddr|].\n    1. Perform ! [=DetachArrayBuffer=](|memory|.\\[[BufferObject]], \"WebAssembly.Memory\").\n    1. Let |buffer| be the result of [=create a memory buffer|creating a memory buffer=] from |memaddr|.\n    1. Set |memory|.\\[[BufferObject]] to |buffer|.\n</div>\n\n<div algorithm=dom-Memory-grow>\n    The <dfn method for=\"Memory\">grow(|delta|)</dfn> method, when invoked, performs the following steps:\n    1. Let |store| be the [=surrounding agent=]'s [=associated store=].\n    1. Let |memaddr| be **this**.\\[[Memory]].\n    1. Let |ret| be the [=mem_size=](|store|, |memaddr|).\n    1. Let |store| be [=mem_grow=](|store|, |memaddr|, |delta|).\n    1. If |store| is [=error=], throw a {{RangeError}} exception.\n    1. Set the [=surrounding agent=]'s [=associated store=] to |store|.\n    1. [=Reset the memory buffer=] of |memaddr|.\n    1. Return |ret|.\n</div>\n\nImmediately after a WebAssembly [=memory.grow=] instruction executes, perform the following steps:\n\n<div algorithm=\"memory.grow\">\n    1. If the top of the stack is not [=i32.const=] (−1),\n        1. Let |frame| be the [=current frame=].\n        1. Assert: due to validation, |frame|.[=frame/module=].[=moduleinst/memaddrs=][0] exists.\n        1. Let |memaddr| be the memory address |frame|.[=frame/module=].[=moduleinst/memaddrs=][0].\n        1. [=Reset the memory buffer=] of |memaddr|.\n</div>\n\n<div algorithm>\n    The getter of the <dfn attribute for=\"Memory\">buffer</dfn> attribute of {{Memory}} returns **this**.\\[[BufferObject]].\n</div>\n\n<h3 id=\"tables\">Tables</h3>\n\n<pre class=\"idl\">\nenum TableKind {\n  \"externref\",\n  \"anyfunc\",\n  // Note: More values may be added in future iterations,\n  // e.g., typed function references, typed GC references\n};\n\ndictionary TableDescriptor {\n  required TableKind element;\n  required [EnforceRange] unsigned long initial;\n  [EnforceRange] unsigned long maximum;\n};\n\n[LegacyNamespace=WebAssembly, Exposed=(Window,Worker,Worklet)]\ninterface Table {\n  constructor(TableDescriptor descriptor, optional any value);\n  unsigned long grow([EnforceRange] unsigned long delta, optional any value);\n  any get([EnforceRange] unsigned long index);\n  undefined set([EnforceRange] unsigned long index, optional any value);\n  readonly attribute unsigned long length;\n};\n</pre>\n\nA {{Table}} object represents a single [=table instance=] which can be simultaneously referenced by\nmultiple {{Instance}} objects.\nEach {{Table}} object has a \\[[Table]] internal slot, which is a [=table address=].\n\n<div algorithm>\n    To <dfn>initialize a table object</dfn> |table| from a [=table address=] |tableaddr|, perform the following steps:\n    1. Let |map| be the [=surrounding agent=]'s associated [=Table object cache=].\n    1. Assert: |map|[|tableaddr|] doesn't [=map/exist=].\n    1. Set |table|.\\[[Table]] to |tableaddr|.\n    1. [=map/Set=] |map|[|tableaddr|] to |table|.\n</div>\n\n<div algorithm>\n    To <dfn>create a table object</dfn> from a [=table address=] |tableaddr|, perform the following steps:\n    1. Let |map| be the [=surrounding agent=]'s associated [=Table object cache=].\n    1. If |map|[|tableaddr|] [=map/exists=],\n        1. Return |map|[|tableaddr|].\n    1. Let |table| be a [=/new=] {{Table}}.\n    1. [=initialize a table object|Initialize=] |table| from |tableaddr|.\n    1. Return |table|.\n</div>\n\n<div algorithm>\n    The <dfn constructor for=\"Table\">Table(|descriptor|, |value|)</dfn> constructor, when invoked, performs the following steps:\n    1. Let |elementType| be [=ToValueType=](|descriptor|[\"element\"]).\n    1. If |elementType| is not a [=reftype=],\n        1. [=Throw=] a {{TypeError}} exception.\n    1. Let |initial| be |descriptor|[\"initial\"].\n    1. If |descriptor|[\"maximum\"] [=map/exists=], let |maximum| be |descriptor|[\"maximum\"]; otherwise, let |maximum| be empty.\n    1. If |maximum| is not empty and |maximum| &lt; |initial|, throw a {{RangeError}} exception.\n    1. If |value| is missing,\n        1. Let |ref| be [=DefaultValue=](|elementType|).\n    1. Otherwise,\n        1. Let |ref| be ? [=ToWebAssemblyValue=](|value|, |elementType|).\n    1. Let |type| be the [=table type=] {[=table type|min=] |initial|, [=table type|ma𝗑=] |maximum|} |elementType|.\n    1. Let |store| be the [=surrounding agent=]'s [=associated store=].\n    1. Let (|store|, |tableaddr|) be [=table_alloc=](|store|, |type|, |ref|). <!-- TODO(littledan): Report allocation failure https://github.com/WebAssembly/spec/issues/584 -->\n    1. Set the [=surrounding agent=]'s [=associated store=] to |store|.\n    1. [=initialize a table object|Initialize=] **this** from |tableaddr|.\n</div>\n\n<div algorithm=dom-Table-grow>\n    The <dfn method for=\"Table\">grow(|delta|, |value|)</dfn> method, when invoked, performs the following steps:\n    1. Let |tableaddr| be **this**.\\[[Table]].\n    1. Let |store| be the [=surrounding agent=]'s [=associated store=].\n    1. Let |initialSize| be [=table_size=](|store|, |tableaddr|).\n    1. Let (<var ignore>limits</var>, |elementType|) be [=table_type=](|tableaddr|).\n    1. If |value| is missing,\n        1. Let |ref| be [=DefaultValue=](|elementType|).\n    1. Otherwise,\n        1. Let |ref| be ? [=ToWebAssemblyValue=](|value|, |elementType|).\n    1. Let |result| be [=table_grow=](|store|, |tableaddr|, |delta|, |ref|).\n    1. If |result| is [=error=], throw a {{RangeError}} exception.\n\n        Note: The above exception can happen due to either insufficient memory or an invalid size parameter.\n\n    1. Set the [=surrounding agent=]'s [=associated store=] to |result|.\n    1. Return |initialSize|.\n</div>\n\n<div algorithm>\n    The getter of the <dfn attribute for=\"Table\">length</dfn> attribute of {{Table}}, when invoked, performs the following steps:\n    1. Let |tableaddr| be **this**.\\[[Table]].\n    1. Let |store| be the [=surrounding agent=]'s [=associated store=].\n    1. Return [=table_size=](|store|, |tableaddr|).\n</div>\n\n<div algorithm>\n    The <dfn method for=\"Table\">get(|index|)</dfn> method, when invoked, performs the following steps:\n    1. Let |tableaddr| be **this**.\\[[Table]].\n    1. Let |store| be the [=surrounding agent=]'s [=associated store=].\n    1. Let |result| be [=table_read=](|store|, |tableaddr|, |index|).\n    1. If |result| is [=error=], throw a {{RangeError}} exception.\n    1. Return [=ToJSValue=](|result|).\n</div>\n\n<div algorithm>\n    The <dfn method for=\"Table\">set(|index|, |value|)</dfn> method, when invoked, performs the following steps:\n    1. Let |tableaddr| be **this**.\\[[Table]].\n    1. Let (<var ignore>limits</var>, |elementType|) be [=table_type=](|tableaddr|).\n    1. If |value| is missing,\n        1. Let |ref| be [=DefaultValue=](|elementType|).\n    1. Otherwise,\n        1. Let |ref| be ? [=ToWebAssemblyValue=](|value|, |elementType|).\n    1. Let |store| be the [=surrounding agent=]'s [=associated store=].\n    1. Let |store| be [=table_write=](|store|, |tableaddr|, |index|, |ref|).\n    1. If |store| is [=error=], throw a {{RangeError}} exception.\n    1. Set the [=surrounding agent=]'s [=associated store=] to |store|.\n</div>\n\n<h3 id=\"globals\">Globals</h3>\n\n<pre class=\"idl\">\nenum ValueType {\n  \"i32\",\n  \"i64\",\n  \"f32\",\n  \"f64\",\n  \"externref\",\n  \"anyfunc\",\n};\n</pre>\n\nNote: this type may be extended with additional cases in future versions of WebAssembly.\n\n<pre class=\"idl\">\ndictionary GlobalDescriptor {\n  required ValueType value;\n  boolean mutable = false;\n};\n\n[LegacyNamespace=WebAssembly, Exposed=(Window,Worker,Worklet)]\ninterface Global {\n  constructor(GlobalDescriptor descriptor, optional any v);\n  any valueOf();\n  attribute any value;\n};\n</pre>\n\nA {{Global}} object represents a single [=global instance=]\nwhich can be simultaneously referenced by multiple {{Instance}} objects. Each\n{{Global}} object has one internal slot:\n\n    * \\[[Global]] : a [=global address=]\n\n<div algorithm>\n    To <dfn>initialize a global object</dfn> |global| from a [=global address=] |globaladdr|, perform the following steps:\n    1. Let |map| be the [=surrounding agent=]'s associated [=Global object cache=].\n    1. Assert: |map|[|globaladdr|] doesn't [=map/exist=].\n    1. Set |global|.\\[[Global]] to |globaladdr|.\n    1. [=map/Set=] |map|[|globaladdr|] to |global|.\n</div>\n\n<div algorithm>\n    To <dfn>create a global object</dfn> from a [=global address=] |globaladdr|, perform the following steps:\n    1. Let |map| be the current [=agent=]'s associated [=Global object cache=].\n    1. If |map|[|globaladdr|] [=map/exists=],\n        1. Return |map|[|globaladdr|].\n    1. Let |global| be a [=/new=] {{Global}}.\n    1. [=initialize a global object|Initialize=] |global| from |globaladdr|.\n    1. Return |global|.\n</div>\n\n<div algorithm>\n    The algorithm <dfn>ToValueType</dfn>(|s|) performs the following steps:\n    1. If |s| equals \"i32\", return [=i32=].\n    1. If |s| equals \"i64\", return [=i64=].\n    1. If |s| equals \"f32\", return [=f32=].\n    1. If |s| equals \"f64\", return [=f64=].\n    1. If |s| equals \"anyfunc\", return [=funcref=].\n    1. If |s| equals \"externref\", return [=externref=].\n    1. Assert: This step is not reached.\n</div>\n\n<div algorithm>\n    The algorithm <dfn>DefaultValue</dfn>(|valuetype|) performs the following steps:\n    1. If |valuetype| equals [=i32=], return [=i32.const=] 0.\n    1. If |valuetype| equals [=i64=], return [=i64.const=] 0.\n    1. If |valuetype| equals [=f32=], return [=f32.const=] 0.\n    1. If |valuetype| equals [=f64=], return [=f64.const=] 0.\n    1. If |valuetype| equals [=funcref=], return [=ref.null=] [=funcref=].\n    1. If |valuetype| equals [=externref=], return [=ToWebAssemblyValue=](undefined, |valuetype|).\n    1. Assert: This step is not reached.\n</div>\n\n<div algorithm>\n    The <dfn constructor for=\"Global\">Global(|descriptor|, |v|)</dfn> constructor, when invoked, performs the following steps:\n    1. Let |mutable| be |descriptor|[\"mutable\"].\n    1. Let |valuetype| be [=ToValueType=](|descriptor|[\"value\"]).\n    1. If |v| is missing,\n        1. Let |value| be [=DefaultValue=](|valuetype|).\n    1. Otherwise,\n        1. Let |value| be [=ToWebAssemblyValue=](|v|, |valuetype|).\n    1. If |mutable| is true, let |globaltype| be [=var=] |valuetype|; otherwise, let |globaltype| be [=const=] |valuetype|.\n    1. Let |store| be the current agent's [=associated store=].\n    1. Let (|store|, |globaladdr|) be [=global_alloc=](|store|, |globaltype|, |value|). <!-- TODO(littledan): Report allocation failure https://github.com/WebAssembly/spec/issues/584 -->\n    1. Set the current agent's [=associated store=] to |store|.\n    1. [=initialize a global object|Initialize=] **this** from |globaladdr|.\n</div>\n\n<div algorithm>\n    The algorithm <dfn>GetGlobalValue</dfn>({{Global}} |global|) performs the following steps:\n    1. Let |store| be the current agent's [=associated store=].\n    1. Let |globaladdr| be |global|.\\[[Global]].\n    1. Let |value| be [=global_read=](|store|, |globaladdr|).\n    1. Return [=ToJSValue=](|value|).\n</div>\n\n<div algorithm>\n    The getter of the <dfn attribute for=\"Global\">value</dfn> attribute of {{Global}}, when invoked, performs the following steps:\n    1. Return [=GetGlobalValue=](**this**).\n\n    The setter of the value attribute of {{Global}}, when invoked, performs the following steps:\n    1. Let |store| be the current agent's [=associated store=].\n    1. Let |globaladdr| be **this**.\\[[Global]].\n    1. Let |mut| |valuetype| be [=global_type=](|store|, |globaladdr|).\n    1. If |mut| is [=const=], throw a {{TypeError}}.\n    1. Let |value| be [=ToWebAssemblyValue=](**the given value**, |valuetype|).\n    1. Let |store| be [=global_write=](|store|, |globaladdr|, |value|).\n    1. If |store| is [=error=], throw a {{RangeError}} exception.\n    1. Set the current agent's [=associated store=] to |store|.\n</div>\n\n<div algorithm>\n    The <dfn method for=\"Global\">valueOf()</dfn> method, when invoked, performs the following steps:\n    1. Return [=GetGlobalValue=](**this**).\n</div>\n\n<h3 id=\"exported-function-exotic-objects\">Exported Functions</h3>\n\nA WebAssembly function is made available in JavaScript as an <dfn>Exported Function</dfn>.\nExported Functions are [=Built-in Function Objects=] which are not constructors, and which have a \\[[FunctionAddress]] internal slot.\nThis slot holds a [=function address=] relative to the [=surrounding agent=]'s [=associated store=].\n\n<div algorithm>\n  The <dfn>name of the WebAssembly function</dfn> |funcaddr| is found by performing the following steps:\n\n    1. Let |store| be the [=surrounding agent=]'s [=associated store=].\n    1. Let |funcinst| be |store|.funcs[|funcaddr|].\n    1. If |funcinst| is of the form {type <var ignore>functype</var>, hostcode |hostfunc|},\n        1. Assert: |hostfunc| is a JavaScript object and [=IsCallable=](|hostfunc|) is true.\n        1. Let |index| be the [=index of the host function=] |funcaddr|.\n    1. Otherwise,\n        1. Let |moduleinst| be |funcinst|.module.\n        1. Assert: |funcaddr| is contained in |moduleinst|.funcaddrs.\n        1. Let |index| be the index of |moduleinst|.funcaddrs where |funcaddr| is found.\n    1. Return ! [=ToString=](|index|).\n</div>\n\n<div algorithm>\n  To create <dfn>a new Exported Function</dfn> from a WebAssembly [=function address=] |funcaddr|, perform the following steps:\n\n    1. Let |map| be the [=surrounding agent=]'s associated [=Exported Function cache=].\n    1. If |map|[|funcaddr|] [=map/exists=],\n        1. Return |map|[|funcaddr|].\n    1. Let |steps| be \"[=call an Exported Function|call the Exported Function=] |funcaddr| with arguments.\"\n    1. Let |realm| be the [=current Realm=].\n    1. Let |function| be [=CreateBuiltinFunction=](|realm|, |steps|, [=%FunctionPrototype%=], &laquo; \\[[FunctionAddress]] &raquo;).\n    1. Set |function|.\\[[FunctionAddress]] to |funcaddr|.\n    1. Let |store| be the [=surrounding agent=]'s [=associated store=].\n    1. Let |functype| be [=func_type=](|store|, |funcaddr|).\n    1. Let [|paramTypes|] → [<var ignore>resultTypes</var>] be |functype|.\n    1. Let |arity| be |paramTypes|'s [=list/size=].\n    1. Perform ! [=SetFunctionLength=](|function|, |arity|).\n    1. Let |name| be the [=name of the WebAssembly function=] |funcaddr|.\n    1. Perform ! [=SetFunctionName=](|function|, |name|).\n    1. [=map/Set=] |map|[|funcaddr|] to |function|.\n    1. Return |function|.\n</div>\n\n<div algorithm>\n  To <dfn>call an Exported Function</dfn> with [=function address=] |funcaddr| and a [=list=] of JavaScript arguments |argValues|, perform the following steps:\n\n    1. Let |store| be the [=surrounding agent=]'s [=associated store=].\n    1. Let |functype| be [=func_type=](|store|, |funcaddr|).\n    1. Let [|parameters|] → [<var ignore>results</var>] be |functype|.\n    1. Let |args| be « ».\n    1. Let |i| be 0.\n    1. [=list/iterate|For each=] |t| of |parameters|,\n        1. If |argValues|'s [=list/size=] &gt; |i|, let |arg| be |argValues|[|i|].\n        1. Otherwise, let |arg| be undefined.\n        1. [=list/Append=] [=ToWebAssemblyValue=](|arg|, |t|) to |args|.\n        1. Set |i| to |i| + 1.\n    1. Let (|store|, |ret|) be the result of [=func_invoke=](|store|, |funcaddr|, |args|).\n    1. Set the [=surrounding agent=]'s [=associated store=] to |store|.\n    1. If |ret| is [=error=], throw an exception. This exception should be a WebAssembly {{RuntimeError}} exception, unless otherwise indicated by <a href=\"#errors\">the WebAssembly error mapping</a>.\n    1. Let |outArity| be the [=list/size=] of |ret|.\n    1. If |outArity| is 0, return undefined.\n    1. Otherwise, if |outArity| is 1, return [=ToJSValue=](|ret|[0]).\n    1. Otherwise,\n        1. Let |values| be « ».\n        1. [=list/iterate|For each=] |r| of |ret|,\n            1. [=list/Append=] [=ToJSValue=](|r|) to |values|.\n        1. Return [=CreateArrayFromList=](|values|).\n</div>\n\nNote: [=call an Exported Function|Calling an Exported Function=] executes in the \\[[Realm]] of the callee Exported Function, as per the definition of [=built-in function objects=].\n\nNote: Exported Functions do not have a \\[[Construct]] method and thus it is not possible to call one with the `new` operator.\n\n<div algorithm>\n  To <dfn>run a host function</dfn> from the JavaScript object |func|, type |functype|, and [=list=] of [=WebAssembly values=] |arguments|, perform the following steps:\n\n    1. Let [<var ignore>parameters</var>] → [|results|] be |functype|.\n    1. Let |jsArguments| be « ».\n    1. [=list/iterate|For each=] |arg| of |arguments|,\n        1. [=list/Append=] ! [=ToJSValue=](|arg|) to |jsArguments|.\n    1. Let |ret| be ? [=Call=](|func|, undefined, |jsArguments|).\n    1. Let |resultsSize| be |results|'s [=list/size=].\n    1. If |resultsSize| is 0, return « ».\n    1. Otherwise, if |resultsSize| is 1, return « ? [=ToWebAssemblyValue=](|ret|, |results|[0]) ».\n    1. Otherwise,\n        1. Let |method| be ? [=GetMethod=](|ret|, [=@@iterator=]).\n        1. If |method| is undefined, [=throw=] a {{TypeError}}.\n        1. Let |values| be ? [=IterableToList=](|ret|, |method|).\n        1. Let |wasmValues| be a new, empty [=list=].\n        1. If |values|'s [=list/size=] is not |resultsSize|, throw a {{TypeError}} exception.\n        1. For each |value| and |resultType| in |values| and |results|, paired linearly,\n            1. [=list/Append=] [=ToWebAssemblyValue=](|value|, |resultType|) to |wasmValues|.\n        1. Return |wasmValues|.\n</div>\n\n<div algorithm>\n  To <dfn>create a host function</dfn> from the JavaScript object |func| and type |functype|, perform the following steps:\n\n    1. Assert: [=IsCallable=](|func|).\n    1. Let |stored settings| be the [=incumbent settings object=].\n    1. Let |hostfunc| be a [=host function=] which performs the following steps when called with arguments |arguments|:\n        1. Let |realm| be |func|'s [=associated Realm=].\n        1. Let |relevant settings| be |realm|'s [=Realm/settings object=].\n        1. [=Prepare to run script=] with |relevant settings|.\n        1. [=Prepare to run a callback=] with |stored settings|.\n        1. Let |result| be the result of [=run a host function|running a host function=] from |func|, |functype|, and |arguments|.\n        1. [=Clean up after running a callback=] with |stored settings|.\n        1. [=Clean up after running script=] with |relevant settings|.\n        1. Assert: |result|.\\[[Type]] is <emu-const>throw</emu-const> or <emu-const>normal</emu-const>.\n        1. If |result|.\\[[Type]] is <emu-const>throw</emu-const>, then trigger a WebAssembly trap, and propagate |result|.\\[[Value]] to the enclosing JavaScript.\n        1. Otherwise, return |result|.\\[[Value]].\n    1. Let |store| be the [=surrounding agent=]'s [=associated store=].\n    1. Let (|store|, |funcaddr|) be [=func_alloc=](|store|, |functype|, |hostfunc|).\n    1. Set the [=surrounding agent=]'s [=associated store=] to |store|.\n    1. Return |funcaddr|.\n</div>\n\n<div algorithm>\nThe algorithm <dfn>ToJSValue</dfn>(|w|) coerces a [=WebAssembly value=] to a JavaScript value by performing the following steps:\n\n1. If |w| is of the form [=i64.const=] |i64|,\n    1. Let |v| be [=signed_64=](|i64|).\n    1. Return a [=BigInt=] representing the mathematical value |v|.\n1. If |w| is of the form [=i32.const=] |i32|, return [=the Number value=] for [=signed_32=](|i32|).\n1. If |w| is of the form [=f32.const=] |f32|, return [=the Number value=] for |f32|.\n1. If |w| is of the form [=f64.const=] |f64|, return [=the Number value=] for |f64|.\n1. If |w| is of the form [=ref.null=] <var ignore>t</var>, return null.\n1. If |w| is of the form [=ref.func=] |funcaddr|, return the result of creating [=a new Exported Function=] from |funcaddr|.\n1. If |w| is of the form [=ref.extern=] |externaddr|, return the result of [=retrieving an extern value=] from |externaddr|.\n\nNote: Number values which are equal to NaN may have various observable NaN payloads; see [=NumberToRawBytes=] for details.\n</div>\n\n<div algorithm>\n\nFor <dfn>retrieving an extern value</dfn> from an [=extern address=] |externaddr|, perform the following steps:\n\n1. Let |map| be the [=surrounding agent=]'s associated [=extern value cache=].\n1. Assert: |map|[|externaddr|] [=map/exists=].\n1. Return |map|[|externaddr|].\n\n</div>\n\n<div algorithm>\nThe algorithm <dfn>ToWebAssemblyValue</dfn>(|v|, |type|) coerces a JavaScript value to a [=WebAssembly value=] by performing the following steps:\n\n1. If |type| is [=i64=],\n    1. Let |i64| be ? [=ToBigInt64=](|v|).\n    1. Return [=i64.const=] |i64|.\n1. If |type| is [=i32=],\n    1. Let |i32| be ? [=ToInt32=](|v|).\n    1. Return [=i32.const=] |i32|.\n1. If |type| is [=f32=],\n    1. Let |f32| be ? [=ToNumber=](|v|) rounded to the nearest representable value using IEEE 754-2008 round to nearest, ties to even mode.\n    1. Return [=f32.const=] |f32|.\n1. If |type| is [=f64=],\n    1. Let |f64| be ? [=ToNumber=](|v|).\n    1. Return [=f64.const=] |f64|.\n1. If |type| is [=funcref=],\n    1. If |v| is null,\n        1. Return [=ref.null=] [=funcref=].\n    1. If |v| is an [=Exported Function=],\n        1. Let |funcaddr| be the value of |v|'s \\[[FunctionAddress]] internal slot.\n        1. Return [=ref.func=] |funcaddr|.\n    1. Throw a {{TypeError}}.\n1. If |type| is [=externref=],\n    1. If |v| is null,\n        1. Return [=ref.null=] [=externref=].\n    1. Let |map| be the [=surrounding agent=]'s associated [=extern value cache=].\n    1. If a [=extern address=] |externaddr| exists such that |map|[|externaddr|] is the same as |v|,\n        1. Return [=ref.extern=] |externaddr|.\n    1. Let [=extern address=] |externaddr| be the smallest address such that |map|[|externaddr|] [=map/exists=] is false.\n    1. [=map/Set=] |map|[|externaddr|] to |v|.\n    1. Return [=ref.extern=] |externaddr|.\n1. Assert: This step is not reached.\n\n</div>\n\n<h3 id=\"error-objects\">Error Objects</h3>\n\nWebAssembly defines the following Error classes: <dfn exception>CompileError</dfn>, <dfn exception>LinkError</dfn>, and <dfn exception>RuntimeError</dfn>.\n\n<div algorithm=\"create the WebAssembly namespace object\">\nWhen the [=namespace object=] for the {{WebAssembly}} namespace is [=create a namespace object|created=], the following steps must be run:\n\n1.  Let |namespaceObject| the [=namespace object=].\n1.  [=list/iterate|For each=] |error| of « \"CompileError\", \"LinkError\", \"RuntimeError\" »,\n    1.  Let |constructor| be a new object, implementing the [=NativeError Object Structure=], with <var ignore>NativeError</var> set to |error|.\n    1.  ! [$CreateMethodProperty$](|namespaceObject|, |error|,  |constructor|).\n\n</div>\n\nNote: This defines {{CompileError}}, {{LinkError}}, and {{RuntimeError}} classes on the {{WebAssembly}} namespace, which are produced by the APIs defined in this specification.\nThey expose the same interface as native JavaScript errors like {{TypeError}} and {{RangeError}}.\n\nNote: It is not currently possible to define this behavior using Web IDL.\n\n\n<h2 id=\"errors\">Error Condition Mappings to JavaScript</h2>\n\nRunning WebAssembly programs encounter certain events which halt execution of the WebAssembly code.\nWebAssembly code (currently)\nhas no way to catch these conditions and thus an exception will necessarily\npropagate to the enclosing non-WebAssembly caller (whether it is a browser,\nJavaScript or another runtime system) where it is handled like a normal JavaScript exception.\n\nIf WebAssembly calls JavaScript via import and the JavaScript throws an\nexception, the exception is propagated through the WebAssembly activation to the\nenclosing caller.\n\nBecause JavaScript exceptions can be handled, and JavaScript can continue to\ncall WebAssembly exports after a trap has been handled, traps do not, in\ngeneral, prevent future execution.\n\n<h3 id=\"stack-overflow\">Stack Overflow</h3>\n\nWhenever a stack overflow occurs in\nWebAssembly code, the same class of exception is thrown as for a stack overflow in\nJavaScript. The particular exception here is implementation-defined in both cases.\n\nNote: ECMAScript doesn't specify any sort of behavior on stack overflow; implementations have been observed to throw {{RangeError}}, InternalError or Error. Any is valid here.\n\n<h3 id=\"out-of-memory\">Out of Memory</h3>\n\nWhenever validation, compilation or instantiation run out of memory, the\nsame class of exception is thrown as for out of memory conditions in JavaScript.\nThe particular exception here is implementation-defined in both cases.\n\nNote: ECMAScript doesn't specify any sort of behavior on out-of-memory conditions; implementations have been observed to throw OOMError and to crash. Either is valid here.\n\n<div class=\"issue\">\n    A failed allocation of a large table or memory may either result in\n        - a {{RangeError}}, as specified in the {{Memory}} {{Memory/grow()}} and {{Table}} {{Table/grow()}} operations\n        - returning -1 as the [=memory.grow=] instruction\n        - UA-specific OOM behavior as described in this section.\n    In a future revision, we may reconsider more reliable and recoverable errors for allocations of large amounts of memory.\n\n    See [Issue 879](https://github.com/WebAssembly/spec/issues/879) for further discussion.\n</div>\n\n<h2 id=\"limits\">Implementation-defined Limits</h2>\n\nThe WebAssembly core specification allows an implementation to define limits on the syntactic structure of the module.\nWhile each embedding of WebAssembly may choose to define its own limits, for predictability the standard WebAssembly JavaScript Interface described in this document defines the following exact limits.\nAn implementation must reject a module that exceeds one of the following limits with a {{CompileError}}:\nIn practice, an implementation may run out of resources for valid modules below these limits.\n\n<ul>\n<li>The maximum size of a module is 1073741824 bytes (1 GiB).</li>\n<li>The maximum number of types defined in the types section is 1000000.</li>\n<li>The maximum number of functions defined in a module is 1000000.</li>\n<li>The maximum number of imports declared in a module is 100000.</li>\n<li>The maximum number of exports declared in a module is 100000.</li>\n<li>The maximum number of globals defined in a module is 1000000.</li>\n<li>The maximum number of data segments defined in a module is 100000.</li>\n\n<li>The maximum number of tables, including declared or imported tables, is 100000.</li>\n<li>The maximum size of a table is 10000000.</li>\n<li>The maximum number of table entries in any table initialization is 10000000.</li>\n<li>The maximum number of memories, including declared or imported memories, is 1.</li>\n\n<li>The maximum number of parameters to any function or block is 1000.</li>\n<li>The maximum number of return values for any function or block is 1000.</li>\n<li>The maximum size of a function body, including locals declarations, is 7654321 bytes.</li>\n<li>The maximum number of locals declared in a function, including implicitly declared as parameters, is 50000.</li>\n</ul>\n\nAn implementation must throw a {{RuntimeError}} if one of the following limits is exceeded during runtime:\nIn practice, an implementation may run out of resources for valid modules below these limits.\n\n<ul>\n<li>The maximum size of a table is 10000000.</li>\n<li>The maximum number of pages of a memory is 65536.</li>\n</ul>\n\n<h2 id=\"security-considerations\">Security and Privacy Considerations</h2>\n\n<p><em>This section is non-normative.</em></p>\n\nThis document defines a host environment for WebAssembly. It enables a WebAssembly instance to [=import=] JavaScript objects and functions from an [=read the imports|import object=], but otherwise provides no access to the embedding environment. Thus a WebAssembly instance is bounds to the same constraints as JavaScript.\n"
  },
  {
    "path": "document/travis-deploy.sh",
    "content": "#!/bin/bash\n\n# Adapted from https://github.com/heycam/webidl/blob/master/deploy.sh\n\nset -e # Exit with nonzero exit code if anything fails\n\nSOURCE_BRANCH=\"master\"\nTARGET_BRANCH=\"gh-pages\"\n\nfunction doCompile {\n  # TODO(littledan): Integrate with document/deploy.sh\n  (cd document; make)\n}\n\n# Pull requests and commits to other branches shouldn't try to deploy, just build to verify\nif [[ \"$TRAVIS_PULL_REQUEST\" != \"false\" || \"$TRAVIS_BRANCH\" != \"$SOURCE_BRANCH\" ]]; then\n  echo \"Skipping deploy; just doing a build.\"\n  doCompile\n  exit 0\nfi\n\n# Save some useful information\nREPO=`git config remote.origin.url`\nSSH_REPO=${REPO/https:\\/\\/github.com\\//git@github.com:}\nSHA=`git rev-parse --verify HEAD`\n\n# Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc\nENCRYPTED_KEY_VAR=\"encrypted_${ENCRYPTION_LABEL}_key\"\nENCRYPTED_IV_VAR=\"encrypted_${ENCRYPTION_LABEL}_iv\"\nENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR}\nENCRYPTED_IV=${!ENCRYPTED_IV_VAR}\nopenssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in deploy_key.enc -out deploy_key -d || true\nchmod 600 deploy_key\neval `ssh-agent -s`\nssh-add deploy_key || true\n\n# DON'T MOVE ABOVE AS IT WILL REVEAL KEYS!\n# Turn on logging from here on.\nset -x\n\n# Clone the existing gh-pages for this repo into _build/\n# Create a new empty branch if gh-pages doesn't exist yet (should only happen\n# on first deploy).\n# Clean document/*/_build.\n(cd document; make clean)\n# Ensure no checkout in _build.\nrm -rf document/_build\n# Clone a second checkout of our repo to _build.\ngit clone $REPO document/_build\n(\n  # Checkout a parentless branch of gh-pages.\n  cd document/_build\n  git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH\n\n  # Clean out existing contents (to be replaced with output from the build\n  # that happens after this).\n  rm -rf ./*\n)\n\n# Run our compile script (output into _build).\ndoCompile\n\n# Set user info on the gh-pages repo in _build.\ncd document/_build\ngit config user.name \"Travis CI\"\ngit config user.email \"$COMMIT_AUTHOR_EMAIL\"\n\n# If there are no changes to the compiled out (e.g. this is a README update) then just bail.\nif [[ -z \"$(git status --porcelain)\" ]]; then\n  echo \"No changes to the output on this push; exiting.\"\n  exit 0\nfi\n\n# Commit the \"changes\", i.e. the new version.\n# The delta will show diffs between new and old versions.\ngit add --all .\ngit commit -m \"Deploy to GitHub Pages: ${SHA}\"\n\n# Now that we're all set up, we can push.\ngit push $SSH_REPO $TARGET_BRANCH\n"
  },
  {
    "path": "document/util/htmldiff.pl",
    "content": "#!/usr/bin/perl\n#\n# htmldiff - present a diff marked version of two html documents\n#\n# Copyright (c) 1998-2006 MACS, Inc.\n#\n# Copyright (c) 2007 SiSco, Inc.\n# \n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the Software, and to\n# permit persons to whom the Software is furnished to do so, subject to\n# the following conditions:\n# \n# The above copyright notice and this permission notice shall be\n# included in all copies or substantial portions of the Software.\n# \n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n#\n# See http://www.themacs.com for more information.\n#\n# usage: htmldiff [[-c] [-l] [-o] oldversion newversion [output]]\n#\n# -c - disable metahtml comment processing\n# -o - disable outputting of old text\n# -l - use navindex to create sequence of diffs\n# oldversion - the previous version of the document\n# newversion - the newer version of the document\n# output - a filename to place the output in. If omitted, the output goes to\n#          standard output.\n#\n# if invoked with no options or arguments, operates as a CGI script. It then\n# takes the following parameters:\n#\n# oldfile - the URL of the original file\n# newfile - the URL of the new file\n# mhtml - a flag to indicate whether it should be aware of MetaHTML comments.\n#\n# requires GNU diff utility\n# also requires the perl modules Getopt::Std\n#\n# NOTE: The markup created by htmldiff may not validate against the HTML 4.0\n# DTD. This is because the algorithm is realtively simple, and there are\n# places in the markup content model where the span element is not allowed.\n# Htmldiff is NOT aware of these places.\n#\n# $Source: /u/sources/public/2009/htmldiff/htmldiff.pl,v $\n# $Revision: 1.7 $\n#\n# $Log: htmldiff.pl,v $\n# Revision 1.7  2018/05/17 14:17:56  dom\n# Summary: take into account no </head>\n#\n# Revision 1.6  2018/05/17 13:53:51  dom\n# Switch from tidy to html5lib for preparing to htmldiff\n#\n# also, adapt a more robust approach to including diff style/script\n#\n# Revision 1.5  2017/03/30 09:04:03  dom\n# Summary: Update link to navigation script\n#\n# Revision 1.4  2017/02/10 10:48:41  dom\n# Remove :focus rule per Simon Pieters request\n#\n# Revision 1.3  2016/10/24 15:06:51  dom\n# Summary: Use nav script always\n#\n# Revision 1.2  2016/10/24 15:04:28  dom\n# Add navigation script\n#\n# Revision 1.1  2014-01-06 08:04:51  dom\n# added copy of htmldiff perl script since aptest.com repo no longer available\n#\n# Revision 1.5  2008/03/05 13:23:16  ahby\n# Fixed a problem with leading whitespace before markup.\n#\n# Revision 1.4  2007/12/13 13:09:16  ahby\n# Updated copyright and license.\n#\n# Revision 1.3  2007/12/13 12:53:34  ahby\n# Changed use of span to ins and del\n#\n# Revision 1.2  2002/02/13 16:27:23  ahby\n# Changed processing model.\n# Improved handling of old text and changed styles.\n#\n# Revision 1.1  2000/07/12 12:20:04  ahby\n# Updated to remove empty spans - this fixes validation problems under\n# strict.\n#\n# Revision 1.11  1999/12/08 19:46:45  ahby\n# Fixed validation errors introduced by placing markup where it didn't\n# belong.\n#\n# Revision 1.10  1999/10/18 13:42:58  ahby\n# Added -o to the usage message.\n#\n# Revision 1.9  1999/05/04 12:29:11  ahby\n# Added an option to turn off the display of old text.\n#\n# Revision 1.8  1999/04/09 14:37:27  ahby\n# Fixed a perl syntax error.\n#\n# Revision 1.7  1999/04/09 14:35:49  ahby\n# Added reference to MACS homepage.\n#\n# Revision 1.6  1999/04/09 14:35:09  ahby\n# Added comment about validity of generated markup.\n#\n# Revision 1.5  1999/02/22 22:17:54  ahby\n# Changed to use stylesheets.\n# Changed to rely upon span.\n# Changed to work around content model problems.\n#\n# Revision 1.4  1999/02/08 02:32:22  ahby\n# Added a copyright statement.\n#\n# Revision 1.3  1999/02/08 02:30:40  ahby\n# Added header processing.\n#\n# Revision 1.2  1998/12/10 17:31:31  ahby\n# Fixed to escape less-thans in change blocks and to not permit change\n# markup within specific elements (like TITLE).\n#\n# Revision 1.1  1998/11/26 00:09:22  ahby\n# Initial revision\n#\n#\n\nuse Getopt::Std;\n\nsub usage {\n\tprint STDERR \"htmldiff [-c] [-o] oldversion newversion [output]\\n\";\n\texit;\n}\n\nsub url_encode {\n    my $str = shift;\n    $str =~ s/([\\x00-\\x1f\\x7F-\\xFF])/\n                 sprintf ('%%%02x', ord ($1))/eg;\n    return $str;\n}\n\n# markit - diff-mark the streams\n#\n# markit(file1, file2)\n#\n# markit relies upon GNUdiff to mark up the text.\n#\n# The markup is encoded using special control sequences:\n#\n#   a block wrapped in control-a is deleted text\n#   a block wrapped in control-b is old text\n#   a block wrapped in control-c is new text\n#\n# The main processing loop attempts to wrap the text blocks in appropriate\n# SPANs based upon the type of text that it is.\n#\n# When the loop encounters a < in the text, it stops the span. Then it outputs\n# the element that is defined, then it restarts the span.\n\nsub markit {\n\tmy $retval = \"\";\n\tmy($file1) = shift;\n\tmy($file2) = shift;\n#\tmy $old=\"<span class=\\\\\\\"diff-old-a\\\\\\\">deleted text: </span>%c'\\012'%c'\\001'%c'\\012'%<%c'\\012'%c'\\001'%c'\\012'\";\n\tmy $old=\"%c'\\012'%c'\\001'%c'\\012'%<%c'\\012'%c'\\001'%c'\\012'\";\n\tmy $new=\"%c'\\012'%c'\\003'%c'\\012'%>%c'\\012'%c'\\003'%c'\\012'\";\n\tmy $unchanged=\"%=\";\n\tmy $changed=\"%c'\\012'%c'\\001'%c'\\012'%<%c'\\012'%c'\\001'%c'\\012'%c'\\004'%c'\\012'%>%c'\\012'%c'\\004'%c'\\012'\";\n\tif ($opt_o) {\n\t\t$old = \"\";\n\t\t$changed = \"%c'\\012'%c'\\004'%c'\\012'%>%c'\\012'%c'\\004'%c'\\012'\";\n\t}\n#\tmy $old=\"%c'\\002'<font color=\\\\\\\"purple\\\\\\\" size=\\\\\\\"-2\\\\\\\">deleted text:</font><s>%c'\\012'%c'\\001'%c'\\012'%<%c'\\012'%c'\\001'%c'\\012'</s>%c'\\012'%c'\\002'\";\n#\tmy $new=\"%c'\\002'<font color=\\\\\\\"purple\\\\\\\"><u>%c'\\012'%c'\\002'%>%c'\\002'</u></font>%c'\\002'%c'\\012'\";\n#\tmy $unchanged=\"%=\";\n#\tmy $changed=\"%c'\\002'<s>%c'\\012'%c'\\001'%c'\\012'%<%c'\\012'%c'\\001'%c'\\012'</s><font color=\\\\\\\"purple\\\\\\\"><u>%c'\\002'%c'\\012'%>%c'\\012'%c'\\002'</u></font>%c'\\002'%c'\\012'\";\n\n\tmy @span;\n\t$span[0]=\"</span>\";\n\t$span[1]=\"<del class=\\\"diff-old\\\">\";\n\t$span[2]=\"<del class=\\\"diff-old\\\">\";\n\t$span[3]=\"<ins class=\\\"diff-new\\\">\";\n\t$span[4]=\"<ins class=\\\"diff-chg\\\">\";\n\t\n\tmy @diffEnd ;\n\t$diffEnd[1] = '</del>';\n\t$diffEnd[2] = '</del>';\n\t$diffEnd[3] = '</ins>';\n\t$diffEnd[4] = '</ins>';\n\n\tmy $diffcounter = 0;\n\n\topen(FILE, qq(diff -d --old-group-format=\"$old\" --new-group-format=\"$new\" --changed-group-format=\"$changed\" --unchanged-group-format=\"$unchanged\" $file1 $file2 |)) || die(\"Diff failed: $!\");\n#\tsystem (qq(diff --old-group-format=\"$old\" --new-group-format=\"$new\" --changed-group-format=\"$changed\" --unchanged-group-format=\"$unchanged\" $file1 $file2 > /tmp/output));\n\n\tmy $state = 0;\n\tmy $inblock = 0;\n\tmy $temp = \"\";\n\tmy $lineCount = 0;\n\n# strategy: \n#\n# process the output of diff...\n#\n# a link with control A-D means the start/end of the corresponding ordinal\n# state (1-4). Resting state is state 0.\n#\n# While in a state, accumulate the contents for that state. When exiting the\n# state, determine if it is appropriate to emit the contents with markup or\n# not (basically, if the accumulated buffer contains only empty lines or lines\n# with markup, then we don't want to emit the wrappers.  We don't need them.\n#\n# Note that if there is markup in the \"old\" block, that markup is silently\n# removed.  It isn't really that interesting, and it messes up the output\n# something fierce.\n\n\twhile (<FILE>) {\n\t\tmy $anchor = $opt_l ? qq[<a tabindex=\"$diffcounter\">] : \"\" ;\n\t\tmy $anchorEnd = $opt_l ? q[</a>] : \"\" ;\n\t\t$lineCount ++;\n\t\tif ($state == 0) {\t# if we are resting and we find a marker, \n\t\t\t\t\t\t\t# then we must be entering a block\n\t\t\tif (m/^([\\001-\\004])/) {\n\t\t\t\t$state = ord($1);\n\t\t\t\t$_ = \"\";\n\t\t\t}\n#\t\t\tif (m/^\\001/) {\n#\t\t\t\t$state = 1;\n#\t\t\t\ts/^/$span[1]/;\n#\t\t\t} elsif (m/^\\002/) {\n#\t\t\t\t$state = 2;\n#\t\t\t\ts/^/$span[2]/;\n#\t\t\t} elsif (m/^\\003/) {\n#\t\t\t\t$state = 3;\n#\t\t\t\ts/^/$span[3]/;\n#\t\t\t} elsif (m/^\\004/) {\n#\t\t\t\t$state = 4;\n#\t\t\t\ts/^/$span[4]/;\n#\t\t\t}\n\t\t} else {\n\t\t\t# if we are in \"old\" state, remove markup\n\t\t\tif (($state == 1) || ($state == 2)) {\n\t\t\t\ts/\\<.*\\>//;\t# get rid of any old markup\n\t\t\t\ts/\\</&lt;/g; # escape any remaining STAG or ETAGs\n\t\t\t\ts/\\>/&gt;/g;\n\t\t\t}\n\t\t\t# if we found another marker, we must be exiting the state\n\t\t\tif (m/^([\\001-\\004])/) {\n\t\t\t\tif ($temp ne \"\") {\n\t\t\t\t\t$_ = $span[$state] . $anchor . $temp . $anchorEnd . $diffEnd[$state] . \"\\n\";\n\t\t\t\t\t$temp = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$_ = \"\" ;\n\t\t\t\t}\n\t\t\t\t$state = 0;\n\t\t\t} elsif (m/^\\s*\\</) { # otherwise, is this line markup?\n\t\t\t\t# if it is markup AND we haven't seen anything else yet,\n\t\t\t\t# then we will emit the markup\n\t\t\t\tif ($temp eq \"\") {\n\t\t\t\t\t$retval .= $_;\n\t\t\t\t\t$_ = \"\";\n\t\t\t\t} else {\t# we wrap it with the state switches and hold it\n\t\t\t\t\ts/^/$anchorEnd$diffEnd[$state]/;\n\t\t\t\t\ts/$/$span[$state]$anchor/;\n\t\t\t\t\t$temp .= $_;\n\t\t\t\t\t$_ = \"\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (m/.+/) {\n\t\t\t\t\t$temp .= $_;\n\t\t\t\t\t$_ = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ts/\\001//g;\n\t\ts/\\002//g;\n\t\ts/\\003//g;\n\t\ts/\\004//g;\n\t\tif ($_ !~ m/^$/) {\n\t\t\t$retval .= $_;\n\t\t}\n\t\t$diffcounter++;\n\t}\n\tclose FILE;\n\t$retval =~ s/$span[1]\\n+$diffEnd[1]//g;\n\t$retval =~ s/$span[2]\\n+$diffEnd[2]//g;\n\t$retval =~ s/$span[3]\\n+$diffEnd[3]//g;\n\t$retval =~ s/$span[4]\\n+$diffEnd[4]//g;\n\t$retval =~ s/$span[1]\\n*$//g;\n\t$retval =~ s/$span[2]\\n*$//g;\n\t$retval =~ s/$span[3]\\n*$//g;\n\t$retval =~ s/$span[4]\\n*$//g;\n\treturn $retval;\n}\n\nsub splitit {\n\tmy $filename = shift;\n\tmy $headertmp = shift;\n\tmy $inheader=0;\n\tmy $preformatted=0;\n\tmy $inelement=0;\n\tmy $retval = \"\";\n\tmy $styles = q(<style type='text/css'>\n.diff-old-a {\n  font-size: smaller;\n  color: red;\n}\n\n.diff-new { background-color: yellow; }\n.diff-chg { background-color: lime; }\n.diff-new:before,\n.diff-new:after\n    { content: \"\\2191\" }\n.diff-chg:before, .diff-chg:after\n    { content: \"\\2195\" }\n.diff-old { text-decoration: line-through; background-color: #FBB; }\n.diff-old:before,\n.diff-old:after\n    { content: \"\\2193\" }\n</style>\n<script src=\"https://w3c.github.io/htmldiff-nav/index.js\"></script>);\n\tif ($opt_t) {\n\t\t$styles .= q(\n<script type=\"text/javascript\">\n<!--\nfunction setOldDisplay() {\n\tfor ( var s = 0; s < document.styleSheets.length; s++ ) {\n\t\tvar css = document.styleSheets[s];\n\t\tvar mydata ;\n\t\ttry { mydata = css.cssRules ;\n\t\tif ( ! mydata ) mydata = css.rules;\n\t\tfor ( var r = 0; r < mydata.length; r++ ) {\n\t\t\tif ( mydata[r].selectorText == '.diff-old' ) {\n\t\t\t\tmydata[r].style.display = ( mydata[r].style.display == '' ) ? 'none'\n: '';\n\t\t\t\treturn;\n\t\t\t}\n\t\t} \n\t\t} catch(e) {} ;\n\t}\n}\n-->\n</script>\n);\n\n\t}\n\t\n\tif ($stripheader) {\n\t\topen(HEADER, \">$headertmp\");\n\t}\n\n\tmy $incomment = 0;\n        my $styleprinted = 0;\n\tmy $inhead = 1;\n\topen(FILE, $filename) || die(\"File $filename cannot be opened: $!\");\n\twhile (<FILE>) {\n\t\tif ($inhead == 1) {\n\t\t\tif (m/\\<\\/head/i) {\n                                s/\\<\\/head/$styles\\<\\/head/i;\n                                $styleprinted = 1;\n\t\t\t}\n\t\t\tif (m/\\<body/i) {\n                                if (!$styleprinted) {\n                                      s/\\<body/$styles\\<body/i;\n                                }\n\t\t\t\t$inhead = 0;\n\t\t\t\tprint HEADER;\n\t\t\t\tif ($opt_t) {\n\t\t\t\t\tprint HEADER q(\n<form action=\"\"><input type=\"button\" onclick=\"setOldDisplay()\" value=\"Show/Hide Old Content\" /></form>\n);\n\t\t\t\t}\n\t\t\t\tclose HEADER;\n\t\t\t} else {\n\t\t\t\tprint HEADER;\n\t\t\t}\n\t\t} else {\n\t\t\tif ($incomment) {\n\t\t\t\tif (m;-->;) {\n\t\t\t\t\t$incomment = 0;\n\t\t\t\t\ts/.*-->//;\n\t\t\t\t} else {\n\t\t\t\t\tnext;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (m;<!--;) {\n\t\t\t\twhile (m;<!--.*-->;) {\n\t\t\t\t\ts/<!--.*?-->//;\n\t\t\t\t}\n\t\t\t\tif (m;<!--; ) {\n\t\t\t\t\t$incomment = 1;\n\t\t\t\t\ts/<!--.*//;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (m/\\<pre/i) {\n\t\t\t\t$preformatted = 1;\n\t\t\t}\n\t\t\tif (m/\\<\\/pre\\>/i) {\n\t\t\t\t$preformatted = 0;\n\t\t\t}\n\t\t\tif ($preformatted) {\n\t\t\t\t$retval .= $_;\n\t\t\t} elsif ($mhtmlcomments && /^;;;/) {\n\t\t\t\t$retval .= $_;\n\t\t\t} else {\n\t\t\t\tmy @list = split(' ');\n\t\t\t\tforeach $element (@list) {\n\t\t\t\t\tif ($element =~ m/\\<H[1-6]/i) {\n#\t\t\t\t\t\t$inheader = 1;\n\t\t\t\t\t}\n\t\t\t\t\tif ($inheader == 0) {\n\t\t\t\t\t\t$element =~ s/</\\n</g;\n\t\t\t\t\t\t$element =~ s/^\\n//;\n\t\t\t\t\t\t$element =~ s/>/>\\n/g;\n\t\t\t\t\t\t$element =~ s/\\n$//;\n\t\t\t\t\t\t$element =~ s/>\\n([.,:!]+)/>$1/g;\n\t\t\t\t\t}\n\t\t\t\t\tif ($element =~ m/\\<\\/H[1-6]\\>/i) {\n\t\t\t\t\t\t$inheader = 0;\n\t\t\t\t\t}\n\t\t\t\t\t$retval .= \"$element\";\n\t\t\t\t\t$inelement += ($element =~ s/</&lt;/g);\n\t\t\t\t\t$inelement -= ($element =~ s/>/&gt;/g);\n\t\t\t\t\tif ($inelement < 0) {\n\t\t\t\t\t\t$inelement = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (($inelement == 0) && ($inheader == 0)) {\n\t\t\t\t\t\t$retval .= \"\\n\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$retval .= \" \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tundef @list;\n\t\t\t}\n\t\t}\n\t}\n\t$retval .= \"\\n\";\n\tclose FILE;\n\treturn $retval;\n}\n\n$mhtmlcomments = 1;\n\nsub cli {\n\tgetopts(\"clto\") || usage();\n\n\tif ($opt_c) {$mhtmlcomments = 0;}\n\n\tif (@ARGV < 2) { usage(); }\n\n\t$file1 = $ARGV[0];\n\t$file2 = $ARGV[1];\n\t$file3 = $ARGV[2];\n\n\t$tmp = splitit($file1, $headertmp1);\n\topen (FILE, \">$tmp1\");\n\tprint FILE $tmp;\n\tclose FILE;\n\n\t$tmp = splitit($file2, $headertmp2);\n\topen (FILE, \">$tmp2\");\n\tprint FILE $tmp;\n\tclose FILE;\n\n\t$output = \"\";\n\n\tif ($stripheader) {\n\t\topen(FILE, $headertmp2);\n\t\twhile (<FILE>) {\n\t\t\t$output .= $_;\n\t\t}\n\t\tclose(FILE);\n\t}\n\n\t$output .= markit($tmp1, $tmp2);\n\n\tif ($file3) {\n\t\topen(FILE, \">$file3\");\n\t\tprint FILE $output;\n\t\tclose FILE;\n\t} else {\n\t\tprint $output;\n\t}\n}\n\nsub cgi {\n#\tuse LWP::UserAgent;\n#\tuse CGI;\n\n\tmy $query = new CGI;\n\tmy $url1 = $query->param(\"oldfile\");\n\tmy $url2 = $query->param(\"newfile\");\n\tmy $mhtml = $query->param(\"mhtml\");\n\n\tmy $file1 = \"/tmp/htdcgi1.$$\";\n\tmy $file2 = \"/tmp/htdcgi2.$$\";\n\n\tmy $ua = new LWP::UserAgent;\n\t$ua->agent(\"MACS, Inc. HTMLdiff/0.9 \" . $ua->agent);\n\n\t# Create a request\n\n\tmy $req1 = new HTTP::Request GET => $url1;\n\n\tmy $res1 = $ua->request($req1, $file1);\n\tif ($res1->is_error) {\n\t\tprint $res1->error_as_HTML();\n\t\tprint \"<p>The URL $url1 could not be found.  Please check it and try again.</p>\";\n\t\treturn;\n\t}\n\n\tmy $req2 = new HTTP::Request GET => $url2;\n\n\tmy $res2 = $ua->request($req2, $file2);\n\tif ($res2->is_error) {\n\t\tprint $res2->error_as_HTML();\n\t\tprint \"<p>The URL $url2 could not be found.  Please check it and try again.</p>\";\n\t\treturn;\n\t}\n\n\t$split1 = splitit($file1, $headertmp1);\n\topen (FILE, \">$tmp1\");\n\tprint FILE $split1;\n\tclose FILE;\n\n\t$split2 = splitit($file2, $headertmp2);\n\topen (FILE, \">$tmp2\");\n\tprint FILE $split2;\n\tclose FILE;\n\n\t$output = \"\";\n\n\tif ($stripheader) {\n\t\topen(FILE, $headertmp2);\n\t\twhile (<FILE>) {\n\t\t\t$output .= $_;\n\t\t}\n\t\tclose(FILE);\n\t}\n\n\t$output .= markit($tmp1, $tmp2);\n\n\tmy $base=$res2->base;\n\n\tif ($base !~ /\\/$/) {\n\t\t$base =~ s/[^\\/]*$//;\n\t}\n\n\tif ( $output !~ /<base/i ) {\n\t\t$output =~ s/<head>/<head>\\n<base href=\"$base\">/i ||\n\t  \t$output =~ s/<html>/<html>\\n<base href=\"$base\">/i ;\n\t}\n\n\tprint $query->header(-type=>'text/html',-nph=>1);\n\tprint $output;\n\n\tunlink $file1;\n\tunlink $file2;\n\n}\n\n$tmp1=\"/tmp/htdtmp1.$$\";\n$headertmp1=\"/tmp/htdhtmp1.$$\";\n$tmp2=\"/tmp/htdtmp2.$$\";\n$headertmp2=\"/tmp/htdhtmp2.$$\";\n$stripheader = 1;\n\nif (@ARGV == 0) {\n\tcgi();\t\t# if no arguments, we must be operating as a cgi script\n} else {\n\tcli();\t\t# if there are arguments, then we are operating as a CLI\n}\n\nunlink $tmp1;\nunlink $headertmp1;\nunlink $tmp2;\nunlink $headertmp2;\n"
  },
  {
    "path": "document/web-api/Makefile",
    "content": "BUILDDIR      = _build\nSTATICDIR     = _static\nDOWNLOADDIR   = _download\nNAME          = WebAssembly\n\n.PHONY: all\nall:\n\tmkdir -p $(BUILDDIR)/html\n\tbikeshed spec index.bs $(BUILDDIR)/html/index.html\n\t@echo \"Build finished. The HTML pages are in `pwd`/$(BUILDDIR)/html.\"\n\n.PHONY: publish\npublish:\n\t(cd ..; make publish-web-api)\n\n.PHONY: clean\nclean:\n\trm -rf $(BUILDDIR)\n\trm -rf $(STATICDIR)\n\n.PHONY: diff\ndiff: all\n\t@echo \"Downloading the old single-file html spec...\"\n\tcurl `grep \"^TR\" index.bs | cut -d' ' -f2` -o $(BUILDDIR)/html/old.html\n\t@echo \"Done.\"\n\t@echo \"Diffing new against old...\"\n\tperl ../util/htmldiff.pl $(BUILDDIR)/html/old.html $(BUILDDIR)/html/index.html $(BUILDDIR)/html/diff.html\n\t@echo \"Done. The diff is at $(BUILDDIR)/html/diff.html\"\n\n.PHONY: WD-tar\nWD-tar:\n\tbikeshed echidna --just-tar index.bs $(BUILDDIR)/html/index.html\n\tmv test.tar $(BUILDDIR)/WD.tar\n\t@echo \"Built $(BUILDDIR)/WD.tar.\"\n\n.PHONY: WD-echidna\nWD-echidna:\n\t@if [ -z $(W3C_USERNAME) ] || \\\n\t    [ -z $(W3C_PASSWORD) ] || \\\n\t\t\t[ -z $(DECISION_URL) ] ; then \\\n\t\techo \"Must provide W3C_USERNAME, W3C_PASSWORD, and DECISION_URL environment variables\"; \\\n\t\texit 1; \\\n\tfi\n\tbikeshed echidna index.bs --u $(W3C_USERNAME) --p $(W3C_PASSWORD) --d $(DECISION_URL)\n"
  },
  {
    "path": "document/web-api/index.bs",
    "content": "<pre class='metadata'>\nTitle: WebAssembly Web API\nShortname: wasm-web-api\nGroup: wasm\nStatus: ED\nLevel: 1\nTR: https://www.w3.org/TR/wasm-web-api-1/\nED: https://webassembly.github.io/spec/web-api/\nEditor: Ms2ger (Igalia)\nRepository: WebAssembly/spec\nAbstract: This document describes the integration of WebAssembly with the broader web platform.\nMarkup Shorthands: css no, markdown yes\nPrepare For TR: true\n</pre>\n\n<pre class='biblio'>\n{\n  \"ECMA-262\": {\n    \"href\": \"https://tc39.github.io/ecma262\",\n    \"title\": \"ECMAScript® Language Specification\",\n    \"publisher\": \"ECMA TC39\",\n    \"status\": \"Current Editor's Draft\"\n  },\n  \"WEBASSEMBLY\": {\n    \"href\": \"https://webassembly.github.io/spec/core/\",\n    \"title\": \"WebAssembly Core Specification\",\n    \"publisher\": \"W3C WebAssembly Community Group\",\n    \"status\": \"Draft\"\n  },\n  \"WASMJS\": {\n    \"href\": \"https://webassembly.github.io/spec/js-api/\",\n    \"title\": \"WebAssembly JS Integration Specification\",\n    \"publisher\": \"W3C WebAssembly Community Group\",\n    \"status\": \"Draft\"\n  },\n  \"SECURECONTEXTS\": {\n    \"href\": \"https://w3c.github.io/webappsec-secure-contexts/\",\n    \"title\": \"Secure Contexts\",\n    \"publisher\": \"WebAppSec WG\",\n    \"status\": \"Candidate Recommendation\"\n  }\n}\n</pre>\n\n<pre class=\"anchors\">\nurlPrefix: https://tc39.github.io/ecma262/; spec: ECMA-262\n    type: exception; for: ECMAScript\n        text: TypeError; url: sec-native-error-types-used-in-this-standard-typeerror\n    type: interface\n        text: ArrayBuffer; url: sec-arraybuffer-objects\n    type: dfn\n        text: agent cluster; url: sec-agent-clusters\n        text: current Realm; url: current-realm\nurlPrefix: https://webassembly.github.io/spec/core/; spec: WebAssembly; type: dfn\n    text: function index; url: syntax/modules.html#syntax-funcidx\n    text: name section; url: appendix/custom.html?highlight=name%20section#binary-namesec\nurlPrefix: https://webassembly.github.io/spec/js-api/; spec: WASMJS\n    type: namespace\n        text: WebAssembly; url: #namespacedef-webassembly\n    type: exception\n        text: CompileError; url: #exceptiondef-compileerror\n    type: interface\n        text: Module; url: #module\n        text: WebAssemblyInstantiatedSource; url: #dictdef-webassemblyinstantiatedsource\n    type: dfn\n        text: compile a WebAssembly module; url: #compile-a-webassembly-module\n        text: instantiate a WebAssembly module; url: #instantiate-a-webassembly-module\n        text: instantiate; url: #dom-webassembly-instantiate\n        text: asynchronously compile a webassembly module; url: #asynchronously-compile-a-webassembly-module\n        text: instantiate a promise of a module; url: #instantiate-a-promise-of-a-module\n        text: Exported Function; url: #exported-function\nurl:https://html.spec.whatwg.org/#cors-same-origin;text:CORS-same-origin;type:dfn;spec:HTML\nurl:https://fetch.spec.whatwg.org/#concept-body-consume-body;text:consume body;type:dfn;spec:FETCH\nurl:https://w3c.github.io/webappsec-secure-contexts/#environment-settings-object-contextually-secure; text:contextually secure; type: dfn; spec: SECURECONTEXTS\n</pre>\n\n<pre class='link-defaults'>\nspec:ecma-262; type:exception; for:ECMAScript; text:TypeError\nspec:webidl; type:dfn; text:resolve\n</pre>\n\nThis document builds off of the WebAssembly specification [[WEBASSEMBLY]] and the WebAssembly JavaScript embedding [[WASMJS]].\n\n<h2 id=\"streaming-modules\">Streaming Module Compilation and Instantiation</h2>\n\n<pre class=\"idl\">\n[Exposed=(Window,Worker)]\npartial namespace WebAssembly {\n  Promise&lt;Module> compileStreaming(Promise&lt;Response> source);\n  Promise&lt;WebAssemblyInstantiatedSource> instantiateStreaming(\n      Promise&lt;Response> source, optional object importObject);\n};\n</pre>\n\n<div algorithm>\nThe <dfn method for=\"WebAssembly\">compileStreaming(|source|)</dfn> method, when invoked, returns the result of [=compile a potential WebAssembly response|compiling a potential WebAssembly response=] with |source|.\n</div>\n\n<div algorithm>\nThe <dfn method for=\"WebAssembly\">instantiateStreaming(|source|, |importObject|)</dfn> method, when invoked, performs the following steps:\n\n    1. Let |promiseOfModule| be the result of [=compile a potential WebAssembly response|compiling a potential WebAssembly response=] with |source|.\n    1. Return the result of [=instantiate a promise of a module|instantiating the promise of a module=] |promiseOfModule| with imports |importObject|.\n</div>\n\n<div algorithm>\nTo <dfn>compile a potential WebAssembly response</dfn> with a promise of a {{Response}} |source|, perform the following steps:\n\nNote: This algorithm accepts a {{Response}} object, or a\n    promise for one, and compiles and instantiates the resulting bytes of the response. This compilation\n    can be performed in the background and in a streaming manner. If the {{Response}} is not\n    [=CORS-same-origin=], does not represent an [=ok status=], or does not match the\n    `` `application/wasm` `` MIME type, the returned promise will be rejected with a {{TypeError}}; if\n    compilation or instantiation fails, the returned promise will be rejected with a\n    {{CompileError}} or other relevant error type, depending on the cause of failure.\n\n\n    1. Let |returnValue| be [=a new promise=]\n    1. [=Upon fulfillment=] of |source| with value |unwrappedSource|:\n        1. Let |response| be |unwrappedSource|'s [=Response/response=].\n        1. Let |mimeType| be the result of [=extracting a MIME type=] from |response|'s [=response/header list=].\n        1. If |mimeType| is not `` `application/wasm` ``, reject |returnValue| with a {{TypeError}} and abort these substeps.\n\n            Note: extra parameters are not allowed, including the empty `` `application/wasm;` ``.\n\n        1. If |response| is not [=CORS-same-origin=], [=reject=] |returnValue| with a {{TypeError}} and abort these substeps.\n        1. If |response|'s [=response/status=] is not an [=ok status=], [=reject=] |returnValue| with a {{TypeError}} and abort these substeps.\n        1. [=Consume body|consume=] |response|'s body as an {{ArrayBuffer}}, and let |bodyPromise| be the result.\n\n            Note: Although it is specified here that the response is consumed entirely before compilation proceeds, that is purely for ease of specification; implementations are likely to instead perform processing in a streaming fashion. The difference is unobservable, and thus the simpler model is specified. <!-- Using consume is a bit silly as it creates an ArrayBuffer but then we just want the underlying bytes. This is because of how streams is specced in terms of promises and JS objects whereas we want to operate more directly on the underlying concept. We can revisit this if things change in the Streams/Fetch specs. -->\n\n        1. [=Upon fulfillment=] of |bodyPromise| with value |bodyArrayBuffer|:\n            1. Let |stableBytes| be a [=get a copy of the buffer source|copy of the bytes held by the buffer=] |bodyArrayBuffer|.\n            1. [=Asynchronously compile a WebAssembly module|Asynchronously compile the WebAssembly module=] |stableBytes| using the [=networking task source=] and [=resolve=] |returnValue| with the result.\n        1. [=Upon rejection=] of |bodyPromise| with reason |reason|:\n            1. [=Reject=] |returnValue| with |reason|.\n     1. [=Upon rejection=] of |source| with reason |reason|:\n         1. [=Reject=] |returnValue| with |reason|.\n     1. Return |returnValue|.\n</div>\n\n<h2 id=\"serialization\">Serialization</h2>\n\nWeb user agents must augment the {{Module}} interface with the <code>[<a extended-attribute>Serializable</a>]</code> extended attribute.\n\nThe [=serialization steps=], given |value|, |serialized|, and |forStorage|, are:\n\n    1. If |forStorage| is true, throw a \"<a exception>DataCloneError</a>\" {{DOMException}}\n\n    1. Set |serialized|.\\[[Bytes]] to the [=sub-serialization=] of |value|.\\[[Bytes]].\n\n    1. Set |serialized|.\\[[AgentCluster]] to the [=current Realm=]'s corresponding [=agent cluster=].\n\nThe [=deserialization steps=], given |serialized| and |value|, are:\n\n    1. Let |bytes| be the [=sub-deserialization=] of |serialized|.\\[[Bytes]].\n\n    1. Set |value|.\\[[Bytes]] to |bytes|.\n\n    1. If |targetRealm|'s corresponding [=agent cluster=] is not |serialized|.\\[[AgentCluster]], then throw a \"<a exception>DataCloneError</a>\" {{DOMException}}.\n\n    1. [=Compile a WebAssembly module=] from |bytes| and set |value|.\\[[Module]] to the result.\n\nEngines should attempt to share/reuse internal compiled code when performing\na structured serialization, although in corner cases like CPU upgrade or browser\nupdate, this might not be possible and full recompilation may be necessary.\n\nNote: The semantics of a structured serialization is as-if the binary source, from which the\n{{Module}} was compiled, is serialized, then deserialized, and recompiled into the target realm.\nGiven the above engine optimizations, structured serialization provides developers\nexplicit control over both compiled-code caching and cross-window/worker code\nsharing.\n\n<h2 id=\"conventions\">Developer-Facing Display Conventions</h2>\n\n<em>This section is non-normative.</em>\n\nBrowsers, JavaScript engines, and offline tools have common ways of referring to\nJavaScript artifacts and language constructs. For example, locations in\nJavaScript source code are printed in stack traces or error messages, and are\nrepresented naturally as decimal-format lines and columns in text files. Names\nof functions and variables are taken directly from the sources. Therefore (for\nexample) even though the exact format of implementation-dependent stack trace\nstrings does not always match, the locations are easily understandable and the\nsame across browsers.\n\nTo achieve the same goal of a common representations for WebAssembly constructs, the\nfollowing conventions are adopted.\n\nA WebAssembly location is a reference to a particular instruction in the binary, and may be\ndisplayed by a browser or engine in similar contexts as JavaScript source locations.\nIt has the following format:\n\n`${url}:wasm-function[${funcIndex}]:${pcOffset}`\n\nWhere\n* `${url}` is the URL associated with the module, if applicable (see notes).\n* `${funcIndex}` is the [=function index=] relative to the module.\n* `${pcOffset}` is the offset in the module binary of the first byte of the instruction, printed in hexadecimal with lower-case digits, with a leading `0x` prefix.\n\nNotes:\n* The URL field may be interpreted differently depending on the\n    context. When the response-based\n    instantiation <a href=\"#streaming-modules\">API</a> is used in a\n    browser, the associated URL should be used; or when the\n    {{ArrayBuffer}}-based instantiation\n    [=instantiate|API=] is used, the browser should represent\n    the location of the API call. This kind of instantiation is analogous to\n    executing JavaScript using `eval`; therefore if the browser has an existing\n    method to represent the location of the `eval` call it can use a similar\n    one for `WebAssembly.instantiate`. For example if the browser uses\n    `foo.js line 10 > eval` or `eval at bar (foo.js:10:3)` for `eval`, it could\n    use `foo.js line 10 > WebAssembly.instantiate` or\n    `WebAssembly.instantiate at bar (foo.js:10:3)`, respectively.\n    Offline tools may use a filename instead.\n* Using hexadecimal for module offsets matches common conventions in native tools\n    such as `objdump` (where addresses are printed in hex) and makes them visually\n    distinct from JavaScript line numbers. Other numbers are represented in decimal.\n\nWhile the \"name\" property of an [=Exported Function=] instance\nis specified by the [[WASMJS|JS API]], synthesized function names are also\ndisplayed in other contexts like call stacks in debuggers and string representations\nof stack traces.\nIf a WebAssembly module contains a [=name section=],\nthese names should be used to synthesize a function name as follows:\n* If a function name subsection is present, the displayed name should be `${module_name}.${function_name}` or `${function_name}`, depending on whether the module name is present.\n* Otherwise, the output can be context-dependent:\n    * If the function name is shown alongside its location in a stack trace, then just the module name (if present) or an empty string can be used (because the function index is already in the location).\n    * Otherwise, `${module_name}.wasm-function[${funcIndex}]` or `wasm-function[${funcIndex}]` should be used to convey the function index.\n\nNote that this document does not specify the full format of strings such as\nstack frame representations; this allows engines to continue using their\nexisting formats for JavaScript (which existing code may already be depending\non) while still printing WebAssembly frames in a format consistent with\nJavaScript.\n\n<h2 id=\"mediaType\">Media-type Registration</h2>\n\nThis section will be submitted to the Internet Engineering Steering Group (IESG) for\nreview, approval, and registration with IANA.\n\napplication/wasm\n\n<dl>\n<dt>Type Name:</dt>\n <dd>application</dd>\n<dt>Subtype Name:</dt>\n <dd>wasm</dd>\n<dt>Required Parameters:</dt>\n <dd>None</dd>\n<dt>Optional Parameters:</dt>\n <dd>None</dd>\n<dt>Encoding Considerations:</dt>\n <dd>binary</dd>\n<dt>Security Considerations:</dt>\n <dd>\n  <p>WebAssembly is a standard, a safe, portable, low-level code format. The\n  security considerations associated with executing WebAssembly code are\n  described in https://www.w3.org/TR/wasm-core/#security-considerations.</p>\n  <p>The WebAssembly format includes no integrity or privacy protection. If\n  such protection is needed it must be provided externally, e.g., through\n  the use of HTTPS.</p>\n </dd>\n<dt>Interoperability Considerations:</dt>\n <dd>See WebAssembly Core Conformance<br/>\n https://www.w3.org/TR/wasm-core/#conformance</dd>\n<dt>Published specification:</dt>\n <dd>https://www.w3.org/TR/wasm-core-1/\n https://www.w3.org/TR/wasm-js-api-1/\n https://www.w3.org/TR/wasm-web-api-1/</dd>\n<dt>Application Usage:</dt>\n <dd>The application/wasm media type is intended for use as the type used to\n describe WebAssembly files when sent over HTTP to be executed by browsers,\n which is a common scenario. Additionally, the type is used by several\n WebAssembly runtimes that take advantage of the safety and portability\n while targeting efficient execution and compact representation.</dd>\n<dt>Fragment Identifier Considerations:</dt>\n <dd>None</dd>\n<dt>Restrictions on usage:</dt>\n <dd>None</dd>\n<dt>Provisional Registrations:</dt>\n <dd>N/A</dd>\n<dt>Additional information:</dt>\n<dd><dl>\n <dt>Deprecated alias names for this type:</dt>\n <dd>None</dd>\n <dt>Magic number(s):</dt>\n <dd>0x00 0x61 0x73 0x6D</dd>\n <dt>File extension(s):</dt>\n <dd>.wasm</dd>\n <dt>Macintosh file type code(s):</dt>\n <dd>None</dd>\n <dt>Object Identifier(s) or OID(s):</dt>\n <dd>None</dd>\n</dl></dd>\n<dt>Intended usage:</dt>\n <dd>Common</dd>\n<dt>Other Information &amp; Comments:</dt>\n <dd>Common</dd>\n<dt>Contact Person:</dt>\n<dd><dl>\n <dt>Contact Name:</dt>\n <dd>Eric Prud'hommeaux</dd>\n <dt>Contact Email Address:</dt>\n <dd>eric@w3.org</dd>\n <dt>Author/Change Controller:</dt>\n <dd>W3C</dd>\n</dl></dd>\n"
  },
  {
    "path": "interpreter/.gitignore",
    "content": "*.cmo\n*.cmx\n*.native\n*.byte\n*.opt\n*.unopt\n*.js\n*.zip\n*.mlpack\n_build\nwasm\nwasm.debug\n\n"
  },
  {
    "path": "interpreter/.merlin",
    "content": "S binary\nS exec\nS host\nS main\nS runtime\nS script\nS syntax\nS text\nS util\nS valid\n\nB _build/*\n"
  },
  {
    "path": "interpreter/LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"{}\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright {yyyy} {name of copyright owner}\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n"
  },
  {
    "path": "interpreter/Makefile",
    "content": "# This Makefile uses ocamlbuild but does not rely on ocamlfind or the Opam\n# package manager to build. However, Opam package management is available\n# optionally through the check/install/uninstall targets.\n#\n# The $(JSLIB) target requires node.js and BuckleScript.\n#\n# See README.me for instructions.\n\n\n# Configuration\n\nNAME =\t\twasm\nUNOPT = \t$(NAME).debug\nOPT =   \t$(NAME)\nLIB =\t\t$(NAME)\nZIP =\t\t$(NAME).zip\nJSLIB =\t\twast.js\nWINMAKE =\twinmake.bat\n\nDIRS =\t\tutil syntax binary text valid runtime exec script host main\nLIBS =\t\tbigarray\nFLAGS = \t-lexflags -ml -cflags '-w +a-4-27-42-44-45 -warn-error +a-3'\nOCBA =\t\tocamlbuild $(FLAGS) $(DIRS:%=-I %)\nOCB =\t\t$(OCBA) $(LIBS:%=-libs %)\nJS =\t\t# set to JS shell command to run JS tests\n\n\n# Main targets\n\n.PHONY:\t\tdefault opt unopt libopt libunopt jslib all land zip\n\ndefault:\topt\ndebug:\t\tunopt\nopt:\t\t$(OPT)\nunopt:\t\t$(UNOPT)\nlibopt:\t\t_build/$(LIB).cmx _build/$(LIB).cmxa\nlibunopt:\t_build/$(LIB).cmo _build/$(LIB).cma\njslib:\t\t$(JSLIB)\nall:\t\tunopt opt libunopt libopt test\nland:\t\t$(WINMAKE) all\nzip: \t\t$(ZIP)\n\n\n# Building executable\n\nempty =\nspace =\t\t$(empty) $(empty)\ncomma =\t\t,\n\n.INTERMEDIATE:\t_tags\n_tags:\n\t\techo >$@ \"true: bin_annot\"\n\t\techo >>$@ \"true: debug\"\n\t\techo >>$@ \"<{$(subst $(space),$(comma),$(DIRS))}/*.cmx>: for-pack($(PACK))\"\n\n$(UNOPT):\tmain.byte\n\t\tmv $< $@\n\n$(OPT):\t\tmain.native\n\t\tmv $< $@\n\n.PHONY:\t\tmain.byte main.native\nmain.byte:\t_tags\n\t\t$(OCB) -quiet $@\n\nmain.native:\t_tags\n\t\t$(OCB) -quiet $@\n\n\n# Building library\n\nFILES =\t\t$(shell ls $(DIRS:%=%/*.ml*))\nPACK =\t\t$(shell echo `echo $(LIB) | sed 's/^\\(.\\).*$$/\\\\1/g' | tr [:lower:] [:upper:]``echo $(LIB) | sed 's/^.\\(.*\\)$$/\\\\1/g'`)\n\n.INTERMEDIATE:\t$(LIB).mlpack\n$(LIB).mlpack:\t$(DIRS)\n\t\tls $(DIRS:%=%/*.ml*) \\\n\t\t| sed 's:\\(.*/\\)\\{0,1\\}\\(.*\\)\\.[^\\.]*:\\2:' \\\n\t\t| grep -v main \\\n\t\t| sort | uniq \\\n\t\t>$@\n\n.INTERMEDIATE: $(LIB).mllib\n$(LIB).mllib:\n\t\techo Wasm >$@\n\n_build/$(LIB).cmo: $(FILES) $(LIB).mlpack _tags Makefile\n\t\t$(OCB) -quiet $(LIB).cmo\n\n_build/$(LIB).cmx: $(FILES) $(LIB).mlpack _tags Makefile\n\t\t$(OCB) -quiet $(LIB).cmx\n\n_build/$(LIB).cma: $(FILES) $(LIB).mlpack _tags Makefile\n\t\t$(OCBA) -quiet $(LIB).cma\n\n_build/$(LIB).cmxa: $(FILES) $(LIB).mlpack _tags Makefile\n\t\t$(OCBA) -quiet $(LIB).cmxa\n\n\n# Building JavaScript library\n\n.PHONY:\t\t$(JSLIB)\n$(JSLIB):\t$(UNOPT)\n\t\tmkdir -p _build/jslib/src\n\t\tcp meta/jslib/* _build/jslib\n\t\tcp $(DIRS:%=_build/%/*.ml*) meta/jslib/*.ml _build/jslib/src\n\t\trm _build/jslib/src/*.ml[^i]\n\t\t(cd _build/jslib; ./build.sh ../../$@)\n\n\n# Building Windows build file\n\n$(WINMAKE):\tclean\n\t\techo rem Auto-generated from Makefile! >$@\n\t\techo set NAME=$(NAME) >>$@\n\t\techo if \\'%1\\' neq \\'\\' set NAME=%1 >>$@\n\t\t$(OCB) main.byte \\\n\t\t| grep -v ocamldep \\\n\t\t| grep -v mkdir \\\n\t\t| sed s:`which ocaml`:ocaml:g \\\n\t\t| sed s:main/main.d.byte:%NAME%.exe: \\\n\t\t>>$@\n\n\n# Executing test suite\n\nTESTDIR =\t../test/core\nTESTFILES =\t$(shell cd $(TESTDIR); ls *.wast)\nTESTS =\t\t$(TESTFILES:%.wast=%)\n\n.PHONY:\t\ttest debugtest partest\n\ntest:\t\t$(OPT)\n\t\t$(TESTDIR)/run.py --wasm `pwd`/$(OPT) $(if $(JS),--js '$(JS)',)\ndebugtest:\t$(UNOPT)\n\t\t$(TESTDIR)/run.py --wasm `pwd`/$(UNOPT) $(if $(JS),--js '$(JS)',)\n\ntest/%:\t\t$(OPT)\n\t\t$(TESTDIR)/run.py --wasm `pwd`/$(OPT) $(if $(JS),--js '$(JS)',) $(TESTDIR)/$(@F).wast\ndebugtest/%:\t$(UNOPT)\n\t\t$(TESTDIR)/run.py --wasm `pwd`/$(UNOPT) $(if $(JS),--js '$(JS)',) $(TESTDIR)/$(@F).wast\n\nrun/%:\t\t$(OPT)\n\t\t./$(OPT) $(TESTDIR)/$(@F).wast\ndebug/%:\t$(UNOPT)\n\t\t./$(UNOPT) $(TESTDIR)/$(@F).wast\n\npartest: \t$(TESTS:%=quiettest/%)\n\t\t@echo All tests passed.\n\nquiettest/%:\t$(OPT)\n\t\t@ ( \\\n\t\t  $(TESTDIR)/run.py 2>$(@F).out --wasm `pwd`/$(OPT) $(if $(JS),--js '$(JS)',) $(@F:%=$(TESTDIR)/%.wast) && \\\n\t\t  rm $(@F).out \\\n\t\t) || \\\n\t\tcat $(@F).out || rm $(@F).out || exit 1\n\n\n# Miscellaneous targets\n\n.PHONY:\t\tclean\n\n$(ZIP):\t\t$(WINMAKE)\n\t\tgit archive --format=zip --prefix=$(NAME)/ -o $@ HEAD\n\nclean:\n\t\trm -rf _build/jslib $(LIB).mlpack _tags\n\t\t$(OCB) -clean\n\n\n# Opam support\n\n.PHONY:\t\tcheck install uninstall\n\ncheck:\n\t\t# Check that we can find all relevant libraries\n\t\t# when using ocamlfind\n\t\tocamlfind query $(LIBS)\n\ninstall:\t_build/$(LIB).cmx _build/$(LIB).cmo\n\t\tocamlfind install $(LIB) meta/findlib/META _build/$(LIB).o \\\n\t\t  $(wildcard _build/$(LIB).cm*) \\\n\t\t  $(wildcard $(DIRS:%=%/*.mli))\n\nuninstall:\n\t\tocamlfind remove $(LIB)\n"
  },
  {
    "path": "interpreter/README.md",
    "content": "# WebAssembly Reference Interpreter\n\nThis repository implements a interpreter for WebAssembly. It is written for clarity and simplicity, _not_ speed. It is intended as a playground for trying out ideas and a device for nailing down the exact semantics, and as a proxy for the (yet to be produced) formal specification of WebAssembly. For that purpose, the code is written in a fairly declarative, \"speccy\" way.\n\nThe interpreter can\n\n* *decode*/*parse* and *validate* modules in binary or text format\n* *execute* scripts with module definitions, invocations, and assertions\n* *convert* between binary and text format (both directions)\n* *export* test scripts to self-contained JavaScript test cases\n* *run* as an interactive interpreter\n\nThe text format defines modules in S-expression syntax. Moreover, it is generalised to a (very dumb) form of *script* that can define multiples module and a batch of invocations, assertions, and conversions between them. As such it is richer than the binary format, with the additional functionality purely intended as testing infrastructure. (See [below](#scripts) for details.)\n\n\n## Building\n\nYou'll need OCaml 4.07 or higher. Instructions for installing a recent version of OCaml on multiple platforms are available [here](https://ocaml.org/docs/install.html). On most platforms, the recommended way is through [OPAM](https://ocaml.org/docs/install.html#OPAM).\n\nOnce you have OCaml, simply do\n\n```\nmake\n```\nYou'll get an executable named `./wasm`. This is a byte code executable. If you want a (faster) native code executable, do\n```\nmake opt\n```\nTo run the test suite,\n```\nmake test\n```\nTo do everything:\n```\nmake all\n```\nBefore committing changes, you should do\n```\nmake land\n```\nThat builds `all`, plus updates `winmake.bat`.\n\n\n#### Building on Windows\n\nThe instructions depend on how you [installed OCaml on Windows](https://ocaml.org/docs/install.html#Windows).\n\n1. *Cygwin*: If you want to build a native code executable, or want to hack on the interpreter (i.e., use incremental compilation), then you need to install the Cygwin core that is included with the OCaml installer. Then you can build the interpreter using `make` in the Cygwin terminal, as described above.\n\n2. *Windows Subsystem for Linux* (WSL): You can build the interpreter using `make`, as described above.\n\n3. *From source*: If you just want to build the interpreter and don't care about modifying it, you don't need to install the Cygwin core that comes with the installer. Just install OCaml itself and run\n```\nwinmake.bat\n```\nin a Windows shell, which creates a program named `wasm`. Note that this will be a byte code executable only, i.e., somewhat slower.\n\nIn any way, in order to run the test suite you'll need to have Python installed. If you used Option 3, you can invoke the test runner `runtests.py` directly instead of doing it through `make`.\n\n\n\n#### Cross-compiling the Interpreter to JavaScript ####\n\nThe Makefile also provides a target to compile (parts of) the interpreter into a [JavaScript library](#javascript-library):\n```\nmake wast.js\n```\nBuilding this target requires node.js and BuckleScript.\n\n\n## Synopsis\n\n#### Running Modules or Scripts\n\nYou can call the executable with\n\n```\nwasm [option | file ...]\n```\n\nwhere `file`, depending on its extension, either should be a binary (`.wasm`) or textual (`.wat`) module file to be loaded, or a script file (`.wast`, see below) to be run.\n\nBy default, the interpreter validates all modules.\nThe `-u` option selects \"unchecked mode\", which skips validation and runs code as is.\nRuntime type errors will be captured and reported appropriately.\n\n#### Converting Modules or Scripts\n\nA file prefixed by `-o` is taken to be an output file. Depending on its extension, this will write out the preceding module definition in either S-expression or binary format. This option can be used to convert between the two in both directions, e.g.:\n\n```\nwasm -d module.wat -o module.wasm\nwasm -d module.wasm -o module.wat\n```\n\nIn the second case, the produced script contains exactly one module definition.\nThe `-d` option selects \"dry mode\" and ensures that the input module is not run, even if it has a start section.\nIn addition, the `-u` option for \"unchecked mode\" can be used to convert even modules that do not validate.\n\nThe interpreter can also convert entire test scripts:\n\n```\nwasm -d script.wast -o script.bin.wast\nwasm -d script.wast -o script2.wast\nwasm -d script.wast -o script.js\n```\n\nThe first creates a new test scripts where all embedded modules are converted to binary, the second one where all are converted to textual.\n\nThe last invocation produces an equivalent, self-contained JavaScript test file.\nThe flag `-h` can be used to omit the test harness from the converted file;\nit then is the client's responsibility to provide versions of the necessary functions.\n\n#### Command Line Expressions\n\nFinally, the option `-e` allows to provide arbitrary script commands directly on the command line. For example:\n\n```\nwasm module.wasm -e '(invoke \"foo\")'\n```\n\n#### Interactive Mode\n\nIf neither a file nor any of the previous options is given, you'll land in the REPL and can enter script commands interactively. You can also get into the REPL by explicitly passing `-` as a file name. You can do that in combination to giving a module or script file, so that you can then invoke its exports interactively, e.g.:\n\n```\nwasm module.wat -\n```\n\nSee `wasm -h` for (the few) additional options.\n\n\n#### JavaScript Library ####\n\nThe file `wast.js` generated by the respective [Makefile target](#cross-compiling-the-interpreter-to-javascript) is a self-contained JavaScript library for making the [S-expression syntax](#s-expression-syntax) available directly within JavaScript.\nIt provides a global object named `WebAssemblyText` that currently provides two methods,\n```\nWebAssemblyText.encode(source)\n```\nwhich turns a module in S-expression syntax into a WebAssembly binary, and\n```\nWebAssemblyText.decode(binary, width = 80)\n```\nwhich pretty-prints a binary back into a canonicalised S-expression string.\n\nFor example:\n```\nlet source = '(module (func (export \"f\") (param i32 i32) (result i32) (i32.add (local.get 0) (local.get 1))))'\nlet binary = WebAssemblyText.encode(source)\n\n(new WebAssembly.Instance(new WebAssembly.Module(binary))).exports.f(3, 4)\n// => 7\n\nWebAssemblyText.decode(binary)\n// =>\n// (module\n//   (type $0 (func (param i32 i32) (result i32)))\n//   (func $0 (type 0) (local.get 0) (local.get 1) (i32.add))\n//   (export \"f\" (func 0))\n// )\n```\n\n\n## S-Expression Syntax\n\nThe implementation consumes a WebAssembly AST given in S-expression syntax. Here is an overview of the grammar of types, expressions, functions, and modules, mirroring what's described in the [design doc](https://github.com/WebAssembly/design/blob/master/Semantics.md).\n\nNote: The grammar is shown here for convenience, the definite source is the [specification of the text format](https://webassembly.github.io/spec/core/text/).\n```\nnum:    <digit>(_? <digit>)*\nhexnum: <hexdigit>(_? <hexdigit>)*\nnat:    <num> | 0x<hexnum>\nint:    <nat> | +<nat> | -<nat>\nfloat:  <num>.<num>?(e|E <num>)? | 0x<hexnum>.<hexnum>?(p|P <num>)?\nname:   $(<letter> | <digit> | _ | . | + | - | * | / | \\ | ^ | ~ | = | < | > | ! | ? | @ | # | $ | % | & | | | : | ' | `)+\nstring: \"(<char> | \\n | \\t | \\\\ | \\' | \\\" | \\<hex><hex> | \\u{<hex>+})*\"\n\nnum: <int> | <float>\nvar: <nat> | <name>\n\nunop:  ctz | clz | popcnt | ...\nbinop: add | sub | mul | ...\nrelop: eq | ne | lt | ...\nsign:  s | u\noffset: offset=<nat>\nalign: align=(1|2|4|8|...)\ncvtop: trunc | extend | wrap | ...\n\nnum_type: i32 | i64 | f32 | f64\nref_kind: func | extern\nref_type: funcref | externref\nval_type: num_type | ref_type\nblock_type : ( result <val_type>* )*\nfunc_type:   ( type <var> )? <param>* <result>*\nglobal_type: <val_type> | ( mut <val_type> )\ntable_type:  <nat> <nat>? <ref_type>\nmemory_type: <nat> <nat>?\n\nexpr:\n  ( <op> )\n  ( <op> <expr>+ )                                                   ;; = <expr>+ (<op>)\n  ( block <name>? <block_type> <instr>* )\n  ( loop <name>? <block_type> <instr>* )\n  ( if <name>? <block_type> ( then <instr>* ) ( else <instr>* )? )\n  ( if <name>? <block_type> <expr>+ ( then <instr>* ) ( else <instr>* )? ) ;; = <expr>+ (if <name>? <block_type> (then <instr>*) (else <instr>*)?)\n\ninstr:\n  <expr>\n  <op>                                                               ;; = (<op>)\n  block <name>? <block_type> <instr>* end <name>?                    ;; = (block <name>? <block_type> <instr>*)\n  loop <name>? <block_type> <instr>* end <name>?                     ;; = (loop <name>? <block_type> <instr>*)\n  if <name>? <block_type> <instr>* end <name>?                       ;; = (if <name>? <block_type> (then <instr>*))\n  if <name>? <block_type> <instr>* else <name>? <instr>* end <name>? ;; = (if <name>? <block_type> (then <instr>*) (else <instr>*))\n\nop:\n  unreachable\n  nop\n  br <var>\n  br_if <var>\n  br_table <var>+\n  return\n  call <var>\n  call_indirect <var>? <func_type>\n  drop\n  select\n  local.get <var>\n  local.set <var>\n  local.tee <var>\n  global.get <var>\n  global.set <var>\n  table.get <var>?\n  table.set <var>?\n  table.size <var>?\n  table.grow <var>?\n  table.fill <var>?\n  table.copy <var>? <var>?\n  table.init <var>? <var>\n  elem.drop <var>\n  <num_type>.load((8|16|32)_<sign>)? <offset>? <align>?\n  <num_type>.store(8|16|32)? <offset>? <align>?\n  memory.size\n  memory.grow\n  memory.fill\n  memory.copy\n  memory.init <var>\n  data.drop <var>\n  ref.null <ref_kind>\n  ref.is_null <ref_kind>\n  ref.func <var>\n  <num_type>.const <value>\n  <num_type>.<unop>\n  <num_type>.<binop>\n  <num_type>.<testop>\n  <num_type>.<relop>\n  <num_type>.<cvtop>_<num_type>(_<sign>)?\n\nfunc:    ( func <name>? <func_type> <local>* <instr>* )\n         ( func <name>? ( export <string> ) <...> )                         ;; = (export <string> (func <N>)) (func <name>? <...>)\n         ( func <name>? ( import <string> <string> ) <func_type>)           ;; = (import <string> <string> (func <name>? <func_type>))\nparam:   ( param <val_type>* ) | ( param <name> <val_type> )\nresult:  ( result <val_type>* )\nlocal:   ( local <val_type>* ) | ( local <name> <val_type> )\n\nglobal:  ( global <name>? <global_type> <instr>* )\n         ( global <name>? ( export <string> ) <...> )                       ;; = (export <string> (global <N>)) (global <name>? <...>)\n         ( global <name>? ( import <string> <string> ) <global_type> )      ;; = (import <string> <string> (global <name>? <global_type>))\ntable:   ( table <name>? <table_type> )\n         ( table <name>? ( export <string> ) <...> )                        ;; = (export <string> (table <N>)) (table <name>? <...>)\n         ( table <name>? ( import <string> <string> ) <table_type> )        ;; = (import <string> <string> (table <name>? <table_type>))\n         ( table <name>? ( export <string> )* <ref_type> ( elem <var>* ) )  ;; = (table <name>? ( export <string> )* <size> <size> <ref_type>) (elem (i32.const 0) <var>*)\nelem:    ( elem <var>? (offset <instr>* ) <var>* )\n         ( elem <var>? <expr> <var>* )                                      ;; = (elem <var>? (offset <expr>) <var>*)\n         ( elem <var>? declare <ref_type> <var>* )\nelem:    ( elem <name>? ( table <var> )? <offset> <ref_type> <item>* )\n         ( elem <name>? ( table <var> )? <offset> func <var>* )             ;; = (elem <name>? ( table <var> )? <offset> funcref (ref.func <var>)*)\n         ( elem <var>? declare? <ref_type> <var>* )\n         ( elem <name>? declare? func <var>* )                               ;; = (elem <name>? declare? funcref (ref.func <var>)*)\noffset:  ( offset <instr>* )\n         <expr>                                                             ;; = ( offset <expr> )\nitem:    ( item <instr>* )\n         <expr>                                                             ;; = ( item <expr> )\nmemory:  ( memory <name>? <memory_type> )\n         ( memory <name>? ( export <string> ) <...> )                       ;; = (export <string> (memory <N>))+ (memory <name>? <...>)\n         ( memory <name>? ( import <string> <string> ) <memory_type> )      ;; = (import <string> <string> (memory <name>? <memory_type>))\n         ( memory <name>? ( export <string> )* ( data <string>* ) )         ;; = (memory <name>? ( export <string> )* <size> <size>) (data (i32.const 0) <string>*)\ndata:    ( data <name>? ( memory <var> )? <offset> <string>* )\n\nstart:   ( start <var> )\n\ntypedef: ( type <name>? ( func <param>* <result>* ) )\n\nimport:  ( import <string> <string> <imkind> )\nimkind:  ( func <name>? <func_type> )\n         ( global <name>? <global_type> )\n         ( table <name>? <table_type> )\n         ( memory <name>? <memory_type> )\nexport:  ( export <string> <exkind> )\nexkind:  ( func <var> )\n         ( global <var> )\n         ( table <var> )\n         ( memory <var> )\n\nmodule:  ( module <name>? <typedef>* <func>* <import>* <export>* <table>* <memory>? <global>* <elem>* <data>* <start>? )\n         <typedef>* <func>* <import>* <export>* <table>* <memory>? <global>* <elem>* <data>* <start>?  ;; =\n         ( module <typedef>* <func>* <import>* <export>* <table>* <memory>? <global>* <elem>* <data>* <start>? )\n```\n\nHere, productions marked with respective comments are abbreviation forms for equivalent expansions (see the explanation of the AST below).\nIn particular, WebAssembly is a stack machine, so that all expressions of the form `(<op> <expr>+)` are merely abbreviations of a corresponding post-order sequence of instructions.\nFor raw instructions, the syntax allows omitting the parentheses around the operator name and its immediate operands. In the case of control operators (`block`, `loop`, `if`), this requires marking the end of the nested sequence with an explicit `end` keyword.\n\nAny form of naming via `<name>` and `<var>` (including expression labels) is merely notational convenience of this text format. The actual AST has no names, and all bindings are referred to via ordered numeric indices; consequently, names are immediately resolved in the parser and replaced by indices. Indices can also be used directly in the text format.\n\nThe segment strings in the memory field are used to initialize the consecutive memory at the given offset.\nThe `<size>` in the expansion of the two short-hand forms for `table` and `memory` is the minimal size that can hold the segment: the number of `<var>`s for tables, and the accumulative length of the strings rounded up to page size for memories.\n\nIn addition to the grammar rules above, the fields of a module may appear in any order, except that all imports must occur before the first proper definition of a function, table, memory, or global.\n\nComments can be written in one of two ways:\n\n```\ncomment:\n  ;; <char>* <eol>\n  (; (<char> | <comment>)* ;)\n```\n\nIn particular, comments of the latter form nest properly.\n\n\n## Scripts\n\nIn order to be able to check and run modules for testing purposes, the S-expression format is interpreted as a very simple and dumb notion of \"script\", with commands as follows:\n\n```\nscript: <cmd>*\n\ncmd:\n  <module>                                   ;; define, validate, and initialize module\n  ( register <string> <name>? )              ;; register module for imports\n  <action>                                   ;; perform action and print results\n  <assertion>                                ;; assert result of an action\n  <meta>                                     ;; meta command\n\nmodule:\n  ...\n  ( module <name>? binary <string>* )        ;; module in binary format (may be malformed)\n  ( module <name>? quote <string>* )         ;; module quoted in text (may be malformed)\n\naction:\n  ( invoke <name>? <string> <const>* )       ;; invoke function export\n  ( get <name>? <string> )                   ;; get global export\n\nconst:\n  ( <num_type>.const <num> )                 ;; number value\n  ( ref.null <ref_kind> )                    ;; null reference\n  ( ref.host <nat> )                         ;; host reference\n\nassertion:\n  ( assert_return <action> <result>* )       ;; assert action has expected results\n  ( assert_trap <action> <failure> )         ;; assert action traps with given failure string\n  ( assert_exhaustion <action> <failure> )   ;; assert action exhausts system resources\n  ( assert_malformed <module> <failure> )    ;; assert module cannot be decoded with given failure string\n  ( assert_invalid <module> <failure> )      ;; assert module is invalid with given failure string\n  ( assert_unlinkable <module> <failure> )   ;; assert module fails to link\n  ( assert_trap <module> <failure> )         ;; assert module traps on instantiation\n\nresult:\n  ( <num_type>.const <num_pat> )\n  ( ref.extern )\n  ( ref.func )\n\nnum_pat:\n  <value>                                    ;; literal result\n  nan:canonical                              ;; NaN in canonical form\n  nan:arithmetic                             ;; NaN with 1 in MSB of payload\n\nmeta:\n  ( script <name>? <script> )                ;; name a subscript\n  ( input <name>? <string> )                 ;; read script or module from file\n  ( output <name>? <string>? )               ;; output module to stout or file\n```\nCommands are executed in sequence. Commands taking an optional module name refer to the most recently defined module if no name is given. They are only possible after a module has been defined.\n\nAfter a module is _registered_ under a string name it is available for importing in other modules.\n\nThe script format supports additional syntax for defining modules.\nA module of the form `(module binary <string>*)` is given in binary form and will be decoded from the (concatenation of the) strings.\nA module of the form `(module quote <string>*)` is given in textual form and will be parsed from the (concatenation of the) strings. In both cases, decoding/parsing happens when the command is executed, not when the script is parsed, so that meta commands like `assert_malformed` can be used to check expected errors.\n\nThere are also a number of meta commands.\nThe `script` command is a simple mechanism to name sub-scripts themselves. This is mainly useful for converting scripts with the `output` command. Commands inside a `script` will be executed normally, but nested meta are expanded in place (`input`, recursively) or elided (`output`) in the named script.\n\nThe `input` and `output` meta commands determine the requested file format from the file name extension. They can handle both `.wasm`, `.wat`, and `.wast` files. In the case of input, a `.wast` script will be recursively executed. Output additionally handles `.js` as a target, which will convert the referenced script to an equivalent, self-contained JavaScript runner. It also recognises `.bin.wast` specially, which creates a _binary script_ where module definitions are in binary, as defined below.\n\nThe interpreter supports a \"dry\" mode (flag `-d`), in which modules are only validated. In this mode, all actions and assertions are ignored.\nIt also supports an \"unchecked\" mode (flag `-u`), in which module definitions are not validated before use.\n\n\n### Spectest host module\n\nWhen running scripts, the interpreter predefines a simple host module named `\"spectest\"` that has the following module type:\n```\n(module\n  (global (export \"global_i32\") i32)\n  (global (export \"global_i64\") i64)\n  (global (export \"global_f32\") f32)\n  (global (export \"global_f64\") f64)\n\n  (table (export \"table\") 10 20 funcref)\n\n  (memory (export \"memory\") 1 2)\n\n  (func (export \"print\"))\n  (func (export \"print_i32\") (param i32))\n  (func (export \"print_i64\") (param i64))\n  (func (export \"print_f32\") (param f32))\n  (func (export \"print_f64\") (param f64))\n  (func (export \"print_i32_f32\") (param i32 f32))\n  (func (export \"print_f64_f64\") (param f64 f64))\n)\n```\nThe `print` functions are assumes to print their respective argument values to stdout (followed by a newline) and can be used to produce observable output.\n\nNote: This module predates the `register` command and should no longer be needed for new tests.\nWe might remove it in the future, so consider it deprecated.\n\n\n### Binary Scripts\n\nThe grammar of binary scripts is a subset of the grammar for general scripts:\n```\nbinscript: <cmd>*\n\ncmd:\n  <module>                                   ;; define, validate, and initialize module\n  ( register <string> <name>? )              ;; register module for imports\n  <action>                                   ;; perform action and print results\n  <assertion>                                ;; assert result of an action\n\nmodule:\n  ( module <name>? binary <string>* )        ;; module in binary format (may be malformed)\n\naction:\n  ( invoke <name>? <string> <expr>* )        ;; invoke function export\n  ( get <name>? <string> )                   ;; get global export\n\nassertion:\n  ( assert_return <action> <result>* )       ;; assert action has expected results\n  ( assert_trap <action> <failure> )         ;; assert action traps with given failure string\n  ( assert_exhaustion <action> <failure> )   ;; assert action exhausts system resources\n  ( assert_malformed <module> <failure> )    ;; assert module cannot be decoded with given failure string\n  ( assert_invalid <module> <failure> )      ;; assert module is invalid with given failure string\n  ( assert_unlinkable <module> <failure> )   ;; assert module fails to link\n  ( assert_trap <module> <failure> )         ;; assert module traps on instantiation\n\nresult:\n  ( <num_type>.const <num_pat> )\n  ( ref.extern )\n  ( ref.func )\n\nnum_pat:\n  <value>                                    ;; literal result\n  nan:canonical                              ;; NaN in canonical form\n  nan:arithmetic                             ;; NaN with 1 in MSB of payload\n\nvalue:  <int> | <float>\nint:    0x<hexnum>\nfloat:  0x<hexnum>.<hexnum>?(p|P <num>)?\nhexnum: <hexdigit>(_? <hexdigit>)*\n\nname:   $(<letter> | <digit> | _ | . | + | - | * | / | \\ | ^ | ~ | = | < | > | ! | ? | @ | # | $ | % | & | | | : | ' | `)+\nstring: \"(<char> | \\n | \\t | \\\\ | \\' | \\\" | \\<hex><hex> | \\u{<hex>+})*\"\n```\nThis grammar removes meta commands, textual and quoted modules.\nAll numbers are in hex notation.\n\nMoreover, float values are required to be precise, that is, they may not contain bits that would lead to rounding.\n\n\n## Abstract Syntax\n\nThe abstract WebAssembly syntax, as described above and in the [design doc](https://github.com/WebAssembly/design/blob/master/Semantics.md), is defined in [ast.ml](syntax/ast.ml).\n\nHowever, to simplify the implementation, this AST representation represents some of the inner structure of the operators more explicitly. The mapping from the operators as given in the design doc to their structured form is defined in [operators.ml](syntax/operators.ml).\n\n\n## Implementation\n\nThe implementation is split into several directories:\n\n* `syntax`: the definition of abstract syntax; corresponds to the \"Structure\" section of the language specification\n\n* `valid`: validation of code and modules; corresponds to the \"Validation\" section of the language specification\n\n* `runtime`: the definition of runtime structures; corresponds to the \"Execution/Runtime\" section of the language specification\n\n* `exec`: execution and module instantiation; corresponds to the \"Execution\" section of the language specification\n\n* `binary`: encoding and decoding of the binary format; corresponds to the \"Binary Format\" section of the language specification\n\n* `text`: parsing and printing the S-expressions text format; corresponds to the \"Text Format\" section of the language specification\n\n* `script`: abstract syntax and execution of the extended script language\n\n* `host`: definition of host environment modules\n\n* `main`: main program\n\n* `util`: utility libraries.\n\nThe implementation consists of the following parts:\n\n* *Abstract Syntax* (`ast.ml`, `operators.ml`, `types.ml`, `source.ml[i]`, `script.ml`). Notably, the `phrase` wrapper type around each AST node carries the source position information.\n\n* *Parser* (`lexer.mll`, `parser.mly`, `parse.ml[i]`). Generated with ocamllex and ocamlyacc. The lexer does the opcode encoding (non-trivial tokens carry e.g. type information as semantic values, as declared in `parser.mly`), the parser the actual S-expression parsing.\n\n* *Pretty Printer* (`print.ml[i]`, `arrange.ml[i]`, `sexpr.ml[i]`). Turns a module or script AST back into the textual S-expression format.\n\n* *Decoder*/*Encoder* (`decode.ml[i]`, `encode.ml[i]`). The former parses the binary format and turns it into an AST, the latter does the inverse.\n\n* *Validator* (`valid.ml[i]`). Does a recursive walk of the AST, passing down the *expected* type for expressions, and checking each expression against that. An expected empty type can be matched by any result, corresponding to implicit dropping of unused values (e.g. in a block).\n\n* *Evaluator* (`eval.ml[i]`, `values.ml`, `func.ml[i]`, `table.ml[i]`, `memory.ml[i]`, `global.ml[i]`, `instance.ml`, `eval_numeric.ml[i]`, `int.ml`, `float.ml`, and a few more). Implements evaluation as a small-step semantics that rewrites a program one computation step at a time.\n\n* *JS Generator* (`js.ml[i]`). Converts a script to equivalent JavaScript.\n\n* *Driver* (`main.ml`, `run.ml[i]`, `import.ml[i]`, `error.ml`, `flags.ml`). Executes scripts, reports results or errors, etc.\n\nThe most relevant pieces are probably the validator (`valid.ml`) and the evaluator (`eval.ml`). They are written to look as much like a \"specification\" as possible. Hopefully, the code is fairly self-explanatory, at least for those with a passing familiarity with functional programming.\n\nIn typical FP convention (and for better readability), the code tends to use single-character names for local variables where consistent naming conventions are applicable (e.g., `e` for expressions, `v` for values, `xs` for lists of `x`s, etc.). See `ast.ml`, `eval.ml` and `eval.ml` for more comments.\n"
  },
  {
    "path": "interpreter/binary/decode.ml",
    "content": "(* Decoding stream *)\n\ntype stream =\n{\n  name : string;\n  bytes : string;\n  pos : int ref;\n}\n\nexception EOS\n\nlet stream name bs = {name; bytes = bs; pos = ref 0}\n\nlet len s = String.length s.bytes\nlet pos s = !(s.pos)\nlet eos s = (pos s = len s)\n\nlet check n s = if pos s + n > len s then raise EOS\nlet skip n s = if n < 0 then raise EOS else check n s; s.pos := !(s.pos) + n\n\nlet read s = Char.code (s.bytes.[!(s.pos)])\nlet peek s = if eos s then None else Some (read s)\nlet get s = check 1 s; let b = read s in skip 1 s; b\nlet get_string n s = let i = pos s in skip n s; String.sub s.bytes i n\n\n\n(* Errors *)\n\nmodule Code = Error.Make ()\nexception Code = Code.Error\n\nlet string_of_byte b = Printf.sprintf \"%02x\" b\nlet string_of_multi n = Printf.sprintf \"%02lx\" n\n\nlet position s pos = Source.({file = s.name; line = -1; column = pos})\nlet region s left right =\n  Source.({left = position s left; right = position s right})\n\nlet error s pos msg = raise (Code (region s pos pos, msg))\nlet require b s pos msg = if not b then error s pos msg\n\nlet guard f s =\n  try f s with EOS -> error s (len s) \"unexpected end of section or function\"\n\nlet get = guard get\nlet get_string n = guard (get_string n)\nlet skip n = guard (skip n)\n\nlet expect b s msg = require (guard get s = b) s (pos s - 1) msg\nlet illegal s pos b = error s pos (\"illegal opcode \" ^ string_of_byte b)\nlet illegal2 s pos b n =\n  error s pos (\"illegal opcode \" ^ string_of_byte b ^ \" \" ^ string_of_multi n)\n\nlet at f s =\n  let left = pos s in\n  let x = f s in\n  let right = pos s in\n  Source.(x @@ region s left right)\n\n\n\n(* Generic values *)\n\nlet u8 s =\n  get s\n\nlet u16 s =\n  let lo = u8 s in\n  let hi = u8 s in\n  hi lsl 8 + lo\n\nlet u32 s =\n  let lo = Int32.of_int (u16 s) in\n  let hi = Int32.of_int (u16 s) in\n  Int32.(add lo (shift_left hi 16))\n\nlet u64 s =\n  let lo = I64_convert.extend_i32_u (u32 s) in\n  let hi = I64_convert.extend_i32_u (u32 s) in\n  Int64.(add lo (shift_left hi 32))\n\nlet rec vuN n s =\n  require (n > 0) s (pos s) \"integer representation too long\";\n  let b = u8 s in\n  require (n >= 7 || b land 0x7f < 1 lsl n) s (pos s - 1) \"integer too large\";\n  let x = Int64.of_int (b land 0x7f) in\n  if b land 0x80 = 0 then x else Int64.(logor x (shift_left (vuN (n - 7) s) 7))\n\nlet rec vsN n s =\n  require (n > 0) s (pos s) \"integer representation too long\";\n  let b = u8 s in\n  let mask = (-1 lsl (n - 1)) land 0x7f in\n  require (n >= 7 || b land mask = 0 || b land mask = mask) s (pos s - 1)\n    \"integer too large\";\n  let x = Int64.of_int (b land 0x7f) in\n  if b land 0x80 = 0\n  then (if b land 0x40 = 0 then x else Int64.(logor x (logxor (-1L) 0x7fL)))\n  else Int64.(logor x (shift_left (vsN (n - 7) s) 7))\n\nlet vu1 s = Int64.to_int (vuN 1 s)\nlet vu32 s = Int64.to_int32 (vuN 32 s)\nlet vs7 s = Int64.to_int (vsN 7 s)\nlet vs32 s = Int64.to_int32 (vsN 32 s)\nlet vs33 s = I32_convert.wrap_i64 (vsN 33 s)\nlet vs64 s = vsN 64 s\nlet f32 s = F32.of_bits (u32 s)\nlet f64 s = F64.of_bits (u64 s)\n\nlet len32 s =\n  let pos = pos s in\n  let n = vu32 s in\n  if I32.le_u n (Int32.of_int (len s)) then Int32.to_int n else\n    error s pos \"length out of bounds\"\n\nlet bool s = (vu1 s = 1)\nlet string s = let n = len32 s in get_string n s\nlet rec list f n s = if n = 0 then [] else let x = f s in x :: list f (n - 1) s\nlet opt f b s = if b then Some (f s) else None\nlet vec f s = let n = len32 s in list f n s\n\nlet name s =\n  let pos = pos s in\n  try Utf8.decode (string s) with Utf8.Utf8 ->\n    error s pos \"malformed UTF-8 encoding\"\n\nlet sized f s =\n  let size = len32 s in\n  let start = pos s in\n  let x = f size s in\n  require (pos s = start + size) s start \"section size mismatch\";\n  x\n\n\n(* Types *)\n\nopen Types\n\nlet num_type s =\n  match vs7 s with\n  | -0x01 -> I32Type\n  | -0x02 -> I64Type\n  | -0x03 -> F32Type\n  | -0x04 -> F64Type\n  | _ -> error s (pos s - 1) \"malformed number type\"\n\nlet ref_type s =\n  match vs7 s with\n  | -0x10 -> FuncRefType\n  | -0x11 -> ExternRefType\n  | _ -> error s (pos s - 1) \"malformed reference type\"\n\nlet value_type s =\n  match peek s with\n  | Some n when n > 0x70 -> NumType (num_type s)\n  | _ -> RefType (ref_type s)\n\nlet result_type s = vec value_type s\nlet func_type s =\n  match vs7 s with\n  | -0x20 ->\n    let ins = result_type s in\n    let out = result_type s in\n    FuncType (ins, out)\n  | _ -> error s (pos s - 1) \"malformed function type\"\n\nlet limits vu s =\n  let has_max = bool s in\n  let min = vu s in\n  let max = opt vu has_max s in\n  {min; max}\n\nlet table_type s =\n  let t = ref_type s in\n  let lim = limits vu32 s in\n  TableType (lim, t)\n\nlet memory_type s =\n  let lim = limits vu32 s in\n  MemoryType lim\n\nlet mutability s =\n  match u8 s with\n  | 0 -> Immutable\n  | 1 -> Mutable\n  | _ -> error s (pos s - 1) \"malformed mutability\"\n\nlet global_type s =\n  let t = value_type s in\n  let mut = mutability s in\n  GlobalType (t, mut)\n\n\n(* Decode instructions *)\n\nopen Ast\nopen Operators\n\nlet var s = vu32 s\n\nlet op s = u8 s\nlet end_ s = expect 0x0b s \"END opcode expected\"\nlet zero s = expect 0x00 s \"zero byte expected\"\n\nlet memop s =\n  let align = vu32 s in\n  require (I32.le_u align 32l) s (pos s - 1) \"malformed memop flags\";\n  let offset = vu32 s in\n  Int32.to_int align, offset\n\nlet block_type s =\n  match peek s with\n  | Some 0x40 -> skip 1 s; ValBlockType None\n  | Some b when b land 0xc0 = 0x40 -> ValBlockType (Some (value_type s))\n  | _ -> VarBlockType (at vs33 s)\n\nlet rec instr s =\n  let pos = pos s in\n  match op s with\n  | 0x00 -> unreachable\n  | 0x01 -> nop\n\n  | 0x02 ->\n    let bt = block_type s in\n    let es' = instr_block s in\n    end_ s;\n    block bt es'\n  | 0x03 ->\n    let bt = block_type s in\n    let es' = instr_block s in\n    end_ s;\n    loop bt es'\n  | 0x04 ->\n    let bt = block_type s in\n    let es1 = instr_block s in\n    if peek s = Some 0x05 then begin\n      expect 0x05 s \"ELSE or END opcode expected\";\n      let es2 = instr_block s in\n      end_ s;\n      if_ bt es1 es2\n    end else begin\n      end_ s;\n      if_ bt es1 []\n    end\n\n  | 0x05 -> error s pos \"misplaced ELSE opcode\"\n  | 0x06| 0x07 | 0x08 | 0x09 | 0x0a as b -> illegal s pos b\n  | 0x0b -> error s pos \"misplaced END opcode\"\n\n  | 0x0c -> br (at var s)\n  | 0x0d -> br_if (at var s)\n  | 0x0e ->\n    let xs = vec (at var) s in\n    let x = at var s in\n    br_table xs x\n  | 0x0f -> return\n\n  | 0x10 -> call (at var s)\n  | 0x11 ->\n    let y = at var s in\n    let x = at var s in\n    call_indirect x y\n\n  | 0x12 | 0x13 | 0x14 | 0x15 | 0x16 | 0x17 | 0x18 | 0x19 as b -> illegal s pos b\n\n  | 0x1a -> drop\n  | 0x1b -> select None\n  | 0x1c -> select (Some (vec value_type s))\n\n  | 0x1d | 0x1e | 0x1f as b -> illegal s pos b\n\n  | 0x20 -> local_get (at var s)\n  | 0x21 -> local_set (at var s)\n  | 0x22 -> local_tee (at var s)\n  | 0x23 -> global_get (at var s)\n  | 0x24 -> global_set (at var s)\n  | 0x25 -> table_get (at var s)\n  | 0x26 -> table_set (at var s)\n\n  | 0x27 as b -> illegal s pos b\n\n  | 0x28 -> let a, o = memop s in i32_load a o\n  | 0x29 -> let a, o = memop s in i64_load a o\n  | 0x2a -> let a, o = memop s in f32_load a o\n  | 0x2b -> let a, o = memop s in f64_load a o\n  | 0x2c -> let a, o = memop s in i32_load8_s a o\n  | 0x2d -> let a, o = memop s in i32_load8_u a o\n  | 0x2e -> let a, o = memop s in i32_load16_s a o\n  | 0x2f -> let a, o = memop s in i32_load16_u a o\n  | 0x30 -> let a, o = memop s in i64_load8_s a o\n  | 0x31 -> let a, o = memop s in i64_load8_u a o\n  | 0x32 -> let a, o = memop s in i64_load16_s a o\n  | 0x33 -> let a, o = memop s in i64_load16_u a o\n  | 0x34 -> let a, o = memop s in i64_load32_s a o\n  | 0x35 -> let a, o = memop s in i64_load32_u a o\n\n  | 0x36 -> let a, o = memop s in i32_store a o\n  | 0x37 -> let a, o = memop s in i64_store a o\n  | 0x38 -> let a, o = memop s in f32_store a o\n  | 0x39 -> let a, o = memop s in f64_store a o\n  | 0x3a -> let a, o = memop s in i32_store8 a o\n  | 0x3b -> let a, o = memop s in i32_store16 a o\n  | 0x3c -> let a, o = memop s in i64_store8 a o\n  | 0x3d -> let a, o = memop s in i64_store16 a o\n  | 0x3e -> let a, o = memop s in i64_store32 a o\n\n  | 0x3f -> zero s; memory_size\n  | 0x40 -> zero s; memory_grow\n\n  | 0x41 -> i32_const (at vs32 s)\n  | 0x42 -> i64_const (at vs64 s)\n  | 0x43 -> f32_const (at f32 s)\n  | 0x44 -> f64_const (at f64 s)\n\n  | 0x45 -> i32_eqz\n  | 0x46 -> i32_eq\n  | 0x47 -> i32_ne\n  | 0x48 -> i32_lt_s\n  | 0x49 -> i32_lt_u\n  | 0x4a -> i32_gt_s\n  | 0x4b -> i32_gt_u\n  | 0x4c -> i32_le_s\n  | 0x4d -> i32_le_u\n  | 0x4e -> i32_ge_s\n  | 0x4f -> i32_ge_u\n\n  | 0x50 -> i64_eqz\n  | 0x51 -> i64_eq\n  | 0x52 -> i64_ne\n  | 0x53 -> i64_lt_s\n  | 0x54 -> i64_lt_u\n  | 0x55 -> i64_gt_s\n  | 0x56 -> i64_gt_u\n  | 0x57 -> i64_le_s\n  | 0x58 -> i64_le_u\n  | 0x59 -> i64_ge_s\n  | 0x5a -> i64_ge_u\n\n  | 0x5b -> f32_eq\n  | 0x5c -> f32_ne\n  | 0x5d -> f32_lt\n  | 0x5e -> f32_gt\n  | 0x5f -> f32_le\n  | 0x60 -> f32_ge\n\n  | 0x61 -> f64_eq\n  | 0x62 -> f64_ne\n  | 0x63 -> f64_lt\n  | 0x64 -> f64_gt\n  | 0x65 -> f64_le\n  | 0x66 -> f64_ge\n\n  | 0x67 -> i32_clz\n  | 0x68 -> i32_ctz\n  | 0x69 -> i32_popcnt\n  | 0x6a -> i32_add\n  | 0x6b -> i32_sub\n  | 0x6c -> i32_mul\n  | 0x6d -> i32_div_s\n  | 0x6e -> i32_div_u\n  | 0x6f -> i32_rem_s\n  | 0x70 -> i32_rem_u\n  | 0x71 -> i32_and\n  | 0x72 -> i32_or\n  | 0x73 -> i32_xor\n  | 0x74 -> i32_shl\n  | 0x75 -> i32_shr_s\n  | 0x76 -> i32_shr_u\n  | 0x77 -> i32_rotl\n  | 0x78 -> i32_rotr\n\n  | 0x79 -> i64_clz\n  | 0x7a -> i64_ctz\n  | 0x7b -> i64_popcnt\n  | 0x7c -> i64_add\n  | 0x7d -> i64_sub\n  | 0x7e -> i64_mul\n  | 0x7f -> i64_div_s\n  | 0x80 -> i64_div_u\n  | 0x81 -> i64_rem_s\n  | 0x82 -> i64_rem_u\n  | 0x83 -> i64_and\n  | 0x84 -> i64_or\n  | 0x85 -> i64_xor\n  | 0x86 -> i64_shl\n  | 0x87 -> i64_shr_s\n  | 0x88 -> i64_shr_u\n  | 0x89 -> i64_rotl\n  | 0x8a -> i64_rotr\n\n  | 0x8b -> f32_abs\n  | 0x8c -> f32_neg\n  | 0x8d -> f32_ceil\n  | 0x8e -> f32_floor\n  | 0x8f -> f32_trunc\n  | 0x90 -> f32_nearest\n  | 0x91 -> f32_sqrt\n  | 0x92 -> f32_add\n  | 0x93 -> f32_sub\n  | 0x94 -> f32_mul\n  | 0x95 -> f32_div\n  | 0x96 -> f32_min\n  | 0x97 -> f32_max\n  | 0x98 -> f32_copysign\n\n  | 0x99 -> f64_abs\n  | 0x9a -> f64_neg\n  | 0x9b -> f64_ceil\n  | 0x9c -> f64_floor\n  | 0x9d -> f64_trunc\n  | 0x9e -> f64_nearest\n  | 0x9f -> f64_sqrt\n  | 0xa0 -> f64_add\n  | 0xa1 -> f64_sub\n  | 0xa2 -> f64_mul\n  | 0xa3 -> f64_div\n  | 0xa4 -> f64_min\n  | 0xa5 -> f64_max\n  | 0xa6 -> f64_copysign\n\n  | 0xa7 -> i32_wrap_i64\n  | 0xa8 -> i32_trunc_f32_s\n  | 0xa9 -> i32_trunc_f32_u\n  | 0xaa -> i32_trunc_f64_s\n  | 0xab -> i32_trunc_f64_u\n  | 0xac -> i64_extend_i32_s\n  | 0xad -> i64_extend_i32_u\n  | 0xae -> i64_trunc_f32_s\n  | 0xaf -> i64_trunc_f32_u\n  | 0xb0 -> i64_trunc_f64_s\n  | 0xb1 -> i64_trunc_f64_u\n  | 0xb2 -> f32_convert_i32_s\n  | 0xb3 -> f32_convert_i32_u\n  | 0xb4 -> f32_convert_i64_s\n  | 0xb5 -> f32_convert_i64_u\n  | 0xb6 -> f32_demote_f64\n  | 0xb7 -> f64_convert_i32_s\n  | 0xb8 -> f64_convert_i32_u\n  | 0xb9 -> f64_convert_i64_s\n  | 0xba -> f64_convert_i64_u\n  | 0xbb -> f64_promote_f32\n\n  | 0xbc -> i32_reinterpret_f32\n  | 0xbd -> i64_reinterpret_f64\n  | 0xbe -> f32_reinterpret_i32\n  | 0xbf -> f64_reinterpret_i64\n\n  | 0xc0 -> i32_extend8_s\n  | 0xc1 -> i32_extend16_s\n  | 0xc2 -> i64_extend8_s\n  | 0xc3 -> i64_extend16_s\n  | 0xc4 -> i64_extend32_s\n\n  | 0xc5 | 0xc6 | 0xc7 | 0xc8 | 0xc9 | 0xca | 0xcb\n  | 0xcc | 0xcd | 0xce | 0xcf as b -> illegal s pos b\n\n  | 0xd0 -> ref_null (ref_type s)\n  | 0xd1 -> ref_is_null\n  | 0xd2 -> ref_func (at var s)\n\n  | 0xfc as b ->\n    (match vu32 s with\n    | 0x00l -> i32_trunc_sat_f32_s\n    | 0x01l -> i32_trunc_sat_f32_u\n    | 0x02l -> i32_trunc_sat_f64_s\n    | 0x03l -> i32_trunc_sat_f64_u\n    | 0x04l -> i64_trunc_sat_f32_s\n    | 0x05l -> i64_trunc_sat_f32_u\n    | 0x06l -> i64_trunc_sat_f64_s\n    | 0x07l -> i64_trunc_sat_f64_u\n\n    | 0x08l ->\n      let x = at var s in\n      zero s; memory_init x\n    | 0x09l -> data_drop (at var s)\n    | 0x0al -> zero s; zero s; memory_copy\n    | 0x0bl -> zero s; memory_fill\n\n    | 0x0cl ->\n      let y = at var s in\n      let x = at var s in\n      table_init x y\n    | 0x0dl -> elem_drop (at var s)\n    | 0x0el ->\n      let x = at var s in\n      let y = at var s in\n      table_copy x y\n    | 0x0fl -> table_grow (at var s)\n    | 0x10l -> table_size (at var s)\n    | 0x11l -> table_fill (at var s)\n\n    | n -> illegal2 s pos b n\n    )\n\n  | b -> illegal s pos b\n\nand instr_block s = List.rev (instr_block' s [])\nand instr_block' s es =\n  match peek s with\n  | None | Some (0x05 | 0x0b) -> es\n  | _ ->\n    let pos = pos s in\n    let e' = instr s in\n    instr_block' s (Source.(e' @@ region s pos pos) :: es)\n\nlet const s =\n  let c = at instr_block s in\n  end_ s;\n  c\n\n\n(* Sections *)\n\nlet id s =\n  let bo = peek s in\n  Lib.Option.map\n    (function\n    | 0 -> `CustomSection\n    | 1 -> `TypeSection\n    | 2 -> `ImportSection\n    | 3 -> `FuncSection\n    | 4 -> `TableSection\n    | 5 -> `MemorySection\n    | 6 -> `GlobalSection\n    | 7 -> `ExportSection\n    | 8 -> `StartSection\n    | 9 -> `ElemSection\n    | 10 -> `CodeSection\n    | 11 -> `DataSection\n    | 12 -> `DataCountSection\n    | _ -> error s (pos s) \"malformed section id\"\n    ) bo\n\nlet section_with_size tag f default s =\n  match id s with\n  | Some tag' when tag' = tag -> ignore (u8 s); sized f s\n  | _ -> default\n\nlet section tag f default s =\n  section_with_size tag (fun _ -> f) default s\n\n\n(* Type section *)\n\nlet type_ s = at func_type s\n\nlet type_section s =\n  section `TypeSection (vec type_) [] s\n\n\n(* Import section *)\n\nlet import_desc s =\n  match u8 s with\n  | 0x00 -> FuncImport (at var s)\n  | 0x01 -> TableImport (table_type s)\n  | 0x02 -> MemoryImport (memory_type s)\n  | 0x03 -> GlobalImport (global_type s)\n  | _ -> error s (pos s - 1) \"malformed import kind\"\n\nlet import s =\n  let module_name = name s in\n  let item_name = name s in\n  let idesc = at import_desc s in\n  {module_name; item_name; idesc}\n\nlet import_section s =\n  section `ImportSection (vec (at import)) [] s\n\n\n(* Function section *)\n\nlet func_section s =\n  section `FuncSection (vec (at var)) [] s\n\n\n(* Table section *)\n\nlet table s =\n  let ttype = table_type s in\n  {ttype}\n\nlet table_section s =\n  section `TableSection (vec (at table)) [] s\n\n\n(* Memory section *)\n\nlet memory s =\n  let mtype = memory_type s in\n  {mtype}\n\nlet memory_section s =\n  section `MemorySection (vec (at memory)) [] s\n\n\n(* Global section *)\n\nlet global s =\n  let gtype = global_type s in\n  let ginit = const s in\n  {gtype; ginit}\n\nlet global_section s =\n  section `GlobalSection (vec (at global)) [] s\n\n\n(* Export section *)\n\nlet export_desc s =\n  match u8 s with\n  | 0x00 -> FuncExport (at var s)\n  | 0x01 -> TableExport (at var s)\n  | 0x02 -> MemoryExport (at var s)\n  | 0x03 -> GlobalExport (at var s)\n  | _ -> error s (pos s - 1) \"malformed export kind\"\n\nlet export s =\n  let name = name s in\n  let edesc = at export_desc s in\n  {name; edesc}\n\nlet export_section s =\n  section `ExportSection (vec (at export)) [] s\n\n\n(* Start section *)\n\nlet start_section s =\n  section `StartSection (opt (at var) true) None s\n\n\n(* Code section *)\n\nlet local s =\n  let n = vu32 s in\n  let t = value_type s in\n  n, t\n\nlet code _ s =\n  let pos = pos s in\n  let nts = vec local s in\n  let ns = List.map (fun (n, _) -> I64_convert.extend_i32_u n) nts in\n  require (I64.lt_u (List.fold_left I64.add 0L ns) 0x1_0000_0000L)\n    s pos \"too many locals\";\n  let locals = List.flatten (List.map (Lib.Fun.uncurry Lib.List32.make) nts) in\n  let body = instr_block s in\n  end_ s;\n  {locals; body; ftype = Source.((-1l) @@ Source.no_region)}\n\nlet code_section s =\n  section `CodeSection (vec (at (sized code))) [] s\n\n\n(* Element section *)\n\nlet passive s =\n  Passive\n\nlet active s =\n  let index = at var s in\n  let offset = const s in\n  Active {index; offset}\n\nlet active_zero s =\n  let index = Source.(0l @@ Source.no_region) in\n  let offset = const s in\n  Active {index; offset}\n\nlet declarative s =\n  Declarative\n\nlet elem_index s =\n  let x = at var s in\n  [Source.(ref_func x @@ x.at)]\n\nlet elem_kind s =\n  match u8 s with\n  | 0x00 -> FuncRefType\n  | _ -> error s (pos s - 1) \"malformed element kind\"\n\nlet elem s =\n  match vu32 s with\n  | 0x00l ->\n    let emode = at active_zero s in\n    let einit = vec (at elem_index) s in\n    {etype = FuncRefType; einit; emode}\n  | 0x01l ->\n    let emode = at passive s in\n    let etype = elem_kind s in\n    let einit = vec (at elem_index) s in\n    {etype; einit; emode}\n  | 0x02l ->\n    let emode = at active s in\n    let etype = elem_kind s in\n    let einit = vec (at elem_index) s in\n    {etype; einit; emode}\n  | 0x03l ->\n    let emode = at declarative s in\n    let etype = elem_kind s in\n    let einit = vec (at elem_index) s in\n    {etype; einit; emode}\n  | 0x04l ->\n    let emode = at active_zero s in\n    let einit = vec const s in\n    {etype = FuncRefType; einit; emode}\n  | 0x05l ->\n    let emode = at passive s in\n    let etype = ref_type s in\n    let einit = vec const s in\n    {etype; einit; emode}\n  | 0x06l ->\n    let emode = at active s in\n    let etype = ref_type s in\n    let einit = vec const s in\n    {etype; einit; emode}\n  | 0x07l ->\n    let emode = at declarative s in\n    let etype = ref_type s in\n    let einit = vec const s in\n    {etype; einit; emode}\n  | _ -> error s (pos s - 1) \"malformed elements segment kind\"\n\nlet elem_section s =\n  section `ElemSection (vec (at elem)) [] s\n\n\n(* Data section *)\n\nlet data s =\n  match vu32 s with\n  | 0x00l ->\n    let dmode = at active_zero s in\n    let dinit = string s in\n    {dinit; dmode}\n  | 0x01l ->\n    let dmode = at passive s in\n    let dinit = string s in\n    {dinit; dmode}\n  | 0x02l ->\n    let dmode = at active s in\n    let dinit = string s in\n    {dinit; dmode}\n  | _ -> error s (pos s - 1) \"malformed data segment kind\"\n\nlet data_section s =\n  section `DataSection (vec (at data)) [] s\n\n\n(* DataCount section *)\n\nlet data_count s =\n  Some (vu32 s)\n\nlet data_count_section s =\n  section `DataCountSection data_count None s\n\n\n(* Custom section *)\n\nlet custom size s =\n  let start = pos s in\n  let id = name s in\n  let bs = get_string (size - (pos s - start)) s in\n  Some (id, bs)\n\nlet custom_section s =\n  section_with_size `CustomSection custom None s\n\nlet non_custom_section s =\n  match id s with\n  | None | Some `CustomSection -> None\n  | _ -> skip 1 s; sized skip s; Some ()\n\n\n(* Modules *)\n\nlet rec iterate f s = if f s <> None then iterate f s\n\nlet magic = 0x6d736100l\n\nlet module_ s =\n  let header = u32 s in\n  require (header = magic) s 0 \"magic header not detected\";\n  let version = u32 s in\n  require (version = Encode.version) s 4 \"unknown binary version\";\n  iterate custom_section s;\n  let types = type_section s in\n  iterate custom_section s;\n  let imports = import_section s in\n  iterate custom_section s;\n  let func_types = func_section s in\n  iterate custom_section s;\n  let tables = table_section s in\n  iterate custom_section s;\n  let memories = memory_section s in\n  iterate custom_section s;\n  let globals = global_section s in\n  iterate custom_section s;\n  let exports = export_section s in\n  iterate custom_section s;\n  let start = start_section s in\n  iterate custom_section s;\n  let elems = elem_section s in\n  iterate custom_section s;\n  let data_count = data_count_section s in\n  iterate custom_section s;\n  let func_bodies = code_section s in\n  iterate custom_section s;\n  let datas = data_section s in\n  iterate custom_section s;\n  require (pos s = len s) s (len s) \"junk after last section\";\n  require (List.length func_types = List.length func_bodies)\n    s (len s) \"function and code section have inconsistent lengths\";\n  require (data_count = None || data_count = Some (Lib.List32.length datas))\n    s (len s) \"data count and data section have inconsistent lengths\";\n  require (data_count <> None ||\n    List.for_all Free.(fun f -> (func f).datas = Set.empty) func_bodies)\n    s (len s) \"data count section required\";\n  let funcs =\n    List.map2 Source.(fun t f -> {f.it with ftype = t} @@ f.at)\n      func_types func_bodies\n  in {types; tables; memories; globals; funcs; imports; exports; elems; datas; start}\n\n\nlet decode name bs = at module_ (stream name bs)\n\nlet all_custom tag s =\n  let header = u32 s in\n  require (header = magic) s 0 \"magic header not detected\";\n  let version = u32 s in\n  require (version = Encode.version) s 4 \"unknown binary version\";\n  let rec collect () =\n    iterate non_custom_section s;\n    match custom_section s with\n    | None -> []\n    | Some (n, s) when n = tag -> s :: collect ()\n    | Some _ -> collect ()\n  in collect ()\n\nlet decode_custom tag name bs = all_custom tag (stream name bs)\n"
  },
  {
    "path": "interpreter/binary/decode.mli",
    "content": "exception Code of Source.region * string\n\nval decode : string -> string -> Ast.module_ (* raises Code *)\n\nval decode_custom : Ast.name -> string -> string -> string list (* raises Code *)\n"
  },
  {
    "path": "interpreter/binary/encode.ml",
    "content": "(* Version *)\n\nlet version = 1l\n\n\n(* Errors *)\n\nmodule Code = Error.Make ()\nexception Code = Code.Error\n\n\n(* Encoding stream *)\n\ntype stream =\n{\n  buf : Buffer.t;\n  patches : (int * char) list ref\n}\n\nlet stream () = {buf = Buffer.create 8192; patches = ref []}\nlet pos s = Buffer.length s.buf\nlet put s b = Buffer.add_char s.buf b\nlet put_string s bs = Buffer.add_string s.buf bs\nlet patch s pos b = s.patches := (pos, b) :: !(s.patches)\n\nlet to_string s =\n  let bs = Buffer.to_bytes s.buf in\n  List.iter (fun (pos, b) -> Bytes.set bs pos b) !(s.patches);\n  Bytes.to_string bs\n\n\n(* Encoding *)\n\nmodule E (S : sig val stream : stream end) =\nstruct\n  let s = S.stream\n\n  (* Generic values *)\n\n  let u8 i = put s (Char.chr (i land 0xff))\n  let u16 i = u8 (i land 0xff); u8 (i lsr 8)\n  let u32 i =\n    Int32.(u16 (to_int (logand i 0xffffl));\n           u16 (to_int (shift_right i 16)))\n  let u64 i =\n    Int64.(u32 (to_int32 (logand i 0xffffffffL));\n           u32 (to_int32 (shift_right i 32)))\n\n  let rec vu64 i =\n    let b = Int64.(to_int (logand i 0x7fL)) in\n    if 0L <= i && i < 128L then u8 b\n    else (u8 (b lor 0x80); vu64 (Int64.shift_right_logical i 7))\n\n  let rec vs64 i =\n    let b = Int64.(to_int (logand i 0x7fL)) in\n    if -64L <= i && i < 64L then u8 b\n    else (u8 (b lor 0x80); vs64 (Int64.shift_right i 7))\n\n  let vu1 i = vu64 Int64.(logand (of_int i) 1L)\n  let vu32 i = vu64 Int64.(logand (of_int32 i) 0xffffffffL)\n  let vs7 i = vs64 (Int64.of_int i)\n  let vs32 i = vs64 (Int64.of_int32 i)\n  let vs33 i = vs64 (I64_convert.extend_i32_s i)\n  let f32 x = u32 (F32.to_bits x)\n  let f64 x = u64 (F64.to_bits x)\n\n  let len i =\n    if Int32.to_int (Int32.of_int i) <> i then\n      Code.error Source.no_region\n        \"cannot encode length with more than 32 bit\";\n    vu32 (Int32.of_int i)\n\n  let bool b = vu1 (if b then 1 else 0)\n  let string bs = len (String.length bs); put_string s bs\n  let name n = string (Utf8.encode n)\n  let list f xs = List.iter f xs\n  let opt f xo = Lib.Option.app f xo\n  let vec f xs = len (List.length xs); list f xs\n\n  let gap32 () = let p = pos s in u32 0l; u8 0; p\n  let patch_gap32 p n =\n    assert (n <= 0x0fff_ffff); (* Strings cannot excess 2G anyway *)\n    let lsb i = Char.chr (i land 0xff) in\n    patch s p (lsb (n lor 0x80));\n    patch s (p + 1) (lsb ((n lsr 7) lor 0x80));\n    patch s (p + 2) (lsb ((n lsr 14) lor 0x80));\n    patch s (p + 3) (lsb ((n lsr 21) lor 0x80));\n    patch s (p + 4) (lsb (n lsr 28))\n\n  (* Types *)\n\n  open Types\n\n  let num_type = function\n    | I32Type -> vs7 (-0x01)\n    | I64Type -> vs7 (-0x02)\n    | F32Type -> vs7 (-0x03)\n    | F64Type -> vs7 (-0x04)\n\n  let ref_type = function\n    | FuncRefType -> vs7 (-0x10)\n    | ExternRefType -> vs7 (-0x11)\n\n  let value_type = function\n    | NumType t -> num_type t\n    | RefType t -> ref_type t\n\n  let func_type = function\n    | FuncType (ts1, ts2) ->\n      vs7 (-0x20); vec value_type ts1; vec value_type ts2\n\n  let limits vu {min; max} =\n    bool (max <> None); vu min; opt vu max\n\n  let table_type = function\n    | TableType (lim, t) -> ref_type t; limits vu32 lim\n\n  let memory_type = function\n    | MemoryType lim -> limits vu32 lim\n\n  let mutability = function\n    | Immutable -> u8 0\n    | Mutable -> u8 1\n\n  let global_type = function\n    | GlobalType (t, mut) -> value_type t; mutability mut\n\n  (* Expressions *)\n\n  open Source\n  open Ast\n  open Values\n\n  let op n = u8 n\n  let end_ () = op 0x0b\n\n  let memop {align; offset; _} = vu32 (Int32.of_int align); vu32 offset\n\n  let var x = vu32 x.it\n\n  let block_type = function\n    | VarBlockType x -> vs33 x.it\n    | ValBlockType None -> vs7 (-0x40)\n    | ValBlockType (Some t) -> value_type t\n\n  let rec instr e =\n    match e.it with\n    | Unreachable -> op 0x00\n    | Nop -> op 0x01\n\n    | Block (bt, es) -> op 0x02; block_type bt; list instr es; end_ ()\n    | Loop (bt, es) -> op 0x03; block_type bt; list instr es; end_ ()\n    | If (bt, es1, es2) ->\n      op 0x04; block_type bt; list instr es1;\n      if es2 <> [] then op 0x05;\n      list instr es2; end_ ()\n\n    | Br x -> op 0x0c; var x\n    | BrIf x -> op 0x0d; var x\n    | BrTable (xs, x) -> op 0x0e; vec var xs; var x\n    | Return -> op 0x0f\n    | Call x -> op 0x10; var x\n    | CallIndirect (x, y) -> op 0x11; var y; var x\n\n    | Drop -> op 0x1a\n    | Select None -> op 0x1b\n    | Select (Some ts) -> op 0x1c; vec value_type ts\n\n    | LocalGet x -> op 0x20; var x\n    | LocalSet x -> op 0x21; var x\n    | LocalTee x -> op 0x22; var x\n    | GlobalGet x -> op 0x23; var x\n    | GlobalSet x -> op 0x24; var x\n\n    | TableGet x -> op 0x25; var x\n    | TableSet x -> op 0x26; var x\n    | TableSize x -> op 0xfc; vu32 0x10l; var x\n    | TableGrow x -> op 0xfc; vu32 0x0fl; var x\n    | TableFill x -> op 0xfc; vu32 0x11l; var x\n    | TableCopy (x, y) -> op 0xfc; vu32 0x0el; var x; var y\n    | TableInit (x, y) -> op 0xfc; vu32 0x0cl; var y; var x\n    | ElemDrop x -> op 0xfc; vu32 0x0dl; var x\n\n    | Load ({ty = I32Type; sz = None; _} as mo) -> op 0x28; memop mo\n    | Load ({ty = I64Type; sz = None; _} as mo) -> op 0x29; memop mo\n    | Load ({ty = F32Type; sz = None; _} as mo) -> op 0x2a; memop mo\n    | Load ({ty = F64Type; sz = None; _} as mo) -> op 0x2b; memop mo\n    | Load ({ty = I32Type; sz = Some (Pack8, SX); _} as mo) ->\n      op 0x2c; memop mo\n    | Load ({ty = I32Type; sz = Some (Pack8, ZX); _} as mo) ->\n      op 0x2d; memop mo\n    | Load ({ty = I32Type; sz = Some (Pack16, SX); _} as mo) ->\n      op 0x2e; memop mo\n    | Load ({ty = I32Type; sz = Some (Pack16, ZX); _} as mo) ->\n      op 0x2f; memop mo\n    | Load {ty = I32Type; sz = Some (Pack32, _); _} ->\n      assert false\n    | Load ({ty = I64Type; sz = Some (Pack8, SX); _} as mo) ->\n      op 0x30; memop mo\n    | Load ({ty = I64Type; sz = Some (Pack8, ZX); _} as mo) ->\n      op 0x31; memop mo\n    | Load ({ty = I64Type; sz = Some (Pack16, SX); _} as mo) ->\n      op 0x32; memop mo\n    | Load ({ty = I64Type; sz = Some (Pack16, ZX); _} as mo) ->\n      op 0x33; memop mo\n    | Load ({ty = I64Type; sz = Some (Pack32, SX); _} as mo) ->\n      op 0x34; memop mo\n    | Load ({ty = I64Type; sz = Some (Pack32, ZX); _} as mo) ->\n      op 0x35; memop mo\n    | Load {ty = F32Type | F64Type; sz = Some _; _} ->\n      assert false\n\n    | Store ({ty = I32Type; sz = None; _} as mo) -> op 0x36; memop mo\n    | Store ({ty = I64Type; sz = None; _} as mo) -> op 0x37; memop mo\n    | Store ({ty = F32Type; sz = None; _} as mo) -> op 0x38; memop mo\n    | Store ({ty = F64Type; sz = None; _} as mo) -> op 0x39; memop mo\n    | Store ({ty = I32Type; sz = Some Pack8; _} as mo) -> op 0x3a; memop mo\n    | Store ({ty = I32Type; sz = Some Pack16; _} as mo) -> op 0x3b; memop mo\n    | Store {ty = I32Type; sz = Some Pack32; _} -> assert false\n    | Store ({ty = I64Type; sz = Some Pack8; _} as mo) -> op 0x3c; memop mo\n    | Store ({ty = I64Type; sz = Some Pack16; _} as mo) -> op 0x3d; memop mo\n    | Store ({ty = I64Type; sz = Some Pack32; _} as mo) -> op 0x3e; memop mo\n    | Store {ty = F32Type | F64Type; sz = Some _; _} -> assert false\n\n    | MemorySize -> op 0x3f; u8 0x00\n    | MemoryGrow -> op 0x40; u8 0x00\n    | MemoryFill -> op 0xfc; vu32 0x0bl; u8 0x00\n    | MemoryCopy -> op 0xfc; vu32 0x0al; u8 0x00; u8 0x00\n    | MemoryInit x -> op 0xfc; vu32 0x08l; var x; u8 0x00\n    | DataDrop x -> op 0xfc; vu32 0x09l; var x\n\n    | RefNull t -> op 0xd0; ref_type t\n    | RefIsNull -> op 0xd1\n    | RefFunc x -> op 0xd2; var x\n\n    | Const {it = I32 c; _} -> op 0x41; vs32 c\n    | Const {it = I64 c; _} -> op 0x42; vs64 c\n    | Const {it = F32 c; _} -> op 0x43; f32 c\n    | Const {it = F64 c; _} -> op 0x44; f64 c\n\n    | Test (I32 I32Op.Eqz) -> op 0x45\n    | Test (I64 I64Op.Eqz) -> op 0x50\n    | Test (F32 _) -> assert false\n    | Test (F64 _) -> assert false\n\n    | Compare (I32 I32Op.Eq) -> op 0x46\n    | Compare (I32 I32Op.Ne) -> op 0x47\n    | Compare (I32 I32Op.LtS) -> op 0x48\n    | Compare (I32 I32Op.LtU) -> op 0x49\n    | Compare (I32 I32Op.GtS) -> op 0x4a\n    | Compare (I32 I32Op.GtU) -> op 0x4b\n    | Compare (I32 I32Op.LeS) -> op 0x4c\n    | Compare (I32 I32Op.LeU) -> op 0x4d\n    | Compare (I32 I32Op.GeS) -> op 0x4e\n    | Compare (I32 I32Op.GeU) -> op 0x4f\n\n    | Compare (I64 I64Op.Eq) -> op 0x51\n    | Compare (I64 I64Op.Ne) -> op 0x52\n    | Compare (I64 I64Op.LtS) -> op 0x53\n    | Compare (I64 I64Op.LtU) -> op 0x54\n    | Compare (I64 I64Op.GtS) -> op 0x55\n    | Compare (I64 I64Op.GtU) -> op 0x56\n    | Compare (I64 I64Op.LeS) -> op 0x57\n    | Compare (I64 I64Op.LeU) -> op 0x58\n    | Compare (I64 I64Op.GeS) -> op 0x59\n    | Compare (I64 I64Op.GeU) -> op 0x5a\n\n    | Compare (F32 F32Op.Eq) -> op 0x5b\n    | Compare (F32 F32Op.Ne) -> op 0x5c\n    | Compare (F32 F32Op.Lt) -> op 0x5d\n    | Compare (F32 F32Op.Gt) -> op 0x5e\n    | Compare (F32 F32Op.Le) -> op 0x5f\n    | Compare (F32 F32Op.Ge) -> op 0x60\n\n    | Compare (F64 F64Op.Eq) -> op 0x61\n    | Compare (F64 F64Op.Ne) -> op 0x62\n    | Compare (F64 F64Op.Lt) -> op 0x63\n    | Compare (F64 F64Op.Gt) -> op 0x64\n    | Compare (F64 F64Op.Le) -> op 0x65\n    | Compare (F64 F64Op.Ge) -> op 0x66\n\n    | Unary (I32 I32Op.Clz) -> op 0x67\n    | Unary (I32 I32Op.Ctz) -> op 0x68\n    | Unary (I32 I32Op.Popcnt) -> op 0x69\n    | Unary (I32 (I32Op.ExtendS Pack8)) -> op 0xc0\n    | Unary (I32 (I32Op.ExtendS Pack16)) -> op 0xc1\n    | Unary (I32 (I32Op.ExtendS Pack32)) -> assert false\n\n    | Unary (I64 I64Op.Clz) -> op 0x79\n    | Unary (I64 I64Op.Ctz) -> op 0x7a\n    | Unary (I64 I64Op.Popcnt) -> op 0x7b\n    | Unary (I64 (I64Op.ExtendS Pack8)) -> op 0xc2\n    | Unary (I64 (I64Op.ExtendS Pack16)) -> op 0xc3\n    | Unary (I64 (I64Op.ExtendS Pack32)) -> op 0xc4\n\n    | Unary (F32 F32Op.Abs) -> op 0x8b\n    | Unary (F32 F32Op.Neg) -> op 0x8c\n    | Unary (F32 F32Op.Ceil) -> op 0x8d\n    | Unary (F32 F32Op.Floor) -> op 0x8e\n    | Unary (F32 F32Op.Trunc) -> op 0x8f\n    | Unary (F32 F32Op.Nearest) -> op 0x90\n    | Unary (F32 F32Op.Sqrt) -> op 0x91\n\n    | Unary (F64 F64Op.Abs) -> op 0x99\n    | Unary (F64 F64Op.Neg) -> op 0x9a\n    | Unary (F64 F64Op.Ceil) -> op 0x9b\n    | Unary (F64 F64Op.Floor) -> op 0x9c\n    | Unary (F64 F64Op.Trunc) -> op 0x9d\n    | Unary (F64 F64Op.Nearest) -> op 0x9e\n    | Unary (F64 F64Op.Sqrt) -> op 0x9f\n\n    | Binary (I32 I32Op.Add) -> op 0x6a\n    | Binary (I32 I32Op.Sub) -> op 0x6b\n    | Binary (I32 I32Op.Mul) -> op 0x6c\n    | Binary (I32 I32Op.DivS) -> op 0x6d\n    | Binary (I32 I32Op.DivU) -> op 0x6e\n    | Binary (I32 I32Op.RemS) -> op 0x6f\n    | Binary (I32 I32Op.RemU) -> op 0x70\n    | Binary (I32 I32Op.And) -> op 0x71\n    | Binary (I32 I32Op.Or) -> op 0x72\n    | Binary (I32 I32Op.Xor) -> op 0x73\n    | Binary (I32 I32Op.Shl) -> op 0x74\n    | Binary (I32 I32Op.ShrS) -> op 0x75\n    | Binary (I32 I32Op.ShrU) -> op 0x76\n    | Binary (I32 I32Op.Rotl) -> op 0x77\n    | Binary (I32 I32Op.Rotr) -> op 0x78\n\n    | Binary (I64 I64Op.Add) -> op 0x7c\n    | Binary (I64 I64Op.Sub) -> op 0x7d\n    | Binary (I64 I64Op.Mul) -> op 0x7e\n    | Binary (I64 I64Op.DivS) -> op 0x7f\n    | Binary (I64 I64Op.DivU) -> op 0x80\n    | Binary (I64 I64Op.RemS) -> op 0x81\n    | Binary (I64 I64Op.RemU) -> op 0x82\n    | Binary (I64 I64Op.And) -> op 0x83\n    | Binary (I64 I64Op.Or) -> op 0x84\n    | Binary (I64 I64Op.Xor) -> op 0x85\n    | Binary (I64 I64Op.Shl) -> op 0x86\n    | Binary (I64 I64Op.ShrS) -> op 0x87\n    | Binary (I64 I64Op.ShrU) -> op 0x88\n    | Binary (I64 I64Op.Rotl) -> op 0x89\n    | Binary (I64 I64Op.Rotr) -> op 0x8a\n\n    | Binary (F32 F32Op.Add) -> op 0x92\n    | Binary (F32 F32Op.Sub) -> op 0x93\n    | Binary (F32 F32Op.Mul) -> op 0x94\n    | Binary (F32 F32Op.Div) -> op 0x95\n    | Binary (F32 F32Op.Min) -> op 0x96\n    | Binary (F32 F32Op.Max) -> op 0x97\n    | Binary (F32 F32Op.CopySign) -> op 0x98\n\n    | Binary (F64 F64Op.Add) -> op 0xa0\n    | Binary (F64 F64Op.Sub) -> op 0xa1\n    | Binary (F64 F64Op.Mul) -> op 0xa2\n    | Binary (F64 F64Op.Div) -> op 0xa3\n    | Binary (F64 F64Op.Min) -> op 0xa4\n    | Binary (F64 F64Op.Max) -> op 0xa5\n    | Binary (F64 F64Op.CopySign) -> op 0xa6\n\n    | Convert (I32 I32Op.ExtendSI32) -> assert false\n    | Convert (I32 I32Op.ExtendUI32) -> assert false\n    | Convert (I32 I32Op.WrapI64) -> op 0xa7\n    | Convert (I32 I32Op.TruncSF32) -> op 0xa8\n    | Convert (I32 I32Op.TruncUF32) -> op 0xa9\n    | Convert (I32 I32Op.TruncSF64) -> op 0xaa\n    | Convert (I32 I32Op.TruncUF64) -> op 0xab\n    | Convert (I32 I32Op.TruncSatSF32) -> op 0xfc; vu32 0x00l\n    | Convert (I32 I32Op.TruncSatUF32) -> op 0xfc; vu32 0x01l\n    | Convert (I32 I32Op.TruncSatSF64) -> op 0xfc; vu32 0x02l\n    | Convert (I32 I32Op.TruncSatUF64) -> op 0xfc; vu32 0x03l\n    | Convert (I32 I32Op.ReinterpretFloat) -> op 0xbc\n\n    | Convert (I64 I64Op.ExtendSI32) -> op 0xac\n    | Convert (I64 I64Op.ExtendUI32) -> op 0xad\n    | Convert (I64 I64Op.WrapI64) -> assert false\n    | Convert (I64 I64Op.TruncSF32) -> op 0xae\n    | Convert (I64 I64Op.TruncUF32) -> op 0xaf\n    | Convert (I64 I64Op.TruncSF64) -> op 0xb0\n    | Convert (I64 I64Op.TruncUF64) -> op 0xb1\n    | Convert (I64 I64Op.TruncSatSF32) -> op 0xfc; vu32 0x04l\n    | Convert (I64 I64Op.TruncSatUF32) -> op 0xfc; vu32 0x05l\n    | Convert (I64 I64Op.TruncSatSF64) -> op 0xfc; vu32 0x06l\n    | Convert (I64 I64Op.TruncSatUF64) -> op 0xfc; vu32 0x07l\n    | Convert (I64 I64Op.ReinterpretFloat) -> op 0xbd\n\n    | Convert (F32 F32Op.ConvertSI32) -> op 0xb2\n    | Convert (F32 F32Op.ConvertUI32) -> op 0xb3\n    | Convert (F32 F32Op.ConvertSI64) -> op 0xb4\n    | Convert (F32 F32Op.ConvertUI64) -> op 0xb5\n    | Convert (F32 F32Op.PromoteF32) -> assert false\n    | Convert (F32 F32Op.DemoteF64) -> op 0xb6\n    | Convert (F32 F32Op.ReinterpretInt) -> op 0xbe\n\n    | Convert (F64 F64Op.ConvertSI32) -> op 0xb7\n    | Convert (F64 F64Op.ConvertUI32) -> op 0xb8\n    | Convert (F64 F64Op.ConvertSI64) -> op 0xb9\n    | Convert (F64 F64Op.ConvertUI64) -> op 0xba\n    | Convert (F64 F64Op.PromoteF32) -> op 0xbb\n    | Convert (F64 F64Op.DemoteF64) -> assert false\n    | Convert (F64 F64Op.ReinterpretInt) -> op 0xbf\n\n  let const c =\n    list instr c.it; end_ ()\n\n  (* Sections *)\n\n  let section id f x needed =\n    if needed then begin\n      u8 id;\n      let g = gap32 () in\n      let p = pos s in\n      f x;\n      patch_gap32 g (pos s - p)\n    end\n\n  (* Type section *)\n  let type_ t = func_type t.it\n\n  let type_section ts =\n    section 1 (vec type_) ts (ts <> [])\n\n  (* Import section *)\n  let import_desc d =\n    match d.it with\n    | FuncImport x -> u8 0x00; var x\n    | TableImport t -> u8 0x01; table_type t\n    | MemoryImport t -> u8 0x02; memory_type t\n    | GlobalImport t -> u8 0x03; global_type t\n\n  let import im =\n    let {module_name; item_name; idesc} = im.it in\n    name module_name; name item_name; import_desc idesc\n\n  let import_section ims =\n    section 2 (vec import) ims (ims <> [])\n\n  (* Function section *)\n  let func f = var f.it.ftype\n\n  let func_section fs =\n    section 3 (vec func) fs (fs <> [])\n\n  (* Table section *)\n  let table tab =\n    let {ttype} = tab.it in\n    table_type ttype\n\n  let table_section tabs =\n    section 4 (vec table) tabs (tabs <> [])\n\n  (* Memory section *)\n  let memory mem =\n    let {mtype} = mem.it in\n    memory_type mtype\n\n  let memory_section mems =\n    section 5 (vec memory) mems (mems <> [])\n\n  (* Global section *)\n  let global g =\n    let {gtype; ginit} = g.it in\n    global_type gtype; const ginit\n\n  let global_section gs =\n    section 6 (vec global) gs (gs <> [])\n\n  (* Export section *)\n  let export_desc d =\n    match d.it with\n    | FuncExport x -> u8 0; var x\n    | TableExport x -> u8 1; var x\n    | MemoryExport x -> u8 2; var x\n    | GlobalExport x -> u8 3; var x\n\n  let export ex =\n    let {name = n; edesc} = ex.it in\n    name n; export_desc edesc\n\n  let export_section exs =\n    section 7 (vec export) exs (exs <> [])\n\n  (* Start section *)\n  let start_section xo =\n    section 8 (opt var) xo (xo <> None)\n\n  (* Code section *)\n  let compress ts =\n    let combine t = function\n      | (t', n) :: ts when t = t' -> (t, n + 1) :: ts\n      | ts -> (t, 1) :: ts\n    in List.fold_right combine ts []\n\n  let local (t, n) = len n; value_type t\n\n  let code f =\n    let {locals; body; _} = f.it in\n    let g = gap32 () in\n    let p = pos s in\n    vec local (compress locals);\n    list instr body;\n    end_ ();\n    patch_gap32 g (pos s - p)\n\n  let code_section fs =\n    section 10 (vec code) fs (fs <> [])\n\n  (* Element section *)\n  let is_elem_kind = function\n    | FuncRefType -> true\n    | _ -> false\n\n  let elem_kind = function\n    | FuncRefType -> u8 0x00\n    | _ -> assert false\n\n  let is_elem_index e =\n    match e.it with\n    | [{it = RefFunc _; _}] -> true\n    | _ -> false\n\n  let elem_index e =\n    match e.it with\n    | [{it = RefFunc x; _}] -> var x\n    | _ -> assert false\n\n  let elem seg =\n    let {etype; einit; emode} = seg.it in\n    if is_elem_kind etype && List.for_all is_elem_index einit then\n      match emode.it with\n      | Passive ->\n        vu32 0x01l; elem_kind etype; vec elem_index einit\n      | Active {index; offset} when index.it = 0l && etype = FuncRefType ->\n        vu32 0x00l; const offset; vec elem_index einit\n      | Active {index; offset} ->\n        vu32 0x02l;\n        var index; const offset; elem_kind etype; vec elem_index einit\n      | Declarative ->\n        vu32 0x03l; elem_kind etype; vec elem_index einit\n    else\n      match emode.it with\n      | Passive ->\n        vu32 0x05l; ref_type etype; vec const einit\n      | Active {index; offset} when index.it = 0l && etype = FuncRefType ->\n        vu32 0x04l; const offset; vec const einit\n      | Active {index; offset} ->\n        vu32 0x06l; var index; const offset; ref_type etype; vec const einit\n      | Declarative ->\n        vu32 0x07l; ref_type etype; vec const einit\n\n  let elem_section elems =\n    section 9 (vec elem) elems (elems <> [])\n\n  (* Data section *)\n  let data seg =\n    let {dinit; dmode} = seg.it in\n    match dmode.it with\n    | Passive ->\n      vu32 0x01l; string dinit\n    | Active {index; offset} when index.it = 0l ->\n      vu32 0x00l; const offset; string dinit\n    | Active {index; offset} ->\n      vu32 0x02l; var index; const offset; string dinit\n    | Declarative ->\n      assert false\n\n  let data_section datas =\n    section 11 (vec data) datas (datas <> [])\n\n  (* Data count section *)\n  let data_count_section datas m =\n    section 12 len (List.length datas) Free.((module_ m).datas <> Set.empty)\n\n  (* Custom section *)\n  let custom (n, bs) =\n    name n;\n    put_string s bs\n\n  let custom_section n bs =\n    section 0 custom (n, bs) true\n\n  (* Module *)\n  let module_ m =\n    u32 0x6d736100l;\n    u32 version;\n    type_section m.it.types;\n    import_section m.it.imports;\n    func_section m.it.funcs;\n    table_section m.it.tables;\n    memory_section m.it.memories;\n    global_section m.it.globals;\n    export_section m.it.exports;\n    start_section m.it.start;\n    elem_section m.it.elems;\n    data_count_section m.it.datas m;\n    code_section m.it.funcs;\n    data_section m.it.datas\nend\n\n\nlet encode m =\n  let module E = E (struct let stream = stream () end) in\n  E.module_ m; to_string E.s\n\nlet encode_custom name content =\n  let module E = E (struct let stream = stream () end) in\n  E.custom_section name content; to_string E.s\n"
  },
  {
    "path": "interpreter/binary/encode.mli",
    "content": "exception Code of Source.region * string\n\nval version : int32\nval encode : Ast.module_ -> string\nval encode_custom : Ast.name -> string -> string\n"
  },
  {
    "path": "interpreter/binary/utf8.ml",
    "content": "exception Utf8\n\nlet con n = 0x80 lor (n land 0x3f)\n\nlet rec encode ns = Lib.String.implode (List.map Char.chr (encode' ns))\nand encode' = function\n  | [] -> []\n  | n::ns when n < 0 ->\n    raise Utf8\n  | n::ns when n < 0x80 ->\n    n :: encode' ns\n  | n::ns when n < 0x800 ->\n    0xc0 lor (n lsr 6) :: con n :: encode' ns\n  | n::ns when n < 0x10000 ->\n    0xe0 lor (n lsr 12) :: con (n lsr 6) :: con n :: encode' ns\n  | n::ns when n < 0x110000 ->\n    0xf0 lor (n lsr 18) :: con (n lsr 12) :: con (n lsr 6) :: con n\n    :: encode' ns\n  | _ ->\n    raise Utf8\n\nlet con b = if b land 0xc0 = 0x80 then b land 0x3f else raise Utf8\nlet code min n =\n  if n < min || (0xd800 <= n && n < 0xe000) || n >= 0x110000 then raise Utf8\n  else n\n\nlet rec decode s = decode' (List.map Char.code (Lib.String.explode s))\nand decode' = function\n  | [] -> []\n  | b1::bs when b1 < 0x80 ->\n    code 0x0 b1 :: decode' bs\n  | b1::bs when b1 < 0xc0 ->\n    raise Utf8\n  | b1::b2::bs when b1 < 0xe0 ->\n    code 0x80 ((b1 land 0x1f) lsl 6 + con b2) :: decode' bs\n  | b1::b2::b3::bs when b1 < 0xf0 ->\n    code 0x800 ((b1 land 0x0f) lsl 12 + con b2 lsl 6 + con b3) :: decode' bs\n  | b1::b2::b3::b4::bs when b1 < 0xf8 ->\n    code 0x10000 ((b1 land 0x07) lsl 18 + con b2 lsl 12 + con b3 lsl 6 + con b4)\n    :: decode' bs\n  | _ ->\n    raise Utf8\n"
  },
  {
    "path": "interpreter/binary/utf8.mli",
    "content": "exception Utf8\n\nval decode : string -> int list (* raises Utf8 *)\nval encode : int list -> string (* raises Utf8 *)\n"
  },
  {
    "path": "interpreter/exec/eval.ml",
    "content": "open Values\nopen Types\nopen Instance\nopen Ast\nopen Source\n\n\n(* Errors *)\n\nmodule Link = Error.Make ()\nmodule Trap = Error.Make ()\nmodule Crash = Error.Make ()\nmodule Exhaustion = Error.Make ()\n\nexception Link = Link.Error\nexception Trap = Trap.Error\nexception Crash = Crash.Error (* failure that cannot happen in valid code *)\nexception Exhaustion = Exhaustion.Error\n\nlet table_error at = function\n  | Table.Bounds -> \"out of bounds table access\"\n  | Table.SizeOverflow -> \"table size overflow\"\n  | Table.SizeLimit -> \"table size limit reached\"\n  | Table.Type -> Crash.error at \"type mismatch at table access\"\n  | exn -> raise exn\n\nlet memory_error at = function\n  | Memory.Bounds -> \"out of bounds memory access\"\n  | Memory.SizeOverflow -> \"memory size overflow\"\n  | Memory.SizeLimit -> \"memory size limit reached\"\n  | Memory.Type -> Crash.error at \"type mismatch at memory access\"\n  | exn -> raise exn\n\nlet numeric_error at = function\n  | Numeric_error.IntegerOverflow -> \"integer overflow\"\n  | Numeric_error.IntegerDivideByZero -> \"integer divide by zero\"\n  | Numeric_error.InvalidConversionToInteger -> \"invalid conversion to integer\"\n  | Eval_numeric.TypeError (i, v, t) ->\n    Crash.error at\n      (\"type error, expected \" ^ Types.string_of_num_type t ^ \" as operand \" ^\n       string_of_int i ^ \", got \" ^ Types.string_of_num_type (type_of_num v))\n  | exn -> raise exn\n\n\n(* Administrative Expressions & Configurations *)\n\ntype 'a stack = 'a list\n\ntype frame =\n{\n  inst : module_inst;\n  locals : value ref list;\n}\n\ntype code = value stack * admin_instr list\n\nand admin_instr = admin_instr' phrase\nand admin_instr' =\n  | Plain of instr'\n  | Refer of ref_\n  | Invoke of func_inst\n  | Trapping of string\n  | Returning of value stack\n  | Breaking of int32 * value stack\n  | Label of int32 * instr list * code\n  | Frame of int32 * frame * code\n\ntype config =\n{\n  frame : frame;\n  code : code;\n  budget : int;  (* to model stack overflow *)\n}\n\nlet frame inst locals = {inst; locals}\nlet config inst vs es = {frame = frame inst []; code = vs, es; budget = 300}\n\nlet plain e = Plain e.it @@ e.at\n\nlet lookup category list x =\n  try Lib.List32.nth list x.it with Failure _ ->\n    Crash.error x.at (\"undefined \" ^ category ^ \" \" ^ Int32.to_string x.it)\n\nlet type_ (inst : module_inst) x = lookup \"type\" inst.types x\nlet func (inst : module_inst) x = lookup \"function\" inst.funcs x\nlet table (inst : module_inst) x = lookup \"table\" inst.tables x\nlet memory (inst : module_inst) x = lookup \"memory\" inst.memories x\nlet global (inst : module_inst) x = lookup \"global\" inst.globals x\nlet elem (inst : module_inst) x = lookup \"element segment\" inst.elems x\nlet data (inst : module_inst) x = lookup \"data segment\" inst.datas x\nlet local (frame : frame) x = lookup \"local\" frame.locals x\n\nlet any_ref inst x i at =\n  try Table.load (table inst x) i with Table.Bounds ->\n    Trap.error at (\"undefined element \" ^ Int32.to_string i)\n\nlet func_ref inst x i at =\n  match any_ref inst x i at with\n  | FuncRef f -> f\n  | NullRef _ -> Trap.error at (\"uninitialized element \" ^ Int32.to_string i)\n  | _ -> Crash.error at (\"type mismatch for element \" ^ Int32.to_string i)\n\nlet func_type_of = function\n  | Func.AstFunc (t, inst, f) -> t\n  | Func.HostFunc (t, _) -> t\n\nlet block_type inst bt =\n  match bt with\n  | VarBlockType x -> type_ inst x\n  | ValBlockType None -> FuncType ([], [])\n  | ValBlockType (Some t) -> FuncType ([], [t])\n\nlet take n (vs : 'a stack) at =\n  try Lib.List32.take n vs with Failure _ -> Crash.error at \"stack underflow\"\n\nlet drop n (vs : 'a stack) at =\n  try Lib.List32.drop n vs with Failure _ -> Crash.error at \"stack underflow\"\n\n\n(* Evaluation *)\n\n(*\n * Conventions:\n *   e  : instr\n *   v  : value\n *   es : instr list\n *   vs : value stack\n *   c : config\n *)\n\nlet mem_oob frame x i n =\n  I64.gt_u (I64.add (I64_convert.extend_i32_u i) (I64_convert.extend_i32_u n))\n    (Memory.bound (memory frame.inst x))\n\nlet data_oob frame x i n =\n  I64.gt_u (I64.add (I64_convert.extend_i32_u i) (I64_convert.extend_i32_u n))\n    (I64.of_int_u (String.length !(data frame.inst x)))\n\nlet table_oob frame x i n =\n  I64.gt_u (I64.add (I64_convert.extend_i32_u i) (I64_convert.extend_i32_u n))\n    (I64_convert.extend_i32_u (Table.size (table frame.inst x)))\n\nlet elem_oob frame x i n =\n  I64.gt_u (I64.add (I64_convert.extend_i32_u i) (I64_convert.extend_i32_u n))\n    (I64.of_int_u (List.length !(elem frame.inst x)))\n\nlet rec step (c : config) : config =\n  let {frame; code = vs, es; _} = c in\n  let e = List.hd es in\n  let vs', es' =\n    match e.it, vs with\n    | Plain e', vs ->\n      (match e', vs with\n      | Unreachable, vs ->\n        vs, [Trapping \"unreachable executed\" @@ e.at]\n\n      | Nop, vs ->\n        vs, []\n\n      | Block (bt, es'), vs ->\n        let FuncType (ts1, ts2) = block_type frame.inst bt in\n        let n1 = Lib.List32.length ts1 in\n        let n2 = Lib.List32.length ts2 in\n        let args, vs' = take n1 vs e.at, drop n1 vs e.at in\n        vs', [Label (n2, [], (args, List.map plain es')) @@ e.at]\n\n      | Loop (bt, es'), vs ->\n        let FuncType (ts1, ts2) = block_type frame.inst bt in\n        let n1 = Lib.List32.length ts1 in\n        let args, vs' = take n1 vs e.at, drop n1 vs e.at in\n        vs', [Label (n1, [e' @@ e.at], (args, List.map plain es')) @@ e.at]\n\n      | If (bt, es1, es2), Num (I32 i) :: vs' ->\n        if i = 0l then\n          vs', [Plain (Block (bt, es2)) @@ e.at]\n        else\n          vs', [Plain (Block (bt, es1)) @@ e.at]\n\n      | Br x, vs ->\n        [], [Breaking (x.it, vs) @@ e.at]\n\n      | BrIf x, Num (I32 i) :: vs' ->\n        if i = 0l then\n          vs', []\n        else\n          vs', [Plain (Br x) @@ e.at]\n\n      | BrTable (xs, x), Num (I32 i) :: vs' ->\n        if I32.ge_u i (Lib.List32.length xs) then\n          vs', [Plain (Br x) @@ e.at]\n        else\n          vs', [Plain (Br (Lib.List32.nth xs i)) @@ e.at]\n\n      | Return, vs ->\n        [], [Returning vs @@ e.at]\n\n      | Call x, vs ->\n        vs, [Invoke (func frame.inst x) @@ e.at]\n\n      | CallIndirect (x, y), Num (I32 i) :: vs ->\n        let func = func_ref frame.inst x i e.at in\n        if type_ frame.inst y <> Func.type_of func then\n          vs, [Trapping \"indirect call type mismatch\" @@ e.at]\n        else\n          vs, [Invoke func @@ e.at]\n\n      | Drop, v :: vs' ->\n        vs', []\n\n      | Select _, Num (I32 i) :: v2 :: v1 :: vs' ->\n        if i = 0l then\n          v2 :: vs', []\n        else\n          v1 :: vs', []\n\n      | LocalGet x, vs ->\n        !(local frame x) :: vs, []\n\n      | LocalSet x, v :: vs' ->\n        local frame x := v;\n        vs', []\n\n      | LocalTee x, v :: vs' ->\n        local frame x := v;\n        v :: vs', []\n\n      | GlobalGet x, vs ->\n        Global.load (global frame.inst x) :: vs, []\n\n      | GlobalSet x, v :: vs' ->\n        (try Global.store (global frame.inst x) v; vs', []\n        with Global.NotMutable -> Crash.error e.at \"write to immutable global\"\n           | Global.Type -> Crash.error e.at \"type mismatch at global write\")\n\n      | TableGet x, Num (I32 i) :: vs' ->\n        (try Ref (Table.load (table frame.inst x) i) :: vs', []\n        with exn -> vs', [Trapping (table_error e.at exn) @@ e.at])\n\n      | TableSet x, Ref r :: Num (I32 i) :: vs' ->\n        (try Table.store (table frame.inst x) i r; vs', []\n        with exn -> vs', [Trapping (table_error e.at exn) @@ e.at])\n\n      | TableSize x, vs ->\n        Num (I32 (Table.size (table frame.inst x))) :: vs, []\n\n      | TableGrow x, Num (I32 delta) :: Ref r :: vs' ->\n        let tab = table frame.inst x in\n        let old_size = Table.size tab in\n        let result =\n          try Table.grow tab delta r; old_size\n          with Table.SizeOverflow | Table.SizeLimit | Table.OutOfMemory -> -1l\n        in Num (I32 result) :: vs', []\n\n      | TableFill x, Num (I32 n) :: Ref r :: Num (I32 i) :: vs' ->\n        if table_oob frame x i n then\n          vs', [Trapping (table_error e.at Table.Bounds) @@ e.at]\n        else if n = 0l then\n          vs', []\n        else\n          let _ = assert (I32.lt_u i 0xffff_ffffl) in\n          vs', List.map (at e.at) [\n            Plain (Const (I32 i @@ e.at));\n            Refer r;\n            Plain (TableSet x);\n            Plain (Const (I32 (I32.add i 1l) @@ e.at));\n            Refer r;\n            Plain (Const (I32 (I32.sub n 1l) @@ e.at));\n            Plain (TableFill x);\n          ]\n\n      | TableCopy (x, y), Num (I32 n) :: Num (I32 s) :: Num (I32 d) :: vs' ->\n        if table_oob frame x d n || table_oob frame y s n then\n          vs', [Trapping (table_error e.at Table.Bounds) @@ e.at]\n        else if n = 0l then\n          vs', []\n        else if I32.le_u d s then\n          vs', List.map (at e.at) [\n            Plain (Const (I32 d @@ e.at));\n            Plain (Const (I32 s @@ e.at));\n            Plain (TableGet y);\n            Plain (TableSet x);\n            Plain (Const (I32 (I32.add d 1l) @@ e.at));\n            Plain (Const (I32 (I32.add s 1l) @@ e.at));\n            Plain (Const (I32 (I32.sub n 1l) @@ e.at));\n            Plain (TableCopy (x, y));\n          ]\n        else (* d > s *)\n          vs', List.map (at e.at) [\n            Plain (Const (I32 (I32.add d 1l) @@ e.at));\n            Plain (Const (I32 (I32.add s 1l) @@ e.at));\n            Plain (Const (I32 (I32.sub n 1l) @@ e.at));\n            Plain (TableCopy (x, y));\n            Plain (Const (I32 d @@ e.at));\n            Plain (Const (I32 s @@ e.at));\n            Plain (TableGet y);\n            Plain (TableSet x);\n          ]\n\n      | TableInit (x, y), Num (I32 n) :: Num (I32 s) :: Num (I32 d) :: vs' ->\n        if table_oob frame x d n || elem_oob frame y s n then\n          vs', [Trapping (table_error e.at Table.Bounds) @@ e.at]\n        else if n = 0l then\n          vs', []\n        else\n          let seg = !(elem frame.inst y) in\n          vs', List.map (at e.at) [\n            Plain (Const (I32 d @@ e.at));\n            Refer (List.nth seg (Int32.to_int s));\n            Plain (TableSet x);\n            Plain (Const (I32 (I32.add d 1l) @@ e.at));\n            Plain (Const (I32 (I32.add s 1l) @@ e.at));\n            Plain (Const (I32 (I32.sub n 1l) @@ e.at));\n            Plain (TableInit (x, y));\n          ]\n\n      | ElemDrop x, vs ->\n        let seg = elem frame.inst x in\n        seg := [];\n        vs, []\n\n      | Load {offset; ty; sz; _}, Num (I32 i) :: vs' ->\n        let mem = memory frame.inst (0l @@ e.at) in\n        let a = I64_convert.extend_i32_u i in\n        (try\n          let n =\n            match sz with\n            | None -> Memory.load_num mem a offset ty\n            | Some (sz, ext) -> Memory.load_packed sz ext mem a offset ty\n          in Num n :: vs', []\n        with exn -> vs', [Trapping (memory_error e.at exn) @@ e.at])\n\n      | Store {offset; sz; _}, Num n :: Num (I32 i) :: vs' ->\n        let mem = memory frame.inst (0l @@ e.at) in\n        let a = I64_convert.extend_i32_u i in\n        (try\n          (match sz with\n          | None -> Memory.store_num mem a offset n\n          | Some sz -> Memory.store_packed sz mem a offset n\n          );\n          vs', []\n        with exn -> vs', [Trapping (memory_error e.at exn) @@ e.at]);\n      | MemorySize, vs ->\n        let mem = memory frame.inst (0l @@ e.at) in\n        Num (I32 (Memory.size mem)) :: vs, []\n\n      | MemoryGrow, Num (I32 delta) :: vs' ->\n        let mem = memory frame.inst (0l @@ e.at) in\n        let old_size = Memory.size mem in\n        let result =\n          try Memory.grow mem delta; old_size\n          with Memory.SizeOverflow | Memory.SizeLimit | Memory.OutOfMemory -> -1l\n        in Num (I32 result) :: vs', []\n\n      | MemoryFill, Num (I32 n) :: Num k :: Num (I32 i) :: vs' ->\n        if mem_oob frame (0l @@ e.at) i n then\n          vs', [Trapping (memory_error e.at Memory.Bounds) @@ e.at]\n        else if n = 0l then\n          vs', []\n        else\n          vs', List.map (at e.at) [\n            Plain (Const (I32 i @@ e.at));\n            Plain (Const (k @@ e.at));\n            Plain (Store\n              {ty = I32Type; align = 0; offset = 0l; sz = Some Pack8});\n            Plain (Const (I32 (I32.add i 1l) @@ e.at));\n            Plain (Const (k @@ e.at));\n            Plain (Const (I32 (I32.sub n 1l) @@ e.at));\n            Plain (MemoryFill);\n          ]\n\n      | MemoryCopy, Num (I32 n) :: Num (I32 s) :: Num (I32 d) :: vs' ->\n        if mem_oob frame (0l @@ e.at) s n || mem_oob frame (0l @@ e.at) d n then\n          vs', [Trapping (memory_error e.at Memory.Bounds) @@ e.at]\n        else if n = 0l then\n          vs', []\n        else if I32.le_u d s then\n          vs', List.map (at e.at) [\n            Plain (Const (I32 d @@ e.at));\n            Plain (Const (I32 s @@ e.at));\n            Plain (Load\n              {ty = I32Type; align = 0; offset = 0l; sz = Some (Pack8, ZX)});\n            Plain (Store\n              {ty = I32Type; align = 0; offset = 0l; sz = Some Pack8});\n            Plain (Const (I32 (I32.add d 1l) @@ e.at));\n            Plain (Const (I32 (I32.add s 1l) @@ e.at));\n            Plain (Const (I32 (I32.sub n 1l) @@ e.at));\n            Plain (MemoryCopy);\n          ]\n        else (* d > s *)\n          vs', List.map (at e.at) [\n            Plain (Const (I32 (I32.add d 1l) @@ e.at));\n            Plain (Const (I32 (I32.add s 1l) @@ e.at));\n            Plain (Const (I32 (I32.sub n 1l) @@ e.at));\n            Plain (MemoryCopy);\n            Plain (Const (I32 d @@ e.at));\n            Plain (Const (I32 s @@ e.at));\n            Plain (Load\n              {ty = I32Type; align = 0; offset = 0l; sz = Some (Pack8, ZX)});\n            Plain (Store\n              {ty = I32Type; align = 0; offset = 0l; sz = Some Pack8});\n          ]\n\n      | MemoryInit x, Num (I32 n) :: Num (I32 s) :: Num (I32 d) :: vs' ->\n        if mem_oob frame (0l @@ e.at) d n || data_oob frame x s n then\n          vs', [Trapping (memory_error e.at Memory.Bounds) @@ e.at]\n        else if n = 0l then\n          vs', []\n        else\n          let seg = !(data frame.inst x) in\n          let b = Int32.of_int (Char.code seg.[Int32.to_int s]) in\n          vs', List.map (at e.at) [\n            Plain (Const (I32 d @@ e.at));\n            Plain (Const (I32 b @@ e.at));\n            Plain (Store\n              {ty = I32Type; align = 0; offset = 0l; sz = Some Pack8});\n            Plain (Const (I32 (I32.add d 1l) @@ e.at));\n            Plain (Const (I32 (I32.add s 1l) @@ e.at));\n            Plain (Const (I32 (I32.sub n 1l) @@ e.at));\n            Plain (MemoryInit x);\n          ]\n\n      | DataDrop x, vs ->\n        let seg = data frame.inst x in\n        seg := \"\";\n        vs, []\n\n      | RefNull t, vs' ->\n        Ref (NullRef t) :: vs', []\n\n      | RefIsNull, Ref r :: vs' ->\n        (match r with\n        | NullRef _ ->\n          Num (I32 1l) :: vs', []\n        | _ ->\n          Num (I32 0l) :: vs', []\n        )\n\n      | RefFunc x, vs' ->\n        let f = func frame.inst x in\n        Ref (FuncRef f) :: vs', []\n\n      | Const n, vs ->\n        Num n.it :: vs, []\n\n      | Test testop, Num n :: vs' ->\n        (try value_of_bool (Eval_numeric.eval_testop testop n) :: vs', []\n        with exn -> vs', [Trapping (numeric_error e.at exn) @@ e.at])\n\n      | Compare relop, Num n2 :: Num n1 :: vs' ->\n        (try value_of_bool (Eval_numeric.eval_relop relop n1 n2) :: vs', []\n        with exn -> vs', [Trapping (numeric_error e.at exn) @@ e.at])\n\n      | Unary unop, Num n :: vs' ->\n        (try Num (Eval_numeric.eval_unop unop n) :: vs', []\n        with exn -> vs', [Trapping (numeric_error e.at exn) @@ e.at])\n\n      | Binary binop, Num n2 :: Num n1 :: vs' ->\n        (try Num (Eval_numeric.eval_binop binop n1 n2) :: vs', []\n        with exn -> vs', [Trapping (numeric_error e.at exn) @@ e.at])\n\n      | Convert cvtop, Num n :: vs' ->\n        (try Num (Eval_numeric.eval_cvtop cvtop n) :: vs', []\n        with exn -> vs', [Trapping (numeric_error e.at exn) @@ e.at])\n\n      | _ ->\n        let s1 = string_of_values (List.rev vs) in\n        let s2 = string_of_value_types (List.map type_of_value (List.rev vs)) in\n        Crash.error e.at\n          (\"missing or ill-typed operand on stack (\" ^ s1 ^ \" : \" ^ s2 ^ \")\")\n      )\n\n    | Refer r, vs ->\n      Ref r :: vs, []\n\n    | Trapping msg, vs ->\n      assert false\n\n    | Returning vs', vs ->\n      Crash.error e.at \"undefined frame\"\n\n    | Breaking (k, vs'), vs ->\n      Crash.error e.at \"undefined label\"\n\n    | Label (n, es0, (vs', [])), vs ->\n      vs' @ vs, []\n\n    | Label (n, es0, (vs', {it = Trapping msg; at} :: es')), vs ->\n      vs, [Trapping msg @@ at]\n\n    | Label (n, es0, (vs', {it = Returning vs0; at} :: es')), vs ->\n      vs, [Returning vs0 @@ at]\n\n    | Label (n, es0, (vs', {it = Breaking (0l, vs0); at} :: es')), vs ->\n      take n vs0 e.at @ vs, List.map plain es0\n\n    | Label (n, es0, (vs', {it = Breaking (k, vs0); at} :: es')), vs ->\n      vs, [Breaking (Int32.sub k 1l, vs0) @@ at]\n\n    | Label (n, es0, code'), vs ->\n      let c' = step {c with code = code'} in\n      vs, [Label (n, es0, c'.code) @@ e.at]\n\n    | Frame (n, frame', (vs', [])), vs ->\n      vs' @ vs, []\n\n    | Frame (n, frame', (vs', {it = Trapping msg; at} :: es')), vs ->\n      vs, [Trapping msg @@ at]\n\n    | Frame (n, frame', (vs', {it = Returning vs0; at} :: es')), vs ->\n      take n vs0 e.at @ vs, []\n\n    | Frame (n, frame', code'), vs ->\n      let c' = step {frame = frame'; code = code'; budget = c.budget - 1} in\n      vs, [Frame (n, c'.frame, c'.code) @@ e.at]\n\n    | Invoke func, vs when c.budget = 0 ->\n      Exhaustion.error e.at \"call stack exhausted\"\n\n    | Invoke func, vs ->\n      let FuncType (ins, out) = func_type_of func in\n      let n1, n2 = Lib.List32.length ins, Lib.List32.length out in\n      let args, vs' = take n1 vs e.at, drop n1 vs e.at in\n      (match func with\n      | Func.AstFunc (t, inst', f) ->\n        let locals' = List.rev args @ List.map default_value f.it.locals in\n        let frame' = {inst = !inst'; locals = List.map ref locals'} in\n        let instr' = [Label (n2, [], ([], List.map plain f.it.body)) @@ f.at] in\n        vs', [Frame (n2, frame', ([], instr')) @@ e.at]\n\n      | Func.HostFunc (t, f) ->\n        try List.rev (f (List.rev args)) @ vs', []\n        with Crash (_, msg) -> Crash.error e.at msg\n      )\n  in {c with code = vs', es' @ List.tl es}\n\n\nlet rec eval (c : config) : value stack =\n  match c.code with\n  | vs, [] ->\n    vs\n\n  | vs, {it = Trapping msg; at} :: _ ->\n    Trap.error at msg\n\n  | vs, es ->\n    eval (step c)\n\n\n(* Functions & Constants *)\n\nlet invoke (func : func_inst) (vs : value list) : value list =\n  let at = match func with Func.AstFunc (_, _, f) -> f.at | _ -> no_region in\n  let FuncType (ins, out) = Func.type_of func in\n  if List.length vs <> List.length ins then\n    Crash.error at \"wrong number of arguments\";\n  if not (List.for_all2 (fun v -> (=) (type_of_value v)) vs ins) then\n    Crash.error at \"wrong types of arguments\";\n  let c = config empty_module_inst (List.rev vs) [Invoke func @@ at] in\n  try List.rev (eval c) with Stack_overflow ->\n    Exhaustion.error at \"call stack exhausted\"\n\nlet eval_const (inst : module_inst) (const : const) : value =\n  let c = config inst [] (List.map plain const.it) in\n  match eval c with\n  | [v] -> v\n  | vs -> Crash.error const.at \"wrong number of results on stack\"\n\n\n(* Modules *)\n\nlet create_func (inst : module_inst) (f : func) : func_inst =\n  Func.alloc (type_ inst f.it.ftype) (ref inst) f\n\nlet create_table (inst : module_inst) (tab : table) : table_inst =\n  let {ttype} = tab.it in\n  let TableType (_lim, t) = ttype in\n  Table.alloc ttype (NullRef t)\n\nlet create_memory (inst : module_inst) (mem : memory) : memory_inst =\n  let {mtype} = mem.it in\n  Memory.alloc mtype\n\nlet create_global (inst : module_inst) (glob : global) : global_inst =\n  let {gtype; ginit} = glob.it in\n  let v = eval_const inst ginit in\n  Global.alloc gtype v\n\nlet create_export (inst : module_inst) (ex : export) : export_inst =\n  let {name; edesc} = ex.it in\n  let ext =\n    match edesc.it with\n    | FuncExport x -> ExternFunc (func inst x)\n    | TableExport x -> ExternTable (table inst x)\n    | MemoryExport x -> ExternMemory (memory inst x)\n    | GlobalExport x -> ExternGlobal (global inst x)\n  in (name, ext)\n\nlet create_elem (inst : module_inst) (seg : elem_segment) : elem_inst =\n  let {etype; einit; _} = seg.it in\n  ref (List.map (fun c -> as_ref (eval_const inst c)) einit)\n\nlet create_data (inst : module_inst) (seg : data_segment) : data_inst =\n  let {dinit; _} = seg.it in\n  ref dinit\n\n\nlet add_import (m : module_) (ext : extern) (im : import) (inst : module_inst)\n  : module_inst =\n  if not (match_extern_type (extern_type_of ext) (import_type m im)) then\n    Link.error im.at (\"incompatible import type for \" ^\n      \"\\\"\" ^ Utf8.encode im.it.module_name ^ \"\\\" \" ^\n      \"\\\"\" ^ Utf8.encode im.it.item_name ^ \"\\\": \" ^\n      \"expected \" ^ Types.string_of_extern_type (import_type m im) ^\n      \", got \" ^ Types.string_of_extern_type (extern_type_of ext));\n  match ext with\n  | ExternFunc func -> {inst with funcs = func :: inst.funcs}\n  | ExternTable tab -> {inst with tables = tab :: inst.tables}\n  | ExternMemory mem -> {inst with memories = mem :: inst.memories}\n  | ExternGlobal glob -> {inst with globals = glob :: inst.globals}\n\nlet init_func (inst : module_inst) (func : func_inst) =\n  match func with\n  | Func.AstFunc (_, inst_ref, _) -> inst_ref := inst\n  | _ -> assert false\n\nlet run_elem i elem =\n  let at = elem.it.emode.at in\n  let x = i @@ at in\n  match elem.it.emode.it with\n  | Passive -> []\n  | Active {index; offset} ->\n    offset.it @ [\n      Const (I32 0l @@ at) @@ at;\n      Const (I32 (Lib.List32.length elem.it.einit) @@ at) @@ at;\n      TableInit (index, x) @@ at;\n      ElemDrop x @@ at\n    ]\n  | Declarative ->\n    [ElemDrop x @@ at]\n\nlet run_data i data =\n  let at = data.it.dmode.at in\n  let x = i @@ at in\n  match data.it.dmode.it with\n  | Passive -> []\n  | Active {index; offset} ->\n    assert (index.it = 0l);\n    offset.it @ [\n      Const (I32 0l @@ at) @@ at;\n      Const (I32 (Int32.of_int (String.length data.it.dinit)) @@ at) @@ at;\n      MemoryInit x @@ at;\n      DataDrop x @@ at\n    ]\n  | Declarative -> assert false\n\nlet run_start start =\n  [Call start @@ start.at]\n\nlet init (m : module_) (exts : extern list) : module_inst =\n  let\n    { imports; tables; memories; globals; funcs; types;\n      exports; elems; datas; start\n    } = m.it\n  in\n  if List.length exts <> List.length imports then\n    Link.error m.at \"wrong number of imports provided for initialisation\";\n  let inst0 =\n    { (List.fold_right2 (add_import m) exts imports empty_module_inst) with\n      types = List.map (fun type_ -> type_.it) types }\n  in\n  let fs = List.map (create_func inst0) funcs in\n  let inst1 = {inst0 with funcs = inst0.funcs @ fs} in\n  let inst2 =\n    { inst1 with\n      tables = inst1.tables @ List.map (create_table inst1) tables;\n      memories = inst1.memories @ List.map (create_memory inst1) memories;\n      globals = inst1.globals @ List.map (create_global inst1) globals;\n    }\n  in\n  let inst =\n    { inst2 with\n      exports = List.map (create_export inst2) exports;\n      elems = List.map (create_elem inst2) elems;\n      datas = List.map (create_data inst2) datas;\n    }\n  in\n  List.iter (init_func inst) fs;\n  let es_elem = List.concat (Lib.List32.mapi run_elem elems) in\n  let es_data = List.concat (Lib.List32.mapi run_data datas) in\n  let es_start = Lib.Option.get (Lib.Option.map run_start start) [] in\n  ignore (eval (config inst [] (List.map plain (es_elem @ es_data @ es_start))));\n  inst\n"
  },
  {
    "path": "interpreter/exec/eval.mli",
    "content": "open Values\nopen Instance\n\nexception Link of Source.region * string\nexception Trap of Source.region * string\nexception Crash of Source.region * string\nexception Exhaustion of Source.region * string\n\nval init : Ast.module_ -> extern list -> module_inst (* raises Link, Trap *)\nval invoke : func_inst -> value list -> value list (* raises Trap *)\n"
  },
  {
    "path": "interpreter/exec/eval_numeric.ml",
    "content": "open Types\nopen Values\n\n\n(* Injection & projection *)\n\nexception TypeError of int * num * num_type\n\nmodule type NumType =\nsig\n  type t\n  val to_num : t -> num\n  val of_num : int -> num -> t\nend\n\nmodule I32Num =\nstruct\n  type t = I32.t\n  let to_num i = I32 i\n  let of_num n = function I32 i -> i | v -> raise (TypeError (n, v, I32Type))\nend\n\nmodule I64Num =\nstruct\n  type t = I64.t\n  let to_num i = I64 i\n  let of_num n = function I64 i -> i | v -> raise (TypeError (n, v, I64Type))\nend\n\nmodule F32Num =\nstruct\n  type t = F32.t\n  let to_num i = F32 i\n  let of_num n = function F32 z -> z | v -> raise (TypeError (n, v, F32Type))\nend\n\nmodule F64Num =\nstruct\n  type t = F64.t\n  let to_num i = F64 i\n  let of_num n = function F64 z -> z | v -> raise (TypeError (n, v, F64Type))\nend\n\n\n(* Int operators *)\n\nmodule IntOp (IXX : Int.S) (Num : NumType with type t = IXX.t) =\nstruct\n  open Ast.IntOp\n  open Num\n\n  let unop op =\n    let f = match op with\n      | Clz -> IXX.clz\n      | Ctz -> IXX.ctz\n      | Popcnt -> IXX.popcnt\n      | ExtendS sz -> IXX.extend_s (8 * packed_size sz)\n    in fun v -> to_num (f (of_num 1 v))\n\n  let binop op =\n    let f = match op with\n      | Add -> IXX.add\n      | Sub -> IXX.sub\n      | Mul -> IXX.mul\n      | DivS -> IXX.div_s\n      | DivU -> IXX.div_u\n      | RemS -> IXX.rem_s\n      | RemU -> IXX.rem_u\n      | And -> IXX.and_\n      | Or -> IXX.or_\n      | Xor -> IXX.xor\n      | Shl -> IXX.shl\n      | ShrU -> IXX.shr_u\n      | ShrS -> IXX.shr_s\n      | Rotl -> IXX.rotl\n      | Rotr -> IXX.rotr\n    in fun v1 v2 -> to_num (f (of_num 1 v1) (of_num 2 v2))\n\n  let testop op =\n    let f = match op with\n      | Eqz -> IXX.eqz\n    in fun v -> f (of_num 1 v)\n\n  let relop op =\n    let f = match op with\n      | Eq -> IXX.eq\n      | Ne -> IXX.ne\n      | LtS -> IXX.lt_s\n      | LtU -> IXX.lt_u\n      | LeS -> IXX.le_s\n      | LeU -> IXX.le_u\n      | GtS -> IXX.gt_s\n      | GtU -> IXX.gt_u\n      | GeS -> IXX.ge_s\n      | GeU -> IXX.ge_u\n    in fun v1 v2 -> f (of_num 1 v1) (of_num 2 v2)\nend\n\nmodule I32Op = IntOp (I32) (I32Num)\nmodule I64Op = IntOp (I64) (I64Num)\n\n\n(* Float operators *)\n\nmodule FloatOp (FXX : Float.S) (Num : NumType with type t = FXX.t) =\nstruct\n  open Ast.FloatOp\n  open Num\n\n  let unop op =\n    let f = match op with\n      | Neg -> FXX.neg\n      | Abs -> FXX.abs\n      | Sqrt  -> FXX.sqrt\n      | Ceil -> FXX.ceil\n      | Floor -> FXX.floor\n      | Trunc -> FXX.trunc\n      | Nearest -> FXX.nearest\n    in fun v -> to_num (f (of_num 1 v))\n\n  let binop op =\n    let f = match op with\n      | Add -> FXX.add\n      | Sub -> FXX.sub\n      | Mul -> FXX.mul\n      | Div -> FXX.div\n      | Min -> FXX.min\n      | Max -> FXX.max\n      | CopySign -> FXX.copysign\n    in fun v1 v2 -> to_num (f (of_num 1 v1) (of_num 2 v2))\n\n  let testop op = assert false\n\n  let relop op =\n    let f = match op with\n      | Eq -> FXX.eq\n      | Ne -> FXX.ne\n      | Lt -> FXX.lt\n      | Le -> FXX.le\n      | Gt -> FXX.gt\n      | Ge -> FXX.ge\n    in fun v1 v2 -> f (of_num 1 v1) (of_num 2 v2)\nend\n\nmodule F32Op = FloatOp (F32) (F32Num)\nmodule F64Op = FloatOp (F64) (F64Num)\n\n\n(* Conversion operators *)\n\nmodule I32CvtOp =\nstruct\n  open Ast.IntOp\n\n  let cvtop op v =\n    let i = match op with\n      | WrapI64 -> I32_convert.wrap_i64 (I64Num.of_num 1 v)\n      | TruncUF32 -> I32_convert.trunc_f32_u (F32Num.of_num 1 v)\n      | TruncSF32 -> I32_convert.trunc_f32_s (F32Num.of_num 1 v)\n      | TruncUF64 -> I32_convert.trunc_f64_u (F64Num.of_num 1 v)\n      | TruncSF64 -> I32_convert.trunc_f64_s (F64Num.of_num 1 v)\n      | TruncSatUF32 -> I32_convert.trunc_sat_f32_u (F32Num.of_num 1 v)\n      | TruncSatSF32 -> I32_convert.trunc_sat_f32_s (F32Num.of_num 1 v)\n      | TruncSatUF64 -> I32_convert.trunc_sat_f64_u (F64Num.of_num 1 v)\n      | TruncSatSF64 -> I32_convert.trunc_sat_f64_s (F64Num.of_num 1 v)\n      | ReinterpretFloat -> I32_convert.reinterpret_f32 (F32Num.of_num 1 v)\n      | ExtendUI32 -> raise (TypeError (1, v, I32Type))\n      | ExtendSI32 -> raise (TypeError (1, v, I32Type))\n    in I32Num.to_num i\nend\n\nmodule I64CvtOp =\nstruct\n  open Ast.IntOp\n\n  let cvtop op v =\n    let i = match op with\n      | ExtendUI32 -> I64_convert.extend_i32_u (I32Num.of_num 1 v)\n      | ExtendSI32 -> I64_convert.extend_i32_s (I32Num.of_num 1 v)\n      | TruncUF32 -> I64_convert.trunc_f32_u (F32Num.of_num 1 v)\n      | TruncSF32 -> I64_convert.trunc_f32_s (F32Num.of_num 1 v)\n      | TruncUF64 -> I64_convert.trunc_f64_u (F64Num.of_num 1 v)\n      | TruncSF64 -> I64_convert.trunc_f64_s (F64Num.of_num 1 v)\n      | TruncSatUF32 -> I64_convert.trunc_sat_f32_u (F32Num.of_num 1 v)\n      | TruncSatSF32 -> I64_convert.trunc_sat_f32_s (F32Num.of_num 1 v)\n      | TruncSatUF64 -> I64_convert.trunc_sat_f64_u (F64Num.of_num 1 v)\n      | TruncSatSF64 -> I64_convert.trunc_sat_f64_s (F64Num.of_num 1 v)\n      | ReinterpretFloat -> I64_convert.reinterpret_f64 (F64Num.of_num 1 v)\n      | WrapI64 -> raise (TypeError (1, v, I64Type))\n    in I64Num.to_num i\nend\n\nmodule F32CvtOp =\nstruct\n  open Ast.FloatOp\n\n  let cvtop op v =\n    let z = match op with\n      | DemoteF64 -> F32_convert.demote_f64 (F64Num.of_num 1 v)\n      | ConvertSI32 -> F32_convert.convert_i32_s (I32Num.of_num 1 v)\n      | ConvertUI32 -> F32_convert.convert_i32_u (I32Num.of_num 1 v)\n      | ConvertSI64 -> F32_convert.convert_i64_s (I64Num.of_num 1 v)\n      | ConvertUI64 -> F32_convert.convert_i64_u (I64Num.of_num 1 v)\n      | ReinterpretInt -> F32_convert.reinterpret_i32 (I32Num.of_num 1 v)\n      | PromoteF32 -> raise (TypeError (1, v, F32Type))\n    in F32Num.to_num z\nend\n\nmodule F64CvtOp =\nstruct\n  open Ast.FloatOp\n\n  let cvtop op v =\n    let z = match op with\n      | PromoteF32 -> F64_convert.promote_f32 (F32Num.of_num 1 v)\n      | ConvertSI32 -> F64_convert.convert_i32_s (I32Num.of_num 1 v)\n      | ConvertUI32 -> F64_convert.convert_i32_u (I32Num.of_num 1 v)\n      | ConvertSI64 -> F64_convert.convert_i64_s (I64Num.of_num 1 v)\n      | ConvertUI64 -> F64_convert.convert_i64_u (I64Num.of_num 1 v)\n      | ReinterpretInt -> F64_convert.reinterpret_i64 (I64Num.of_num 1 v)\n      | DemoteF64 -> raise (TypeError (1, v, F64Type))\n    in F64Num.to_num z\nend\n\n\n(* Dispatch *)\n\nlet op i32 i64 f32 f64 = function\n  | I32 x -> i32 x\n  | I64 x -> i64 x\n  | F32 x -> f32 x\n  | F64 x -> f64 x\n\nlet eval_unop = op I32Op.unop I64Op.unop F32Op.unop F64Op.unop\nlet eval_binop = op I32Op.binop I64Op.binop F32Op.binop F64Op.binop\nlet eval_testop = op I32Op.testop I64Op.testop F32Op.testop F64Op.testop\nlet eval_relop = op I32Op.relop I64Op.relop F32Op.relop F64Op.relop\nlet eval_cvtop = op I32CvtOp.cvtop I64CvtOp.cvtop F32CvtOp.cvtop F64CvtOp.cvtop\n"
  },
  {
    "path": "interpreter/exec/eval_numeric.mli",
    "content": "open Values\n\nexception TypeError of int * num * Types.num_type\n\nval eval_unop : Ast.unop -> num -> num\nval eval_binop : Ast.binop -> num -> num -> num\nval eval_testop : Ast.testop -> num -> bool\nval eval_relop : Ast.relop -> num -> num -> bool\nval eval_cvtop : Ast.cvtop -> num -> num\n"
  },
  {
    "path": "interpreter/exec/f32.ml",
    "content": "(*\n * OCaml lacks 32-bit floats, however we can emulate all the basic operations\n * using 64-bit floats, as described in the paper\n * \"When is double rounding innocuous?\" by Samuel A. Figueroa.\n *)\ninclude Float.Make\n  (struct\n    include Int32\n    let mantissa = 23\n    let pos_nan = 0x7fc0_0000l\n    let neg_nan = 0xffc0_0000l\n    let bare_nan = 0x7f80_0000l\n    let to_hex_string = Printf.sprintf \"%lx\"\n  end)\n"
  },
  {
    "path": "interpreter/exec/f32_convert.ml",
    "content": "(* WebAssembly-compatible type conversions to f32 implementation *)\n\nlet demote_f64 x =\n  let xf = F64.to_float x in\n  if xf = xf then F32.of_float xf else\n  let nan64bits = F64.to_bits x in\n  let sign_field = Int64.(shift_left (shift_right_logical nan64bits 63) 31) in\n  let significand_field = Int64.(shift_right_logical (shift_left nan64bits 12) 41) in\n  let fields = Int64.logor sign_field significand_field in\n  let nan32bits = Int32.logor 0x7fc0_0000l (I32_convert.wrap_i64 fields) in\n  F32.of_bits nan32bits\n\nlet convert_i32_s x =\n  F32.of_float (Int32.to_float x)\n\n(*\n * Similar to convert_i64_u below, the high half of the i32 range are beyond\n * the range where f32 can represent odd numbers, though we do need to adjust\n * the least significant bit to round correctly.\n *)\nlet convert_i32_u x =\n  F32.of_float Int32.(\n    if x >= zero then to_float x else\n    to_float (logor (shift_right_logical x 1) (logand x 1l)) *. 2.0\n  )\n\n(*\n * Values that are too large would get rounded when represented in f64,\n * but double rounding via i64->f64->f32 can produce inaccurate results.\n * Hence, for large values we shift right but make sure to accumulate the lost\n * bits in the least significant bit, such that rounding still is correct.\n *)\nlet convert_i64_s x =\n  F32.of_float Int64.(\n    if abs x < 0x10_0000_0000_0000L then to_float x else\n    let r = if logand x 0xfffL = 0L then 0L else 1L in\n    to_float (logor (shift_right x 12) r) *. 0x1p12\n  )\n\nlet convert_i64_u x =\n  F32.of_float Int64.(\n    if I64.lt_u x 0x10_0000_0000_0000L then to_float x else\n    let r = if logand x 0xfffL = 0L then 0L else 1L in\n    to_float (logor (shift_right_logical x 12) r) *. 0x1p12\n  )\n\nlet reinterpret_i32 = F32.of_bits\n"
  },
  {
    "path": "interpreter/exec/f32_convert.mli",
    "content": "(* WebAssembly-compatible type conversions to f32 implementation *)\n\nval demote_f64 : F64.t -> F32.t\nval convert_i32_s : I32.t -> F32.t\nval convert_i32_u : I32.t -> F32.t\nval convert_i64_s : I64.t -> F32.t\nval convert_i64_u : I64.t -> F32.t\nval reinterpret_i32 : I32.t -> F32.t\n"
  },
  {
    "path": "interpreter/exec/f64.ml",
    "content": "include Float.Make\n  (struct\n    include Int64\n    let mantissa = 52\n    let pos_nan = 0x7ff8_0000_0000_0000L\n    let neg_nan = 0xfff8_0000_0000_0000L\n    let bare_nan = 0x7ff0_0000_0000_0000L\n    let to_hex_string = Printf.sprintf \"%Lx\"\n  end)\n"
  },
  {
    "path": "interpreter/exec/f64_convert.ml",
    "content": "(* WebAssembly-compatible type conversions to f64 implementation *)\n\nlet promote_f32 x =\n  let xf = F32.to_float x in\n  if xf = xf then F64.of_float xf else\n  let nan32bits = I64_convert.extend_i32_u (F32.to_bits x) in\n  let sign_field = Int64.(shift_left (shift_right_logical nan32bits 31) 63) in\n  let significand_field = Int64.(shift_right_logical (shift_left nan32bits 41) 12) in\n  let fields = Int64.logor sign_field significand_field in\n  let nan64bits = Int64.logor 0x7ff8_0000_0000_0000L fields in\n  F64.of_bits nan64bits\n\nlet convert_i32_s x =\n  F64.of_float (Int32.to_float x)\n\n(*\n * Unlike the other convert_u functions, the high half of the i32 range is\n * within the range where f32 can represent odd numbers, so we can't do the\n * shift. Instead, we can use int64 signed arithmetic.\n *)\nlet convert_i32_u x =\n  F64.of_float Int64.(to_float (logand (of_int32 x) 0x0000_0000_ffff_ffffL))\n\nlet convert_i64_s x =\n  F64.of_float (Int64.to_float x)\n\n(*\n * Values in the low half of the int64 range can be converted with a signed\n * conversion. The high half is beyond the range where f64 can represent odd\n * numbers, so we can shift the value right, adjust the least significant\n * bit to round correctly, do a conversion, and then scale it back up.\n *)\nlet convert_i64_u x =\n  F64.of_float Int64.(\n    if x >= zero then to_float x else\n    to_float (logor (shift_right_logical x 1) (logand x 1L)) *. 2.0\n  )\n\nlet reinterpret_i64 = F64.of_bits\n"
  },
  {
    "path": "interpreter/exec/f64_convert.mli",
    "content": "(* WebAssembly-compatible type conversions to f64 implementation *)\n\nval promote_f32 : F32.t -> F64.t\nval convert_i32_s : I32.t -> F64.t\nval convert_i32_u : I32.t -> F64.t\nval convert_i64_s : I64.t -> F64.t\nval convert_i64_u : I64.t -> F64.t\nval reinterpret_i64 : I64.t -> F64.t\n"
  },
  {
    "path": "interpreter/exec/float.ml",
    "content": "module type RepType =\nsig\n  type t\n\n  val mantissa : int\n\n  val zero : t\n  val min_int : t\n  val max_int : t\n\n  val pos_nan : t\n  val neg_nan : t\n  val bare_nan : t\n\n  val bits_of_float : float -> t\n  val float_of_bits : t -> float\n  val of_string : string -> t\n  val to_string : t -> string\n  val to_hex_string : t -> string\n\n  val lognot : t -> t\n  val logand : t -> t -> t\n  val logor : t -> t -> t\n  val logxor : t -> t -> t\nend\n\nmodule type S =\nsig\n  type t\n  type bits\n  val pos_nan : t\n  val neg_nan : t\n  val is_inf : t -> bool\n  val is_nan : t -> bool\n  val of_float : float -> t\n  val to_float : t -> float\n  val of_string : string -> t\n  val to_string : t -> string\n  val to_hex_string : t -> string\n  val of_bits : bits -> t\n  val to_bits : t -> bits\n  val add : t -> t -> t\n  val sub : t -> t -> t\n  val mul : t -> t -> t\n  val div : t -> t -> t\n  val sqrt : t -> t\n  val min : t -> t -> t\n  val max : t -> t -> t\n  val ceil : t -> t\n  val floor : t -> t\n  val trunc : t -> t\n  val nearest : t -> t\n  val abs : t -> t\n  val neg : t -> t\n  val copysign : t -> t -> t\n  val eq : t -> t -> bool\n  val ne : t -> t -> bool\n  val lt : t -> t -> bool\n  val le : t -> t -> bool\n  val gt : t -> t -> bool\n  val ge : t -> t -> bool\n  val zero : t\nend\n\nmodule Make (Rep : RepType) : S with type bits = Rep.t =\nstruct\n  let _ = assert (Rep.mantissa <= 52)\n\n  type t = Rep.t\n  type bits = Rep.t\n\n  let pos_inf = Rep.bits_of_float (1.0 /. 0.0)\n  let neg_inf = Rep.bits_of_float (-. (1.0 /. 0.0))\n  let pos_nan = Rep.pos_nan\n  let neg_nan = Rep.neg_nan\n  let bare_nan = Rep.bare_nan\n\n  let of_float = Rep.bits_of_float\n  let to_float = Rep.float_of_bits\n\n  let of_bits x = x\n  let to_bits x = x\n\n  let is_inf x = x = pos_inf || x = neg_inf\n  let is_nan x = let xf = Rep.float_of_bits x in xf <> xf\n\n  (*\n   * When the result of an arithmetic operation is NaN, the most significant\n   * bit of the significand field is set.\n   *)\n  let canonicalize_nan x = Rep.logor x Rep.pos_nan\n\n  (*\n   * When the result of a binary operation is NaN, the resulting NaN is computed\n   * from one of the NaN inputs, if there is one. If both are NaN, one is\n   * selected nondeterminstically. If neither, we use a default NaN value.\n   *)\n  let determine_binary_nan x y =\n    (*\n     * TODO: There are two nondeterministic things we could do here. When both\n     * x and y are NaN, we can nondeterministically pick which to return. And\n     * when neither is NaN, we can nondeterministically pick whether to return\n     * pos_nan or neg_nan.\n     *)\n    let nan =\n      if is_nan x then x else\n      if is_nan y then y else Rep.pos_nan\n    in canonicalize_nan nan\n\n  (*\n   * When the result of a unary operation is NaN, the resulting NaN is computed\n   * from one of the NaN input, if there it is NaN. Otherwise, we use a default\n   * NaN value.\n   *)\n  let determine_unary_nan x =\n    (*\n     * TODO: There is one nondeterministic thing we could do here. When the\n     * operand is not NaN, we can nondeterministically pick whether to return\n     * pos_nan or neg_nan.\n     *)\n    let nan = if is_nan x then x else Rep.pos_nan in\n    canonicalize_nan nan\n\n  let binary x op y =\n    let xf = to_float x in\n    let yf = to_float y in\n    let t = op xf yf in\n    if t = t then of_float t else determine_binary_nan x y\n\n  let unary op x =\n    let t = op (to_float x) in\n    if t = t then of_float t else determine_unary_nan x\n\n  let zero = of_float 0.0\n\n  let add x y = binary x (+.) y\n  let sub x y = binary x (-.) y\n  let mul x y = binary x ( *.) y\n  let div x y = binary x (/.) y\n\n  let sqrt  x = unary Stdlib.sqrt x\n\n  let ceil  x = unary Stdlib.ceil x\n  let floor x = unary Stdlib.floor x\n\n  let trunc x =\n    let xf = to_float x in\n    (* preserve the sign of zero *)\n    if xf = 0.0 then x else\n    (* trunc is either ceil or floor depending on which one is toward zero *)\n    let f = if xf < 0.0 then Stdlib.ceil xf else Stdlib.floor xf in\n    let result = of_float f in\n    if is_nan result then determine_unary_nan result else result\n\n  let nearest x =\n    let xf = to_float x in\n    (* preserve the sign of zero *)\n    if xf = 0.0 then x else\n    (* nearest is either ceil or floor depending on which is nearest or even *)\n    let u = Stdlib.ceil xf in\n    let d = Stdlib.floor xf in\n    let um = abs_float (xf -. u) in\n    let dm = abs_float (xf -. d) in\n    let u_or_d =\n      um < dm ||\n      um = dm && let h = u /. 2. in Stdlib.floor h = h\n    in\n    let f = if u_or_d then u else d in\n    let result = of_float f in\n    if is_nan result then determine_unary_nan result else result\n\n  let min x y =\n    let xf = to_float x in\n    let yf = to_float y in\n    (* min -0 0 is -0 *)\n    if xf = yf then Rep.logor x y else\n    if xf < yf then x else\n    if xf > yf then y else\n    determine_binary_nan x y\n\n  let max x y =\n    let xf = to_float x in\n    let yf = to_float y in\n    (* max -0 0 is 0 *)\n    if xf = yf then Rep.logand x y else\n    if xf > yf then x else\n    if xf < yf then y else\n    determine_binary_nan x y\n\n  (* abs, neg, copysign are purely bitwise operations, even on NaN values *)\n  let abs x =\n    Rep.logand x Rep.max_int\n\n  let neg x =\n    Rep.logxor x Rep.min_int\n\n  let copysign x y =\n    Rep.logor (abs x) (Rep.logand y Rep.min_int)\n\n  let eq x y = (to_float x = to_float y)\n  let ne x y = (to_float x <> to_float y)\n  let lt x y = (to_float x < to_float y)\n  let gt x y = (to_float x > to_float y)\n  let le x y = (to_float x <= to_float y)\n  let ge x y = (to_float x >= to_float y)\n\n  (*\n   * Compare mantissa of two floats in string representation (hex or dec).\n   * This is a gross hack to detect rounding during parsing of floats.\n   *)\n  let is_hex c = ('0' <= c && c <= '9') || ('A' <= c && c <= 'F')\n  let is_exp hex c = (c = if hex then 'P' else 'E')\n  let at_end hex s i = (i = String.length s) || is_exp hex s.[i]\n\n  let rec skip_non_hex s i =  (* to skip sign, 'x', '.', '_', etc. *)\n    if at_end true s i || is_hex s.[i] then i else skip_non_hex s (i + 1)\n\n  let rec skip_zeroes s i =\n    let i' = skip_non_hex s i in\n    if at_end true s i' || s.[i'] <> '0' then i' else skip_zeroes s (i' + 1)\n\n  let rec compare_mantissa_str' hex s1 i1 s2 i2 =\n    let i1' = skip_non_hex s1 i1 in\n    let i2' = skip_non_hex s2 i2 in\n    match at_end hex s1 i1', at_end hex s2 i2' with\n    | true, true -> 0\n    | true, false -> if at_end hex s2 (skip_zeroes s2 i2') then 0 else -1\n    | false, true -> if at_end hex s1 (skip_zeroes s1 i1') then 0 else +1\n    | false, false ->\n      match compare s1.[i1'] s2.[i2'] with\n      | 0 -> compare_mantissa_str' hex s1 (i1' + 1) s2 (i2' + 1)\n      | n -> n\n\n  let compare_mantissa_str hex s1 s2 =\n    let s1' = String.uppercase_ascii s1 in\n    let s2' = String.uppercase_ascii s2 in\n    compare_mantissa_str' hex s1' (skip_zeroes s1' 0) s2' (skip_zeroes s2' 0)\n\n  (*\n   * Convert a string to a float in target precision by going through\n   * OCaml's 64 bit floats. This may incur double rounding errors in edge\n   * cases, i.e., when rounding to target precision involves a tie that\n   * was created by earlier rounding during parsing to float. If both\n   * end up rounding in the same direction, we would \"over round\".\n   * This function tries to detect this case and correct accordingly.\n   *)\n  let float_of_string_prevent_double_rounding s =\n    (* First parse to a 64 bit float. *)\n    let z = float_of_string s in\n    (* If value is already infinite we are done. *)\n    if abs_float z = 1.0 /. 0.0 then z else\n    (* Else, bit twiddling to see what rounding to target precision will do. *)\n    let open Int64 in\n    let bits = bits_of_float z in\n    let lsb = shift_left 1L (52 - Rep.mantissa) in\n    (* Check for tie, i.e. whether the bits right of target LSB are 10000... *)\n    let tie = shift_right lsb 1 in\n    let mask = lognot (shift_left (-1L) (52 - Rep.mantissa)) in\n    (* If we have no tie, we are good. *)\n    if logand bits mask <> tie then z else\n    (* Else, define epsilon to be the value of the tie bit. *)\n    let exp = float_of_bits (logand bits 0xfff0_0000_0000_0000L) in\n    let eps = float_of_bits (logor tie (bits_of_float exp)) -. exp in\n    (* Convert 64 bit float back to string to compare to input. *)\n    let hex = String.contains s 'x' in\n    let s' =\n      if not hex then Printf.sprintf \"%.*g\" (String.length s) z else\n      let m = logor (logand bits 0xf_ffff_ffff_ffffL) 0x10_0000_0000_0000L in\n      (* Shift mantissa to match msb position in most significant hex digit *)\n      let i = skip_zeroes (String.uppercase_ascii s) 0 in\n      if i = String.length s then Printf.sprintf \"%.*g\" (String.length s) z else\n      let sh =\n        match s.[i] with '1' -> 0 | '2'..'3' -> 1 | '4'..'7' -> 2 | _ -> 3 in\n      Printf.sprintf \"%Lx\" (shift_left m sh)\n    in\n    (* - If mantissa became larger, float was rounded up to tie already;\n     *   round-to-even might round up again: sub epsilon to round down.\n     * - If mantissa became smaller, float was rounded down to tie already;\n     *   round-to-even migth round down again: add epsilon to round up.\n     * - If tie is not the result of prior rounding, then we are good.\n     *)\n    match compare_mantissa_str hex s s' with\n    | -1 -> z -. eps\n    | +1 -> z +. eps\n    | _ -> z\n\n  let of_signless_string s =\n    if s = \"inf\" then\n      pos_inf\n    else if s = \"nan\" then\n      pos_nan\n    else if String.length s > 6 && String.sub s 0 6 = \"nan:0x\" then\n      let x = Rep.of_string (String.sub s 4 (String.length s - 4)) in\n      if x = Rep.zero then\n        raise (Failure \"nan payload must not be zero\")\n      else if Rep.logand x bare_nan <> Rep.zero then\n        raise (Failure \"nan payload must not overlap with exponent bits\")\n      else if x < Rep.zero then\n        raise (Failure \"nan payload must not overlap with sign bit\")\n      else\n        Rep.logor x bare_nan\n    else\n      let s' = String.concat \"\" (String.split_on_char '_' s) in\n      let x = of_float (float_of_string_prevent_double_rounding s') in\n      if is_inf x then failwith \"of_string\" else x\n\n  let of_string s =\n    if s = \"\" then\n      failwith \"of_string\"\n    else if s.[0] = '+' || s.[0] = '-' then\n      let x = of_signless_string (String.sub s 1 (String.length s - 1)) in\n      if s.[0] = '+' then x else neg x\n    else\n      of_signless_string s\n\n  (* String conversion that groups digits for readability *)\n\n  let is_digit c = '0' <= c && c <= '9'\n  let is_hex_digit c = is_digit c || 'a' <= c && c <= 'f'\n\n  let rec add_digits buf s i j k n =\n    if i < j then begin\n      if k = 0 then Buffer.add_char buf '_';\n      Buffer.add_char buf s.[i];\n      add_digits buf s (i + 1) j ((k + n - 1) mod n) n\n    end\n\n  let group_digits is_digit n s =\n    let isnt_digit c = not (is_digit c) in\n    let len = String.length s in\n    let x = Lib.Option.get (Lib.String.find_from_opt ((=) 'x') s 0) 0 in\n    let mant = Lib.Option.get (Lib.String.find_from_opt is_digit s x) len in\n    let point = Lib.Option.get (Lib.String.find_from_opt isnt_digit s mant) len in\n    let frac = Lib.Option.get (Lib.String.find_from_opt is_digit s point) len in\n    let exp = Lib.Option.get (Lib.String.find_from_opt isnt_digit s frac) len in\n    let buf = Buffer.create (len*(n+1)/n) in\n    Buffer.add_substring buf s 0 mant;\n    add_digits buf s mant point ((point - mant) mod n + n) n;\n    Buffer.add_substring buf s point (frac - point);\n    add_digits buf s frac exp n n;\n    Buffer.add_substring buf s exp (len - exp);\n    Buffer.contents buf\n\n  let to_string' convert is_digit n x =\n    (if x < Rep.zero then \"-\" else \"\") ^\n    if is_nan x then\n      let payload = Rep.logand (abs x) (Rep.lognot bare_nan) in\n      \"nan:0x\" ^ group_digits is_hex_digit 4 (Rep.to_hex_string payload)\n    else\n      let s = convert (to_float (abs x)) in\n      group_digits is_digit n\n        (if s.[String.length s - 1] = '.' then s ^ \"0\" else s)\n\n  let to_string = to_string' (Printf.sprintf \"%.17g\") is_digit 3\n  let to_hex_string x =\n    if is_inf x then to_string x else\n    to_string' (Printf.sprintf \"%h\") is_hex_digit 4 x\nend\n"
  },
  {
    "path": "interpreter/exec/i32.ml",
    "content": "(* WebAssembly-compatible i32 implementation *)\n\ninclude Int.Make\n  (struct\n    include Int32\n    let bitwidth = 32\n    let to_hex_string = Printf.sprintf \"%lx\"\n  end)\n"
  },
  {
    "path": "interpreter/exec/i32_convert.ml",
    "content": "(* WebAssembly-compatible type conversions to i32 implementation *)\n\nlet wrap_i64 x = Int64.to_int32 x\n\nlet trunc_f32_s x =\n  if F32.ne x x then\n    raise Numeric_error.InvalidConversionToInteger\n  else\n    let xf = F32.to_float x in\n    if xf >= -.Int32.(to_float min_int) || xf < Int32.(to_float min_int) then\n      raise Numeric_error.IntegerOverflow\n    else\n      Int32.of_float xf\n\nlet trunc_f32_u x =\n  if F32.ne x x then\n    raise Numeric_error.InvalidConversionToInteger\n  else\n    let xf = F32.to_float x in\n    if xf >= -.Int32.(to_float min_int) *. 2.0 || xf <= -1.0 then\n      raise Numeric_error.IntegerOverflow\n    else\n      Int64.(to_int32 (of_float xf))\n\nlet trunc_f64_s x =\n  if F64.ne x x then\n    raise Numeric_error.InvalidConversionToInteger\n  else\n    let xf = F64.to_float x in\n    if xf >= -.Int32.(to_float min_int) || xf <= Int32.(to_float min_int) -. 1.0 then\n      raise Numeric_error.IntegerOverflow\n    else\n      Int32.of_float xf\n\nlet trunc_f64_u x =\n  if F64.ne x x then\n    raise Numeric_error.InvalidConversionToInteger\n  else\n    let xf = F64.to_float x in\n    if xf >= -.Int32.(to_float min_int) *. 2.0 || xf <= -1.0 then\n      raise Numeric_error.IntegerOverflow\n    else\n      Int64.(to_int32 (of_float xf))\n\nlet trunc_sat_f32_s x =\n  if F32.ne x x then\n    0l\n  else\n    let xf = F32.to_float x in\n    if xf < Int32.(to_float min_int) then\n      Int32.min_int\n    else if xf >= -.Int32.(to_float min_int) then\n      Int32.max_int\n    else\n      Int32.of_float xf\n\nlet trunc_sat_f32_u x =\n  if F32.ne x x then\n    0l\n  else\n    let xf = F32.to_float x in\n    if xf <= -1.0 then\n      0l\n    else if xf >= -.Int32.(to_float min_int) *. 2.0 then\n      -1l\n    else\n      Int64.(to_int32 (of_float xf))\n\nlet trunc_sat_f64_s x =\n  if F64.ne x x then\n    0l\n  else\n    let xf = F64.to_float x in\n    if xf < Int32.(to_float min_int) then\n      Int32.min_int\n    else if xf >= -.Int32.(to_float min_int) then\n      Int32.max_int\n    else\n      Int32.of_float xf\n\nlet trunc_sat_f64_u x =\n  if F64.ne x x then\n    0l\n  else\n    let xf = F64.to_float x in\n    if xf <= -1.0 then\n      0l\n    else if xf >= -.Int32.(to_float min_int) *. 2.0 then\n      -1l\n    else\n      Int64.(to_int32 (of_float xf))\n\nlet reinterpret_f32 = F32.to_bits\n"
  },
  {
    "path": "interpreter/exec/i32_convert.mli",
    "content": "(* WebAssembly-compatible type conversions to i32 implementation *)\n\nval wrap_i64 : I64.t -> I32.t\nval trunc_f32_s : F32.t -> I32.t\nval trunc_f32_u : F32.t -> I32.t\nval trunc_f64_s : F64.t -> I32.t\nval trunc_f64_u : F64.t -> I32.t\nval trunc_sat_f32_s : F32.t -> I32.t\nval trunc_sat_f32_u : F32.t -> I32.t\nval trunc_sat_f64_s : F64.t -> I32.t\nval trunc_sat_f64_u : F64.t -> I32.t\nval reinterpret_f32 : F32.t -> I32.t\n"
  },
  {
    "path": "interpreter/exec/i64.ml",
    "content": "(* WebAssembly-compatible i64 implementation *)\n\ninclude Int.Make\n  (struct\n    include Int64\n    let bitwidth = 64\n    let to_hex_string = Printf.sprintf \"%Lx\"\n  end)\n"
  },
  {
    "path": "interpreter/exec/i64_convert.ml",
    "content": "(* WebAssembly-compatible type conversions to i64 implementation *)\n\nlet extend_i32_s x = Int64.of_int32 x\n\nlet extend_i32_u x = Int64.logand (Int64.of_int32 x) 0x0000_0000_ffff_ffffL\n\nlet trunc_f32_s x =\n  if F32.ne x x then\n    raise Numeric_error.InvalidConversionToInteger\n  else\n    let xf = F32.to_float x in\n    if xf >= -.Int64.(to_float min_int) || xf < Int64.(to_float min_int) then\n      raise Numeric_error.IntegerOverflow\n    else\n      Int64.of_float xf\n\nlet trunc_f32_u x =\n  if F32.ne x x then\n    raise Numeric_error.InvalidConversionToInteger\n  else\n    let xf = F32.to_float x in\n    if xf >= -.Int64.(to_float min_int) *. 2.0 || xf <= -1.0 then\n      raise Numeric_error.IntegerOverflow\n    else if xf >= -.Int64.(to_float min_int) then\n      Int64.(logxor (of_float (xf -. 0x1p63)) min_int)\n    else\n      Int64.of_float xf\n\nlet trunc_f64_s x =\n  if F64.ne x x then\n    raise Numeric_error.InvalidConversionToInteger\n  else\n    let xf = F64.to_float x in\n    if xf >= -.Int64.(to_float min_int) || xf < Int64.(to_float min_int) then\n      raise Numeric_error.IntegerOverflow\n    else\n      Int64.of_float xf\n\nlet trunc_f64_u x =\n  if F64.ne x x then\n    raise Numeric_error.InvalidConversionToInteger\n  else\n    let xf = F64.to_float x in\n    if xf >= -.Int64.(to_float min_int) *. 2.0 || xf <= -1.0 then\n      raise Numeric_error.IntegerOverflow\n    else if xf >= -.Int64.(to_float min_int) then\n      Int64.(logxor (of_float (xf -. 0x1p63)) min_int)\n    else\n      Int64.of_float xf\n\nlet trunc_sat_f32_s x =\n  if F32.ne x x then\n    0L\n  else\n    let xf = F32.to_float x in\n    if xf < Int64.(to_float min_int) then\n      Int64.min_int\n    else if xf >= -.Int64.(to_float min_int) then\n      Int64.max_int\n    else\n      Int64.of_float xf\n\nlet trunc_sat_f32_u x =\n  if F32.ne x x then\n    0L\n  else\n    let xf = F32.to_float x in\n    if xf <= -1.0 then\n      0L\n    else if xf >= -.Int64.(to_float min_int) *. 2.0 then\n      -1L\n    else if xf >= -.Int64.(to_float min_int) then\n      Int64.(logxor (of_float (xf -. 9223372036854775808.0)) min_int)\n    else\n      Int64.of_float xf\n\nlet trunc_sat_f64_s x =\n  if F64.ne x x then\n    0L\n  else\n    let xf = F64.to_float x in\n    if xf < Int64.(to_float min_int) then\n      Int64.min_int\n    else if xf >= -.Int64.(to_float min_int) then\n      Int64.max_int\n    else\n      Int64.of_float xf\n\nlet trunc_sat_f64_u x =\n  if F64.ne x x then\n    0L\n  else\n    let xf = F64.to_float x in\n    if xf <= -1.0 then\n      0L\n    else if xf >= -.Int64.(to_float min_int) *. 2.0 then\n      -1L\n    else if xf >= -.Int64.(to_float min_int) then\n      Int64.(logxor (of_float (xf -. 9223372036854775808.0)) min_int)\n    else\n      Int64.of_float xf\n\nlet reinterpret_f64 = F64.to_bits\n"
  },
  {
    "path": "interpreter/exec/i64_convert.mli",
    "content": "(* WebAssembly-compatible type conversions to i64 implementation *)\n\nval extend_i32_s : I32.t -> I64.t\nval extend_i32_u : I32.t -> I64.t\nval trunc_f32_s : F32.t -> I64.t\nval trunc_f32_u : F32.t -> I64.t\nval trunc_f64_s : F64.t -> I64.t\nval trunc_f64_u : F64.t -> I64.t\nval trunc_sat_f32_s : F32.t -> I64.t\nval trunc_sat_f32_u : F32.t -> I64.t\nval trunc_sat_f64_s : F64.t -> I64.t\nval trunc_sat_f64_u : F64.t -> I64.t\nval reinterpret_f64 : F64.t -> I64.t\n"
  },
  {
    "path": "interpreter/exec/int.ml",
    "content": "module type RepType =\nsig\n  type t\n\n  val zero : t\n  val one : t\n  val minus_one : t\n  val max_int : t\n  val min_int : t\n\n  val neg : t -> t\n  val add : t -> t -> t\n  val sub : t -> t -> t\n  val mul : t -> t -> t\n  val div : t -> t -> t (* raises Division_by_zero *)\n  val rem : t -> t -> t (* raises Division_by_zero *)\n\n  val logand : t -> t -> t\n  val lognot : t -> t\n  val logor : t -> t -> t\n  val logxor : t -> t -> t\n  val shift_left : t -> int -> t\n  val shift_right : t -> int -> t\n  val shift_right_logical : t -> int -> t\n\n  val of_int : int -> t\n  val to_int : t -> int\n  val to_string : t -> string\n  val to_hex_string : t -> string\n\n  val bitwidth : int\nend\n\nmodule type S =\nsig\n  type t\n  type bits\n\n  val of_bits : bits -> t\n  val to_bits : t -> bits\n\n  val zero : t\n\n  val add : t -> t -> t\n  val sub : t -> t -> t\n  val mul : t -> t -> t\n  val div_s : t -> t -> t (* raises IntegerDivideByZero, IntegerOverflow *)\n  val div_u : t -> t -> t (* raises IntegerDivideByZero *)\n  val rem_s : t -> t -> t (* raises IntegerDivideByZero *)\n  val rem_u : t -> t -> t (* raises IntegerDivideByZero *)\n  val and_ : t -> t -> t\n  val or_ : t -> t -> t\n  val xor : t -> t -> t\n  val shl : t -> t -> t\n  val shr_s : t -> t -> t\n  val shr_u : t -> t -> t\n  val rotl : t -> t -> t\n  val rotr : t -> t -> t\n  val clz : t -> t\n  val ctz : t -> t\n  val popcnt : t -> t\n  val extend_s : int -> t -> t\n  val eqz : t -> bool\n  val eq : t -> t -> bool\n  val ne : t -> t -> bool\n  val lt_s : t -> t -> bool\n  val lt_u : t -> t -> bool\n  val le_s : t -> t -> bool\n  val le_u : t -> t -> bool\n  val gt_s : t -> t -> bool\n  val gt_u : t -> t -> bool\n  val ge_s : t -> t -> bool\n  val ge_u : t -> t -> bool\n\n  val of_int_s : int -> t\n  val of_int_u : int -> t\n  val of_string_s : string -> t\n  val of_string_u : string -> t\n  val of_string : string -> t\n  val to_int_s : t -> int\n  val to_int_u : t -> int\n  val to_string_s : t -> string\n  val to_string_u : t -> string\n  val to_hex_string : t -> string\nend\n\nmodule Make (Rep : RepType) : S with type bits = Rep.t and type t = Rep.t =\nstruct\n  (*\n   * Unsigned comparison in terms of signed comparison.\n   *)\n  let cmp_u x op y =\n    op (Rep.add x Rep.min_int) (Rep.add y Rep.min_int)\n\n  (*\n   * Unsigned division and remainder in terms of signed division; algorithm from\n   * Hacker's Delight, Second Edition, by Henry S. Warren, Jr., section 9-3\n   * \"Unsigned Short Division from Signed Division\".\n   *)\n  let divrem_u n d =\n    if d = Rep.zero then raise Numeric_error.IntegerDivideByZero else\n    let t = Rep.shift_right d (Rep.bitwidth - 1) in\n    let n' = Rep.logand n (Rep.lognot t) in\n    let q = Rep.shift_left (Rep.div (Rep.shift_right_logical n' 1) d) 1 in\n    let r = Rep.sub n (Rep.mul q d) in\n    if cmp_u r (<) d then\n      q, r\n    else\n      Rep.add q Rep.one, Rep.sub r d\n\n  type t = Rep.t\n  type bits = Rep.t\n\n  let of_bits x = x\n  let to_bits x = x\n\n  let zero = Rep.zero\n  let one = Rep.one\n  let ten = Rep.of_int 10\n\n  (* add, sub, and mul are sign-agnostic and do not trap on overflow. *)\n  let add = Rep.add\n  let sub = Rep.sub\n  let mul = Rep.mul\n\n  (* result is truncated toward zero *)\n  let div_s x y =\n    if y = Rep.zero then\n      raise Numeric_error.IntegerDivideByZero\n    else if x = Rep.min_int && y = Rep.minus_one then\n      raise Numeric_error.IntegerOverflow\n    else\n      Rep.div x y\n\n  (* result is floored (which is the same as truncating for unsigned values) *)\n  let div_u x y =\n    let q, r = divrem_u x y in q\n\n  (* result has the sign of the dividend *)\n  let rem_s x y =\n    if y = Rep.zero then\n      raise Numeric_error.IntegerDivideByZero\n    else\n      Rep.rem x y\n\n  let rem_u x y =\n    let q, r = divrem_u x y in r\n\n  let and_ = Rep.logand\n  let or_ = Rep.logor\n  let xor = Rep.logxor\n\n  (* WebAssembly's shifts mask the shift count according to the bitwidth. *)\n  let shift f x y =\n    f x (Rep.to_int (Rep.logand y (Rep.of_int (Rep.bitwidth - 1))))\n\n  let shl x y =\n    shift Rep.shift_left x y\n\n  let shr_s x y =\n    shift Rep.shift_right x y\n\n  let shr_u x y =\n    shift Rep.shift_right_logical x y\n\n  (* We must mask the count to implement rotates via shifts. *)\n  let clamp_rotate_count n =\n    Rep.to_int (Rep.logand n (Rep.of_int (Rep.bitwidth - 1)))\n\n  let rotl x y =\n    let n = clamp_rotate_count y in\n    or_ (Rep.shift_left x n) (Rep.shift_right_logical x (Rep.bitwidth - n))\n\n  let rotr x y =\n    let n = clamp_rotate_count y in\n    or_ (Rep.shift_right_logical x n) (Rep.shift_left x (Rep.bitwidth - n))\n\n  (* clz is defined for all values, including all-zeros. *)\n  let clz x =\n    let rec loop acc n =\n      if n = Rep.zero then\n        Rep.bitwidth\n      else if and_ n (Rep.shift_left Rep.one (Rep.bitwidth - 1)) = zero then\n        loop (1 + acc) (Rep.shift_left n 1)\n      else\n        acc\n    in Rep.of_int (loop 0 x)\n\n  (* ctz is defined for all values, including all-zeros. *)\n  let ctz x =\n    let rec loop acc n =\n      if n = Rep.zero then\n        Rep.bitwidth\n      else if and_ n Rep.one = Rep.one then\n        acc\n      else\n        loop (1 + acc) (Rep.shift_right_logical n 1)\n    in Rep.of_int (loop 0 x)\n\n  let popcnt x =\n    let rec loop acc i n =\n      if i = 0 then\n        acc\n      else\n        let acc' = if and_ n Rep.one = Rep.one then acc + 1 else acc in\n        loop acc' (i - 1) (Rep.shift_right_logical n 1)\n    in Rep.of_int (loop 0 Rep.bitwidth x)\n\n  let extend_s n x =\n    let shift = Rep.bitwidth - n in\n    Rep.shift_right (Rep.shift_left x shift) shift\n\n  let eqz x = x = Rep.zero\n\n  let eq x y = x = y\n  let ne x y = x <> y\n  let lt_s x y = x < y\n  let lt_u x y = cmp_u x (<) y\n  let le_s x y = x <= y\n  let le_u x y = cmp_u x (<=) y\n  let gt_s x y = x > y\n  let gt_u x y = cmp_u x (>) y\n  let ge_s x y = x >= y\n  let ge_u x y = cmp_u x (>=) y\n\n  let to_int_s = Rep.to_int\n  let to_int_u i = Rep.to_int i land (Rep.to_int Rep.max_int lsl 1) lor 1\n\n  let of_int_s = Rep.of_int\n  let of_int_u i = and_ (Rep.of_int i) (or_ (shl (Rep.of_int max_int) one) one)\n\n  (* String conversion that allows leading signs and unsigned values *)\n\n  let require b = if not b then failwith \"of_string\"\n\n  let dec_digit = function\n    | '0' .. '9' as c -> Char.code c - Char.code '0'\n    | _ -> failwith \"of_string\"\n\n  let hex_digit = function\n    | '0' .. '9' as c ->  Char.code c - Char.code '0'\n    | 'a' .. 'f' as c ->  0xa + Char.code c - Char.code 'a'\n    | 'A' .. 'F' as c ->  0xa + Char.code c - Char.code 'A'\n    | _ ->  failwith \"of_string\"\n\n  let max_upper, max_lower = divrem_u Rep.minus_one ten\n\n  let of_string s =\n    let open Rep in\n    let len = String.length s in\n    let rec parse_hex i num =\n      if i = len then num else\n      if s.[i] = '_' then parse_hex (i + 1) num else\n      let digit = of_int (hex_digit s.[i]) in\n      require (le_u num (shr_u minus_one (of_int 4)));\n      parse_hex (i + 1) (logor (shift_left num 4) digit)\n    in\n    let rec parse_dec i num =\n      if i = len then num else\n      if s.[i] = '_' then parse_dec (i + 1) num else\n      let digit = of_int (dec_digit s.[i]) in\n      require (lt_u num max_upper || num = max_upper && le_u digit max_lower);\n      parse_dec (i + 1) (add (mul num ten) digit)\n    in\n    let parse_int i =\n      require (len - i > 0);\n      if i + 2 <= len && s.[i] = '0' && s.[i + 1] = 'x'\n      then parse_hex (i + 2) zero\n      else parse_dec i zero\n    in\n    require (len > 0);\n    match s.[0] with\n    | '+' -> parse_int 1\n    | '-' ->\n      let n = parse_int 1 in\n      require (ge_s (sub n one) minus_one);\n      Rep.neg n\n    | _ -> parse_int 0\n\n  let of_string_s s =\n    let n = of_string s in\n    require (s.[0] = '-' || ge_s n Rep.zero);\n    n\n\n  let of_string_u s =\n    let n = of_string s in\n    require (s.[0] != '+' && s.[0] != '-');\n    n\n\n  (* String conversion that groups digits for readability *)\n\n  let rec add_digits buf s i j k n =\n    if i < j then begin\n      if k = 0 then Buffer.add_char buf '_';\n      Buffer.add_char buf s.[i];\n      add_digits buf s (i + 1) j ((k + n - 1) mod n) n\n    end\n\n  let group_digits n s =\n    let len = String.length s in\n    let num = if s.[0] = '-' then 1 else 0 in\n    let buf = Buffer.create (len*(n+1)/n) in\n    Buffer.add_substring buf s 0 num;\n    add_digits buf s num len ((len - num) mod n + n) n;\n    Buffer.contents buf\n\n  let to_string_s i = group_digits 3 (Rep.to_string i)\n  let to_string_u i =\n    if i >= Rep.zero then\n      group_digits 3 (Rep.to_string i)\n    else\n      group_digits 3 (Rep.to_string (div_u i ten) ^ Rep.to_string (rem_u i ten))\n\n  let to_hex_string i = \"0x\" ^ group_digits 4 (Rep.to_hex_string i)\nend\n"
  },
  {
    "path": "interpreter/exec/numeric_error.ml",
    "content": "exception IntegerOverflow\nexception IntegerDivideByZero\nexception InvalidConversionToInteger\n"
  },
  {
    "path": "interpreter/host/env.ml",
    "content": "(*\n * Emulation of (a subset of) the `env` module currently used by Binaryen,\n * so that we can run modules generated by Binaryen. This is a stopgap until\n * we have agreement on what libc should look like.\n *)\n\nopen Values\nopen Types\nopen Instance\n\n\nlet error msg = raise (Eval.Crash (Source.no_region, msg))\n\nlet type_error v t =\n  error\n    (\"type error, expected \" ^ string_of_value_type t ^\n     \", got \" ^ string_of_value_type (type_of_value v))\n\nlet empty = function\n  | [] -> ()\n  | vs -> error \"type error, too many arguments\"\n\nlet single = function\n  | [] -> error \"type error, missing arguments\"\n  | [v] -> v\n  | vs -> error \"type error, too many arguments\"\n\nlet int = function\n  | Num (I32 i) -> Int32.to_int i\n  | v -> type_error v (NumType I32Type)\n\n\nlet abort vs =\n  empty vs;\n  print_endline \"Abort!\";\n  exit (-1)\n\nlet exit vs =\n  exit (int (single vs))\n\n\nlet lookup name t =\n  match Utf8.encode name, t with\n  | \"abort\", ExternFuncType t -> ExternFunc (Func.alloc_host t abort)\n  | \"exit\", ExternFuncType t -> ExternFunc (Func.alloc_host t exit)\n  | _ -> raise Not_found\n"
  },
  {
    "path": "interpreter/host/spectest.ml",
    "content": "(*\n * Simple collection of functions useful for writing test cases.\n *)\n\nopen Types\nopen Values\nopen Instance\n\n\nlet global (GlobalType (t, _) as gt) =\n  let v =\n    match t with\n    | NumType I32Type -> Num (I32 666l)\n    | NumType I64Type -> Num (I64 666L)\n    | NumType F32Type -> Num (F32 (F32.of_float 666.6))\n    | NumType F64Type -> Num (F64 (F64.of_float 666.6))\n    | RefType t -> Ref (NullRef t)\n  in Global.alloc gt v\n\nlet table =\n  Table.alloc (TableType ({min = 10l; max = Some 20l}, FuncRefType))\n    (NullRef FuncRefType)\nlet memory = Memory.alloc (MemoryType {min = 1l; max = Some 2l})\nlet func f t = Func.alloc_host t (f t)\n\nlet print_value v =\n  Printf.printf \"%s : %s\\n\"\n    (Values.string_of_value v)\n    (Types.string_of_value_type (Values.type_of_value v))\n\nlet print (FuncType (_, out)) vs =\n  List.iter print_value vs;\n  flush_all ();\n  List.map default_value out\n\n\nlet lookup name t =\n  match Utf8.encode name, t with\n  | \"print\", _ -> ExternFunc (func print (FuncType ([], [])))\n  | \"print_i32\", _ -> ExternFunc (func print (FuncType ([NumType I32Type], [])))\n  | \"print_i64\", _ -> ExternFunc (func print (FuncType ([NumType I64Type], [])))\n  | \"print_f32\", _ -> ExternFunc (func print (FuncType ([NumType F32Type], [])))\n  | \"print_f64\", _ -> ExternFunc (func print (FuncType ([NumType F64Type], [])))\n  | \"print_i32_f32\", _ ->\n    ExternFunc (func print (FuncType ([NumType I32Type; NumType F32Type], [])))\n  | \"print_f64_f64\", _ ->\n    ExternFunc (func print (FuncType ([NumType F64Type; NumType F64Type], [])))\n  | \"global_i32\", _ -> ExternGlobal (global (GlobalType (NumType I32Type, Immutable)))\n  | \"global_i64\", _ -> ExternGlobal (global (GlobalType (NumType I64Type, Immutable)))\n  | \"global_f32\", _ -> ExternGlobal (global (GlobalType (NumType F32Type, Immutable)))\n  | \"global_f64\", _ -> ExternGlobal (global (GlobalType (NumType F64Type, Immutable)))\n  | \"table\", _ -> ExternTable table\n  | \"memory\", _ -> ExternMemory memory\n  | _ -> raise Not_found\n"
  },
  {
    "path": "interpreter/main/flags.ml",
    "content": "let interactive = ref false\nlet trace = ref false\nlet unchecked = ref false\nlet print_sig = ref false\nlet dry = ref false\nlet width = ref 80\nlet harness = ref true\n"
  },
  {
    "path": "interpreter/main/main.ml",
    "content": "let name = \"wasm\"\nlet version = \"1.0\"\n\nlet configure () =\n  Import.register (Utf8.decode \"spectest\") Spectest.lookup;\n  Import.register (Utf8.decode \"env\") Env.lookup\n\nlet banner () =\n  print_endline (name ^ \" \" ^ version ^ \" reference interpreter\")\n\nlet usage = \"Usage: \" ^ name ^ \" [option] [file ...]\"\n\nlet args = ref []\nlet add_arg source = args := !args @ [source]\n\nlet quote s = \"\\\"\" ^ String.escaped s ^ \"\\\"\"\n\nlet argspec = Arg.align\n[\n  \"-\", Arg.Set Flags.interactive,\n    \" run interactively (default if no files given)\";\n  \"-e\", Arg.String add_arg, \" evaluate string\";\n  \"-i\", Arg.String (fun file -> add_arg (\"(input \" ^ quote file ^ \")\")),\n    \" read script from file\";\n  \"-o\", Arg.String (fun file -> add_arg (\"(output \" ^ quote file ^ \")\")),\n    \" write module to file\";\n  \"-w\", Arg.Int (fun n -> Flags.width := n),\n    \" configure output width (default is 80)\";\n  \"-s\", Arg.Set Flags.print_sig, \" show module signatures\";\n  \"-u\", Arg.Set Flags.unchecked, \" unchecked, do not perform validation\";\n  \"-h\", Arg.Clear Flags.harness, \" exclude harness for JS conversion\";\n  \"-d\", Arg.Set Flags.dry, \" dry, do not run program\";\n  \"-t\", Arg.Set Flags.trace, \" trace execution\";\n  \"-v\", Arg.Unit banner, \" show version\"\n]\n\nlet () =\n  Printexc.record_backtrace true;\n  try\n    configure ();\n    Arg.parse argspec\n      (fun file -> add_arg (\"(input \" ^ quote file ^ \")\")) usage;\n    List.iter (fun arg -> if not (Run.run_string arg) then exit 1) !args;\n    if !args = [] then Flags.interactive := true;\n    if !Flags.interactive then begin\n      Flags.print_sig := true;\n      banner ();\n      Run.run_stdin ()\n    end\n  with exn ->\n    flush_all ();\n    prerr_endline\n      (Sys.argv.(0) ^ \": uncaught exception \" ^ Printexc.to_string exn);\n    Printexc.print_backtrace stderr;\n    exit 2\n"
  },
  {
    "path": "interpreter/meta/findlib/META",
    "content": "description = \"A library for writing/reading/running WebAssembly binaries\"\nrequires = \"bigarray,str\"\narchive(byte) = \"wasm.cmo\"\narchive(native) = \"wasm.cmx\"\n"
  },
  {
    "path": "interpreter/meta/jslib/bsconfig.json",
    "content": "{\n  \"name\": \"wasm\",\n  \"sources\": [\n    {\"dir\": \"src\"},\n  ]\n}\n"
  },
  {
    "path": "interpreter/meta/jslib/build.sh",
    "content": "link () {\necho \"// DO NOT EDIT. Generated from WebAssembly spec interpreter\"\necho \"\nlet WebAssemblyText = (function() {\n  let _registry = {__proto__: null};\n  function normalize(file) {\n    return file.split('/').reverse()[0].split('.')[0];\n  }\n  function require(file) {\n    let name = normalize(file);\n    if (!(name in _registry)) {\n      throw new Error('missing module: ' + name)\n    } else if (typeof _registry[name] === 'function') {\n\"\nif (($LOG == 1))\nthen\n  echo 1>&2 Logging on\n  echo \"\n    console.log(name);\n\"\nfi\necho \"\n      let f = _registry[name];\n      _registry[name] = function() { throw new Error('cyclic module: ' + name) };\n      _registry[name] = f();\n    }\n    return _registry[name];\n  }\n\"\n\nfor file in $*\ndo\n  echo 1>&2 Including $file\n  name=`basename $file | sed s/[.]js//g`\n  echo \"\n  _registry['$name'] = function() {\n    let exports = {};\n//////// start of $name.js ////////\"\n  cat $file\n  echo \"//////// end of $name.js ////////\n    return exports;\n  };\n\"\ndone\n\necho \"\n  function binary(bytes) {\n    let buffer = new ArrayBuffer(bytes.length);\n    let view = new Uint8Array(buffer);\n    for (let i = 0; i < bytes.length; ++i) {\n      view[i] = bytes.charCodeAt(i);\n    }\n    return buffer;\n  }\n  function bytes(buffer) {\n    let string = '';\n    let view = new Uint8Array(buffer);\n    for (let i = 0; i < view.length; ++i) {\n      string += String.fromCodePoint(view[i]);\n    }\n    return string;\n  }\n  let Wasm = require('wasm');\n  return {\n    encode(s) { return binary(Wasm.encode(s)) },\n    decode(b, w = 80) { return Wasm.decode(bytes(b), w) }\n  };\n})();\n\n\"\n}\n\necho 1>&2 ==== Preparing ====\nnpm link bs-platform\n\necho 1>&2 ==== Compiling ====\nbsb || exit 1\n\necho 1>&2 ==== Linking full version ====\nLOG=1\nFILES='node_modules/bs-platform/lib/js/*.js lib/js/src/*.js'\nlink $FILES >temp.js || exit 1\n\necho 1>&2 ==== Running for dependencies ====\nnode temp.js | tee temp.log || exit 1\n\necho 1>&2 ==== Linking stripped version ====\nused=''\nfor file in `ls $FILES`\ndo\n  if grep -q `basename $file | sed s/.js//g` temp.log\n  then\n    used=\"$used $file\"\n  fi\ndone\nLOG=0\nlink $used >$1 || exit 1\n"
  },
  {
    "path": "interpreter/meta/jslib/wasm.ml",
    "content": "let encode s =\n  let def = Parse.string_to_module s in\n  match def.Source.it with\n  | Script.Textual m -> Encode.encode m\n  | Script.Encoded (_, bs) -> bs\n\nlet decode s width =\n  let m = Decode.decode \"(decode)\" s in\n  Sexpr.to_string width (Arrange.module_ m)\n"
  },
  {
    "path": "interpreter/meta/travis/build-test.sh",
    "content": "#!/bin/bash\n\nset -e\nset -x\n\n# Move to a location relative to the script so it runs\n# from anywhere.\ncd $(dirname ${BASH_SOURCE[0]})/../..\n\nmake all\n"
  },
  {
    "path": "interpreter/meta/travis/install-ocaml.sh",
    "content": "#!/bin/bash\n\nset -e\n\ndownload_from_gh_archive() {\n  local project=$1;\n  local version=$2;\n  local sha=$3;\n\n  curl https://github.com/ocaml/${project}/archive/${version}.tar.gz -OL\n  CHECKSUM=$(shasum -a 256 ${version}.tar.gz | awk '{ print $1 }')\n  if [ ${CHECKSUM} != ${sha} ]; then\n    echo \"Bad checksum ${project} download checksum!\"\n    exit 1\n  fi\n  tar xfz ${version}.tar.gz\n}\n\n# Move to a location relative to the script so it runs\n# from anywhere. Go three levels down to get out of interpreter/\n# and into the top-level dir, since we'll run ocamlbuild\n# inside of interpreter/ and it goes pear-shaped if it\n# encounters ocaml's own build directory.\ncd $(dirname ${BASH_SOURCE[0]})/../../..\n\nPREFIX=$PWD/ocaml/install\n\nrm -rf ocaml\nmkdir ocaml\ncd ocaml\nmkdir install\n\ndownload_from_gh_archive ocaml 4.05.0 e5d8a6f629020c580473d8afcfcb06c3966d01929f7b734f41dc0c737cd8ea3f\ncd ocaml-4.05.0\n./configure -prefix ${PREFIX}\nmake world.opt\nmake install\ncd ..\n\nPATH=${PREFIX}/bin:${PATH}\n\ndownload_from_gh_archive ocamlbuild 0.11.0 1717edc841c9b98072e410f1b0bc8b84444b4b35ed3b4949ce2bec17c60103ee\ncd ocamlbuild-0.11.0\nmake configure\nmake\nmake install\n"
  },
  {
    "path": "interpreter/runtime/func.ml",
    "content": "open Types\nopen Values\n\ntype 'inst t = 'inst func\nand 'inst func =\n  | AstFunc of func_type * 'inst * Ast.func\n  | HostFunc of func_type * (value list -> value list)\n\nlet alloc ft inst f = AstFunc (ft, inst, f)\nlet alloc_host ft f = HostFunc (ft, f)\n\nlet type_of = function\n  | AstFunc (ft, _, _) -> ft\n  | HostFunc (ft, _) -> ft\n"
  },
  {
    "path": "interpreter/runtime/func.mli",
    "content": "open Types\nopen Values\n\ntype 'inst t = 'inst func\nand 'inst func =\n  | AstFunc of func_type * 'inst * Ast.func\n  | HostFunc of func_type * (value list -> value list)\n\nval alloc : func_type -> 'inst -> Ast.func -> 'inst func\nval alloc_host : func_type -> (value list -> value list) -> 'inst func\nval type_of : 'inst func -> func_type\n"
  },
  {
    "path": "interpreter/runtime/global.ml",
    "content": "open Types\nopen Values\n\ntype global = {ty : global_type; mutable content : value}\ntype t = global\n\nexception Type\nexception NotMutable\n\nlet alloc (GlobalType (t, _) as ty) v =\n  if type_of_value v <> t then raise Type;\n  {ty; content = v}\n\nlet type_of glob =\n  glob.ty\n\nlet load glob =\n  glob.content\n\nlet store glob v =\n  let GlobalType (t, mut) = glob.ty in\n  if mut <> Mutable then raise NotMutable;\n  if type_of_value v <> t then raise Type;\n  glob.content <- v\n"
  },
  {
    "path": "interpreter/runtime/global.mli",
    "content": "open Types\nopen Values\n\ntype global\ntype t = global\n\nexception Type\nexception NotMutable\n\nval alloc : global_type -> value -> global  (* raises Type *)\nval type_of : global -> global_type\n\nval load : global -> value\nval store : global -> value -> unit  (* raises Type, NotMutable *)\n"
  },
  {
    "path": "interpreter/runtime/instance.ml",
    "content": "open Types\n\ntype module_inst =\n{\n  types : func_type list;\n  funcs : func_inst list;\n  tables : table_inst list;\n  memories : memory_inst list;\n  globals : global_inst list;\n  exports : export_inst list;\n  elems : elem_inst list;\n  datas : data_inst list;\n}\n\nand func_inst = module_inst ref Func.t\nand table_inst = Table.t\nand memory_inst = Memory.t\nand global_inst = Global.t\nand export_inst = Ast.name * extern\nand elem_inst = Values.ref_ list ref\nand data_inst = string ref\n\nand extern =\n  | ExternFunc of func_inst\n  | ExternTable of table_inst\n  | ExternMemory of memory_inst\n  | ExternGlobal of global_inst\n\n\n(* Reference types *)\n\ntype Values.ref_ += FuncRef of func_inst\n\nlet () =\n  let type_of_ref' = !Values.type_of_ref' in\n  Values.type_of_ref' := function\n    | FuncRef _ -> FuncRefType\n    | r -> type_of_ref' r\n\nlet () =\n  let string_of_ref' = !Values.string_of_ref' in\n  Values.string_of_ref' := function\n    | FuncRef _ -> \"func\"\n    | r -> string_of_ref' r\n\n\n(* Auxiliary functions *)\n\nlet empty_module_inst =\n  { types = []; funcs = []; tables = []; memories = []; globals = [];\n    exports = []; elems = []; datas = [] }\n\nlet extern_type_of = function\n  | ExternFunc func -> ExternFuncType (Func.type_of func)\n  | ExternTable tab -> ExternTableType (Table.type_of tab)\n  | ExternMemory mem -> ExternMemoryType (Memory.type_of mem)\n  | ExternGlobal glob -> ExternGlobalType (Global.type_of glob)\n\nlet export inst name =\n  try Some (List.assoc name inst.exports) with Not_found -> None\n"
  },
  {
    "path": "interpreter/runtime/memory.ml",
    "content": "open Bigarray\nopen Lib.Bigarray\nopen Types\nopen Values\n\ntype size = int32  (* number of pages *)\ntype address = int64\ntype offset = int32\ntype count = int32\n\ntype memory' = (int, int8_unsigned_elt, c_layout) Array1.t\ntype memory = {mutable ty : memory_type; mutable content : memory'}\ntype t = memory\n\nexception Type\nexception Bounds\nexception SizeOverflow\nexception SizeLimit\nexception OutOfMemory\n\nlet page_size = 0x10000L (* 64 KiB *)\n\nlet valid_limits {min; max} =\n  match max with\n  | None -> true\n  | Some m -> I32.le_u min m\n\nlet create n =\n  if I32.gt_u n 0x10000l then raise SizeOverflow else\n  try\n    let size = Int64.(mul (of_int32 n) page_size) in\n    let mem = Array1_64.create Int8_unsigned C_layout size in\n    Array1.fill mem 0;\n    mem\n  with Out_of_memory -> raise OutOfMemory\n\nlet alloc (MemoryType lim as ty) =\n  if not (valid_limits lim) then raise Type;\n  {ty; content = create lim.min}\n\nlet bound mem =\n  Array1_64.dim mem.content\n\nlet size mem =\n  Int64.(to_int32 (div (bound mem) page_size))\n\nlet type_of mem =\n  mem.ty\n\nlet grow mem delta =\n  let MemoryType lim = mem.ty in\n  assert (lim.min = size mem);\n  let old_size = lim.min in\n  let new_size = Int32.add old_size delta in\n  if I32.gt_u old_size new_size then raise SizeOverflow else\n  let lim' = {lim with min = new_size} in\n  if not (valid_limits lim') then raise SizeLimit else\n  let after = create new_size in\n  let dim = Array1_64.dim mem.content in\n  Array1.blit (Array1_64.sub mem.content 0L dim) (Array1_64.sub after 0L dim);\n  mem.ty <- MemoryType lim';\n  mem.content <- after\n\nlet load_byte mem a =\n  try Array1_64.get mem.content a with Invalid_argument _ -> raise Bounds\n\nlet store_byte mem a b =\n  try Array1_64.set mem.content a b with Invalid_argument _ -> raise Bounds\n\nlet load_bytes mem a n =\n  let buf = Buffer.create n in\n  for i = 0 to n - 1 do\n    Buffer.add_char buf (Char.chr (load_byte mem Int64.(add a (of_int i))))\n  done;\n  Buffer.contents buf\n\nlet store_bytes mem a bs =\n  for i = String.length bs - 1 downto 0 do\n    store_byte mem Int64.(add a (of_int i)) (Char.code bs.[i])\n  done\n\nlet effective_address a o =\n  let ea = Int64.(add a (of_int32 o)) in\n  if I64.lt_u ea a then raise Bounds;\n  ea\n\nlet loadn mem a o n =\n  assert (n > 0 && n <= 8);\n  let rec loop a n =\n    if n = 0 then 0L else begin\n      let x = Int64.(shift_left (loop (add a 1L) (n - 1)) 8) in\n      Int64.logor (Int64.of_int (load_byte mem a)) x\n    end\n  in loop (effective_address a o) n\n\nlet storen mem a o n x =\n  assert (n > 0 && n <= 8);\n  let rec loop a n x =\n    if n > 0 then begin\n      Int64.(loop (add a 1L) (n - 1) (shift_right x 8));\n      store_byte mem a (Int64.to_int x land 0xff)\n    end\n  in loop (effective_address a o) n x\n\nlet load_num mem a o t =\n  let n = loadn mem a o (Types.size t) in\n  match t with\n  | I32Type -> I32 (Int64.to_int32 n)\n  | I64Type -> I64 n\n  | F32Type -> F32 (F32.of_bits (Int64.to_int32 n))\n  | F64Type -> F64 (F64.of_bits n)\n\nlet store_num mem a o n =\n  let x =\n    match n with\n    | I32 x -> Int64.of_int32 x\n    | I64 x -> x\n    | F32 x -> Int64.of_int32 (F32.to_bits x)\n    | F64 x -> F64.to_bits x\n  in storen mem a o (Types.size (Values.type_of_num n)) x\n\nlet extend x n = function\n  | ZX -> x\n  | SX -> let sh = 64 - 8 * n in Int64.(shift_right (shift_left x sh) sh)\n\nlet load_packed sz ext mem a o t =\n  assert (packed_size sz <= Types.size t);\n  let w = packed_size sz in\n  let x = extend (loadn mem a o w) w ext in\n  match t with\n  | I32Type -> I32 (Int64.to_int32 x)\n  | I64Type -> I64 x\n  | _ -> raise Type\n\nlet store_packed sz mem a o n =\n  assert (packed_size sz <= Types.size (Values.type_of_num n));\n  let w = packed_size sz in\n  let x =\n    match n with\n    | I32 x -> Int64.of_int32 x\n    | I64 x -> x\n    | _ -> raise Type\n  in storen mem a o w x\n"
  },
  {
    "path": "interpreter/runtime/memory.mli",
    "content": "open Types\nopen Values\n\ntype memory\ntype t = memory\n\ntype size = int32  (* number of pages *)\ntype address = int64\ntype offset = int32\ntype count = int32\n\nexception Type\nexception Bounds\nexception SizeOverflow\nexception SizeLimit\nexception OutOfMemory\n\nval page_size : int64\n\nval alloc : memory_type -> memory (* raises Type, SizeOverflow, OutOfMemory *)\nval type_of : memory -> memory_type\nval size : memory -> size\nval bound : memory -> address\nval grow : memory -> size -> unit\n  (* raises SizeLimit, SizeOverflow, OutOfMemory *)\n\nval load_byte : memory -> address -> int (* raises Bounds *)\nval store_byte : memory -> address -> int -> unit (* raises Bounds *)\nval load_bytes : memory -> address -> int -> string (* raises Bounds *)\nval store_bytes : memory -> address -> string -> unit (* raises Bounds *)\n\nval load_num :\n  memory -> address -> offset -> num_type -> num (* raises Bounds *)\nval store_num :\n  memory -> address -> offset -> num -> unit (* raises Bounds *)\nval load_packed :\n  pack_size -> extension -> memory -> address -> offset -> num_type -> num\n    (* raises Type, Bounds *)\nval store_packed :\n  pack_size -> memory -> address -> offset -> num -> unit\n    (* raises Type, Bounds *)\n"
  },
  {
    "path": "interpreter/runtime/table.ml",
    "content": "open Types\nopen Values\n\ntype size = int32\ntype index = int32\ntype count = int32\n\ntype table = {mutable ty : table_type; mutable content : ref_ array}\ntype t = table\n\nexception Type\nexception Bounds\nexception SizeOverflow\nexception SizeLimit\nexception OutOfMemory\n\nlet valid_limits {min; max} =\n  match max with\n  | None -> true\n  | Some m -> I32.le_u min m\n\nlet create size r =\n  try Lib.Array32.make size r\n  with Out_of_memory | Invalid_argument _ -> raise OutOfMemory\n\nlet alloc (TableType (lim, _) as ty) r =\n  if not (valid_limits lim) then raise Type;\n  {ty; content = create lim.min r}\n\nlet size tab =\n  Lib.Array32.length tab.content\n\nlet type_of tab =\n  tab.ty\n\nlet grow tab delta r =\n  let TableType (lim, t) = tab.ty in\n  assert (lim.min = size tab);\n  let old_size = lim.min in\n  let new_size = Int32.add old_size delta in\n  if I32.gt_u old_size new_size then raise SizeOverflow else\n  let lim' = {lim with min = new_size} in\n  if not (valid_limits lim') then raise SizeLimit else\n  let after = create new_size r in\n  Array.blit tab.content 0 after 0 (Array.length tab.content);\n  tab.ty <- TableType (lim', t);\n  tab.content <- after\n\nlet load tab i =\n  try Lib.Array32.get tab.content i with Invalid_argument _ -> raise Bounds\n\nlet store tab i r =\n  let TableType (lim, t) = tab.ty in\n  if type_of_ref r <> t then raise Type;\n  try Lib.Array32.set tab.content i r with Invalid_argument _ -> raise Bounds\n\nlet blit tab offset rs =\n  let data = Array.of_list rs in\n  try Lib.Array32.blit data 0l tab.content offset (Lib.Array32.length data)\n  with Invalid_argument _ -> raise Bounds\n"
  },
  {
    "path": "interpreter/runtime/table.mli",
    "content": "open Types\nopen Values\n\ntype table\ntype t = table\n\ntype size = int32\ntype index = int32\ntype count = int32\n\nexception Type\nexception Bounds\nexception SizeOverflow\nexception SizeLimit\nexception OutOfMemory\n\nval alloc : table_type -> ref_ -> table (* raises Type, OutOfMemory *)\nval type_of : table -> table_type\nval size : table -> size\nval grow : table -> size -> ref_ -> unit\n  (* raises SizeOverflow, SizeLimit, OutOfMemory *)\n\nval load : table -> index -> ref_ (* raises Bounds *)\nval store : table -> index -> ref_ -> unit (* raises Type, Bounds *)\nval blit : table -> index -> ref_ list -> unit (* raises Bounds *)\n"
  },
  {
    "path": "interpreter/script/import.ml",
    "content": "open Source\nopen Ast\n\nmodule Unknown = Error.Make ()\nexception Unknown = Unknown.Error  (* indicates unknown import name *)\n\nmodule Registry = Map.Make(struct type t = Ast.name let compare = compare end)\nlet registry = ref Registry.empty\n\nlet register name lookup = registry := Registry.add name lookup !registry\n\nlet lookup (m : module_) (im : import) : Instance.extern =\n  let {module_name; item_name; idesc} = im.it in\n  let t = import_type m im in\n  try Registry.find module_name !registry item_name t with Not_found ->\n    Unknown.error im.at\n      (\"unknown import \\\"\" ^ string_of_name module_name ^\n        \"\\\".\\\"\" ^ string_of_name item_name ^ \"\\\"\")\n\nlet link m = List.map (lookup m) m.it.imports\n"
  },
  {
    "path": "interpreter/script/import.mli",
    "content": "exception Unknown of Source.region * string\n\nval link : Ast.module_ -> Instance.extern list (* raises Unknown *)\n\nval register :\n  Ast.name ->\n  (Ast.name -> Types.extern_type -> Instance.extern (* raises Not_found *)) ->\n  unit\n"
  },
  {
    "path": "interpreter/script/js.ml",
    "content": "open Types\nopen Ast\nopen Script\nopen Source\n\n\n(* Harness *)\n\nlet harness =\n{|\n'use strict';\n\nlet externrefs = {};\nlet externsym = Symbol(\"externref\");\nfunction externref(s) {\n  if (! (s in externrefs)) externrefs[s] = {[externsym]: s};\n  return externrefs[s];\n}\nfunction is_externref(x) {\n  return (x !== null && externsym in x) ? 1 : 0;\n}\nfunction is_funcref(x) {\n  return typeof x === \"function\" ? 1 : 0;\n}\nfunction eq_externref(x, y) {\n  return x === y ? 1 : 0;\n}\nfunction eq_funcref(x, y) {\n  return x === y ? 1 : 0;\n}\n\nlet spectest = {\n  externref: externref,\n  is_externref: is_externref,\n  is_funcref: is_funcref,\n  eq_externref: eq_externref,\n  eq_funcref: eq_funcref,\n  print: console.log.bind(console),\n  print_i32: console.log.bind(console),\n  print_i32_f32: console.log.bind(console),\n  print_f64_f64: console.log.bind(console),\n  print_f32: console.log.bind(console),\n  print_f64: console.log.bind(console),\n  global_i32: 666,\n  global_i64: 666n,\n  global_f32: 666,\n  global_f64: 666,\n  table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),\n  memory: new WebAssembly.Memory({initial: 1, maximum: 2})\n};\n\nlet handler = {\n  get(target, prop) {\n    return (prop in target) ?  target[prop] : {};\n  }\n};\nlet registry = new Proxy({spectest}, handler);\n\nfunction register(name, instance) {\n  registry[name] = instance.exports;\n}\n\nfunction module(bytes, valid = true) {\n  let buffer = new ArrayBuffer(bytes.length);\n  let view = new Uint8Array(buffer);\n  for (let i = 0; i < bytes.length; ++i) {\n    view[i] = bytes.charCodeAt(i);\n  }\n  let validated;\n  try {\n    validated = WebAssembly.validate(buffer);\n  } catch (e) {\n    throw new Error(\"Wasm validate throws\");\n  }\n  if (validated !== valid) {\n    throw new Error(\"Wasm validate failure\" + (valid ? \"\" : \" expected\"));\n  }\n  return new WebAssembly.Module(buffer);\n}\n\nfunction instance(bytes, imports = registry) {\n  return new WebAssembly.Instance(module(bytes), imports);\n}\n\nfunction call(instance, name, args) {\n  return instance.exports[name](...args);\n}\n\nfunction get(instance, name) {\n  let v = instance.exports[name];\n  return (v instanceof WebAssembly.Global) ? v.value : v;\n}\n\nfunction exports(instance) {\n  return {module: instance.exports, spectest: spectest};\n}\n\nfunction run(action) {\n  action();\n}\n\nfunction assert_malformed(bytes) {\n  try { module(bytes, false) } catch (e) {\n    if (e instanceof WebAssembly.CompileError) return;\n  }\n  throw new Error(\"Wasm decoding failure expected\");\n}\n\nfunction assert_invalid(bytes) {\n  try { module(bytes, false) } catch (e) {\n    if (e instanceof WebAssembly.CompileError) return;\n  }\n  throw new Error(\"Wasm validation failure expected\");\n}\n\nfunction assert_unlinkable(bytes) {\n  let mod = module(bytes);\n  try { new WebAssembly.Instance(mod, registry) } catch (e) {\n    if (e instanceof WebAssembly.LinkError) return;\n  }\n  throw new Error(\"Wasm linking failure expected\");\n}\n\nfunction assert_uninstantiable(bytes) {\n  let mod = module(bytes);\n  try { new WebAssembly.Instance(mod, registry) } catch (e) {\n    if (e instanceof WebAssembly.RuntimeError) return;\n  }\n  throw new Error(\"Wasm trap expected\");\n}\n\nfunction assert_trap(action) {\n  try { action() } catch (e) {\n    if (e instanceof WebAssembly.RuntimeError) return;\n  }\n  throw new Error(\"Wasm trap expected\");\n}\n\nlet StackOverflow;\ntry { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }\n\nfunction assert_exhaustion(action) {\n  try { action() } catch (e) {\n    if (e instanceof StackOverflow) return;\n  }\n  throw new Error(\"Wasm resource exhaustion expected\");\n}\n\nfunction assert_return(action, ...expected) {\n  let actual = action();\n  if (actual === undefined) {\n    actual = [];\n  } else if (!Array.isArray(actual)) {\n    actual = [actual];\n  }\n  if (actual.length !== expected.length) {\n    throw new Error(expected.length + \" value(s) expected, got \" + actual.length);\n  }\n  for (let i = 0; i < actual.length; ++i) {\n    switch (expected[i]) {\n      case \"nan:canonical\":\n      case \"nan:arithmetic\":\n      case \"nan:any\":\n        // Note that JS can't reliably distinguish different NaN values,\n        // so there's no good way to test that it's a canonical NaN.\n        if (!Number.isNaN(actual[i])) {\n          throw new Error(\"Wasm return value NaN expected, got \" + actual[i]);\n        };\n        return;\n      case \"ref.func\":\n        if (typeof actual[i] !== \"function\") {\n          throw new Error(\"Wasm function return value expected, got \" + actual[i]);\n        };\n        return;\n      case \"ref.extern\":\n        if (actual[i] === null) {\n          throw new Error(\"Wasm reference return value expected, got \" + actual[i]);\n        };\n        return;\n      default:\n        if (!Object.is(actual[i], expected[i])) {\n          throw new Error(\"Wasm return value \" + expected[i] + \" expected, got \" + actual[i]);\n        };\n    }\n  }\n}\n|}\n\n\n(* Context *)\n\nmodule NameMap = Map.Make(struct type t = Ast.name let compare = compare end)\nmodule Map = Map.Make(String)\n\ntype exports = extern_type NameMap.t\ntype modules = {mutable env : exports Map.t; mutable current : int}\n\nlet exports m : exports =\n  List.fold_left\n    (fun map exp -> NameMap.add exp.it.name (export_type m exp) map)\n    NameMap.empty m.it.exports\n\nlet modules () : modules = {env = Map.empty; current = 0}\n\nlet current_var (mods : modules) = \"$\" ^ string_of_int mods.current\nlet of_var_opt (mods : modules) = function\n  | None -> current_var mods\n  | Some x -> x.it\n\nlet bind (mods : modules) x_opt m =\n  let exports = exports m in\n  mods.current <- mods.current + 1;\n  mods.env <- Map.add (of_var_opt mods x_opt) exports mods.env;\n  if x_opt <> None then mods.env <- Map.add (current_var mods) exports mods.env\n\nlet lookup (mods : modules) x_opt name at =\n  let exports =\n    try Map.find (of_var_opt mods x_opt) mods.env with Not_found ->\n      raise (Eval.Crash (at, \n        if x_opt = None then \"no module defined within script\"\n        else \"unknown module \" ^ of_var_opt mods x_opt ^ \" within script\"))\n  in try NameMap.find name exports with Not_found ->\n    raise (Eval.Crash (at, \"unknown export \\\"\" ^\n      string_of_name name ^ \"\\\" within module\"))\n\n\n(* Wrappers *)\n\nlet subject_idx = 0l\nlet externref_idx = 1l\nlet is_externref_idx = 2l\nlet is_funcref_idx = 3l\nlet eq_externref_idx = 4l\nlet _eq_funcref_idx = 5l\nlet subject_type_idx = 6l\n\nlet eq_of = function\n  | I32Type -> Values.I32 I32Op.Eq\n  | I64Type -> Values.I64 I64Op.Eq\n  | F32Type -> Values.F32 F32Op.Eq\n  | F64Type -> Values.F64 F64Op.Eq\n\nlet and_of = function\n  | I32Type | F32Type -> Values.I32 I32Op.And\n  | I64Type | F64Type -> Values.I64 I64Op.And\n\nlet reinterpret_of = function\n  | I32Type -> I32Type, Nop\n  | I64Type -> I64Type, Nop\n  | F32Type -> I32Type, Convert (Values.I32 I32Op.ReinterpretFloat)\n  | F64Type -> I64Type, Convert (Values.I64 I64Op.ReinterpretFloat)\n\nlet canonical_nan_of = function\n  | I32Type | F32Type -> Values.I32 (F32.to_bits F32.pos_nan)\n  | I64Type | F64Type -> Values.I64 (F64.to_bits F64.pos_nan)\n\nlet abs_mask_of = function\n  | I32Type | F32Type -> Values.I32 Int32.max_int\n  | I64Type | F64Type -> Values.I64 Int64.max_int\n\nlet value v =\n  match v.it with\n  | Values.Num num -> [Const (num @@ v.at) @@ v.at]\n  | Values.Ref (Values.NullRef t) -> [RefNull t @@ v.at]\n  | Values.Ref (ExternRef n) ->\n    [Const (Values.I32 n @@ v.at) @@ v.at; Call (externref_idx @@ v.at) @@ v.at]\n  | Values.Ref _ -> assert false\n\nlet invoke ft vs at =\n  [ft @@ at], FuncImport (subject_type_idx @@ at) @@ at,\n  List.concat (List.map value vs) @ [Call (subject_idx @@ at) @@ at]\n\nlet get t at =\n  [], GlobalImport t @@ at, [GlobalGet (subject_idx @@ at) @@ at]\n\nlet run ts at =\n  [], []\n\nlet assert_return ress ts at =\n  let test res =\n    match res.it with\n    | LitResult {it = Values.Num num; at = at'} ->\n      let t', reinterpret = reinterpret_of (Values.type_of_num num) in\n      [ reinterpret @@ at;\n        Const (num @@ at')  @@ at;\n        reinterpret @@ at;\n        Compare (eq_of t') @@ at;\n        Test (Values.I32 I32Op.Eqz) @@ at;\n        BrIf (0l @@ at) @@ at ]\n    | LitResult {it = Values.Ref (Values.NullRef t); _} ->\n      [ RefIsNull @@ at;\n        Test (Values.I32 I32Op.Eqz) @@ at;\n        BrIf (0l @@ at) @@ at ]\n    | LitResult {it = Values.Ref (ExternRef n); _} ->\n      [ Const (Values.I32 n @@ at) @@ at;\n        Call (externref_idx @@ at) @@ at;\n        Call (eq_externref_idx @@ at)  @@ at;\n        Test (Values.I32 I32Op.Eqz) @@ at;\n        BrIf (0l @@ at) @@ at ]\n    | LitResult {it = Values.Ref _; _} ->\n      assert false\n    | NanResult nanop ->\n      let nan =\n        match nanop.it with\n        | Values.I32 _ | Values.I64 _ -> assert false\n        | Values.F32 n | Values.F64 n -> n\n      in\n      let nan_bitmask_of =\n        match nan with\n        | CanonicalNan -> abs_mask_of (* must only differ from the canonical NaN in its sign bit *)\n        | ArithmeticNan -> canonical_nan_of (* can be any NaN that's one everywhere the canonical NaN is one *)\n      in\n      let t = Values.type_of_num nanop.it in\n      let t', reinterpret = reinterpret_of t in\n      [ reinterpret @@ at;\n        Const (nan_bitmask_of t' @@ at) @@ at;\n        Binary (and_of t') @@ at;\n        Const (canonical_nan_of t' @@ at) @@ at;\n        Compare (eq_of t') @@ at;\n        Test (Values.I32 I32Op.Eqz) @@ at;\n        BrIf (0l @@ at) @@ at ]\n    | RefResult t ->\n      let is_ref_idx =\n        match t with\n        | FuncRefType -> is_funcref_idx\n        | ExternRefType -> is_externref_idx\n      in\n      [ Call (is_ref_idx @@ at) @@ at;\n        Test (Values.I32 I32Op.Eqz) @@ at;\n        BrIf (0l @@ at) @@ at ]\n  in [], List.flatten (List.rev_map test ress)\n\nlet wrap item_name wrap_action wrap_assertion at =\n  let itypes, idesc, action = wrap_action at in\n  let locals, assertion = wrap_assertion at in\n  let types =\n    (FuncType ([], []) @@ at) ::\n    (FuncType ([NumType I32Type], [RefType ExternRefType]) @@ at) ::\n    (FuncType ([RefType ExternRefType], [NumType I32Type]) @@ at) ::\n    (FuncType ([RefType FuncRefType], [NumType I32Type]) @@ at) ::\n    (FuncType ([RefType ExternRefType; RefType ExternRefType], [NumType I32Type]) @@ at) ::\n    (FuncType ([RefType FuncRefType; RefType FuncRefType], [NumType I32Type]) @@ at) ::\n    itypes\n  in\n  let imports =\n    [ {module_name = Utf8.decode \"module\"; item_name; idesc} @@ at;\n      {module_name = Utf8.decode \"spectest\"; item_name = Utf8.decode \"externref\";\n       idesc = FuncImport (1l @@ at) @@ at} @@ at;\n      {module_name = Utf8.decode \"spectest\"; item_name = Utf8.decode \"is_externref\";\n       idesc = FuncImport (2l @@ at) @@ at} @@ at;\n      {module_name = Utf8.decode \"spectest\"; item_name = Utf8.decode \"is_funcref\";\n       idesc = FuncImport (3l @@ at) @@ at} @@ at;\n      {module_name = Utf8.decode \"spectest\"; item_name = Utf8.decode \"eq_externref\";\n       idesc = FuncImport (4l @@ at) @@ at} @@ at;\n      {module_name = Utf8.decode \"spectest\"; item_name = Utf8.decode \"eq_funcref\";\n       idesc = FuncImport (5l @@ at) @@ at} @@ at ]\n  in\n  let item =\n    List.fold_left\n      (fun i im ->\n        match im.it.idesc.it with FuncImport _ -> Int32.add i 1l | _ -> i\n      ) 0l imports @@ at\n  in\n  let edesc = FuncExport item @@ at in\n  let exports = [{name = Utf8.decode \"run\"; edesc} @@ at] in\n  let body =\n    [ Block (ValBlockType None, action @ assertion @ [Return @@ at]) @@ at;\n      Unreachable @@ at ]\n  in\n  let funcs = [{ftype = 0l @@ at; locals; body} @@ at] in\n  let m = {empty_module with types; funcs; imports; exports} @@ at in\n  Encode.encode m\n\n\nlet is_js_num_type = function\n  | I32Type -> true\n  | I64Type | F32Type | F64Type -> false\n\nlet is_js_value_type = function\n  | NumType t -> is_js_num_type t\n  | RefType t -> true\n\nlet is_js_global_type = function\n  | GlobalType (t, mut) -> is_js_value_type t && mut = Immutable\n\nlet is_js_func_type = function\n  | FuncType (ins, out) -> List.for_all is_js_value_type (ins @ out)\n\n\n(* Script conversion *)\n\nlet add_hex_char buf c = Printf.bprintf buf \"\\\\x%02x\" (Char.code c)\nlet add_char buf c =\n  if c < '\\x20' || c >= '\\x7f' then\n    add_hex_char buf c\n  else begin\n    if c = '\\\"' || c = '\\\\' then Buffer.add_char buf '\\\\';\n    Buffer.add_char buf c\n  end\nlet add_unicode_char buf uc =\n  if uc < 0x20 || uc >= 0x7f then\n    Printf.bprintf buf \"\\\\u{%02x}\" uc\n  else\n    add_char buf (Char.chr uc)\n\nlet of_string_with iter add_char s =\n  let buf = Buffer.create 256 in\n  Buffer.add_char buf '\\\"';\n  iter (add_char buf) s;\n  Buffer.add_char buf '\\\"';\n  Buffer.contents buf\n\nlet of_bytes = of_string_with String.iter add_hex_char\nlet of_name = of_string_with List.iter add_unicode_char\n\nlet of_float z =\n  match string_of_float z with\n  | \"nan\" -> \"NaN\"\n  | \"-nan\" -> \"-NaN\"\n  | \"inf\" -> \"Infinity\"\n  | \"-inf\" -> \"-Infinity\"\n  | s -> s\n\nlet of_value v =\n  let open Values in\n  match v.it with\n  | Num (I32 i) -> I32.to_string_s i\n  | Num (I64 i) -> \"int64(\\\"\" ^ I64.to_string_s i ^ \"\\\")\"\n  | Num (F32 z) -> of_float (F32.to_float z)\n  | Num (F64 z) -> of_float (F64.to_float z)\n  | Ref (NullRef _) -> \"null\"\n  | Ref (ExternRef n) -> \"externref(\" ^ Int32.to_string n ^ \")\"\n  | _ -> assert false\n\nlet of_nan = function\n  | CanonicalNan -> \"\\\"nan:canonical\\\"\"\n  | ArithmeticNan -> \"\\\"nan:arithmetic\\\"\"\n\nlet of_result res =\n  match res.it with\n  | LitResult value -> of_value value\n  | NanResult nanop ->\n    (match nanop.it with\n    | Values.I32 _ | Values.I64 _ -> assert false\n    | Values.F32 n | Values.F64 n -> of_nan n\n    )\n  | RefResult t -> \"\\\"ref.\" ^ string_of_refed_type t ^ \"\\\"\"\n\nlet rec of_definition def =\n  match def.it with\n  | Textual m -> of_bytes (Encode.encode m)\n  | Encoded (_, bs) -> of_bytes bs\n  | Quoted (_, s) ->\n    try of_definition (Parse.string_to_module s) with Parse.Syntax _ ->\n      of_bytes \"<malformed quote>\"\n\nlet of_wrapper mods x_opt name wrap_action wrap_assertion at =\n  let x = of_var_opt mods x_opt in\n  let bs = wrap name wrap_action wrap_assertion at in\n  \"call(instance(\" ^ of_bytes bs ^ \", \" ^\n    \"exports(\" ^ x ^ \")), \" ^ \" \\\"run\\\", [])\"\n\nlet of_action mods act =\n  match act.it with\n  | Invoke (x_opt, name, vs) ->\n    \"call(\" ^ of_var_opt mods x_opt ^ \", \" ^ of_name name ^ \", \" ^\n      \"[\" ^ String.concat \", \" (List.map of_value vs) ^ \"])\",\n    (match lookup mods x_opt name act.at with\n    | ExternFuncType ft when not (is_js_func_type ft) ->\n      let FuncType (_, out) = ft in\n      Some (of_wrapper mods x_opt name (invoke ft vs), out)\n    | _ -> None\n    )\n  | Get (x_opt, name) ->\n    \"get(\" ^ of_var_opt mods x_opt ^ \", \" ^ of_name name ^ \")\",\n    (match lookup mods x_opt name act.at with\n    | ExternGlobalType gt when not (is_js_global_type gt) ->\n      let GlobalType (t, _) = gt in\n      Some (of_wrapper mods x_opt name (get gt), [t])\n    | _ -> None\n    )\n\nlet of_assertion' mods act name args wrapper_opt =\n  let act_js, act_wrapper_opt = of_action mods act in\n  let js = name ^ \"(() => \" ^ act_js ^ String.concat \", \" (\"\" :: args) ^ \")\" in\n  match act_wrapper_opt with\n  | None -> js ^ \";\"\n  | Some (act_wrapper, out) ->\n    let run_name, wrapper =\n      match wrapper_opt with\n      | None -> name, run\n      | Some wrapper -> \"run\", wrapper\n    in run_name ^ \"(() => \" ^ act_wrapper (wrapper out) act.at ^ \");  // \" ^ js\n\nlet of_assertion mods ass =\n  match ass.it with\n  | AssertMalformed (def, _) ->\n    \"assert_malformed(\" ^ of_definition def ^ \");\"\n  | AssertInvalid (def, _) ->\n    \"assert_invalid(\" ^ of_definition def ^ \");\"\n  | AssertUnlinkable (def, _) ->\n    \"assert_unlinkable(\" ^ of_definition def ^ \");\"\n  | AssertUninstantiable (def, _) ->\n    \"assert_uninstantiable(\" ^ of_definition def ^ \");\"\n  | AssertReturn (act, ress) ->\n    of_assertion' mods act \"assert_return\" (List.map of_result ress)\n      (Some (assert_return ress))\n  | AssertTrap (act, _) ->\n    of_assertion' mods act \"assert_trap\" [] None\n  | AssertExhaustion (act, _) ->\n    of_assertion' mods act \"assert_exhaustion\" [] None\n\nlet of_command mods cmd =\n  \"\\n// \" ^ Filename.basename cmd.at.left.file ^\n    \":\" ^ string_of_int cmd.at.left.line ^ \"\\n\" ^\n  match cmd.it with\n  | Module (x_opt, def) ->\n    let rec unquote def =\n      match def.it with\n      | Textual m -> m\n      | Encoded (_, bs) -> Decode.decode \"binary\" bs\n      | Quoted (_, s) -> unquote (Parse.string_to_module s)\n    in bind mods x_opt (unquote def);\n    \"let \" ^ current_var mods ^ \" = instance(\" ^ of_definition def ^ \");\\n\" ^\n    (if x_opt = None then \"\" else\n    \"let \" ^ of_var_opt mods x_opt ^ \" = \" ^ current_var mods ^ \";\\n\")\n  | Register (name, x_opt) ->\n    \"register(\" ^ of_name name ^ \", \" ^ of_var_opt mods x_opt ^ \")\\n\"\n  | Action act ->\n    of_assertion' mods act \"run\" [] None ^ \"\\n\"\n  | Assertion ass ->\n    of_assertion mods ass ^ \"\\n\"\n  | Meta _ -> assert false\n\nlet of_script scr =\n  (if !Flags.harness then harness else \"\") ^\n  String.concat \"\" (List.map (of_command (modules ())) scr)\n"
  },
  {
    "path": "interpreter/script/js.mli",
    "content": "val of_script : Script.script -> string\n"
  },
  {
    "path": "interpreter/script/run.ml",
    "content": "open Script\nopen Source\n\n\n(* Errors & Tracing *)\n\nmodule Script = Error.Make ()\nmodule Abort = Error.Make ()\nmodule Assert = Error.Make ()\nmodule IO = Error.Make ()\n\nexception Abort = Abort.Error\nexception Assert = Assert.Error\nexception IO = IO.Error\n\nlet trace name = if !Flags.trace then print_endline (\"-- \" ^ name)\n\n\n(* File types *)\n\nlet binary_ext = \"wasm\"\nlet sexpr_ext = \"wat\"\nlet script_binary_ext = \"bin.wast\"\nlet script_ext = \"wast\"\nlet js_ext = \"js\"\n\nlet dispatch_file_ext on_binary on_sexpr on_script_binary on_script on_js file =\n  if Filename.check_suffix file binary_ext then\n    on_binary file\n  else if Filename.check_suffix file sexpr_ext then\n    on_sexpr file\n  else if Filename.check_suffix file script_binary_ext then\n    on_script_binary file\n  else if Filename.check_suffix file script_ext then\n    on_script file\n  else if Filename.check_suffix file js_ext then\n    on_js file\n  else\n    raise (Sys_error (file ^ \": unrecognized file type\"))\n\n\n(* Output *)\n\nlet create_binary_file file _ get_module =\n  trace (\"Encoding (\" ^ file ^ \")...\");\n  let s = Encode.encode (get_module ()) in\n  let oc = open_out_bin file in\n  try\n    trace \"Writing...\";\n    output_string oc s;\n    close_out oc\n  with exn -> close_out oc; raise exn\n\nlet create_sexpr_file file _ get_module =\n  trace (\"Writing (\" ^ file ^ \")...\");\n  let oc = open_out file in\n  try\n    Print.module_ oc !Flags.width (get_module ());\n    close_out oc\n  with exn -> close_out oc; raise exn\n\nlet create_script_file mode file get_script _ =\n  trace (\"Writing (\" ^ file ^ \")...\");\n  let oc = open_out file in\n  try\n    Print.script oc !Flags.width mode (get_script ());\n    close_out oc\n  with exn -> close_out oc; raise exn\n\nlet create_js_file file get_script _ =\n  trace (\"Converting (\" ^ file ^ \")...\");\n  let js = Js.of_script (get_script ()) in\n  let oc = open_out file in\n  try\n    trace \"Writing...\";\n    output_string oc js;\n    close_out oc\n  with exn -> close_out oc; raise exn\n\nlet output_file =\n  dispatch_file_ext\n    create_binary_file\n    create_sexpr_file\n    (create_script_file `Binary)\n    (create_script_file `Textual)\n    create_js_file\n\nlet output_stdout get_module =\n  trace \"Printing...\";\n  Print.module_ stdout !Flags.width (get_module ())\n\n\n(* Input *)\n\nlet error at category msg =\n  trace (\"Error: \");\n  prerr_endline (Source.string_of_region at ^ \": \" ^ category ^ \": \" ^ msg);\n  false\n\nlet input_from get_script run =\n  try\n    let script = get_script () in\n    trace \"Running...\";\n    run script;\n    true\n  with\n  | Decode.Code (at, msg) -> error at \"decoding error\" msg\n  | Parse.Syntax (at, msg) -> error at \"syntax error\" msg\n  | Valid.Invalid (at, msg) -> error at \"invalid module\" msg\n  | Import.Unknown (at, msg) -> error at \"link failure\" msg\n  | Eval.Link (at, msg) -> error at \"link failure\" msg\n  | Eval.Trap (at, msg) -> error at \"runtime trap\" msg\n  | Eval.Exhaustion (at, msg) -> error at \"resource exhaustion\" msg\n  | Eval.Crash (at, msg) -> error at \"runtime crash\" msg\n  | Encode.Code (at, msg) -> error at \"encoding error\" msg\n  | Script.Error (at, msg) -> error at \"script error\" msg\n  | IO (at, msg) -> error at \"i/o error\" msg\n  | Assert (at, msg) -> error at \"assertion failure\" msg\n  | Abort _ -> false\n\nlet input_script start name lexbuf run =\n  input_from (fun _ -> Parse.parse name lexbuf start) run\n\nlet input_sexpr name lexbuf run =\n  input_from (fun _ ->\n    let var_opt, def = Parse.parse name lexbuf Parse.Module in\n    [Module (var_opt, def) @@ no_region]) run\n\nlet input_binary name buf run =\n  let open Source in\n  input_from (fun _ ->\n    [Module (None, Encoded (name, buf) @@ no_region) @@ no_region]) run\n\nlet input_sexpr_file input file run =\n  trace (\"Loading (\" ^ file ^ \")...\");\n  let ic = open_in file in\n  try\n    let lexbuf = Lexing.from_channel ic in\n    trace \"Parsing...\";\n    let success = input file lexbuf run in\n    close_in ic;\n    success\n  with exn -> close_in ic; raise exn\n\nlet input_binary_file file run =\n  trace (\"Loading (\" ^ file ^ \")...\");\n  let ic = open_in_bin file in\n  try\n    let len = in_channel_length ic in\n    let buf = Bytes.make len '\\x00' in\n    really_input ic buf 0 len;\n    trace \"Decoding...\";\n    let success = input_binary file (Bytes.to_string buf) run in\n    close_in ic;\n    success\n  with exn -> close_in ic; raise exn\n\nlet input_js_file file run =\n  raise (Sys_error (file ^ \": unrecognized input file type\"))\n\nlet input_file file run =\n  dispatch_file_ext\n    input_binary_file\n    (input_sexpr_file input_sexpr)\n    (input_sexpr_file (input_script Parse.Script))\n    (input_sexpr_file (input_script Parse.Script))\n    input_js_file\n    file run\n\nlet input_string string run =\n  trace (\"Running (\\\"\" ^ String.escaped string ^ \"\\\")...\");\n  let lexbuf = Lexing.from_string string in\n  trace \"Parsing...\";\n  input_script Parse.Script \"string\" lexbuf run\n\n\n(* Interactive *)\n\nlet continuing = ref false\n\nlet lexbuf_stdin buf len =\n  let prompt = if !continuing then \"  \" else \"> \" in\n  print_string prompt; flush_all ();\n  continuing := true;\n  let rec loop i =\n    if i = len then i else\n    let ch = input_char stdin in\n    Bytes.set buf i ch;\n    if ch = '\\n' then i + 1 else loop (i + 1)\n  in\n  let n = loop 0 in\n  if n = 1 then continuing := false else trace \"Parsing...\";\n  n\n\nlet input_stdin run =\n  let lexbuf = Lexing.from_function lexbuf_stdin in\n  let rec loop () =\n    let success = input_script Parse.Script1 \"stdin\" lexbuf run in\n    if not success then Lexing.flush_input lexbuf;\n    if Lexing.(lexbuf.lex_curr_pos >= lexbuf.lex_buffer_len - 1) then\n      continuing := false;\n    loop ()\n  in\n  try loop () with End_of_file ->\n    print_endline \"\";\n    trace \"Bye.\"\n\n\n(* Printing *)\n\nlet print_import m im =\n  let open Types in\n  let category, annotation =\n    match Ast.import_type m im with\n    | ExternFuncType t -> \"func\", string_of_func_type t\n    | ExternTableType t -> \"table\", string_of_table_type t\n    | ExternMemoryType t -> \"memory\", string_of_memory_type t\n    | ExternGlobalType t -> \"global\", string_of_global_type t\n  in\n  Printf.printf \"  import %s \\\"%s\\\" \\\"%s\\\" : %s\\n\"\n    category (Ast.string_of_name im.it.Ast.module_name)\n      (Ast.string_of_name im.it.Ast.item_name) annotation\n\nlet print_export m ex =\n  let open Types in\n  let category, annotation =\n    match Ast.export_type m ex with\n    | ExternFuncType t -> \"func\", string_of_func_type t\n    | ExternTableType t -> \"table\", string_of_table_type t\n    | ExternMemoryType t -> \"memory\", string_of_memory_type t\n    | ExternGlobalType t -> \"global\", string_of_global_type t\n  in\n  Printf.printf \"  export %s \\\"%s\\\" : %s\\n\"\n    category (Ast.string_of_name ex.it.Ast.name) annotation\n\nlet print_module x_opt m =\n  Printf.printf \"module%s :\\n\"\n    (match x_opt with None -> \"\" | Some x -> \" \" ^ x.it);\n  List.iter (print_import m) m.it.Ast.imports;\n  List.iter (print_export m) m.it.Ast.exports;\n  flush_all ()\n\nlet print_values vs =\n  let ts = List.map Values.type_of_value vs in\n  Printf.printf \"%s : %s\\n\"\n    (Values.string_of_values vs) (Types.string_of_value_types ts);\n  flush_all ()\n\nlet string_of_nan = function\n  | CanonicalNan -> \"nan:canonical\"\n  | ArithmeticNan -> \"nan:arithmetic\"\n\nlet type_of_result r =\n  match r with\n  | LitResult v -> Values.type_of_value v.it\n  | NanResult n -> Types.NumType (Values.type_of_num n.it)\n  | RefResult t -> Types.RefType t\n\nlet string_of_result r =\n  match r with\n  | LitResult v -> Values.string_of_value v.it\n  | NanResult nanop ->\n    (match nanop.it with\n    | Values.I32 _ | Values.I64 _ -> assert false\n    | Values.F32 n | Values.F64 n -> string_of_nan n\n    )\n  | RefResult t -> Types.string_of_refed_type t\n\nlet string_of_results = function\n  | [r] -> string_of_result r\n  | rs -> \"[\" ^ String.concat \" \" (List.map string_of_result rs) ^ \"]\"\n\nlet print_results rs =\n  let ts = List.map type_of_result rs in\n  Printf.printf \"%s : %s\\n\"\n    (string_of_results rs) (Types.string_of_value_types ts);\n  flush_all ()\n\n\n(* Configuration *)\n\nmodule Map = Map.Make(String)\n\nlet quote : script ref = ref []\nlet scripts : script Map.t ref = ref Map.empty\nlet modules : Ast.module_ Map.t ref = ref Map.empty\nlet instances : Instance.module_inst Map.t ref = ref Map.empty\nlet registry : Instance.module_inst Map.t ref = ref Map.empty\n\nlet bind map x_opt y =\n  let map' =\n    match x_opt with\n    | None -> !map\n    | Some x -> Map.add x.it y !map\n  in map := Map.add \"\" y map'\n\nlet lookup category map x_opt at =\n  let key = match x_opt with None -> \"\" | Some x -> x.it in\n  try Map.find key !map with Not_found ->\n    IO.error at\n      (if key = \"\" then \"no \" ^ category ^ \" defined\"\n       else \"unknown \" ^ category ^ \" \" ^ key)\n\nlet lookup_script = lookup \"script\" scripts\nlet lookup_module = lookup \"module\" modules\nlet lookup_instance = lookup \"module\" instances\n\nlet lookup_registry module_name item_name _t =\n  match Instance.export (Map.find module_name !registry) item_name with\n  | Some ext -> ext\n  | None -> raise Not_found\n\n\n(* Running *)\n\nlet rec run_definition def : Ast.module_ =\n  match def.it with\n  | Textual m -> m\n  | Encoded (name, bs) ->\n    trace \"Decoding...\";\n    Decode.decode name bs\n  | Quoted (_, s) ->\n    trace \"Parsing quote...\";\n    let def' = Parse.string_to_module s in\n    run_definition def'\n\nlet run_action act : Values.value list =\n  match act.it with\n  | Invoke (x_opt, name, vs) ->\n    trace (\"Invoking function \\\"\" ^ Ast.string_of_name name ^ \"\\\"...\");\n    let inst = lookup_instance x_opt act.at in\n    (match Instance.export inst name with\n    | Some (Instance.ExternFunc f) ->\n      let Types.FuncType (ins, out) = Func.type_of f in\n      if List.length vs <> List.length ins then\n        Script.error act.at \"wrong number of arguments\";\n      List.iter2 (fun v t ->\n        if Values.type_of_value v.it <> t then\n          Script.error v.at \"wrong type of argument\"\n      ) vs ins;\n      Eval.invoke f (List.map (fun v -> v.it) vs)\n    | Some _ -> Assert.error act.at \"export is not a function\"\n    | None -> Assert.error act.at \"undefined export\"\n    )\n\n | Get (x_opt, name) ->\n    trace (\"Getting global \\\"\" ^ Ast.string_of_name name ^ \"\\\"...\");\n    let inst = lookup_instance x_opt act.at in\n    (match Instance.export inst name with\n    | Some (Instance.ExternGlobal gl) -> [Global.load gl]\n    | Some _ -> Assert.error act.at \"export is not a global\"\n    | None -> Assert.error act.at \"undefined export\"\n    )\n\nlet assert_result at got expect =\n  let open Values in\n  if\n    List.length got <> List.length expect ||\n    List.exists2 (fun v r ->\n      match r with\n      | LitResult v' -> v <> v'.it\n      | NanResult nanop ->\n        (match nanop.it, v with\n        | F32 CanonicalNan, Num (F32 z) ->\n          z <> F32.pos_nan && z <> F32.neg_nan\n        | F64 CanonicalNan, Num (F64 z) ->\n          z <> F64.pos_nan && z <> F64.neg_nan\n        | F32 ArithmeticNan, Num (F32 z) ->\n          let pos_nan = F32.to_bits F32.pos_nan in\n          Int32.logand (F32.to_bits z) pos_nan <> pos_nan\n        | F64 ArithmeticNan, Num (F64 z) ->\n          let pos_nan = F64.to_bits F64.pos_nan in\n          Int64.logand (F64.to_bits z) pos_nan <> pos_nan\n        | _, _ -> false\n        )\n      | RefResult t ->\n        (match t, v with\n        | Types.FuncRefType, Ref (Instance.FuncRef _)\n        | Types.ExternRefType, Ref (ExternRef _) -> false\n        | _ -> true\n        )\n    ) got expect\n  then begin\n    print_string \"Result: \"; print_values got;\n    print_string \"Expect: \"; print_results expect;\n    Assert.error at \"wrong return values\"\n  end\n\nlet assert_message at name msg re =\n  if\n    String.length msg < String.length re ||\n    String.sub msg 0 (String.length re) <> re\n  then begin\n    print_endline (\"Result: \\\"\" ^ msg ^ \"\\\"\");\n    print_endline (\"Expect: \\\"\" ^ re ^ \"\\\"\");\n    Assert.error at (\"wrong \" ^ name ^ \" error\")\n  end\n\nlet run_assertion ass =\n  match ass.it with\n  | AssertMalformed (def, re) ->\n    trace \"Asserting malformed...\";\n    (match ignore (run_definition def) with\n    | exception Decode.Code (_, msg) -> assert_message ass.at \"decoding\" msg re\n    | exception Parse.Syntax (_, msg) -> assert_message ass.at \"parsing\" msg re\n    | _ -> Assert.error ass.at \"expected decoding/parsing error\"\n    )\n\n  | AssertInvalid (def, re) ->\n    trace \"Asserting invalid...\";\n    (match\n      let m = run_definition def in\n      Valid.check_module m\n    with\n    | exception Valid.Invalid (_, msg) ->\n      assert_message ass.at \"validation\" msg re\n    | _ -> Assert.error ass.at \"expected validation error\"\n    )\n\n  | AssertUnlinkable (def, re) ->\n    trace \"Asserting unlinkable...\";\n    let m = run_definition def in\n    if not !Flags.unchecked then Valid.check_module m;\n    (match\n      let imports = Import.link m in\n      ignore (Eval.init m imports)\n    with\n    | exception (Import.Unknown (_, msg) | Eval.Link (_, msg)) ->\n      assert_message ass.at \"linking\" msg re\n    | _ -> Assert.error ass.at \"expected linking error\"\n    )\n\n  | AssertUninstantiable (def, re) ->\n    trace \"Asserting trap...\";\n    let m = run_definition def in\n    if not !Flags.unchecked then Valid.check_module m;\n    (match\n      let imports = Import.link m in\n      ignore (Eval.init m imports)\n    with\n    | exception Eval.Trap (_, msg) ->\n      assert_message ass.at \"instantiation\" msg re\n    | _ -> Assert.error ass.at \"expected instantiation error\"\n    )\n\n  | AssertReturn (act, rs) ->\n    trace (\"Asserting return...\");\n    let got_vs = run_action act in\n    let expect_rs = List.map (fun r -> r.it) rs in\n    assert_result ass.at got_vs expect_rs\n\n  | AssertTrap (act, re) ->\n    trace (\"Asserting trap...\");\n    (match run_action act with\n    | exception Eval.Trap (_, msg) -> assert_message ass.at \"runtime\" msg re\n    | _ -> Assert.error ass.at \"expected runtime error\"\n    )\n\n  | AssertExhaustion (act, re) ->\n    trace (\"Asserting exhaustion...\");\n    (match run_action act with\n    | exception Eval.Exhaustion (_, msg) ->\n      assert_message ass.at \"exhaustion\" msg re\n    | _ -> Assert.error ass.at \"expected exhaustion error\"\n    )\n\nlet rec run_command cmd =\n  match cmd.it with\n  | Module (x_opt, def) ->\n    quote := cmd :: !quote;\n    let m = run_definition def in\n    if not !Flags.unchecked then begin\n      trace \"Checking...\";\n      Valid.check_module m;\n      if !Flags.print_sig then begin\n        trace \"Signature:\";\n        print_module x_opt m\n      end\n    end;\n    bind scripts x_opt [cmd];\n    bind modules x_opt m;\n    if not !Flags.dry then begin\n      trace \"Initializing...\";\n      let imports = Import.link m in\n      let inst = Eval.init m imports in\n      bind instances x_opt inst\n    end\n\n  | Register (name, x_opt) ->\n    quote := cmd :: !quote;\n    if not !Flags.dry then begin\n      trace (\"Registering module \\\"\" ^ Ast.string_of_name name ^ \"\\\"...\");\n      let inst = lookup_instance x_opt cmd.at in\n      registry := Map.add (Utf8.encode name) inst !registry;\n      Import.register name (lookup_registry (Utf8.encode name))\n    end\n\n  | Action act ->\n    quote := cmd :: !quote;\n    if not !Flags.dry then begin\n      let vs = run_action act in\n      if vs <> [] then print_values vs\n    end\n\n  | Assertion ass ->\n    quote := cmd :: !quote;\n    if not !Flags.dry then begin\n      run_assertion ass\n    end\n\n  | Meta cmd ->\n    run_meta cmd\n\nand run_meta cmd =\n  match cmd.it with\n  | Script (x_opt, script) ->\n    run_quote_script script;\n    bind scripts x_opt (lookup_script None cmd.at)\n\n  | Input (x_opt, file) ->\n    (try if not (input_file file run_quote_script) then\n      Abort.error cmd.at \"aborting\"\n    with Sys_error msg -> IO.error cmd.at msg);\n    bind scripts x_opt (lookup_script None cmd.at);\n    if x_opt <> None then begin\n      bind modules x_opt (lookup_module None cmd.at);\n      if not !Flags.dry then begin\n        bind instances x_opt (lookup_instance None cmd.at)\n      end\n    end\n\n  | Output (x_opt, Some file) ->\n    (try\n      output_file file\n        (fun () -> lookup_script x_opt cmd.at)\n        (fun () -> lookup_module x_opt cmd.at)\n    with Sys_error msg -> IO.error cmd.at msg)\n\n  | Output (x_opt, None) ->\n    (try output_stdout (fun () -> lookup_module x_opt cmd.at)\n    with Sys_error msg -> IO.error cmd.at msg)\n\nand run_script script =\n  List.iter run_command script\n\nand run_quote_script script =\n  let save_quote = !quote in\n  quote := [];\n  (try run_script script with exn -> quote := save_quote; raise exn);\n  bind scripts None (List.rev !quote);\n  quote := !quote @ save_quote\n\nlet run_file file = input_file file run_script\nlet run_string string = input_string string run_script\nlet run_stdin () = input_stdin run_script\n"
  },
  {
    "path": "interpreter/script/run.mli",
    "content": "exception Abort of Source.region * string\nexception Assert of Source.region * string\nexception IO of Source.region * string\n\nval trace : string -> unit\n\nval run_string : string -> bool\nval run_file : string -> bool\nval run_stdin : unit -> unit\n"
  },
  {
    "path": "interpreter/script/script.ml",
    "content": "type var = string Source.phrase\n\ntype Values.ref_ += ExternRef of int32\ntype literal = Values.value Source.phrase\n\ntype definition = definition' Source.phrase\nand definition' =\n  | Textual of Ast.module_\n  | Encoded of string * string\n  | Quoted of string * string\n\ntype action = action' Source.phrase\nand action' =\n  | Invoke of var option * Ast.name * literal list\n  | Get of var option * Ast.name\n\ntype nanop = nanop' Source.phrase\nand nanop' = (Lib.void, Lib.void, nan, nan) Values.op\nand nan = CanonicalNan | ArithmeticNan\n\ntype result = result' Source.phrase\nand result' =\n  | LitResult of literal\n  | NanResult of nanop\n  | RefResult of Types.ref_type\n\ntype assertion = assertion' Source.phrase\nand assertion' =\n  | AssertMalformed of definition * string\n  | AssertInvalid of definition * string\n  | AssertUnlinkable of definition * string\n  | AssertUninstantiable of definition * string\n  | AssertReturn of action * result list\n  | AssertTrap of action * string\n  | AssertExhaustion of action * string\n\ntype command = command' Source.phrase\nand command' =\n  | Module of var option * definition\n  | Register of Ast.name * var option\n  | Action of action\n  | Assertion of assertion\n  | Meta of meta\n\nand meta = meta' Source.phrase\nand meta' =\n  | Input of var option * string\n  | Output of var option * string option\n  | Script of var option * script\n\nand script = command list\n\nexception Syntax of Source.region * string\n\n\nlet () =\n  let type_of_ref' = !Values.type_of_ref' in\n  Values.type_of_ref' := function\n    | ExternRef _ -> Types.ExternRefType\n    | r -> type_of_ref' r\n\nlet () =\n  let string_of_ref' = !Values.string_of_ref' in\n  Values.string_of_ref' := function\n    | ExternRef n -> \"ref \" ^ Int32.to_string n\n    | r -> string_of_ref' r\n"
  },
  {
    "path": "interpreter/syntax/ast.ml",
    "content": "(*\n * Throughout the implementation we use consistent naming conventions for\n * syntactic elements, associated with the types defined here and in a few\n * other places:\n *\n *   x : var\n *   v : value\n *   e : instr\n *   f : func\n *   m : module_\n *\n *   t : value_type\n *   s : func_type\n *   c : context / config\n *\n * These conventions mostly follow standard practice in language semantics.\n *)\n\nopen Types\n\n\n(* Operators *)\n\nmodule IntOp =\nstruct\n  type unop = Clz | Ctz | Popcnt | ExtendS of pack_size\n  type binop = Add | Sub | Mul | DivS | DivU | RemS | RemU\n             | And | Or | Xor | Shl | ShrS | ShrU | Rotl | Rotr\n  type testop = Eqz\n  type relop = Eq | Ne | LtS | LtU | GtS | GtU | LeS | LeU | GeS | GeU\n  type cvtop = ExtendSI32 | ExtendUI32 | WrapI64\n             | TruncSF32 | TruncUF32 | TruncSF64 | TruncUF64\n             | TruncSatSF32 | TruncSatUF32 | TruncSatSF64 | TruncSatUF64\n             | ReinterpretFloat\nend\n\nmodule FloatOp =\nstruct\n  type unop = Neg | Abs | Ceil | Floor | Trunc | Nearest | Sqrt\n  type binop = Add | Sub | Mul | Div | Min | Max | CopySign\n  type testop\n  type relop = Eq | Ne | Lt | Gt | Le | Ge\n  type cvtop = ConvertSI32 | ConvertUI32 | ConvertSI64 | ConvertUI64\n             | PromoteF32 | DemoteF64\n             | ReinterpretInt\nend\n\nmodule I32Op = IntOp\nmodule I64Op = IntOp\nmodule F32Op = FloatOp\nmodule F64Op = FloatOp\n\ntype unop = (I32Op.unop, I64Op.unop, F32Op.unop, F64Op.unop) Values.op\ntype binop = (I32Op.binop, I64Op.binop, F32Op.binop, F64Op.binop) Values.op\ntype testop = (I32Op.testop, I64Op.testop, F32Op.testop, F64Op.testop) Values.op\ntype relop = (I32Op.relop, I64Op.relop, F32Op.relop, F64Op.relop) Values.op\ntype cvtop = (I32Op.cvtop, I64Op.cvtop, F32Op.cvtop, F64Op.cvtop) Values.op\n\ntype 'a memop = {ty : num_type; align : int; offset : int32; sz : 'a option}\ntype loadop = (pack_size * extension) memop\ntype storeop = pack_size memop\n\n\n(* Expressions *)\n\ntype var = int32 Source.phrase\ntype num = Values.num Source.phrase\ntype name = int list\n\ntype block_type = VarBlockType of var | ValBlockType of value_type option\n\ntype instr = instr' Source.phrase\nand instr' =\n  | Unreachable                       (* trap unconditionally *)\n  | Nop                               (* do nothing *)\n  | Drop                              (* forget a value *)\n  | Select of value_type list option  (* branchless conditional *)\n  | Block of block_type * instr list  (* execute in sequence *)\n  | Loop of block_type * instr list   (* loop header *)\n  | If of block_type * instr list * instr list  (* conditional *)\n  | Br of var                         (* break to n-th surrounding label *)\n  | BrIf of var                       (* conditional break *)\n  | BrTable of var list * var         (* indexed break *)\n  | Return                            (* break from function body *)\n  | Call of var                       (* call function *)\n  | CallIndirect of var * var         (* call function through table *)\n  | LocalGet of var                   (* read local variable *)\n  | LocalSet of var                   (* write local variable *)\n  | LocalTee of var                   (* write local variable and keep value *)\n  | GlobalGet of var                  (* read global variable *)\n  | GlobalSet of var                  (* write global variable *)\n  | TableGet of var                   (* read table element *)\n  | TableSet of var                   (* write table element *)\n  | TableSize of var                  (* size of table *)\n  | TableGrow of var                  (* grow table *)\n  | TableFill of var                  (* fill table range with value *)\n  | TableCopy of var * var            (* copy table range *)\n  | TableInit of var * var            (* initialize table range from segment *)\n  | ElemDrop of var                   (* drop passive element segment *)\n  | Load of loadop                    (* read memory at address *)\n  | Store of storeop                  (* write memory at address *)\n  | MemorySize                        (* size of memory *)\n  | MemoryGrow                        (* grow memory *)\n  | MemoryFill                        (* fill memory range with value *)\n  | MemoryCopy                        (* copy memory ranges *)\n  | MemoryInit of var                 (* initialize memory range from segment *)\n  | DataDrop of var                   (* drop passive data segment *)\n  | RefNull of ref_type               (* null reference *)\n  | RefFunc of var                    (* function reference *)\n  | RefIsNull                         (* null test *)\n  | Const of num                      (* constant *)\n  | Test of testop                    (* numeric test *)\n  | Compare of relop                  (* numeric comparison *)\n  | Unary of unop                     (* unary numeric operator *)\n  | Binary of binop                   (* binary numeric operator *)\n  | Convert of cvtop                  (* conversion *)\n\n\n(* Globals & Functions *)\n\ntype const = instr list Source.phrase\n\ntype global = global' Source.phrase\nand global' =\n{\n  gtype : global_type;\n  ginit : const;\n}\n\ntype func = func' Source.phrase\nand func' =\n{\n  ftype : var;\n  locals : value_type list;\n  body : instr list;\n}\n\n\n(* Tables & Memories *)\n\ntype table = table' Source.phrase\nand table' =\n{\n  ttype : table_type;\n}\n\ntype memory = memory' Source.phrase\nand memory' =\n{\n  mtype : memory_type;\n}\n\ntype segment_mode = segment_mode' Source.phrase\nand segment_mode' =\n  | Passive\n  | Active of {index : var; offset : const}\n  | Declarative\n\ntype elem_segment = elem_segment' Source.phrase\nand elem_segment' =\n{\n  etype : ref_type;\n  einit : const list;\n  emode : segment_mode;\n}\n\ntype data_segment = data_segment' Source.phrase\nand data_segment' =\n{\n  dinit : string;\n  dmode : segment_mode;\n}\n\n\n(* Modules *)\n\ntype type_ = func_type Source.phrase\n\ntype export_desc = export_desc' Source.phrase\nand export_desc' =\n  | FuncExport of var\n  | TableExport of var\n  | MemoryExport of var\n  | GlobalExport of var\n\ntype export = export' Source.phrase\nand export' =\n{\n  name : name;\n  edesc : export_desc;\n}\n\ntype import_desc = import_desc' Source.phrase\nand import_desc' =\n  | FuncImport of var\n  | TableImport of table_type\n  | MemoryImport of memory_type\n  | GlobalImport of global_type\n\ntype import = import' Source.phrase\nand import' =\n{\n  module_name : name;\n  item_name : name;\n  idesc : import_desc;\n}\n\ntype module_ = module_' Source.phrase\nand module_' =\n{\n  types : type_ list;\n  globals : global list;\n  tables : table list;\n  memories : memory list;\n  funcs : func list;\n  start : var option;\n  elems : elem_segment list;\n  datas : data_segment list;\n  imports : import list;\n  exports : export list;\n}\n\n\n(* Auxiliary functions *)\n\nlet empty_module =\n{\n  types = [];\n  globals = [];\n  tables = [];\n  memories = [];\n  funcs = [];\n  start = None;\n  elems = [];\n  datas = [];\n  imports = [];\n  exports = [];\n}\n\nopen Source\n\nlet func_type_for (m : module_) (x : var) : func_type =\n  (Lib.List32.nth m.it.types x.it).it\n\nlet import_type (m : module_) (im : import) : extern_type =\n  let {idesc; _} = im.it in\n  match idesc.it with\n  | FuncImport x -> ExternFuncType (func_type_for m x)\n  | TableImport t -> ExternTableType t\n  | MemoryImport t -> ExternMemoryType t\n  | GlobalImport t -> ExternGlobalType t\n\nlet export_type (m : module_) (ex : export) : extern_type =\n  let {edesc; _} = ex.it in\n  let its = List.map (import_type m) m.it.imports in\n  let open Lib.List32 in\n  match edesc.it with\n  | FuncExport x ->\n    let fts =\n      funcs its @ List.map (fun f -> func_type_for m f.it.ftype) m.it.funcs\n    in ExternFuncType (nth fts x.it)\n  | TableExport x ->\n    let tts = tables its @ List.map (fun t -> t.it.ttype) m.it.tables in\n    ExternTableType (nth tts x.it)\n  | MemoryExport x ->\n    let mts = memories its @ List.map (fun m -> m.it.mtype) m.it.memories in\n    ExternMemoryType (nth mts x.it)\n  | GlobalExport x ->\n    let gts = globals its @ List.map (fun g -> g.it.gtype) m.it.globals in\n    ExternGlobalType (nth gts x.it)\n\nlet string_of_name n =\n  let b = Buffer.create 16 in\n  let escape uc =\n    if uc < 0x20 || uc >= 0x7f then\n      Buffer.add_string b (Printf.sprintf \"\\\\u{%02x}\" uc)\n    else begin\n      let c = Char.chr uc in\n      if c = '\\\"' || c = '\\\\' then Buffer.add_char b '\\\\';\n      Buffer.add_char b c\n    end\n  in\n  List.iter escape n;\n  Buffer.contents b\n\n"
  },
  {
    "path": "interpreter/syntax/free.ml",
    "content": "open Source\nopen Ast\n\nmodule Set = Set.Make(Int32)\n\ntype t =\n{\n  types : Set.t;\n  globals : Set.t;\n  tables : Set.t;\n  memories : Set.t;\n  funcs : Set.t;\n  elems : Set.t;\n  datas : Set.t;\n  locals : Set.t;\n  labels : Set.t;\n}\n\nlet empty : t =\n{\n  types = Set.empty;\n  globals = Set.empty;\n  tables = Set.empty;\n  memories = Set.empty;\n  funcs = Set.empty;\n  elems = Set.empty;\n  datas = Set.empty;\n  locals = Set.empty;\n  labels = Set.empty;\n}\n\nlet union (s1 : t) (s2 : t) : t =\n{\n  types = Set.union s1.types s2.types;\n  globals = Set.union s1.globals s2.globals;\n  tables = Set.union s1.tables s2.tables;\n  memories = Set.union s1.memories s2.memories;\n  funcs = Set.union s1.funcs s2.funcs;\n  elems = Set.union s1.elems s2.elems;\n  datas = Set.union s1.datas s2.datas;\n  locals = Set.union s1.locals s2.locals;\n  labels = Set.union s1.labels s2.labels;\n}\n\nlet types s = {empty with types = s}\nlet globals s = {empty with globals = s}\nlet tables s = {empty with tables = s}\nlet memories s = {empty with memories = s}\nlet funcs s = {empty with funcs = s}\nlet elems s = {empty with elems = s}\nlet datas s = {empty with datas = s}\nlet locals s = {empty with locals = s}\nlet labels s = {empty with labels = s}\n\nlet var x = Set.singleton x.it\nlet zero = Set.singleton 0l\nlet shift s = Set.map (Int32.add (-1l)) (Set.remove 0l s)\n\nlet (++) = union\nlet list free xs = List.fold_left union empty (List.map free xs)\n\nlet block_type = function\n  | VarBlockType x -> types (var x)\n  | ValBlockType _ -> empty\n\nlet rec instr (e : instr) =\n  match e.it with\n  | Unreachable | Nop | Drop | Select _ -> empty\n  | RefNull _ | RefIsNull -> empty\n  | RefFunc x -> funcs (var x)\n  | Const _ | Test _ | Compare _ | Unary _ | Binary _ | Convert _ -> empty\n  | Block (bt, es) | Loop (bt, es) -> block_type bt ++ block es\n  | If (bt, es1, es2) -> block_type bt ++ block es1 ++ block es2\n  | Br x | BrIf x -> labels (var x)\n  | BrTable (xs, x) -> list (fun x -> labels (var x)) (x::xs)\n  | Return -> empty\n  | Call x -> funcs (var x)\n  | CallIndirect (x, y) -> tables (var x) ++ types (var y)\n  | LocalGet x | LocalSet x | LocalTee x -> locals (var x)\n  | GlobalGet x | GlobalSet x -> globals (var x)\n  | TableGet x | TableSet x | TableSize x | TableGrow x | TableFill x ->\n    tables (var x)\n  | TableCopy (x, y) -> tables (var x) ++ tables (var y)\n  | TableInit (x, y) -> tables (var x) ++ elems (var y)\n  | ElemDrop x -> elems (var x)\n  | Load _ | Store _ | MemorySize | MemoryGrow | MemoryCopy | MemoryFill ->\n    memories zero\n  | MemoryInit x -> memories zero ++ datas (var x)\n  | DataDrop x -> datas (var x)\n\nand block (es : instr list) =\n  let free = list instr es in {free with labels = shift free.labels}\n\nlet const (c : const) = block c.it\n\nlet global (g : global) = const g.it.ginit\nlet func (f : func) = {(block f.it.body) with locals = Set.empty}\nlet table (t : table) = empty\nlet memory (m : memory) = empty\n\nlet segment_mode f (m : segment_mode) =\n  match m.it with\n  | Passive | Declarative -> empty\n  | Active {index; offset} -> f (var index) ++ const offset\n\nlet elem (s : elem_segment) =\n  list const s.it.einit ++ segment_mode tables s.it.emode\n\nlet data (s : data_segment) =\n  segment_mode memories s.it.dmode\n\nlet type_ (t : type_) = empty\n\nlet export_desc (d : export_desc) =\n  match d.it with\n  | FuncExport x -> funcs (var x)\n  | TableExport x -> tables (var x)\n  | MemoryExport x -> memories (var x)\n  | GlobalExport x -> globals (var x)\n\nlet import_desc (d : import_desc) =\n  match d.it with\n  | FuncImport x -> types (var x)\n  | TableImport tt -> empty\n  | MemoryImport mt -> empty\n  | GlobalImport gt -> empty\n\nlet export (e : export) = export_desc e.it.edesc\nlet import (i : import) = import_desc i.it.idesc\n\nlet start (s : var option) =\n  funcs (Lib.Option.get (Lib.Option.map var s) Set.empty)\n\nlet module_ (m : module_) =\n  list type_ m.it.types ++\n  list global m.it.globals ++\n  list table m.it.tables ++\n  list memory m.it.memories ++\n  list func m.it.funcs ++\n  start m.it.start ++\n  list elem m.it.elems ++\n  list data m.it.datas ++\n  list import m.it.imports ++\n  list export m.it.exports\n"
  },
  {
    "path": "interpreter/syntax/free.mli",
    "content": "module Set : Set.S with type elt = int32\n\ntype t =\n{\n  types : Set.t;\n  globals : Set.t;\n  tables : Set.t;\n  memories : Set.t;\n  funcs : Set.t;\n  elems : Set.t;\n  datas : Set.t;\n  locals : Set.t;\n  labels : Set.t;\n}\n\nval empty : t\nval union : t -> t -> t\n\nval instr : Ast.instr -> t\nval block : Ast.instr list -> t\nval const : Ast.const -> t\n\nval type_ : Ast.type_ -> t\nval global : Ast.global -> t\nval func : Ast.func -> t\nval table : Ast.table -> t\nval memory : Ast.memory -> t\nval elem : Ast.elem_segment -> t\nval data : Ast.data_segment -> t\nval export : Ast.export -> t\nval import : Ast.import -> t\nval start : Ast.var option -> t\n\nval module_ : Ast.module_ -> t\n\nval list : ('a -> t) -> 'a list -> t\n"
  },
  {
    "path": "interpreter/syntax/operators.ml",
    "content": "open Source\nopen Types\nopen Values\nopen Ast\n\n\nlet i32_const n = Const (I32 n.it @@ n.at)\nlet i64_const n = Const (I64 n.it @@ n.at)\nlet f32_const n = Const (F32 n.it @@ n.at)\nlet f64_const n = Const (F64 n.it @@ n.at)\nlet ref_null t = RefNull t\nlet ref_func x = RefFunc x\n\nlet unreachable = Unreachable\nlet nop = Nop\nlet drop = Drop\nlet select t = Select t\nlet block bt es = Block (bt, es)\nlet loop bt es = Loop (bt, es)\nlet if_ bt es1 es2 = If (bt, es1, es2)\nlet br x = Br x\nlet br_if x = BrIf x\nlet br_table xs x = BrTable (xs, x)\n\nlet return = Return\nlet call x = Call x\nlet call_indirect x y = CallIndirect (x, y)\n\nlet local_get x = LocalGet x\nlet local_set x = LocalSet x\nlet local_tee x = LocalTee x\nlet global_get x = GlobalGet x\nlet global_set x = GlobalSet x\n\nlet table_get x = TableGet x\nlet table_set x = TableSet x\nlet table_size x = TableSize x\nlet table_grow x = TableGrow x\nlet table_fill x = TableFill x\nlet table_copy x y = TableCopy (x, y)\nlet table_init x y = TableInit (x, y)\nlet elem_drop x = ElemDrop x\n\nlet i32_load align offset = Load {ty = I32Type; align; offset; sz = None}\nlet i64_load align offset = Load {ty = I64Type; align; offset; sz = None}\nlet f32_load align offset = Load {ty = F32Type; align; offset; sz = None}\nlet f64_load align offset = Load {ty = F64Type; align; offset; sz = None}\nlet i32_load8_s align offset =\n  Load {ty = I32Type; align; offset; sz = Some (Pack8, SX)}\nlet i32_load8_u align offset =\n  Load {ty = I32Type; align; offset; sz = Some (Pack8, ZX)}\nlet i32_load16_s align offset =\n  Load {ty = I32Type; align; offset; sz = Some (Pack16, SX)}\nlet i32_load16_u align offset =\n  Load {ty = I32Type; align; offset; sz = Some (Pack16, ZX)}\nlet i64_load8_s align offset =\n  Load {ty = I64Type; align; offset; sz = Some (Pack8, SX)}\nlet i64_load8_u align offset =\n  Load {ty = I64Type; align; offset; sz = Some (Pack8, ZX)}\nlet i64_load16_s align offset =\n  Load {ty = I64Type; align; offset; sz = Some (Pack16, SX)}\nlet i64_load16_u align offset =\n  Load {ty = I64Type; align; offset; sz = Some (Pack16, ZX)}\nlet i64_load32_s align offset =\n  Load {ty = I64Type; align; offset; sz = Some (Pack32, SX)}\nlet i64_load32_u align offset =\n  Load {ty = I64Type; align; offset; sz = Some (Pack32, ZX)}\n\nlet i32_store align offset = Store {ty = I32Type; align; offset; sz = None}\nlet i64_store align offset = Store {ty = I64Type; align; offset; sz = None}\nlet f32_store align offset = Store {ty = F32Type; align; offset; sz = None}\nlet f64_store align offset = Store {ty = F64Type; align; offset; sz = None}\nlet i32_store8 align offset =\n  Store {ty = I32Type; align; offset; sz = Some Pack8}\nlet i32_store16 align offset =\n  Store {ty = I32Type; align; offset; sz = Some Pack16}\nlet i64_store8 align offset =\n  Store {ty = I64Type; align; offset; sz = Some Pack8}\nlet i64_store16 align offset =\n  Store {ty = I64Type; align; offset; sz = Some Pack16}\nlet i64_store32 align offset =\n  Store {ty = I64Type; align; offset; sz = Some Pack32}\n\nlet memory_size = MemorySize\nlet memory_grow = MemoryGrow\nlet memory_fill = MemoryFill\nlet memory_copy = MemoryCopy\nlet memory_init x = MemoryInit x\nlet data_drop x = DataDrop x\n\nlet ref_is_null = RefIsNull\n\nlet i32_clz = Unary (I32 I32Op.Clz)\nlet i32_ctz = Unary (I32 I32Op.Ctz)\nlet i32_popcnt = Unary (I32 I32Op.Popcnt)\nlet i64_clz = Unary (I64 I64Op.Clz)\nlet i64_ctz = Unary (I64 I64Op.Ctz)\nlet i64_popcnt = Unary (I64 I64Op.Popcnt)\nlet f32_neg = Unary (F32 F32Op.Neg)\nlet f32_abs = Unary (F32 F32Op.Abs)\nlet f32_sqrt = Unary (F32 F32Op.Sqrt)\nlet f32_ceil = Unary (F32 F32Op.Ceil)\nlet f32_floor = Unary (F32 F32Op.Floor)\nlet f32_trunc = Unary (F32 F32Op.Trunc)\nlet f32_nearest = Unary (F32 F32Op.Nearest)\nlet f64_neg = Unary (F64 F64Op.Neg)\nlet f64_abs = Unary (F64 F64Op.Abs)\nlet f64_sqrt = Unary (F64 F64Op.Sqrt)\nlet f64_ceil = Unary (F64 F64Op.Ceil)\nlet f64_floor = Unary (F64 F64Op.Floor)\nlet f64_trunc = Unary (F64 F64Op.Trunc)\nlet f64_nearest = Unary (F64 F64Op.Nearest)\n\nlet i32_add = Binary (I32 I32Op.Add)\nlet i32_sub = Binary (I32 I32Op.Sub)\nlet i32_mul = Binary (I32 I32Op.Mul)\nlet i32_div_s = Binary (I32 I32Op.DivS)\nlet i32_div_u = Binary (I32 I32Op.DivU)\nlet i32_rem_s = Binary (I32 I32Op.RemS)\nlet i32_rem_u = Binary (I32 I32Op.RemU)\nlet i32_and = Binary (I32 I32Op.And)\nlet i32_or = Binary (I32 I32Op.Or)\nlet i32_xor = Binary (I32 I32Op.Xor)\nlet i32_shl = Binary (I32 I32Op.Shl)\nlet i32_shr_s = Binary (I32 I32Op.ShrS)\nlet i32_shr_u = Binary (I32 I32Op.ShrU)\nlet i32_rotl = Binary (I32 I32Op.Rotl)\nlet i32_rotr = Binary (I32 I32Op.Rotr)\nlet i64_add = Binary (I64 I64Op.Add)\nlet i64_sub = Binary (I64 I64Op.Sub)\nlet i64_mul = Binary (I64 I64Op.Mul)\nlet i64_div_s = Binary (I64 I64Op.DivS)\nlet i64_div_u = Binary (I64 I64Op.DivU)\nlet i64_rem_s = Binary (I64 I64Op.RemS)\nlet i64_rem_u = Binary (I64 I64Op.RemU)\nlet i64_and = Binary (I64 I64Op.And)\nlet i64_or = Binary (I64 I64Op.Or)\nlet i64_xor = Binary (I64 I64Op.Xor)\nlet i64_shl = Binary (I64 I64Op.Shl)\nlet i64_shr_s = Binary (I64 I64Op.ShrS)\nlet i64_shr_u = Binary (I64 I64Op.ShrU)\nlet i64_rotl = Binary (I64 I64Op.Rotl)\nlet i64_rotr = Binary (I64 I64Op.Rotr)\nlet f32_add = Binary (F32 F32Op.Add)\nlet f32_sub = Binary (F32 F32Op.Sub)\nlet f32_mul = Binary (F32 F32Op.Mul)\nlet f32_div = Binary (F32 F32Op.Div)\nlet f32_min = Binary (F32 F32Op.Min)\nlet f32_max = Binary (F32 F32Op.Max)\nlet f32_copysign = Binary (F32 F32Op.CopySign)\nlet f64_add = Binary (F64 F64Op.Add)\nlet f64_sub = Binary (F64 F64Op.Sub)\nlet f64_mul = Binary (F64 F64Op.Mul)\nlet f64_div = Binary (F64 F64Op.Div)\nlet f64_min = Binary (F64 F64Op.Min)\nlet f64_max = Binary (F64 F64Op.Max)\nlet f64_copysign = Binary (F64 F64Op.CopySign)\n\nlet i32_eqz = Test (I32 I32Op.Eqz)\nlet i64_eqz = Test (I64 I64Op.Eqz)\n\nlet i32_eq = Compare (I32 I32Op.Eq)\nlet i32_ne = Compare (I32 I32Op.Ne)\nlet i32_lt_s = Compare (I32 I32Op.LtS)\nlet i32_lt_u = Compare (I32 I32Op.LtU)\nlet i32_le_s = Compare (I32 I32Op.LeS)\nlet i32_le_u = Compare (I32 I32Op.LeU)\nlet i32_gt_s = Compare (I32 I32Op.GtS)\nlet i32_gt_u = Compare (I32 I32Op.GtU)\nlet i32_ge_s = Compare (I32 I32Op.GeS)\nlet i32_ge_u = Compare (I32 I32Op.GeU)\nlet i64_eq = Compare (I64 I64Op.Eq)\nlet i64_ne = Compare (I64 I64Op.Ne)\nlet i64_lt_s = Compare (I64 I64Op.LtS)\nlet i64_lt_u = Compare (I64 I64Op.LtU)\nlet i64_le_s = Compare (I64 I64Op.LeS)\nlet i64_le_u = Compare (I64 I64Op.LeU)\nlet i64_gt_s = Compare (I64 I64Op.GtS)\nlet i64_gt_u = Compare (I64 I64Op.GtU)\nlet i64_ge_s = Compare (I64 I64Op.GeS)\nlet i64_ge_u = Compare (I64 I64Op.GeU)\nlet f32_eq = Compare (F32 F32Op.Eq)\nlet f32_ne = Compare (F32 F32Op.Ne)\nlet f32_lt = Compare (F32 F32Op.Lt)\nlet f32_le = Compare (F32 F32Op.Le)\nlet f32_gt = Compare (F32 F32Op.Gt)\nlet f32_ge = Compare (F32 F32Op.Ge)\nlet f64_eq = Compare (F64 F64Op.Eq)\nlet f64_ne = Compare (F64 F64Op.Ne)\nlet f64_lt = Compare (F64 F64Op.Lt)\nlet f64_le = Compare (F64 F64Op.Le)\nlet f64_gt = Compare (F64 F64Op.Gt)\nlet f64_ge = Compare (F64 F64Op.Ge)\n\nlet i32_extend8_s = Unary (I32 (I32Op.ExtendS Pack8))\nlet i32_extend16_s = Unary (I32 (I32Op.ExtendS Pack16))\nlet i64_extend8_s = Unary (I64 (I64Op.ExtendS Pack8))\nlet i64_extend16_s = Unary (I64 (I64Op.ExtendS Pack16))\nlet i64_extend32_s = Unary (I64 (I64Op.ExtendS Pack32))\n\nlet i32_wrap_i64 = Convert (I32 I32Op.WrapI64)\nlet i32_trunc_f32_s = Convert (I32 I32Op.TruncSF32)\nlet i32_trunc_f32_u = Convert (I32 I32Op.TruncUF32)\nlet i32_trunc_f64_s = Convert (I32 I32Op.TruncSF64)\nlet i32_trunc_f64_u = Convert (I32 I32Op.TruncUF64)\nlet i32_trunc_sat_f32_s = Convert (I32 I32Op.TruncSatSF32)\nlet i32_trunc_sat_f32_u = Convert (I32 I32Op.TruncSatUF32)\nlet i32_trunc_sat_f64_s = Convert (I32 I32Op.TruncSatSF64)\nlet i32_trunc_sat_f64_u = Convert (I32 I32Op.TruncSatUF64)\nlet i64_extend_i32_s = Convert (I64 I64Op.ExtendSI32)\nlet i64_extend_i32_u = Convert (I64 I64Op.ExtendUI32)\nlet i64_trunc_f32_s = Convert (I64 I64Op.TruncSF32)\nlet i64_trunc_f32_u = Convert (I64 I64Op.TruncUF32)\nlet i64_trunc_f64_s = Convert (I64 I64Op.TruncSF64)\nlet i64_trunc_f64_u = Convert (I64 I64Op.TruncUF64)\nlet f32_convert_i32_s = Convert (F32 F32Op.ConvertSI32)\nlet f32_convert_i32_u = Convert (F32 F32Op.ConvertUI32)\nlet f32_convert_i64_s = Convert (F32 F32Op.ConvertSI64)\nlet f32_convert_i64_u = Convert (F32 F32Op.ConvertUI64)\nlet i64_trunc_sat_f32_s = Convert (I64 I64Op.TruncSatSF32)\nlet i64_trunc_sat_f32_u = Convert (I64 I64Op.TruncSatUF32)\nlet i64_trunc_sat_f64_s = Convert (I64 I64Op.TruncSatSF64)\nlet i64_trunc_sat_f64_u = Convert (I64 I64Op.TruncSatUF64)\nlet f32_demote_f64 = Convert (F32 F32Op.DemoteF64)\nlet f64_convert_i32_s = Convert (F64 F64Op.ConvertSI32)\nlet f64_convert_i32_u = Convert (F64 F64Op.ConvertUI32)\nlet f64_convert_i64_s = Convert (F64 F64Op.ConvertSI64)\nlet f64_convert_i64_u = Convert (F64 F64Op.ConvertUI64)\nlet f64_promote_f32 = Convert (F64 F64Op.PromoteF32)\nlet i32_reinterpret_f32 = Convert (I32 I32Op.ReinterpretFloat)\nlet i64_reinterpret_f64 = Convert (I64 I64Op.ReinterpretFloat)\nlet f32_reinterpret_i32 = Convert (F32 F32Op.ReinterpretInt)\nlet f64_reinterpret_i64 = Convert (F64 F64Op.ReinterpretInt)\n"
  },
  {
    "path": "interpreter/syntax/types.ml",
    "content": "(* Types *)\n\ntype num_type = I32Type | I64Type | F32Type | F64Type\ntype ref_type = FuncRefType | ExternRefType\ntype value_type = NumType of num_type | RefType of ref_type\ntype result_type = value_type list\ntype func_type = FuncType of result_type * result_type\n\ntype 'a limits = {min : 'a; max : 'a option}\ntype mutability = Immutable | Mutable\ntype table_type = TableType of Int32.t limits * ref_type\ntype memory_type = MemoryType of Int32.t limits\ntype global_type = GlobalType of value_type * mutability\ntype extern_type =\n  | ExternFuncType of func_type\n  | ExternTableType of table_type\n  | ExternMemoryType of memory_type\n  | ExternGlobalType of global_type\n\ntype pack_size = Pack8 | Pack16 | Pack32\ntype extension = SX | ZX\n\n\n(* Attributes *)\n\nlet size = function\n  | I32Type | F32Type -> 4\n  | I64Type | F64Type -> 8\n\nlet packed_size = function\n  | Pack8 -> 1\n  | Pack16 -> 2\n  | Pack32 -> 4\n\nlet is_num_type = function\n  | NumType _ -> true\n  | RefType _ -> false\n\nlet is_ref_type = function\n  | NumType _ -> false\n  | RefType _ -> true\n\n\n(* Filters *)\n\nlet funcs =\n  Lib.List.map_filter (function ExternFuncType t -> Some t | _ -> None)\nlet tables =\n  Lib.List.map_filter (function ExternTableType t -> Some t | _ -> None)\nlet memories =\n  Lib.List.map_filter (function ExternMemoryType t -> Some t | _ -> None)\nlet globals =\n  Lib.List.map_filter (function ExternGlobalType t -> Some t | _ -> None)\n\n\n(* Subtyping *)\n\nlet match_limits lim1 lim2 =\n  I32.ge_u lim1.min lim2.min &&\n  match lim1.max, lim2.max with\n  | _, None -> true\n  | None, Some _ -> false\n  | Some i, Some j -> I32.le_u i j\n\nlet match_func_type ft1 ft2 =\n  ft1 = ft2\n\nlet match_table_type (TableType (lim1, et1)) (TableType (lim2, et2)) =\n  et1 = et2 && match_limits lim1 lim2\n\nlet match_memory_type (MemoryType lim1) (MemoryType lim2) =\n  match_limits lim1 lim2\n\nlet match_global_type gt1 gt2 =\n  gt1 = gt2\n\nlet match_extern_type et1 et2 =\n  match et1, et2 with\n  | ExternFuncType ft1, ExternFuncType ft2 -> match_func_type ft1 ft2\n  | ExternTableType tt1, ExternTableType tt2 -> match_table_type tt1 tt2\n  | ExternMemoryType mt1, ExternMemoryType mt2 -> match_memory_type mt1 mt2\n  | ExternGlobalType gt1, ExternGlobalType gt2 -> match_global_type gt1 gt2\n  | _, _ -> false\n\n\n(* String conversion *)\n\nlet string_of_num_type = function\n  | I32Type -> \"i32\"\n  | I64Type -> \"i64\"\n  | F32Type -> \"f32\"\n  | F64Type -> \"f64\"\n\nlet string_of_ref_type = function\n  | FuncRefType -> \"funcref\"\n  | ExternRefType -> \"externref\"\n\nlet string_of_refed_type = function\n  | FuncRefType -> \"func\"\n  | ExternRefType -> \"extern\"\n\nlet string_of_value_type = function\n  | NumType t -> string_of_num_type t\n  | RefType t -> string_of_ref_type t\n\nlet string_of_value_types = function\n  | [t] -> string_of_value_type t\n  | ts -> \"[\" ^ String.concat \" \" (List.map string_of_value_type ts) ^ \"]\"\n\n\nlet string_of_limits {min; max} =\n  I32.to_string_u min ^\n  (match max with None -> \"\" | Some n -> \" \" ^ I32.to_string_u n)\n\nlet string_of_memory_type = function\n  | MemoryType lim -> string_of_limits lim\n\nlet string_of_table_type = function\n  | TableType (lim, t) -> string_of_limits lim ^ \" \" ^ string_of_ref_type t\n\nlet string_of_global_type = function\n  | GlobalType (t, Immutable) -> string_of_value_type t\n  | GlobalType (t, Mutable) -> \"(mut \" ^ string_of_value_type t ^ \")\"\n\nlet string_of_result_type ts =\n  \"[\" ^ String.concat \" \" (List.map string_of_value_type ts) ^ \"]\"\n\nlet string_of_func_type (FuncType (ins, out)) =\n  string_of_result_type ins ^ \" -> \" ^ string_of_result_type out\n\nlet string_of_extern_type = function\n  | ExternFuncType ft -> \"func \" ^ string_of_func_type ft\n  | ExternTableType tt -> \"table \" ^ string_of_table_type tt\n  | ExternMemoryType mt -> \"memory \" ^ string_of_memory_type mt\n  | ExternGlobalType gt -> \"global \" ^ string_of_global_type gt\n"
  },
  {
    "path": "interpreter/syntax/values.ml",
    "content": "open Types\n\n\n(* Values and operators *)\n\ntype ('i32, 'i64, 'f32, 'f64) op =\n  I32 of 'i32 | I64 of 'i64 | F32 of 'f32 | F64 of 'f64\n\ntype num = (I32.t, I64.t, F32.t, F64.t) op\n\ntype ref_ = ..\ntype ref_ += NullRef of ref_type\n\ntype value = Num of num | Ref of ref_\n\n\n(* Typing *)\n\nlet type_of_num = function\n  | I32 _ -> I32Type\n  | I64 _ -> I64Type\n  | F32 _ -> F32Type\n  | F64 _ -> F64Type\n\nlet type_of_ref' = ref (function NullRef t -> t | _ -> assert false)\nlet type_of_ref r = !type_of_ref' r\n\nlet type_of_value = function\n  | Num n -> NumType (type_of_num n)\n  | Ref r -> RefType (type_of_ref r)\n\n\n(* Projections *)\n\nlet as_num = function\n  | Num n -> n\n  | Ref _ -> failwith \"as_num\"\n\nlet as_ref = function\n  | Num _ -> failwith \"as_ref\"\n  | Ref r -> r\n\n\n(* Defaults *)\n\nlet default_num = function\n  | I32Type -> I32 I32.zero\n  | I64Type -> I64 I64.zero\n  | F32Type -> F32 F32.zero\n  | F64Type -> F64 F64.zero\n\nlet default_ref = function\n  | t -> NullRef t\n\nlet default_value = function\n  | NumType t' -> Num (default_num t')\n  | RefType t' -> Ref (default_ref t')\n\n\n(* Conversion *)\n\nlet value_of_bool b = Num (I32 (if b then 1l else 0l))\n\nlet string_of_num = function\n  | I32 i -> I32.to_string_s i\n  | I64 i -> I64.to_string_s i\n  | F32 z -> F32.to_string z\n  | F64 z -> F64.to_string z\n\nlet string_of_ref' = ref (function NullRef t -> \"null\" | _ -> \"ref\")\nlet string_of_ref r = !string_of_ref' r\n\nlet string_of_value = function\n  | Num n -> string_of_num n\n  | Ref r -> string_of_ref r\n\nlet string_of_values = function\n  | [v] -> string_of_value v\n  | vs -> \"[\" ^ String.concat \" \" (List.map string_of_value vs) ^ \"]\"\n"
  },
  {
    "path": "interpreter/text/arrange.ml",
    "content": "open Source\nopen Ast\nopen Script\nopen Values\nopen Types\nopen Sexpr\n\n\n(* Generic formatting *)\n\nlet nat n = I32.to_string_u (I32.of_int_u n)\nlet nat32 = I32.to_string_u\n\nlet add_hex_char buf c = Printf.bprintf buf \"\\\\%02x\" (Char.code c)\nlet add_char buf = function\n  | '\\n' -> Buffer.add_string buf \"\\\\n\"\n  | '\\t' -> Buffer.add_string buf \"\\\\t\"\n  | '\\\"' -> Buffer.add_string buf \"\\\\\\\"\"\n  | '\\\\' -> Buffer.add_string buf \"\\\\\\\\\"\n  | c when '\\x20' <= c && c < '\\x7f' -> Buffer.add_char buf c\n  | c -> add_hex_char buf c\nlet add_unicode_char buf = function\n  | (0x09 | 0x0a) as uc -> add_char buf (Char.chr uc)\n  | uc when 0x20 <= uc && uc < 0x7f -> add_char buf (Char.chr uc)\n  | uc -> Printf.bprintf buf \"\\\\u{%02x}\" uc\n\nlet string_with iter add_char s =\n  let buf = Buffer.create 256 in\n  Buffer.add_char buf '\\\"';\n  iter (add_char buf) s;\n  Buffer.add_char buf '\\\"';\n  Buffer.contents buf\n\nlet bytes = string_with String.iter add_hex_char\nlet string = string_with String.iter add_char\nlet name = string_with List.iter add_unicode_char\n\nlet list_of_opt = function None -> [] | Some x -> [x]\n\nlet list f xs = List.map f xs\nlet listi f xs = List.mapi f xs\nlet opt f xo = list f (list_of_opt xo)\n\nlet tab head f xs = if xs = [] then [] else [Node (head, list f xs)]\nlet atom f x = Atom (f x)\n\nlet break_bytes s =\n  let ss = Lib.String.breakup s 16 in\n  list (atom bytes) ss\n\nlet break_string s =\n  let ss, s' = Lib.List.split_last (Lib.String.split s '\\n') in\n  list (atom string) (List.map (fun s -> s ^ \"\\n\") ss @ [s'])\n\n\n(* Types *)\n\nlet num_type t = string_of_num_type t\nlet ref_type t = string_of_ref_type t\nlet refed_type t = string_of_refed_type t\nlet value_type t = string_of_value_type t\n\nlet decls kind ts = tab kind (atom value_type) ts\n\nlet func_type (FuncType (ins, out)) =\n  Node (\"func\", decls \"param\" ins @ decls \"result\" out)\n\nlet struct_type = func_type\n\nlet limits nat {min; max} =\n  String.concat \" \" (nat min :: opt nat max)\n\nlet global_type = function\n  | GlobalType (t, Immutable) -> atom string_of_value_type t\n  | GlobalType (t, Mutable) -> Node (\"mut\", [atom string_of_value_type t])\n\nlet pack_size = function\n  | Pack8 -> \"8\"\n  | Pack16 -> \"16\"\n  | Pack32 -> \"32\"\n\nlet extension = function\n  | SX -> \"_s\"\n  | ZX -> \"_u\"\n\n\n(* Operators *)\n\nmodule IntOp =\nstruct\n  open Ast.IntOp\n\n  let testop xx = function\n    | Eqz -> \"eqz\"\n\n  let relop xx = function\n    | Eq -> \"eq\"\n    | Ne -> \"ne\"\n    | LtS -> \"lt_s\"\n    | LtU -> \"lt_u\"\n    | GtS -> \"gt_s\"\n    | GtU -> \"gt_u\"\n    | LeS -> \"le_s\"\n    | LeU -> \"le_u\"\n    | GeS -> \"ge_s\"\n    | GeU -> \"ge_u\"\n\n  let unop xx = function\n    | Clz -> \"clz\"\n    | Ctz -> \"ctz\"\n    | Popcnt -> \"popcnt\"\n    | ExtendS sz -> \"extend\" ^ pack_size sz ^ \"_s\"\n\n  let binop xx = function\n    | Add -> \"add\"\n    | Sub -> \"sub\"\n    | Mul -> \"mul\"\n    | DivS -> \"div_s\"\n    | DivU -> \"div_u\"\n    | RemS -> \"rem_s\"\n    | RemU -> \"rem_u\"\n    | And -> \"and\"\n    | Or -> \"or\"\n    | Xor -> \"xor\"\n    | Shl -> \"shl\"\n    | ShrS -> \"shr_s\"\n    | ShrU -> \"shr_u\"\n    | Rotl -> \"rotl\"\n    | Rotr -> \"rotr\"\n\n  let cvtop xx = function\n    | ExtendSI32 -> \"extend_i32_s\"\n    | ExtendUI32 -> \"extend_i32_u\"\n    | WrapI64 -> \"wrap_i64\"\n    | TruncSF32 -> \"trunc_f32_s\"\n    | TruncUF32 -> \"trunc_f32_u\"\n    | TruncSF64 -> \"trunc_f64_s\"\n    | TruncUF64 -> \"trunc_f64_u\"\n    | TruncSatSF32 -> \"trunc_sat_f32_s\"\n    | TruncSatUF32 -> \"trunc_sat_f32_u\"\n    | TruncSatSF64 -> \"trunc_sat_f64_s\"\n    | TruncSatUF64 -> \"trunc_sat_f64_u\"\n    | ReinterpretFloat -> \"reinterpret_f\" ^ xx\nend\n\nmodule FloatOp =\nstruct\n  open Ast.FloatOp\n\n  let testop xx = fun _ -> assert false\n\n  let relop xx = function\n    | Eq -> \"eq\"\n    | Ne -> \"ne\"\n    | Lt -> \"lt\"\n    | Gt -> \"gt\"\n    | Le -> \"le\"\n    | Ge -> \"ge\"\n\n  let unop xx = function\n    | Neg -> \"neg\"\n    | Abs -> \"abs\"\n    | Ceil -> \"ceil\"\n    | Floor -> \"floor\"\n    | Trunc -> \"trunc\"\n    | Nearest -> \"nearest\"\n    | Sqrt -> \"sqrt\"\n\n  let binop xx = function\n    | Add -> \"add\"\n    | Sub -> \"sub\"\n    | Mul -> \"mul\"\n    | Div -> \"div\"\n    | Min -> \"min\"\n    | Max -> \"max\"\n    | CopySign -> \"copysign\"\n\n  let cvtop xx = function\n    | ConvertSI32 -> \"convert_i32_s\"\n    | ConvertUI32 -> \"convert_i32_u\"\n    | ConvertSI64 -> \"convert_i64_s\"\n    | ConvertUI64 -> \"convert_i64_u\"\n    | PromoteF32 -> \"promote_f32\"\n    | DemoteF64 -> \"demote_f64\"\n    | ReinterpretInt -> \"reinterpret_i\" ^ xx\nend\n\nlet oper (intop, floatop) op =\n  num_type (type_of_num op) ^ \".\" ^\n  (match op with\n  | I32 o -> intop \"32\" o\n  | I64 o -> intop \"64\" o\n  | F32 o -> floatop \"32\" o\n  | F64 o -> floatop \"64\" o\n  )\n\nlet unop = oper (IntOp.unop, FloatOp.unop)\nlet binop = oper (IntOp.binop, FloatOp.binop)\nlet testop = oper (IntOp.testop, FloatOp.testop)\nlet relop = oper (IntOp.relop, FloatOp.relop)\nlet cvtop = oper (IntOp.cvtop, FloatOp.cvtop)\n\nlet memop name {ty; align; offset; _} sz =\n  num_type ty ^ \".\" ^ name ^\n  (if offset = 0l then \"\" else \" offset=\" ^ nat32 offset) ^\n  (if 1 lsl align = sz then \"\" else \" align=\" ^ nat (1 lsl align))\n\nlet loadop op =\n  match op.sz with\n  | None -> memop \"load\" op (size op.ty)\n  | Some (sz, ext) ->\n    memop (\"load\" ^ pack_size sz ^ extension ext) op (packed_size sz)\n\nlet storeop op =\n  match op.sz with\n  | None -> memop \"store\" op (size op.ty)\n  | Some sz -> memop (\"store\" ^ pack_size sz) op (packed_size sz)\n\n\n(* Expressions *)\n\nlet var x = nat32 x.it\nlet num v = string_of_num v.it\nlet constop v = num_type (type_of_num v.it) ^ \".const\"\n\nlet block_type = function\n  | VarBlockType x -> [Node (\"type \" ^ var x, [])]\n  | ValBlockType ts -> decls \"result\" (list_of_opt ts)\n\nlet rec instr e =\n  let head, inner =\n    match e.it with\n    | Unreachable -> \"unreachable\", []\n    | Nop -> \"nop\", []\n    | Drop -> \"drop\", []\n    | Select None -> \"select\", []\n    | Select (Some []) -> \"select\", [Node (\"result\", [])]\n    | Select (Some ts) -> \"select\", decls \"result\" ts\n    | Block (bt, es) -> \"block\", block_type bt @ list instr es\n    | Loop (bt, es) -> \"loop\", block_type bt @ list instr es\n    | If (bt, es1, es2) ->\n      \"if\", block_type bt @\n        [Node (\"then\", list instr es1); Node (\"else\", list instr es2)]\n    | Br x -> \"br \" ^ var x, []\n    | BrIf x -> \"br_if \" ^ var x, []\n    | BrTable (xs, x) ->\n      \"br_table \" ^ String.concat \" \" (list var (xs @ [x])), []\n    | Return -> \"return\", []\n    | Call x -> \"call \" ^ var x, []\n    | CallIndirect (x, y) ->\n      \"call_indirect \" ^ var x, [Node (\"type \" ^ var y, [])]\n    | LocalGet x -> \"local.get \" ^ var x, []\n    | LocalSet x -> \"local.set \" ^ var x, []\n    | LocalTee x -> \"local.tee \" ^ var x, []\n    | GlobalGet x -> \"global.get \" ^ var x, []\n    | GlobalSet x -> \"global.set \" ^ var x, []\n    | TableGet x -> \"table.get \" ^ var x, []\n    | TableSet x -> \"table.set \" ^ var x, []\n    | TableSize x -> \"table.size \" ^ var x, []\n    | TableGrow x -> \"table.grow \" ^ var x, []\n    | TableFill x -> \"table.fill \" ^ var x, []\n    | TableCopy (x, y) -> \"table.copy \" ^ var x ^ \" \" ^ var y, []\n    | TableInit (x, y) -> \"table.init \" ^ var x ^ \" \" ^ var y, []\n    | ElemDrop x -> \"elem.drop \" ^ var x, []\n    | Load op -> loadop op, []\n    | Store op -> storeop op, []\n    | MemorySize -> \"memory.size\", []\n    | MemoryGrow -> \"memory.grow\", []\n    | MemoryFill -> \"memory.fill\", []\n    | MemoryCopy -> \"memory.copy\", []\n    | MemoryInit x -> \"memory.init \" ^ var x, []\n    | DataDrop x -> \"data.drop \" ^ var x, []\n    | RefNull t -> \"ref.null\", [Atom (refed_type t)]\n    | RefIsNull -> \"ref.is_null\", []\n    | RefFunc x -> \"ref.func \" ^ var x, []\n    | Const n -> constop n ^ \" \" ^ num n, []\n    | Test op -> testop op, []\n    | Compare op -> relop op, []\n    | Unary op -> unop op, []\n    | Binary op -> binop op, []\n    | Convert op -> cvtop op, []\n  in Node (head, inner)\n\nlet const head c =\n  match c.it with\n  | [e] -> instr e\n  | es -> Node (head, list instr c.it)\n\n\n(* Functions *)\n\nlet func_with_name name f =\n  let {ftype; locals; body} = f.it in\n  Node (\"func\" ^ name,\n    [Node (\"type \" ^ var ftype, [])] @\n    decls \"local\" locals @\n    list instr body\n  )\n\nlet func_with_index off i f =\n  func_with_name (\" $\" ^ nat (off + i)) f\n\nlet func f =\n  func_with_name \"\" f\n\nlet start x = Node (\"start \" ^ var x, [])\n\n\n(* Tables & memories *)\n\nlet table off i tab =\n  let {ttype = TableType (lim, t)} = tab.it in\n  Node (\"table $\" ^ nat (off + i) ^ \" \" ^ limits nat32 lim,\n    [atom ref_type t]\n  )\n\nlet memory off i mem =\n  let {mtype = MemoryType lim} = mem.it in\n  Node (\"memory $\" ^ nat (off + i) ^ \" \" ^ limits nat32 lim, [])\n\nlet is_elem_kind = function\n  | FuncRefType -> true\n  | _ -> false\n\nlet elem_kind = function\n  | FuncRefType -> \"func\"\n  | _ -> assert false\n\nlet is_elem_index e =\n  match e.it with\n  | [{it = RefFunc _; _}] -> true\n  | _ -> false\n\nlet elem_index e =\n  match e.it with\n  | [{it = RefFunc x; _}] -> atom var x\n  | _ -> assert false\n\nlet segment_mode category mode =\n  match mode.it with\n  | Passive -> []\n  | Active {index; offset} ->\n    (if index.it = 0l then [] else [Node (category, [atom var index])]) @\n    [const \"offset\" offset]\n  | Declarative -> [Atom \"declare\"]\n\nlet elem i seg =\n  let {etype; einit; emode} = seg.it in\n  Node (\"elem $\" ^ nat i,\n    segment_mode \"table\" emode @\n    if is_elem_kind etype && List.for_all is_elem_index einit then\n      atom elem_kind etype :: list elem_index einit\n    else\n      atom ref_type etype :: list (const \"item\") einit\n  )\n\nlet data i seg =\n  let {dinit; dmode} = seg.it in\n  Node (\"data $\" ^ nat i, segment_mode \"memory\" dmode @ break_bytes dinit)\n\n\n(* Modules *)\n\nlet typedef i ty =\n  Node (\"type $\" ^ nat i, [struct_type ty.it])\n\nlet import_desc fx tx mx gx d =\n  match d.it with\n  | FuncImport x ->\n    incr fx; Node (\"func $\" ^ nat (!fx - 1), [Node (\"type\", [atom var x])])\n  | TableImport t ->\n    incr tx; table 0 (!tx - 1) ({ttype = t} @@ d.at)\n  | MemoryImport t ->\n    incr mx; memory 0 (!mx - 1) ({mtype = t} @@ d.at)\n  | GlobalImport t ->\n    incr gx; Node (\"global $\" ^ nat (!gx - 1), [global_type t])\n\nlet import fx tx mx gx im =\n  let {module_name; item_name; idesc} = im.it in\n  Node (\"import\",\n    [atom name module_name; atom name item_name; import_desc fx tx mx gx idesc]\n  )\n\nlet export_desc d =\n  match d.it with\n  | FuncExport x -> Node (\"func\", [atom var x])\n  | TableExport x -> Node (\"table\", [atom var x])\n  | MemoryExport x -> Node (\"memory\", [atom var x])\n  | GlobalExport x -> Node (\"global\", [atom var x])\n\nlet export ex =\n  let {name = n; edesc} = ex.it in\n  Node (\"export\", [atom name n; export_desc edesc])\n\nlet global off i g =\n  let {gtype; ginit} = g.it in\n  Node (\"global $\" ^ nat (off + i), global_type gtype :: list instr ginit.it)\n\n\n(* Modules *)\n\nlet var_opt = function\n  | None -> \"\"\n  | Some x -> \" \" ^ x.it\n\nlet module_with_var_opt x_opt m =\n  let fx = ref 0 in\n  let tx = ref 0 in\n  let mx = ref 0 in\n  let gx = ref 0 in\n  let imports = list (import fx tx mx gx) m.it.imports in\n  Node (\"module\" ^ var_opt x_opt,\n    listi typedef m.it.types @\n    imports @\n    listi (table !tx) m.it.tables @\n    listi (memory !mx) m.it.memories @\n    listi (global !gx) m.it.globals @\n    listi (func_with_index !fx) m.it.funcs @\n    list export m.it.exports @\n    opt start m.it.start @\n    listi elem m.it.elems @\n    listi data m.it.datas\n  )\n\nlet binary_module_with_var_opt x_opt bs =\n  Node (\"module\" ^ var_opt x_opt ^ \" binary\", break_bytes bs)\n\nlet quoted_module_with_var_opt x_opt s =\n  Node (\"module\" ^ var_opt x_opt ^ \" quote\", break_string s)\n\nlet module_ = module_with_var_opt None\n\n\n(* Scripts *)\n\nlet literal mode lit =\n  match lit.it with\n  | Num (Values.I32 i) ->\n    let f = if mode = `Binary then I32.to_hex_string else I32.to_string_s in\n    Node (\"i32.const \" ^ f i, [])\n  | Num (Values.I64 i) ->\n    let f = if mode = `Binary then I64.to_hex_string else I64.to_string_s in\n    Node (\"i64.const \" ^ f i, [])\n  | Num (Values.F32 z) ->\n    let f = if mode = `Binary then F32.to_hex_string else F32.to_string in\n    Node (\"f32.const \" ^ f z, [])\n  | Num (Values.F64 z) ->\n    let f = if mode = `Binary then F64.to_hex_string else F64.to_string in\n    Node (\"f64.const \" ^ f z, [])\n  | Ref (NullRef t) ->\n    Node (\"ref.null \" ^ refed_type t, [])\n  | Ref (ExternRef n) ->\n    Node (\"ref.extern \" ^ nat32 n, [])\n  | Ref _ ->\n    assert false\n\nlet definition mode x_opt def =\n  try\n    match mode with\n    | `Textual ->\n      let rec unquote def =\n        match def.it with\n        | Textual m -> m\n        | Encoded (_, bs) -> Decode.decode \"\" bs\n        | Quoted (_, s) -> unquote (Parse.string_to_module s)\n      in module_with_var_opt x_opt (unquote def)\n    | `Binary ->\n      let rec unquote def =\n        match def.it with\n        | Textual m -> Encode.encode m\n        | Encoded (_, bs) -> Encode.encode (Decode.decode \"\" bs)\n        | Quoted (_, s) -> unquote (Parse.string_to_module s)\n      in binary_module_with_var_opt x_opt (unquote def)\n    | `Original ->\n      match def.it with\n      | Textual m -> module_with_var_opt x_opt m\n      | Encoded (_, bs) -> binary_module_with_var_opt x_opt bs\n      | Quoted (_, s) -> quoted_module_with_var_opt x_opt s\n  with Parse.Syntax _ ->\n    quoted_module_with_var_opt x_opt \"<invalid module>\"\n\nlet access x_opt n =\n  String.concat \" \" [var_opt x_opt; name n]\n\nlet action mode act =\n  match act.it with\n  | Invoke (x_opt, name, lits) ->\n    Node (\"invoke\" ^ access x_opt name, List.map (literal mode) lits)\n  | Get (x_opt, name) ->\n    Node (\"get\" ^ access x_opt name, [])\n\nlet nan = function\n  | CanonicalNan -> \"nan:canonical\"\n  | ArithmeticNan -> \"nan:arithmetic\"\n\nlet result mode res =\n  match res.it with\n  | LitResult lit -> literal mode lit\n  | NanResult nanop ->\n    (match nanop.it with\n    | Values.I32 _ | Values.I64 _ -> assert false\n    | Values.F32 n -> Node (\"f32.const \" ^ nan n, [])\n    | Values.F64 n -> Node (\"f64.const \" ^ nan n, [])\n    )\n  | RefResult t -> Node (\"ref.\" ^ refed_type t, [])\n\nlet assertion mode ass =\n  match ass.it with\n  | AssertMalformed (def, re) ->\n    (match mode, def.it with\n    | `Binary, Quoted _ -> []\n    | _ ->\n      [Node (\"assert_malformed\", [definition `Original None def; Atom (string re)])]\n    )\n  | AssertInvalid (def, re) ->\n    [Node (\"assert_invalid\", [definition mode None def; Atom (string re)])]\n  | AssertUnlinkable (def, re) ->\n    [Node (\"assert_unlinkable\", [definition mode None def; Atom (string re)])]\n  | AssertUninstantiable (def, re) ->\n    [Node (\"assert_trap\", [definition mode None def; Atom (string re)])]\n  | AssertReturn (act, results) ->\n    [Node (\"assert_return\", action mode act :: List.map (result mode) results)]\n  | AssertTrap (act, re) ->\n    [Node (\"assert_trap\", [action mode act; Atom (string re)])]\n  | AssertExhaustion (act, re) ->\n    [Node (\"assert_exhaustion\", [action mode act; Atom (string re)])]\n\nlet command mode cmd =\n  match cmd.it with\n  | Module (x_opt, def) -> [definition mode x_opt def]\n  | Register (n, x_opt) -> [Node (\"register \" ^ name n ^ var_opt x_opt, [])]\n  | Action act -> [action mode act]\n  | Assertion ass -> assertion mode ass\n  | Meta _ -> assert false\n\nlet script mode scr = Lib.List.concat_map (command mode) scr\n"
  },
  {
    "path": "interpreter/text/arrange.mli",
    "content": "open Sexpr\n\nval instr : Ast.instr -> sexpr\nval func : Ast.func -> sexpr\nval module_ : Ast.module_ -> sexpr\nval script : [`Textual | `Binary] -> Script.script -> sexpr list\n"
  },
  {
    "path": "interpreter/text/lexer.mli",
    "content": "val convert_pos : Lexing.position -> Source.pos\n\nval token : Lexing.lexbuf -> Parser.token  (* raises Source.Error *)\n"
  },
  {
    "path": "interpreter/text/lexer.mll",
    "content": "{\nopen Parser\nopen Operators\n\nlet convert_pos pos =\n  { Source.file = pos.Lexing.pos_fname;\n    Source.line = pos.Lexing.pos_lnum;\n    Source.column = pos.Lexing.pos_cnum - pos.Lexing.pos_bol\n  }\n\nlet region lexbuf =\n  let left = convert_pos (Lexing.lexeme_start_p lexbuf) in\n  let right = convert_pos (Lexing.lexeme_end_p lexbuf) in\n  {Source.left = left; Source.right = right}\n\nlet error lexbuf msg = raise (Script.Syntax (region lexbuf, msg))\nlet error_nest start lexbuf msg =\n  lexbuf.Lexing.lex_start_p <- start;\n  error lexbuf msg\n\nlet string s =\n  let b = Buffer.create (String.length s) in\n  let i = ref 1 in\n  while !i < String.length s - 1 do\n    let c = if s.[!i] <> '\\\\' then s.[!i] else\n      match (incr i; s.[!i]) with\n      | 'n' -> '\\n'\n      | 'r' -> '\\r'\n      | 't' -> '\\t'\n      | '\\\\' -> '\\\\'\n      | '\\'' -> '\\''\n      | '\\\"' -> '\\\"'\n      | 'u' ->\n        let j = !i + 2 in\n        i := String.index_from s j '}';\n        let n = int_of_string (\"0x\" ^ String.sub s j (!i - j)) in\n        let bs = Utf8.encode [n] in\n        Buffer.add_substring b bs 0 (String.length bs - 1);\n        bs.[String.length bs - 1]\n      | h ->\n        incr i;\n        Char.chr (int_of_string (\"0x\" ^ String.make 1 h ^ String.make 1 s.[!i]))\n    in Buffer.add_char b c;\n    incr i\n  done;\n  Buffer.contents b\n\nlet num_type = function\n  | \"i32\" -> Types.I32Type\n  | \"i64\" -> Types.I64Type\n  | \"f32\" -> Types.F32Type\n  | \"f64\" -> Types.F64Type\n  | _ -> assert false\n\nlet intop t i32 i64 =\n  match t with\n  | \"i32\" -> i32\n  | \"i64\" -> i64\n  | _ -> assert false\n\nlet floatop t f32 f64 =\n  match t with\n  | \"f32\" -> f32\n  | \"f64\" -> f64\n  | _ -> assert false\n\nlet numop t i32 i64 f32 f64 =\n  match t with\n  | \"i32\" -> i32\n  | \"i64\" -> i64\n  | \"f32\" -> f32\n  | \"f64\" -> f64\n  | _ -> assert false\n\nlet memsz sz m8 m16 m32 =\n  match sz with\n  | \"8\" -> m8\n  | \"16\" -> m16\n  | \"32\" -> m32\n  | _ -> assert false\n\nlet ext e s u =\n  match e with\n  | 's' -> s\n  | 'u' -> u\n  | _ -> assert false\n\nlet opt = Lib.Option.get\n}\n\nlet sign = '+' | '-'\nlet digit = ['0'-'9']\nlet hexdigit = ['0'-'9''a'-'f''A'-'F']\nlet num = digit ('_'? digit)*\nlet hexnum = hexdigit ('_'? hexdigit)*\n\nlet letter = ['a'-'z''A'-'Z']\nlet symbol =\n  ['+''-''*''/''\\\\''^''~''=''<''>''!''?''@''#''$''%''&''|'':''`''.''\\'']\n\nlet space = [' ''\\t''\\n''\\r']\nlet ascii = ['\\x00'-'\\x7f']\nlet ascii_no_nl = ['\\x00'-'\\x09''\\x0b'-'\\x7f']\nlet utf8cont = ['\\x80'-'\\xbf']\nlet utf8enc =\n    ['\\xc2'-'\\xdf'] utf8cont\n  | ['\\xe0'] ['\\xa0'-'\\xbf'] utf8cont\n  | ['\\xed'] ['\\x80'-'\\x9f'] utf8cont\n  | ['\\xe1'-'\\xec''\\xee'-'\\xef'] utf8cont utf8cont\n  | ['\\xf0'] ['\\x90'-'\\xbf'] utf8cont utf8cont\n  | ['\\xf4'] ['\\x80'-'\\x8f'] utf8cont utf8cont\n  | ['\\xf1'-'\\xf3'] utf8cont utf8cont utf8cont\nlet utf8 = ascii | utf8enc\nlet utf8_no_nl = ascii_no_nl | utf8enc\n\nlet escape = ['n''r''t''\\\\''\\'''\\\"']\nlet character =\n    [^'\"''\\\\''\\x00'-'\\x1f''\\x7f'-'\\xff']\n  | utf8enc\n  | '\\\\'escape\n  | '\\\\'hexdigit hexdigit \n  | \"\\\\u{\" hexnum '}'\n\nlet nat = num | \"0x\" hexnum\nlet int = sign nat\nlet frac = num\nlet hexfrac = hexnum\nlet float =\n    sign? num '.' frac?\n  | sign? num ('.' frac?)? ('e' | 'E') sign? num\n  | sign? \"0x\" hexnum '.' hexfrac?\n  | sign? \"0x\" hexnum ('.' hexfrac?)? ('p' | 'P') sign? num\n  | sign? \"inf\"\n  | sign? \"nan\"\n  | sign? \"nan:\" \"0x\" hexnum\nlet string = '\"' character* '\"'\nlet reserved = (letter | digit | '_' | symbol)+\nlet name = '$' reserved\n\nlet ixx = \"i\" (\"32\" | \"64\")\nlet fxx = \"f\" (\"32\" | \"64\")\nlet nxx = ixx | fxx\nlet mixx = \"i\" (\"8\" | \"16\" | \"32\" | \"64\")\nlet mfxx = \"f\" (\"32\" | \"64\")\nlet sign = \"s\" | \"u\"\nlet mem_size = \"8\" | \"16\" | \"32\"\n\nrule token = parse\n  | \"(\" { LPAR }\n  | \")\" { RPAR }\n\n  | nat as s { NAT s }\n  | int as s { INT s }\n  | float as s { FLOAT s }\n\n  | string as s { STRING (string s) }\n  | '\"'character*('\\n'|eof) { error lexbuf \"unclosed string literal\" }\n  | '\"'character*['\\x00'-'\\x09''\\x0b'-'\\x1f''\\x7f']\n    { error lexbuf \"illegal control character in string literal\" }\n  | '\"'character*'\\\\'_\n    { error_nest (Lexing.lexeme_end_p lexbuf) lexbuf \"illegal escape\" }\n\n  | \"extern\" { EXTERN }\n  | \"externref\" { EXTERNREF }\n  | \"funcref\" { FUNCREF }\n  | (nxx as t) { NUM_TYPE (num_type t) }\n  | \"mut\" { MUT }\n\n  | (nxx as t)\".const\"\n    { let open Source in\n      CONST (numop t\n        (fun s -> let n = I32.of_string s.it in\n          i32_const (n @@ s.at), Values.I32 n)\n        (fun s -> let n = I64.of_string s.it in\n          i64_const (n @@ s.at), Values.I64 n)\n        (fun s -> let n = F32.of_string s.it in\n          f32_const (n @@ s.at), Values.F32 n)\n        (fun s -> let n = F64.of_string s.it in\n          f64_const (n @@ s.at), Values.F64 n))\n    }\n  | \"ref.null\" { REF_NULL }\n  | \"ref.func\" { REF_FUNC }\n  | \"ref.extern\" { REF_EXTERN }\n  | \"ref.is_null\" { REF_IS_NULL }\n\n  | \"nop\" { NOP }\n  | \"unreachable\" { UNREACHABLE }\n  | \"drop\" { DROP }\n  | \"block\" { BLOCK }\n  | \"loop\" { LOOP }\n  | \"end\" { END }\n  | \"br\" { BR }\n  | \"br_if\" { BR_IF }\n  | \"br_table\" { BR_TABLE }\n  | \"return\" { RETURN }\n  | \"if\" { IF }\n  | \"then\" { THEN }\n  | \"else\" { ELSE }\n  | \"select\" { SELECT }\n  | \"call\" { CALL }\n  | \"call_indirect\" { CALL_INDIRECT }\n\n  | \"local.get\" { LOCAL_GET }\n  | \"local.set\" { LOCAL_SET }\n  | \"local.tee\" { LOCAL_TEE }\n  | \"global.get\" { GLOBAL_GET }\n  | \"global.set\" { GLOBAL_SET }\n\n  | \"table.get\" { TABLE_GET }\n  | \"table.set\" { TABLE_SET }\n  | \"table.size\" { TABLE_SIZE }\n  | \"table.grow\" { TABLE_GROW }\n  | \"table.fill\" { TABLE_FILL }\n  | \"table.copy\" { TABLE_COPY }\n  | \"table.init\" { TABLE_INIT }\n  | \"elem.drop\" { ELEM_DROP }\n\n  | \"memory.size\" { MEMORY_SIZE }\n  | \"memory.grow\" { MEMORY_GROW }\n  | \"memory.fill\" { MEMORY_FILL }\n  | \"memory.copy\" { MEMORY_COPY }\n  | \"memory.init\" { MEMORY_INIT }\n  | \"data.drop\" { DATA_DROP }\n\n  | (nxx as t)\".load\"\n    { LOAD (fun a o ->\n        numop t (i32_load (opt a 2)) (i64_load (opt a 3))\n                (f32_load (opt a 2)) (f64_load (opt a 3)) o) }\n  | (nxx as t)\".store\"\n    { STORE (fun a o ->\n        numop t (i32_store (opt a 2)) (i64_store (opt a 3))\n                (f32_store (opt a 2)) (f64_store (opt a 3)) o) }\n  | (ixx as t)\".load\"(mem_size as sz)\"_\"(sign as s)\n    { if t = \"i32\" && sz = \"32\" then error lexbuf \"unknown operator\";\n      LOAD (fun a o ->\n        intop t\n          (memsz sz\n            (ext s i32_load8_s i32_load8_u (opt a 0))\n            (ext s i32_load16_s i32_load16_u (opt a 1))\n            (fun _ -> unreachable) o)\n          (memsz sz\n            (ext s i64_load8_s i64_load8_u (opt a 0))\n            (ext s i64_load16_s i64_load16_u (opt a 1))\n            (ext s i64_load32_s i64_load32_u (opt a 2)) o)) }\n  | (ixx as t)\".store\"(mem_size as sz)\n    { if t = \"i32\" && sz = \"32\" then error lexbuf \"unknown operator\";\n      STORE (fun a o ->\n        intop t\n          (memsz sz\n            (i32_store8 (opt a 0))\n            (i32_store16 (opt a 1))\n            (fun _ -> unreachable) o)\n          (memsz sz\n            (i64_store8 (opt a 0))\n            (i64_store16 (opt a 1))\n            (i64_store32 (opt a 2)) o)) }\n\n  | \"offset=\"(nat as s) { OFFSET_EQ_NAT s }\n  | \"align=\"(nat as s) { ALIGN_EQ_NAT s }\n\n  | (ixx as t)\".clz\" { UNARY (intop t i32_clz i64_clz) }\n  | (ixx as t)\".ctz\" { UNARY (intop t i32_ctz i64_ctz) }\n  | (ixx as t)\".popcnt\" { UNARY (intop t i32_popcnt i64_popcnt) }\n  | (ixx as t)\".extend8_s\" { UNARY (intop t i32_extend8_s i64_extend8_s) }\n  | (ixx as t)\".extend16_s\" { UNARY (intop t i32_extend16_s i64_extend16_s) }\n  | \"i64.extend32_s\" { UNARY i64_extend32_s }\n  | (fxx as t)\".neg\" { UNARY (floatop t f32_neg f64_neg) }\n  | (fxx as t)\".abs\" { UNARY (floatop t f32_abs f64_abs) }\n  | (fxx as t)\".sqrt\" { UNARY (floatop t f32_sqrt f64_sqrt) }\n  | (fxx as t)\".ceil\" { UNARY (floatop t f32_ceil f64_ceil) }\n  | (fxx as t)\".floor\" { UNARY (floatop t f32_floor f64_floor) }\n  | (fxx as t)\".trunc\" { UNARY (floatop t f32_trunc f64_trunc) }\n  | (fxx as t)\".nearest\" { UNARY (floatop t f32_nearest f64_nearest) }\n\n  | (ixx as t)\".add\" { BINARY (intop t i32_add i64_add) }\n  | (ixx as t)\".sub\" { BINARY (intop t i32_sub i64_sub) }\n  | (ixx as t)\".mul\" { BINARY (intop t i32_mul i64_mul) }\n  | (ixx as t)\".div_s\" { BINARY (intop t i32_div_s i64_div_s) }\n  | (ixx as t)\".div_u\" { BINARY (intop t i32_div_u i64_div_u) }\n  | (ixx as t)\".rem_s\" { BINARY (intop t i32_rem_s i64_rem_s) }\n  | (ixx as t)\".rem_u\" { BINARY (intop t i32_rem_u i64_rem_u) }\n  | (ixx as t)\".and\" { BINARY (intop t i32_and i64_and) }\n  | (ixx as t)\".or\" { BINARY (intop t i32_or i64_or) }\n  | (ixx as t)\".xor\" { BINARY (intop t i32_xor i64_xor) }\n  | (ixx as t)\".shl\" { BINARY (intop t i32_shl i64_shl) }\n  | (ixx as t)\".shr_s\" { BINARY (intop t i32_shr_s i64_shr_s) }\n  | (ixx as t)\".shr_u\" { BINARY (intop t i32_shr_u i64_shr_u) }\n  | (ixx as t)\".rotl\" { BINARY (intop t i32_rotl i64_rotl) }\n  | (ixx as t)\".rotr\" { BINARY (intop t i32_rotr i64_rotr) }\n  | (fxx as t)\".add\" { BINARY (floatop t f32_add f64_add) }\n  | (fxx as t)\".sub\" { BINARY (floatop t f32_sub f64_sub) }\n  | (fxx as t)\".mul\" { BINARY (floatop t f32_mul f64_mul) }\n  | (fxx as t)\".div\" { BINARY (floatop t f32_div f64_div) }\n  | (fxx as t)\".min\" { BINARY (floatop t f32_min f64_min) }\n  | (fxx as t)\".max\" { BINARY (floatop t f32_max f64_max) }\n  | (fxx as t)\".copysign\" { BINARY (floatop t f32_copysign f64_copysign) }\n\n  | (ixx as t)\".eqz\" { TEST (intop t i32_eqz i64_eqz) }\n\n  | (ixx as t)\".eq\" { COMPARE (intop t i32_eq i64_eq) }\n  | (ixx as t)\".ne\" { COMPARE (intop t i32_ne i64_ne) }\n  | (ixx as t)\".lt_s\" { COMPARE (intop t i32_lt_s i64_lt_s) }\n  | (ixx as t)\".lt_u\" { COMPARE (intop t i32_lt_u i64_lt_u) }\n  | (ixx as t)\".le_s\" { COMPARE (intop t i32_le_s i64_le_s) }\n  | (ixx as t)\".le_u\" { COMPARE (intop t i32_le_u i64_le_u) }\n  | (ixx as t)\".gt_s\" { COMPARE (intop t i32_gt_s i64_gt_s) }\n  | (ixx as t)\".gt_u\" { COMPARE (intop t i32_gt_u i64_gt_u) }\n  | (ixx as t)\".ge_s\" { COMPARE (intop t i32_ge_s i64_ge_s) }\n  | (ixx as t)\".ge_u\" { COMPARE (intop t i32_ge_u i64_ge_u) }\n  | (fxx as t)\".eq\" { COMPARE (floatop t f32_eq f64_eq) }\n  | (fxx as t)\".ne\" { COMPARE (floatop t f32_ne f64_ne) }\n  | (fxx as t)\".lt\" { COMPARE (floatop t f32_lt f64_lt) }\n  | (fxx as t)\".le\" { COMPARE (floatop t f32_le f64_le) }\n  | (fxx as t)\".gt\" { COMPARE (floatop t f32_gt f64_gt) }\n  | (fxx as t)\".ge\" { COMPARE (floatop t f32_ge f64_ge) }\n\n  | \"i32.wrap_i64\" { CONVERT i32_wrap_i64 }\n  | \"i64.extend_i32_s\" { CONVERT i64_extend_i32_s }\n  | \"i64.extend_i32_u\" { CONVERT i64_extend_i32_u }\n  | \"f32.demote_f64\" { CONVERT f32_demote_f64 }\n  | \"f64.promote_f32\" { CONVERT f64_promote_f32 }\n  | (ixx as t)\".trunc_f32_s\"\n    { CONVERT (intop t i32_trunc_f32_s i64_trunc_f32_s) }\n  | (ixx as t)\".trunc_f32_u\"\n    { CONVERT (intop t i32_trunc_f32_u i64_trunc_f32_u) }\n  | (ixx as t)\".trunc_f64_s\"\n    { CONVERT (intop t i32_trunc_f64_s i64_trunc_f64_s) }\n  | (ixx as t)\".trunc_f64_u\"\n    { CONVERT (intop t i32_trunc_f64_u i64_trunc_f64_u) }\n  | (ixx as t)\".trunc_sat_f32_s\"\n    { CONVERT (intop t i32_trunc_sat_f32_s i64_trunc_sat_f32_s) }\n  | (ixx as t)\".trunc_sat_f32_u\"\n    { CONVERT (intop t i32_trunc_sat_f32_u i64_trunc_sat_f32_u) }\n  | (ixx as t)\".trunc_sat_f64_s\"\n    { CONVERT (intop t i32_trunc_sat_f64_s i64_trunc_sat_f64_s) }\n  | (ixx as t)\".trunc_sat_f64_u\"\n    { CONVERT (intop t i32_trunc_sat_f64_u i64_trunc_sat_f64_u) }\n  | (fxx as t)\".convert_i32_s\"\n    { CONVERT (floatop t f32_convert_i32_s f64_convert_i32_s) }\n  | (fxx as t)\".convert_i32_u\"\n    { CONVERT (floatop t f32_convert_i32_u f64_convert_i32_u) }\n  | (fxx as t)\".convert_i64_s\"\n    { CONVERT (floatop t f32_convert_i64_s f64_convert_i64_s) }\n  | (fxx as t)\".convert_i64_u\"\n    { CONVERT (floatop t f32_convert_i64_u f64_convert_i64_u) }\n  | \"f32.reinterpret_i32\" { CONVERT f32_reinterpret_i32 }\n  | \"f64.reinterpret_i64\" { CONVERT f64_reinterpret_i64 }\n  | \"i32.reinterpret_f32\" { CONVERT i32_reinterpret_f32 }\n  | \"i64.reinterpret_f64\" { CONVERT i64_reinterpret_f64 }\n\n  | \"type\" { TYPE }\n  | \"func\" { FUNC }\n  | \"start\" { START }\n  | \"param\" { PARAM }\n  | \"result\" { RESULT }\n  | \"local\" { LOCAL }\n  | \"global\" { GLOBAL }\n  | \"table\" { TABLE }\n  | \"memory\" { MEMORY }\n  | \"elem\" { ELEM }\n  | \"data\" { DATA }\n  | \"declare\" { DECLARE }\n  | \"offset\" { OFFSET }\n  | \"item\" { ITEM }\n  | \"import\" { IMPORT }\n  | \"export\" { EXPORT }\n\n  | \"module\" { MODULE }\n  | \"binary\" { BIN }\n  | \"quote\" { QUOTE }\n\n  | \"script\" { SCRIPT }\n  | \"register\" { REGISTER }\n  | \"invoke\" { INVOKE }\n  | \"get\" { GET }\n  | \"assert_malformed\" { ASSERT_MALFORMED }\n  | \"assert_invalid\" { ASSERT_INVALID }\n  | \"assert_unlinkable\" { ASSERT_UNLINKABLE }\n  | \"assert_return\" { ASSERT_RETURN }\n  | \"assert_trap\" { ASSERT_TRAP }\n  | \"assert_exhaustion\" { ASSERT_EXHAUSTION }\n  | \"nan:canonical\" { NAN Script.CanonicalNan }\n  | \"nan:arithmetic\" { NAN Script.ArithmeticNan }\n  | \"input\" { INPUT }\n  | \"output\" { OUTPUT }\n\n  | name as s { VAR s }\n\n  | \";;\"utf8_no_nl*eof { EOF }\n  | \";;\"utf8_no_nl*'\\n' { Lexing.new_line lexbuf; token lexbuf }\n  | \";;\"utf8_no_nl* { token lexbuf (* causes error on following position *) }\n  | \"(;\" { comment (Lexing.lexeme_start_p lexbuf) lexbuf; token lexbuf }\n  | space#'\\n' { token lexbuf }\n  | '\\n' { Lexing.new_line lexbuf; token lexbuf }\n  | eof { EOF }\n\n  | reserved { error lexbuf \"unknown operator\" }\n  | utf8 { error lexbuf \"malformed operator\" }\n  | _ { error lexbuf \"malformed UTF-8 encoding\" }\n\nand comment start = parse\n  | \";)\" { () }\n  | \"(;\" { comment (Lexing.lexeme_start_p lexbuf) lexbuf; comment start lexbuf }\n  | '\\n' { Lexing.new_line lexbuf; comment start lexbuf }\n  | eof { error_nest start lexbuf \"unclosed comment\" }\n  | utf8 { comment start lexbuf }\n  | _ { error lexbuf \"malformed UTF-8 encoding\" }\n"
  },
  {
    "path": "interpreter/text/parse.ml",
    "content": "type 'a start =\n  | Module : (Script.var option * Script.definition) start\n  | Script : Script.script start\n  | Script1 : Script.script start\n\nexception Syntax = Script.Syntax\n\nlet parse' name lexbuf start =\n  lexbuf.Lexing.lex_curr_p <-\n    {lexbuf.Lexing.lex_curr_p with Lexing.pos_fname = name};\n  try start Lexer.token lexbuf\n  with Syntax (region, s) ->\n    let region' = if region <> Source.no_region then region else\n      {Source.left = Lexer.convert_pos lexbuf.Lexing.lex_start_p;\n       Source.right = Lexer.convert_pos lexbuf.Lexing.lex_curr_p} in\n    raise (Syntax (region', s))\n\nlet parse (type a) name lexbuf : a start -> a = function\n  | Module -> parse' name lexbuf Parser.module1\n  | Script -> parse' name lexbuf Parser.script\n  | Script1 -> parse' name lexbuf Parser.script1\n\nlet string_to start s =\n  let lexbuf = Lexing.from_string s in\n  parse \"string\" lexbuf start\n\nlet string_to_script s = string_to Script s\nlet string_to_module s = snd (string_to Module s)\n"
  },
  {
    "path": "interpreter/text/parse.mli",
    "content": "type 'a start =\n  | Module : (Script.var option * Script.definition) start\n  | Script : Script.script start\n  | Script1 : Script.script start\n\nexception Syntax of Source.region * string\n\nval parse : string -> Lexing.lexbuf -> 'a start -> 'a (* raises Syntax *)\n\nval string_to_script : string -> Script.script (* raises Syntax *)\nval string_to_module : string -> Script.definition (* raises Syntax *)\n"
  },
  {
    "path": "interpreter/text/parser.mly",
    "content": "%{\nopen Source\nopen Types\nopen Ast\nopen Operators\nopen Script\n\n\n(* Error handling *)\n\nlet error at msg = raise (Script.Syntax (at, msg))\n\nlet parse_error msg =\n  error Source.no_region\n    (if msg = \"syntax error\" then \"unexpected token\" else msg)\n\n\n(* Position handling *)\n\nlet position_to_pos position =\n  { file = position.Lexing.pos_fname;\n    line = position.Lexing.pos_lnum;\n    column = position.Lexing.pos_cnum - position.Lexing.pos_bol\n  }\n\nlet positions_to_region position1 position2 =\n  { left = position_to_pos position1;\n    right = position_to_pos position2\n  }\n\nlet at () =\n  positions_to_region (Parsing.symbol_start_pos ()) (Parsing.symbol_end_pos ())\nlet ati i =\n  positions_to_region (Parsing.rhs_start_pos i) (Parsing.rhs_end_pos i)\n\n\n(* Literals *)\n\nlet num f s =\n  try f s with Failure _ -> error s.at \"constant out of range\"\n\nlet nanop f nan =\n  let open Source in\n  let open Values in\n  match snd (f (\"0\" @@ no_region)) with\n  | F32 _ -> F32 nan.it @@ nan.at\n  | F64 _ -> F64 nan.it @@ nan.at\n  | I32 _ | I64 _ -> error nan.at \"NaN pattern with non-float type\"\n\nlet nat s at =\n  try\n    let n = int_of_string s in\n    if n >= 0 then n else raise (Failure \"\")\n  with Failure _ -> error at \"integer constant out of range\"\n\nlet nat32 s at =\n  try I32.of_string_u s with Failure _ -> error at \"i32 constant out of range\"\n\nlet name s at =\n  try Utf8.decode s with Utf8.Utf8 -> error at \"malformed UTF-8 encoding\"\n\n\n(* Symbolic variables *)\n\nmodule VarMap = Map.Make(String)\n\ntype space = {mutable map : int32 VarMap.t; mutable count : int32}\nlet empty () = {map = VarMap.empty; count = 0l}\n\ntype types = {space : space; mutable list : type_ list}\nlet empty_types () = {space = empty (); list = []}\n\ntype context =\n  { types : types; tables : space; memories : space;\n    funcs : space; locals : space; globals : space;\n    datas : space; elems : space;\n    labels : int32 VarMap.t; deferred_locals : (unit -> unit) list ref\n  }\n\nlet empty_context () =\n  { types = empty_types (); tables = empty (); memories = empty ();\n    funcs = empty (); locals = empty (); globals = empty ();\n    datas = empty (); elems = empty ();\n    labels = VarMap.empty; deferred_locals = ref []\n  }\n\nlet force_locals (c : context) =\n  List.fold_right Stdlib.(@@) !(c.deferred_locals) ();\n  c.deferred_locals := []\n\nlet enter_func (c : context) =\n  {c with labels = VarMap.empty; locals = empty ()}\n\nlet lookup category space x =\n  try VarMap.find x.it space.map\n  with Not_found -> error x.at (\"unknown \" ^ category ^ \" \" ^ x.it)\n\nlet type_ (c : context) x = lookup \"type\" c.types.space x\nlet func (c : context) x = lookup \"function\" c.funcs x\nlet local (c : context) x = force_locals c; lookup \"local\" c.locals x\nlet global (c : context) x = lookup \"global\" c.globals x\nlet table (c : context) x = lookup \"table\" c.tables x\nlet memory (c : context) x = lookup \"memory\" c.memories x\nlet elem (c : context) x = lookup \"elem segment\" c.elems x\nlet data (c : context) x = lookup \"data segment\" c.datas x\nlet label (c : context) x =\n  try VarMap.find x.it c.labels\n  with Not_found -> error x.at (\"unknown label \" ^ x.it)\n\nlet func_type (c : context) x =\n  try (Lib.List32.nth c.types.list x.it).it\n  with Failure _ -> error x.at (\"unknown type \" ^ Int32.to_string x.it)\n\n\nlet anon category space n =\n  let i = space.count in\n  space.count <- Int32.add i n;\n  if I32.lt_u space.count n then\n    error no_region (\"too many \" ^ category ^ \" bindings\");\n  i\n\nlet bind category space x =\n  let i = anon category space 1l in\n  if VarMap.mem x.it space.map then\n    error x.at (\"duplicate \" ^ category ^ \" \" ^ x.it);\n  space.map <- VarMap.add x.it i space.map;\n  i\n\nlet bind_type (c : context) x ty =\n  c.types.list <- c.types.list @ [ty];\n  bind \"type\" c.types.space x\nlet bind_func (c : context) x = bind \"function\" c.funcs x\nlet bind_local (c : context) x = force_locals c; bind \"local\" c.locals x\nlet bind_global (c : context) x = bind \"global\" c.globals x\nlet bind_table (c : context) x = bind \"table\" c.tables x\nlet bind_memory (c : context) x = bind \"memory\" c.memories x\nlet bind_elem (c : context) x = bind \"elem segment\" c.elems x\nlet bind_data (c : context) x = bind \"data segment\" c.datas x\nlet bind_label (c : context) x =\n  {c with labels = VarMap.add x.it 0l (VarMap.map (Int32.add 1l) c.labels)}\n\nlet anon_type (c : context) ty =\n  c.types.list <- c.types.list @ [ty];\n  anon \"type\" c.types.space 1l\nlet anon_func (c : context) = anon \"function\" c.funcs 1l\nlet anon_locals (c : context) lazy_ts =\n  let f () =\n    ignore (anon \"local\" c.locals (Lib.List32.length (Lazy.force lazy_ts)))\n  in c.deferred_locals := f :: !(c.deferred_locals)\nlet anon_global (c : context) = anon \"global\" c.globals 1l\nlet anon_table (c : context) = anon \"table\" c.tables 1l\nlet anon_memory (c : context) = anon \"memory\" c.memories 1l\nlet anon_elem (c : context) = anon \"elem segment\" c.elems 1l\nlet anon_data (c : context) = anon \"data segment\" c.datas 1l\nlet anon_label (c : context) =\n  {c with labels = VarMap.map (Int32.add 1l) c.labels}\n\n\nlet inline_type (c : context) ft at =\n  match Lib.List.index_where (fun ty -> ty.it = ft) c.types.list with\n  | Some i -> Int32.of_int i @@ at\n  | None -> anon_type c (ft @@ at) @@ at\n\nlet inline_type_explicit (c : context) x ft at =\n  if ft = FuncType ([], []) then\n    (* Laziness ensures that type lookup is only triggered when\n       symbolic identifiers are used, and not for desugared functions *)\n    anon_locals c (lazy (let FuncType (ts, _) = func_type c x in ts))\n  else if ft <> func_type c x then\n    error at \"inline function type does not match explicit type\";\n  x\n\n%}\n\n%token LPAR RPAR\n%token NAT INT FLOAT STRING VAR\n%token NUM_TYPE FUNCREF EXTERNREF EXTERN MUT\n%token UNREACHABLE NOP DROP SELECT\n%token BLOCK END IF THEN ELSE LOOP BR BR_IF BR_TABLE\n%token CALL CALL_INDIRECT RETURN\n%token LOCAL_GET LOCAL_SET LOCAL_TEE GLOBAL_GET GLOBAL_SET\n%token TABLE_GET TABLE_SET\n%token TABLE_SIZE TABLE_GROW TABLE_FILL TABLE_COPY TABLE_INIT ELEM_DROP\n%token MEMORY_SIZE MEMORY_GROW MEMORY_FILL MEMORY_COPY MEMORY_INIT DATA_DROP\n%token LOAD STORE OFFSET_EQ_NAT ALIGN_EQ_NAT\n%token CONST UNARY BINARY TEST COMPARE CONVERT\n%token REF_NULL REF_FUNC REF_EXTERN REF_IS_NULL\n%token FUNC START TYPE PARAM RESULT LOCAL GLOBAL\n%token TABLE ELEM MEMORY DATA DECLARE OFFSET ITEM IMPORT EXPORT\n%token MODULE BIN QUOTE\n%token SCRIPT REGISTER INVOKE GET\n%token ASSERT_MALFORMED ASSERT_INVALID ASSERT_SOFT_INVALID ASSERT_UNLINKABLE\n%token ASSERT_RETURN ASSERT_TRAP ASSERT_EXHAUSTION\n%token NAN\n%token INPUT OUTPUT\n%token EOF\n\n%token<string> NAT\n%token<string> INT\n%token<string> FLOAT\n%token<string> STRING\n%token<string> VAR\n%token<Types.num_type> NUM_TYPE\n%token<string Source.phrase -> Ast.instr' * Values.num> CONST\n%token<Ast.instr'> UNARY\n%token<Ast.instr'> BINARY\n%token<Ast.instr'> TEST\n%token<Ast.instr'> COMPARE\n%token<Ast.instr'> CONVERT\n%token<int option -> Memory.offset -> Ast.instr'> LOAD\n%token<int option -> Memory.offset -> Ast.instr'> STORE\n%token<string> OFFSET_EQ_NAT\n%token<string> ALIGN_EQ_NAT\n\n%token<Script.nan> NAN\n\n%nonassoc LOW\n%nonassoc VAR\n\n%start script script1 module1\n%type<Script.script> script\n%type<Script.script> script1\n%type<Script.var option * Script.definition> module1\n\n%%\n\n/* Auxiliaries */\n\nname :\n  | STRING { name $1 (at ()) }\n\nstring_list :\n  | /* empty */ { \"\" }\n  | string_list STRING { $1 ^ $2 }\n\n\n/* Types */\n\nref_kind :\n  | FUNC { FuncRefType }\n  | EXTERN { ExternRefType }\n\nref_type :\n  | FUNCREF { FuncRefType }\n  | EXTERNREF { ExternRefType }\n\nvalue_type :\n  | NUM_TYPE { NumType $1 }\n  | ref_type { RefType $1 }\n\nvalue_type_list :\n  | /* empty */ { [] }\n  | value_type value_type_list { $1 :: $2 }\n\nglobal_type :\n  | value_type { GlobalType ($1, Immutable) }\n  | LPAR MUT value_type RPAR { GlobalType ($3, Mutable) }\n\ndef_type :\n  | LPAR FUNC func_type RPAR { $3 }\n\nfunc_type :\n  | /* empty */\n    { FuncType ([], []) }\n  | LPAR RESULT value_type_list RPAR func_type\n    { let FuncType (ins, out) = $5 in\n      if ins <> [] then error (at ()) \"result before parameter\";\n      FuncType (ins, $3 @ out) }\n  | LPAR PARAM value_type_list RPAR func_type\n    { let FuncType (ins, out) = $5 in FuncType ($3 @ ins, out) }\n  | LPAR PARAM bind_var value_type RPAR func_type  /* Sugar */\n    { let FuncType (ins, out) = $6 in FuncType ($4 :: ins, out) }\n\ntable_type :\n  | limits ref_type { TableType ($1, $2) }\n\nmemory_type :\n  | limits { MemoryType $1 }\n\nlimits :\n  | NAT { {min = nat32 $1 (ati 1); max = None} }\n  | NAT NAT { {min = nat32 $1 (ati 1); max = Some (nat32 $2 (ati 2))} }\n\ntype_use :\n  | LPAR TYPE var RPAR { $3 }\n\n\n/* Immediates */\n\nnum :\n  | NAT { $1 @@ at () }\n  | INT { $1 @@ at () }\n  | FLOAT { $1 @@ at () }\n\nvar :\n  | NAT { let at = at () in fun c lookup -> nat32 $1 at @@ at }\n  | VAR { let at = at () in fun c lookup -> lookup c ($1 @@ at) @@ at }\n\nvar_list :\n  | /* empty */ { fun c lookup -> [] }\n  | var var_list { fun c lookup -> $1 c lookup :: $2 c lookup }\n\nbind_var_opt :\n  | /* empty */ { fun c anon bind -> anon c }\n  | bind_var { fun c anon bind -> bind c $1 }  /* Sugar */\n\nbind_var :\n  | VAR { $1 @@ at () }\n\nlabeling_opt :\n  | /* empty */ %prec LOW\n    { fun c xs ->\n      List.iter (fun x -> error x.at \"mismatching label\") xs;\n      anon_label c }\n  | bind_var\n    { fun c xs ->\n      List.iter\n        (fun x -> if x.it <> $1.it then error x.at \"mismatching label\") xs;\n      bind_label c $1 }\n\nlabeling_end_opt :\n  | /* empty */ %prec LOW { [] }\n  | bind_var { [$1] }\n\noffset_opt :\n  | /* empty */ { 0l }\n  | OFFSET_EQ_NAT { nat32 $1 (at ()) }\n\nalign_opt :\n  | /* empty */ { None }\n  | ALIGN_EQ_NAT\n    { let n = nat $1 (at ()) in\n      if not (Lib.Int.is_power_of_two n) then\n        error (at ()) \"alignment must be a power of two\";\n      Some (Lib.Int.log2 n) }\n\n\n/* Instructions & Expressions */\n\ninstr :\n  | plain_instr { let at = at () in fun c -> [$1 c @@ at] }\n  | select_instr_instr { fun c -> let e, es = $1 c in e :: es }\n  | call_instr_instr { fun c -> let e, es = $1 c in e :: es }\n  | block_instr { let at = at () in fun c -> [$1 c @@ at] }\n  | expr { $1 } /* Sugar */\n\nplain_instr :\n  | UNREACHABLE { fun c -> unreachable }\n  | NOP { fun c -> nop }\n  | DROP { fun c -> drop }\n  | BR var { fun c -> br ($2 c label) }\n  | BR_IF var { fun c -> br_if ($2 c label) }\n  | BR_TABLE var var_list\n    { fun c -> let xs, x = Lib.List.split_last ($2 c label :: $3 c label) in\n      br_table xs x }\n  | RETURN { fun c -> return }\n  | CALL var { fun c -> call ($2 c func) }\n  | LOCAL_GET var { fun c -> local_get ($2 c local) }\n  | LOCAL_SET var { fun c -> local_set ($2 c local) }\n  | LOCAL_TEE var { fun c -> local_tee ($2 c local) }\n  | GLOBAL_GET var { fun c -> global_get ($2 c global) }\n  | GLOBAL_SET var { fun c -> global_set ($2 c global) }\n  | TABLE_GET var { fun c -> table_get ($2 c table) }\n  | TABLE_SET var { fun c -> table_set ($2 c table) }\n  | TABLE_SIZE var { fun c -> table_size ($2 c table) }\n  | TABLE_GROW var { fun c -> table_grow ($2 c table) }\n  | TABLE_FILL var { fun c -> table_fill ($2 c table) }\n  | TABLE_COPY var var { fun c -> table_copy ($2 c table) ($3 c table) }\n  | TABLE_INIT var var { fun c -> table_init ($2 c table) ($3 c elem) }\n  | TABLE_GET { let at = at () in fun c -> table_get (0l @@ at) }  /* Sugar */\n  | TABLE_SET { let at = at () in fun c -> table_set (0l @@ at) }  /* Sugar */\n  | TABLE_SIZE { let at = at () in fun c -> table_size (0l @@ at) }  /* Sugar */\n  | TABLE_GROW { let at = at () in fun c -> table_grow (0l @@ at) }  /* Sugar */\n  | TABLE_FILL { let at = at () in fun c -> table_fill (0l @@ at) }  /* Sugar */\n  | TABLE_COPY  /* Sugar */\n    { let at = at () in fun c -> table_copy (0l @@ at) (0l @@ at) }\n  | TABLE_INIT var  /* Sugar */\n    { let at = at () in fun c -> table_init (0l @@ at) ($2 c elem) }\n  | ELEM_DROP var { fun c -> elem_drop ($2 c elem) }\n  | LOAD offset_opt align_opt { fun c -> $1 $3 $2 }\n  | STORE offset_opt align_opt { fun c -> $1 $3 $2 }\n  | MEMORY_SIZE { fun c -> memory_size }\n  | MEMORY_GROW { fun c -> memory_grow }\n  | MEMORY_FILL { fun c -> memory_fill }\n  | MEMORY_COPY { fun c -> memory_copy }\n  | MEMORY_INIT var { fun c -> memory_init ($2 c data) }\n  | DATA_DROP var { fun c -> data_drop ($2 c data) }\n  | REF_NULL ref_kind { fun c -> ref_null $2 }\n  | REF_IS_NULL { fun c -> ref_is_null }\n  | REF_FUNC var { fun c -> ref_func ($2 c func) }\n  | CONST num { fun c -> fst (num $1 $2) }\n  | TEST { fun c -> $1 }\n  | COMPARE { fun c -> $1 }\n  | UNARY { fun c -> $1 }\n  | BINARY { fun c -> $1 }\n  | CONVERT { fun c -> $1 }\n\n\nselect_instr :\n  | SELECT select_instr_results\n    { let at = at () in fun c -> let b, ts = $2 in\n      select (if b then (Some ts) else None) @@ at }\n\nselect_instr_results :\n  | LPAR RESULT value_type_list RPAR select_instr_results\n    { let _, ts = $5 in true, $3 @ ts }\n  | /* empty */\n    { false, [] }\n\nselect_instr_instr :\n  | SELECT select_instr_results_instr\n    { let at1 = ati 1 in\n      fun c -> let b, ts, es = $2 c in\n      select (if b then (Some ts) else None) @@ at1, es }\n\nselect_instr_results_instr :\n  | LPAR RESULT value_type_list RPAR select_instr_results_instr\n    { fun c -> let _, ts, es = $5 c in true, $3 @ ts, es }\n  | instr\n    { fun c -> false, [], $1 c }\n\n\ncall_instr :\n  | CALL_INDIRECT var call_instr_type\n    { let at = at () in fun c -> call_indirect ($2 c table) ($3 c) @@ at }\n  | CALL_INDIRECT call_instr_type  /* Sugar */\n    { let at = at () in fun c -> call_indirect (0l @@ at) ($2 c) @@ at }\n\ncall_instr_type :\n  | type_use call_instr_params\n    { let at1 = ati 1 in\n      fun c ->\n      match $2 c with\n      | FuncType ([], []) -> $1 c type_\n      | ft -> inline_type_explicit c ($1 c type_) ft at1 }\n  | call_instr_params\n    { let at = at () in fun c -> inline_type c ($1 c) at }\n\ncall_instr_params :\n  | LPAR PARAM value_type_list RPAR call_instr_params\n    { fun c -> let FuncType (ts1, ts2) = $5 c in FuncType ($3 @ ts1, ts2) }\n  | call_instr_results\n    { fun c -> FuncType ([], $1 c) }\n\ncall_instr_results :\n  | LPAR RESULT value_type_list RPAR call_instr_results\n    { fun c -> $3 @ $5 c }\n  | /* empty */\n    { fun c -> [] }\n\n\ncall_instr_instr :\n  | CALL_INDIRECT var call_instr_type_instr\n    { let at1 = ati 1 in\n      fun c -> let x, es = $3 c in call_indirect ($2 c table) x @@ at1, es }\n  | CALL_INDIRECT call_instr_type_instr  /* Sugar */\n    { let at1 = ati 1 in\n      fun c -> let x, es = $2 c in call_indirect (0l @@ at1) x @@ at1, es }\n\ncall_instr_type_instr :\n  | type_use call_instr_params_instr\n    { let at1 = ati 1 in\n      fun c ->\n      match $2 c with\n      | FuncType ([], []), es -> $1 c type_, es\n      | ft, es -> inline_type_explicit c ($1 c type_) ft at1, es }\n  | call_instr_params_instr\n    { let at = at () in\n      fun c -> let ft, es = $1 c in inline_type c ft at, es }\n\ncall_instr_params_instr :\n  | LPAR PARAM value_type_list RPAR call_instr_params_instr\n    { fun c ->\n      let FuncType (ts1, ts2), es = $5 c in FuncType ($3 @ ts1, ts2), es }\n  | call_instr_results_instr\n    { fun c -> let ts, es = $1 c in FuncType ([], ts), es }\n\ncall_instr_results_instr :\n  | LPAR RESULT value_type_list RPAR call_instr_results_instr\n    { fun c -> let ts, es = $5 c in $3 @ ts, es }\n  | instr\n    { fun c -> [], $1 c }\n\n\nblock_instr :\n  | BLOCK labeling_opt block END labeling_end_opt\n    { fun c -> let c' = $2 c $5 in let bt, es = $3 c' in block bt es }\n  | LOOP labeling_opt block END labeling_end_opt\n    { fun c -> let c' = $2 c $5 in let bt, es = $3 c' in loop bt es }\n  | IF labeling_opt block END labeling_end_opt\n    { fun c -> let c' = $2 c $5 in let bt, es = $3 c' in if_ bt es [] }\n  | IF labeling_opt block ELSE labeling_end_opt instr_list END labeling_end_opt\n    { fun c -> let c' = $2 c ($5 @ $8) in\n      let ts, es1 = $3 c' in if_ ts es1 ($6 c') }\n\nblock :\n  | type_use block_param_body\n    { let at1 = ati 1 in\n      fun c ->\n      VarBlockType (inline_type_explicit c ($1 c type_) (fst $2) at1),\n      snd $2 c }\n  | block_param_body  /* Sugar */\n    { let at = at () in\n      fun c ->\n      let bt =\n        match fst $1 with\n        | FuncType ([], []) -> ValBlockType None\n        | FuncType ([], [t]) -> ValBlockType (Some t)\n        | ft ->  VarBlockType (inline_type c ft at)\n      in bt, snd $1 c }\n\nblock_param_body :\n  | block_result_body { $1 }\n  | LPAR PARAM value_type_list RPAR block_param_body\n    { let FuncType (ins, out) = fst $5 in\n      FuncType ($3 @ ins, out), snd $5 }\n\nblock_result_body :\n  | instr_list { FuncType ([], []), $1 }\n  | LPAR RESULT value_type_list RPAR block_result_body\n    { let FuncType (ins, out) = fst $5 in\n      FuncType (ins, $3 @ out), snd $5 }\n\n\nexpr :  /* Sugar */\n  | LPAR expr1 RPAR\n    { let at = at () in fun c -> let es, e' = $2 c in es @ [e' @@ at] }\n\nexpr1 :  /* Sugar */\n  | plain_instr expr_list { fun c -> $2 c, $1 c }\n  | SELECT select_expr_results\n    { fun c -> let b, ts, es = $2 c in es, select (if b then (Some ts) else None) }\n  | CALL_INDIRECT var call_expr_type\n    { fun c -> let x, es = $3 c in es, call_indirect ($2 c table) x }\n  | CALL_INDIRECT call_expr_type  /* Sugar */\n    { let at1 = ati 1 in\n      fun c -> let x, es = $2 c in es, call_indirect (0l @@ at1) x }\n  | BLOCK labeling_opt block\n    { fun c -> let c' = $2 c [] in let bt, es = $3 c' in [], block bt es }\n  | LOOP labeling_opt block\n    { fun c -> let c' = $2 c [] in let bt, es = $3 c' in [], loop bt es }\n  | IF labeling_opt if_block\n    { fun c -> let c' = $2 c [] in\n      let bt, (es, es1, es2) = $3 c c' in es, if_ bt es1 es2 }\n\nselect_expr_results :\n  | LPAR RESULT value_type_list RPAR select_expr_results\n    { fun c -> let _, ts, es = $5 c in true, $3 @ ts, es }\n  | expr_list\n    { fun c -> false, [], $1 c }\n\ncall_expr_type :\n  | type_use call_expr_params\n    { let at1 = ati 1 in\n      fun c ->\n      match $2 c with\n      | FuncType ([], []), es -> $1 c type_, es\n      | ft, es -> inline_type_explicit c ($1 c type_) ft at1, es }\n  | call_expr_params\n    { let at1 = ati 1 in\n      fun c -> let ft, es = $1 c in inline_type c ft at1, es }\n\ncall_expr_params :\n  | LPAR PARAM value_type_list RPAR call_expr_params\n    { fun c ->\n      let FuncType (ts1, ts2), es = $5 c in FuncType ($3 @ ts1, ts2), es }\n  | call_expr_results\n    { fun c -> let ts, es = $1 c in FuncType ([], ts), es }\n\ncall_expr_results :\n  | LPAR RESULT value_type_list RPAR call_expr_results\n    { fun c -> let ts, es = $5 c in $3 @ ts, es }\n  | expr_list\n    { fun c -> [], $1 c }\n\n\nif_block :\n  | type_use if_block_param_body\n    { let at = at () in\n      fun c c' ->\n      VarBlockType (inline_type_explicit c ($1 c type_) (fst $2) at),\n      snd $2 c c' }\n  | if_block_param_body  /* Sugar */\n    { let at = at () in\n      fun c c' ->\n      let bt =\n        match fst $1 with\n        | FuncType ([], []) -> ValBlockType None\n        | FuncType ([], [t]) -> ValBlockType (Some t)\n        | ft ->  VarBlockType (inline_type c ft at)\n      in bt, snd $1 c c' }\n\nif_block_param_body :\n  | if_block_result_body { $1 }\n  | LPAR PARAM value_type_list RPAR if_block_param_body\n    { let FuncType (ins, out) = fst $5 in\n      FuncType ($3 @ ins, out), snd $5 }\n\nif_block_result_body :\n  | if_ { FuncType ([], []), $1 }\n  | LPAR RESULT value_type_list RPAR if_block_result_body\n    { let FuncType (ins, out) = fst $5 in\n      FuncType (ins, $3 @ out), snd $5 }\n\nif_ :\n  | expr if_\n    { fun c c' -> let es = $1 c in let es0, es1, es2 = $2 c c' in\n      es @ es0, es1, es2 }\n  | LPAR THEN instr_list RPAR LPAR ELSE instr_list RPAR  /* Sugar */\n    { fun c c' -> [], $3 c', $7 c' }\n  | LPAR THEN instr_list RPAR  /* Sugar */\n    { fun c c' -> [], $3 c', [] }\n\ninstr_list :\n  | /* empty */ { fun c -> [] }\n  | select_instr { fun c -> [$1 c] }\n  | call_instr { fun c -> [$1 c] }\n  | instr instr_list { fun c -> $1 c @ $2 c }\n\nexpr_list :\n  | /* empty */ { fun c -> [] }\n  | expr expr_list { fun c -> $1 c @ $2 c }\n\nconst_expr :\n  | instr_list { let at = at () in fun c -> $1 c @@ at }\n\n\n/* Functions */\n\nfunc :\n  | LPAR FUNC bind_var_opt func_fields RPAR\n    { let at = at () in\n      fun c -> let x = $3 c anon_func bind_func @@ at in fun () -> $4 c x at }\n\nfunc_fields :\n  | type_use func_fields_body\n    { fun c x at ->\n      let c' = enter_func c in\n      let y = inline_type_explicit c' ($1 c' type_) (fst $2) at in\n      [{(snd $2 c') with ftype = y} @@ at], [], [] }\n  | func_fields_body  /* Sugar */\n    { fun c x at ->\n      let c' = enter_func c in\n      let y = inline_type c' (fst $1) at in\n      [{(snd $1 c') with ftype = y} @@ at], [], [] }\n  | inline_import type_use func_fields_import  /* Sugar */\n    { fun c x at ->\n      let y = inline_type_explicit c ($2 c type_) $3 at in\n      [],\n      [{ module_name = fst $1; item_name = snd $1;\n         idesc = FuncImport y @@ at } @@ at ], [] }\n  | inline_import func_fields_import  /* Sugar */\n    { fun c x at ->\n      let y = inline_type c $2 at in\n      [],\n      [{ module_name = fst $1; item_name = snd $1;\n         idesc = FuncImport y @@ at } @@ at ], [] }\n  | inline_export func_fields  /* Sugar */\n    { fun c x at ->\n      let fns, ims, exs = $2 c x at in fns, ims, $1 (FuncExport x) c :: exs }\n\nfunc_fields_import :  /* Sugar */\n  | func_fields_import_result { $1 }\n  | LPAR PARAM value_type_list RPAR func_fields_import\n    { let FuncType (ins, out) = $5 in FuncType ($3 @ ins, out) }\n  | LPAR PARAM bind_var value_type RPAR func_fields_import  /* Sugar */\n    { let FuncType (ins, out) = $6 in FuncType ($4 :: ins, out) }\n\nfunc_fields_import_result :  /* Sugar */\n  | /* empty */ { FuncType ([], []) }\n  | LPAR RESULT value_type_list RPAR func_fields_import_result\n    { let FuncType (ins, out) = $5 in FuncType (ins, $3 @ out) }\n\nfunc_fields_body :\n  | func_result_body { $1 }\n  | LPAR PARAM value_type_list RPAR func_fields_body\n    { let FuncType (ins, out) = fst $5 in\n      FuncType ($3 @ ins, out),\n      fun c -> anon_locals c (lazy $3); snd $5 c }\n  | LPAR PARAM bind_var value_type RPAR func_fields_body  /* Sugar */\n    { let FuncType (ins, out) = fst $6 in\n      FuncType ($4 :: ins, out),\n      fun c -> ignore (bind_local c $3); snd $6 c }\n\nfunc_result_body :\n  | func_body { FuncType ([], []), $1 }\n  | LPAR RESULT value_type_list RPAR func_result_body\n    { let FuncType (ins, out) = fst $5 in\n      FuncType (ins, $3 @ out), snd $5 }\n\nfunc_body :\n  | instr_list\n    { fun c -> let c' = anon_label c in\n      {ftype = -1l @@ at(); locals = []; body = $1 c'} }\n  | LPAR LOCAL value_type_list RPAR func_body\n    { fun c -> anon_locals c (lazy $3); let f = $5 c in\n      {f with locals = $3 @ f.locals} }\n  | LPAR LOCAL bind_var value_type RPAR func_body  /* Sugar */\n    { fun c -> ignore (bind_local c $3); let f = $6 c in\n      {f with locals = $4 :: f.locals} }\n\n\n/* Tables, Memories & Globals */\n\ntable_use :\n  | LPAR TABLE var RPAR { fun c -> $3 c }\n\nmemory_use :\n  | LPAR MEMORY var RPAR { fun c -> $3 c }\n\noffset :\n  | LPAR OFFSET const_expr RPAR { $3 }\n  | expr { let at = at () in fun c -> $1 c @@ at }  /* Sugar */\n\nelem_kind :\n  | FUNC { FuncRefType }\n\nelem_expr :\n  | LPAR ITEM const_expr RPAR { $3 }\n  | expr { let at = at () in fun c -> $1 c @@ at }  /* Sugar */\n\nelem_expr_list :\n  | /* empty */ { fun c -> [] }\n  | elem_expr elem_expr_list { fun c -> $1 c :: $2 c }\n\nelem_var_list :\n  | var_list\n    { let f = function {at; _} as x -> [ref_func x @@ at] @@ at in\n      fun c lookup -> List.map f ($1 c lookup) }\n\nelem_list :\n  | elem_kind elem_var_list\n    { ($1, fun c -> $2 c func) }\n  | ref_type elem_expr_list\n    { ($1, fun c -> $2 c) }\n\n\nelem :\n  | LPAR ELEM bind_var_opt elem_list RPAR\n    { let at = at () in\n      fun c -> ignore ($3 c anon_elem bind_elem);\n      fun () ->\n      { etype = (fst $4); einit = (snd $4) c; emode = Passive @@ at } @@ at }\n  | LPAR ELEM bind_var_opt table_use offset elem_list RPAR\n    { let at = at () in\n      fun c -> ignore ($3 c anon_elem bind_elem);\n      fun () ->\n      { etype = (fst $6); einit = (snd $6) c;\n        emode = Active {index = $4 c table; offset = $5 c} @@ at } @@ at }\n  | LPAR ELEM bind_var_opt DECLARE elem_list RPAR\n    { let at = at () in\n      fun c -> ignore ($3 c anon_elem bind_elem);\n      fun () ->\n      { etype = (fst $5); einit = (snd $5) c; emode = Declarative @@ at } @@ at }\n  | LPAR ELEM bind_var_opt offset elem_list RPAR  /* Sugar */\n    { let at = at () in\n      fun c -> ignore ($3 c anon_elem bind_elem);\n      fun () ->\n      { etype = (fst $5); einit = (snd $5) c;\n        emode = Active {index = 0l @@ at; offset = $4 c} @@ at } @@ at }\n  | LPAR ELEM bind_var_opt offset elem_var_list RPAR  /* Sugar */\n    { let at = at () in\n      fun c -> ignore ($3 c anon_elem bind_elem);\n      fun () ->\n      { etype = FuncRefType; einit = $5 c func;\n        emode = Active {index = 0l @@ at; offset = $4 c} @@ at } @@ at }\n\ntable :\n  | LPAR TABLE bind_var_opt table_fields RPAR\n    { let at = at () in\n      fun c -> let x = $3 c anon_table bind_table @@ at in\n      fun () -> $4 c x at }\n\ntable_fields :\n  | table_type\n    { fun c x at -> [{ttype = $1} @@ at], [], [], [] }\n  | inline_import table_type  /* Sugar */\n    { fun c x at ->\n      [], [],\n      [{ module_name = fst $1; item_name = snd $1;\n        idesc = TableImport $2 @@ at } @@ at], [] }\n  | inline_export table_fields  /* Sugar */\n    { fun c x at -> let tabs, elems, ims, exs = $2 c x at in\n      tabs, elems, ims, $1 (TableExport x) c :: exs }\n  | ref_type LPAR ELEM elem_var_list RPAR  /* Sugar */\n    { fun c x at ->\n      let offset = [i32_const (0l @@ at) @@ at] @@ at in\n      let einit = $4 c func in\n      let size = Lib.List32.length einit in\n      let emode = Active {index = x; offset} @@ at in\n      [{ttype = TableType ({min = size; max = Some size}, $1)} @@ at],\n      [{etype = FuncRefType; einit; emode} @@ at],\n      [], [] }\n  | ref_type LPAR ELEM elem_expr elem_expr_list RPAR  /* Sugar */\n    { fun c x at ->\n      let offset = [i32_const (0l @@ at) @@ at] @@ at in\n      let einit = (fun c -> $4 c :: $5 c) c in\n      let size = Lib.List32.length einit in\n      let emode = Active {index = x; offset} @@ at in\n      [{ttype = TableType ({min = size; max = Some size}, $1)} @@ at],\n      [{etype = FuncRefType; einit; emode} @@ at],\n      [], [] }\n\ndata :\n  | LPAR DATA bind_var_opt string_list RPAR\n    { let at = at () in\n      fun c -> ignore ($3 c anon_data bind_data);\n      fun () -> {dinit = $4; dmode = Passive @@ at} @@ at }\n  | LPAR DATA bind_var_opt memory_use offset string_list RPAR\n    { let at = at () in\n      fun c -> ignore ($3 c anon_data bind_data);\n      fun () ->\n      {dinit = $6; dmode = Active {index = $4 c memory; offset = $5 c} @@ at} @@ at }\n  | LPAR DATA bind_var_opt offset string_list RPAR  /* Sugar */\n    { let at = at () in\n      fun c -> ignore ($3 c anon_data bind_data);\n      fun () ->\n      {dinit = $5; dmode = Active {index = 0l @@ at; offset = $4 c} @@ at} @@ at }\n\nmemory :\n  | LPAR MEMORY bind_var_opt memory_fields RPAR\n    { let at = at () in\n      fun c -> let x = $3 c anon_memory bind_memory @@ at in\n      fun () -> $4 c x at }\n\nmemory_fields :\n  | memory_type\n    { fun c x at -> [{mtype = $1} @@ at], [], [], [] }\n  | inline_import memory_type  /* Sugar */\n    { fun c x at ->\n      [], [],\n      [{ module_name = fst $1; item_name = snd $1;\n         idesc = MemoryImport $2 @@ at } @@ at], [] }\n  | inline_export memory_fields  /* Sugar */\n    { fun c x at -> let mems, data, ims, exs = $2 c x at in\n      mems, data, ims, $1 (MemoryExport x) c :: exs }\n  | LPAR DATA string_list RPAR  /* Sugar */\n    { fun c x at ->\n      let offset = [i32_const (0l @@ at) @@ at] @@ at in\n      let size = Int32.(div (add (of_int (String.length $3)) 65535l) 65536l) in\n      [{mtype = MemoryType {min = size; max = Some size}} @@ at],\n      [{dinit = $3; dmode = Active {index = x; offset} @@ at} @@ at],\n      [], [] }\n\nglobal :\n  | LPAR GLOBAL bind_var_opt global_fields RPAR\n    { let at = at () in\n      fun c -> let x = $3 c anon_global bind_global @@ at in\n      fun () -> $4 c x at }\n\nglobal_fields :\n  | global_type const_expr\n    { fun c x at -> [{gtype = $1; ginit = $2 c} @@ at], [], [] }\n  | inline_import global_type  /* Sugar */\n    { fun c x at ->\n      [],\n      [{ module_name = fst $1; item_name = snd $1;\n         idesc = GlobalImport $2 @@ at } @@ at], [] }\n  | inline_export global_fields  /* Sugar */\n    { fun c x at -> let globs, ims, exs = $2 c x at in\n      globs, ims, $1 (GlobalExport x) c :: exs }\n\n\n/* Imports & Exports */\n\nimport_desc :\n  | LPAR FUNC bind_var_opt type_use RPAR\n    { fun c -> ignore ($3 c anon_func bind_func);\n      fun () -> FuncImport ($4 c type_) }\n  | LPAR FUNC bind_var_opt func_type RPAR  /* Sugar */\n    { let at4 = ati 4 in\n      fun c -> ignore ($3 c anon_func bind_func);\n      fun () -> FuncImport (inline_type c $4 at4) }\n  | LPAR TABLE bind_var_opt table_type RPAR\n    { fun c -> ignore ($3 c anon_table bind_table);\n      fun () -> TableImport $4 }\n  | LPAR MEMORY bind_var_opt memory_type RPAR\n    { fun c -> ignore ($3 c anon_memory bind_memory);\n      fun () -> MemoryImport $4 }\n  | LPAR GLOBAL bind_var_opt global_type RPAR\n    { fun c -> ignore ($3 c anon_global bind_global);\n      fun () -> GlobalImport $4 }\n\nimport :\n  | LPAR IMPORT name name import_desc RPAR\n    { let at = at () and at5 = ati 5 in\n      fun c -> let df = $5 c in\n      fun () -> {module_name = $3; item_name = $4; idesc = df () @@ at5} @@ at }\n\ninline_import :\n  | LPAR IMPORT name name RPAR { $3, $4 }\n\nexport_desc :\n  | LPAR FUNC var RPAR { fun c -> FuncExport ($3 c func) }\n  | LPAR TABLE var RPAR { fun c -> TableExport ($3 c table) }\n  | LPAR MEMORY var RPAR { fun c -> MemoryExport ($3 c memory) }\n  | LPAR GLOBAL var RPAR { fun c -> GlobalExport ($3 c global) }\n\nexport :\n  | LPAR EXPORT name export_desc RPAR\n    { let at = at () and at4 = ati 4 in\n      fun c -> {name = $3; edesc = $4 c @@ at4} @@ at }\n\ninline_export :\n  | LPAR EXPORT name RPAR\n    { let at = at () in fun d c -> {name = $3; edesc = d @@ at} @@ at }\n\n\n/* Modules */\n\ntype_ :\n  | def_type { $1 @@ at () }\n\ntype_def :\n  | LPAR TYPE type_ RPAR\n    { fun c -> anon_type c $3 }\n  | LPAR TYPE bind_var type_ RPAR  /* Sugar */\n    { fun c -> bind_type c $3 $4 }\n\nstart :\n  | LPAR START var RPAR\n    { fun c -> $3 c func }\n\nmodule_fields :\n  | /* empty */\n    { fun (c : context) () -> {empty_module with types = c.types.list} }\n  | module_fields1 { $1 }\n\nmodule_fields1 :\n  | type_def module_fields\n    { fun c -> ignore ($1 c); $2 c }\n  | global module_fields\n    { fun c -> let gf = $1 c in let mf = $2 c in\n      fun () -> let globs, ims, exs = gf () in let m = mf () in\n      if globs <> [] && m.imports <> [] then\n        error (List.hd m.imports).at \"import after global definition\";\n      { m with globals = globs @ m.globals;\n        imports = ims @ m.imports; exports = exs @ m.exports } }\n  | table module_fields\n    { fun c -> let tf = $1 c in let mf = $2 c in\n      fun () -> let tabs, elems, ims, exs = tf () in let m = mf () in\n      if tabs <> [] && m.imports <> [] then\n        error (List.hd m.imports).at \"import after table definition\";\n      { m with tables = tabs @ m.tables; elems = elems @ m.elems;\n        imports = ims @ m.imports; exports = exs @ m.exports } }\n  | memory module_fields\n    { fun c -> let mmf = $1 c in let mf = $2 c in\n      fun () -> let mems, data, ims, exs = mmf () in let m = mf () in\n      if mems <> [] && m.imports <> [] then\n        error (List.hd m.imports).at \"import after memory definition\";\n      { m with memories = mems @ m.memories; datas = data @ m.datas;\n        imports = ims @ m.imports; exports = exs @ m.exports } }\n  | func module_fields\n    { fun c -> let ff = $1 c in let mf = $2 c in\n      fun () -> let funcs, ims, exs = ff () in let m = mf () in\n      if funcs <> [] && m.imports <> [] then\n        error (List.hd m.imports).at \"import after function definition\";\n      { m with funcs = funcs @ m.funcs;\n        imports = ims @ m.imports; exports = exs @ m.exports } }\n  | elem module_fields\n    { fun c -> let ef = $1 c in let mf = $2 c in\n      fun () -> let elems = ef () in let m = mf () in\n      {m with elems = elems :: m.elems} }\n  | data module_fields\n    { fun c -> let df = $1 c in let mf = $2 c in\n      fun () -> let data = df () in let m = mf () in\n      {m with datas = data :: m.datas} }\n  | start module_fields\n    { fun c -> let mf = $2 c in\n      fun () -> let m = mf () in let x = $1 c in\n      match m.start with\n      | Some _ -> error x.at \"multiple start sections\"\n      | None -> {m with start = Some x} }\n  | import module_fields\n    { fun c -> let imf = $1 c in let mf = $2 c in\n      fun () -> let im = imf () in let m = mf () in\n      {m with imports = im :: m.imports} }\n  | export module_fields\n    { fun c -> let mf = $2 c in\n      fun () -> let m = mf () in\n      {m with exports = $1 c :: m.exports} }\n\nmodule_var_opt :\n  | /* empty */ { None }\n  | VAR { Some ($1 @@ at ()) }  /* Sugar */\n\nmodule_ :\n  | LPAR MODULE module_var_opt module_fields RPAR\n    { $3, Textual ($4 (empty_context ()) () @@ at ()) @@ at () }\n\ninline_module :  /* Sugar */\n  | module_fields { Textual ($1 (empty_context ()) () @@ at ()) @@ at () }\n\ninline_module1 :  /* Sugar */\n  | module_fields1 { Textual ($1 (empty_context ()) () @@ at ()) @@ at () }\n\n\n/* Scripts */\n\nscript_var_opt :\n  | /* empty */ { None }\n  | VAR { Some ($1 @@ at ()) }  /* Sugar */\n\nscript_module :\n  | module_ { $1 }\n  | LPAR MODULE module_var_opt BIN string_list RPAR\n    { $3, Encoded (\"binary:\" ^ string_of_pos (at()).left, $5) @@ at() }\n  | LPAR MODULE module_var_opt QUOTE string_list RPAR\n    { $3, Quoted (\"quote:\" ^ string_of_pos (at()).left, $5) @@ at() }\n\naction :\n  | LPAR INVOKE module_var_opt name const_list RPAR\n    { Invoke ($3, $4, $5) @@ at () }\n  | LPAR GET module_var_opt name RPAR\n    { Get ($3, $4) @@ at() }\n\nassertion :\n  | LPAR ASSERT_MALFORMED script_module STRING RPAR\n    { AssertMalformed (snd $3, $4) @@ at () }\n  | LPAR ASSERT_INVALID script_module STRING RPAR\n    { AssertInvalid (snd $3, $4) @@ at () }\n  | LPAR ASSERT_UNLINKABLE script_module STRING RPAR\n    { AssertUnlinkable (snd $3, $4) @@ at () }\n  | LPAR ASSERT_TRAP script_module STRING RPAR\n    { AssertUninstantiable (snd $3, $4) @@ at () }\n  | LPAR ASSERT_RETURN action result_list RPAR { AssertReturn ($3, $4) @@ at () }\n  | LPAR ASSERT_TRAP action STRING RPAR { AssertTrap ($3, $4) @@ at () }\n  | LPAR ASSERT_EXHAUSTION action STRING RPAR { AssertExhaustion ($3, $4) @@ at () }\n\ncmd :\n  | action { Action $1 @@ at () }\n  | assertion { Assertion $1 @@ at () }\n  | script_module { Module (fst $1, snd $1) @@ at () }\n  | LPAR REGISTER name module_var_opt RPAR { Register ($3, $4) @@ at () }\n  | meta { Meta $1 @@ at () }\n\ncmd_list :\n  | /* empty */ { [] }\n  | cmd cmd_list { $1 :: $2 }\n\nmeta :\n  | LPAR SCRIPT script_var_opt cmd_list RPAR { Script ($3, $4) @@ at () }\n  | LPAR INPUT script_var_opt STRING RPAR { Input ($3, $4) @@ at () }\n  | LPAR OUTPUT script_var_opt STRING RPAR { Output ($3, Some $4) @@ at () }\n  | LPAR OUTPUT script_var_opt RPAR { Output ($3, None) @@ at () }\n\nconst :\n  | LPAR CONST num RPAR { Values.Num (snd (num $2 $3)) @@ at () }\n  | LPAR REF_NULL ref_kind RPAR { Values.Ref (Values.NullRef $3) @@ at () }\n  | LPAR REF_EXTERN NAT RPAR { Values.Ref (ExternRef (nat32 $3 (ati 3))) @@ at () }\n\nconst_list :\n  | /* empty */ { [] }\n  | const const_list { $1 :: $2 }\n\nresult :\n  | const { LitResult $1 @@ at () }\n  | LPAR CONST NAN RPAR { NanResult (nanop $2 ($3 @@ ati 3)) @@ at () }\n  | LPAR REF_FUNC RPAR { RefResult FuncRefType @@ at () }\n  | LPAR REF_EXTERN RPAR { RefResult ExternRefType @@ at () }\n\nresult_list :\n  | /* empty */ { [] }\n  | result result_list { $1 :: $2 }\n\nscript :\n  | cmd_list EOF { $1 }\n  | inline_module1 EOF { [Module (None, $1) @@ at ()] }  /* Sugar */\n\nscript1 :\n  | cmd { [$1] }\n\nmodule1 :\n  | module_ EOF { $1 }\n  | inline_module EOF { None, $1 }  /* Sugar */\n%%\n"
  },
  {
    "path": "interpreter/text/print.ml",
    "content": "let instr oc width e = Sexpr.output oc width (Arrange.instr e)\nlet func oc width f = Sexpr.output oc width (Arrange.func f)\nlet module_ oc width m = Sexpr.output oc width (Arrange.module_ m)\nlet script oc width mode s =\n  List.iter (Sexpr.output oc width) (Arrange.script mode s)\n"
  },
  {
    "path": "interpreter/text/print.mli",
    "content": "val instr : out_channel -> int -> Ast.instr -> unit\nval func : out_channel -> int -> Ast.func -> unit\nval module_ : out_channel -> int -> Ast.module_ -> unit\nval script : out_channel -> int -> [`Textual | `Binary] -> Script.script -> unit\n"
  },
  {
    "path": "interpreter/util/error.ml",
    "content": "module Make () =\nstruct\n  exception Error of Source.region * string\n\n  let warn at m = prerr_endline (Source.string_of_region at ^ \": warning: \" ^ m)\n  let error at m = raise (Error (at, m))\nend\n\n"
  },
  {
    "path": "interpreter/util/error.mli",
    "content": "module Make () :\nsig\n  exception Error of Source.region * string\n\n  val warn : Source.region -> string -> unit\n  val error : Source.region -> string -> 'a  (* raises Error *)\nend\n\n"
  },
  {
    "path": "interpreter/util/lib.ml",
    "content": "type void\n\nmodule Fun =\nstruct\n  let id x = x\n  let curry f x y = f (x, y)\n  let uncurry f (x, y) = f x y\n\n  let rec repeat n f x =\n    if n = 0 then () else (f x; repeat (n - 1) f x)\nend\n\nmodule Int =\nstruct\n  let log2 n =\n    if n <= 0 then failwith \"log2\";\n    let rec loop acc n = if n = 1 then acc else loop (acc + 1) (n lsr 1) in\n    loop 0 n\n\n  let is_power_of_two n =\n    if n < 0 then failwith \"is_power_of_two\";\n    n <> 0 && n land (n - 1) = 0\nend\n\nmodule String =\nstruct\n  let implode cs =\n    let buf = Buffer.create 80 in\n    List.iter (Buffer.add_char buf) cs;\n    Buffer.contents buf\n\n  let explode s =\n    let cs = ref [] in\n    for i = String.length s - 1 downto 0 do cs := s.[i] :: !cs done;\n    !cs\n\n  let split s c =\n    let len = String.length s in\n    let rec loop i =\n      if i > len then [] else\n      let j = try String.index_from s i c with Not_found -> len in\n      String.sub s i (j - i) :: loop (j + 1)\n    in loop 0\n\n  let breakup s n =\n    let rec loop i =\n      let len = min n (String.length s - i) in\n      if len = 0 then [] else String.sub s i len :: loop (i + len)\n    in loop 0\n\n  let rec find_from_opt f s i =\n    if i = String.length s then\n      None\n    else if f s.[i] then\n      Some i\n    else\n      find_from_opt f s (i + 1)\nend\n\nmodule List =\nstruct\n  let rec make n x = make' n x []\n  and make' n x xs =\n    if n = 0 then xs else make' (n - 1) x (x::xs)\n\n  let rec table n f = table' n f []\n  and table' n f xs =\n    if n = 0 then xs else table' (n - 1) f (f (n - 1) :: xs)\n\n  let rec take n xs =\n    match n, xs with\n    | 0, _ -> []\n    | n, x::xs' when n > 0 -> x :: take (n - 1) xs'\n    | _ -> failwith \"take\"\n\n  let rec drop n xs =\n    match n, xs with\n    | 0, _ -> xs\n    | n, _::xs' when n > 0 -> drop (n - 1) xs'\n    | _ -> failwith \"drop\"\n\n  let rec last = function\n    | x::[] -> x\n    | _::xs -> last xs\n    | [] -> failwith \"last\"\n\n  let rec split_last = function\n    | x::[] -> [], x\n    | x::xs -> let ys, y = split_last xs in x::ys, y\n    | [] -> failwith \"split_last\"\n\n  let rec index_where p xs = index_where' p xs 0\n  and index_where' p xs i =\n    match xs with\n    | [] -> None\n    | x::xs' when p x -> Some i\n    | x::xs' -> index_where' p xs' (i+1)\n\n  let index_of x = index_where ((=) x)\n\n  let rec map_filter f = function\n    | [] -> []\n    | x::xs ->\n      match f x with\n      | None -> map_filter f xs\n      | Some y -> y :: map_filter f xs\n\n  let rec concat_map f = function\n    | [] -> []\n    | x::xs -> f x @ concat_map f xs\nend\n\nmodule List32 =\nstruct\n  let rec make n x = make' n x []\n  and make' n x xs =\n    if n = 0l then xs else make' (Int32.sub n 1l) x (x::xs)\n\n  let rec length xs = length' xs 0l\n  and length' xs n =\n    match xs with\n    | [] -> n\n    | _::xs' when n < Int32.max_int -> length' xs' (Int32.add n 1l)\n    | _ -> failwith \"length\"\n\n  let rec nth xs n =\n    match n, xs with\n    | 0l, x::_ -> x\n    | n, _::xs' when n > 0l -> nth xs' (Int32.sub n 1l)\n    | _ -> failwith \"nth\"\n\n  let rec take n xs =\n    match n, xs with\n    | 0l, _ -> []\n    | n, x::xs' when n > 0l -> x :: take (Int32.sub n 1l) xs'\n    | _ -> failwith \"take\"\n\n  let rec drop n xs =\n    match n, xs with\n    | 0l, _ -> xs\n    | n, _::xs' when n > 0l -> drop (Int32.sub n 1l) xs'\n    | _ -> failwith \"drop\"\n\n  let rec mapi f xs = mapi' f 0l xs\n  and mapi' f i = function\n    | [] -> []\n    | x::xs -> f i x :: mapi' f (Int32.add i 1l) xs\nend\n\nmodule Array32 =\nstruct\n  let make n x =\n    if n < 0l || Int64.of_int32 n > Int64.of_int max_int then\n      raise (Invalid_argument \"Array32.make\");\n    Array.make (Int32.to_int n) x\n\n  let length a = Int32.of_int (Array.length a)\n\n  let index_of_int32 i =\n    if i < 0l || Int64.of_int32 i > Int64.of_int max_int then -1 else\n    Int32.to_int i\n\n  let get a i = Array.get a (index_of_int32 i)\n  let set a i x = Array.set a (index_of_int32 i) x\n  let blit a1 i1 a2 i2 n =\n    Array.blit a1 (index_of_int32 i1) a2 (index_of_int32 i2) (index_of_int32 n)\nend\n\nmodule Bigarray =\nstruct\n  open Bigarray\n\n  module Array1_64 =\n  struct\n    let create kind layout n =\n      if n < 0L || n > Int64.of_int max_int then\n        raise (Invalid_argument \"Bigarray.Array1_64.create\");\n      Array1.create kind layout (Int64.to_int n)\n\n    let dim a = Int64.of_int (Array1.dim a)\n\n    let index_of_int64 i =\n      if i < 0L || i > Int64.of_int max_int then -1 else\n      Int64.to_int i\n\n    let get a i = Array1.get a (index_of_int64 i)\n    let set a i x = Array1.set a (index_of_int64 i) x\n    let sub a i n = Array1.sub a (index_of_int64 i) (index_of_int64 n)\n  end\nend\n\nmodule Option =\nstruct\n  let get o x =\n    match o with\n    | Some y -> y\n    | None -> x\n\n  let force o =\n    match o with\n    | Some y -> y\n    | None -> raise (Invalid_argument \"Option.force\")\n\n  let map f = function\n    | Some x -> Some (f x)\n    | None -> None\n\n  let app f = function\n    | Some x -> f x\n    | None -> ()\nend\n"
  },
  {
    "path": "interpreter/util/lib.mli",
    "content": "(* Things that should be in the OCaml library... *)\n\ntype void\n\nmodule Fun :\nsig\n  val id : 'a -> 'a\n  val curry : ('a * 'b -> 'c) -> ('a -> 'b -> 'c)\n  val uncurry : ('a -> 'b -> 'c) -> ('a * 'b -> 'c)\n\n  val repeat : int -> ('a -> unit) -> 'a -> unit\nend\n\nmodule List :\nsig\n  val make : int -> 'a -> 'a list\n  val table : int -> (int -> 'a) -> 'a list\n  val take : int -> 'a list -> 'a list (* raises Failure *)\n  val drop : int -> 'a list -> 'a list (* raises Failure *)\n\n  val last : 'a list -> 'a (* raises Failure *)\n  val split_last : 'a list -> 'a list * 'a (* raises Failure *)\n\n  val index_of : 'a -> 'a list -> int option\n  val index_where : ('a -> bool) -> 'a list -> int option\n  val map_filter : ('a -> 'b option) -> 'a list -> 'b list\n  val concat_map : ('a -> 'b list) -> 'a list -> 'b list\nend\n\nmodule List32 :\nsig\n  val make : int32 -> 'a -> 'a list\n  val length : 'a list -> int32\n  val nth : 'a list -> int32 -> 'a (* raises Failure *)\n  val take : int32 -> 'a list -> 'a list (* raises Failure *)\n  val drop : int32 -> 'a list -> 'a list (* raises Failure *)\n  val mapi : (int32 -> 'a -> 'b) -> 'a list -> 'b list\nend\n\nmodule Array32 :\nsig\n  val make : int32 -> 'a -> 'a array\n  val length : 'a array -> int32\n  val get : 'a array -> int32 -> 'a\n  val set : 'a array -> int32 -> 'a -> unit\n  val blit : 'a array -> int32 -> 'a array -> int32 -> int32 -> unit\nend\n\nmodule Bigarray :\nsig\n  open Bigarray\n\n  module Array1_64 :\n  sig\n    val create : ('a, 'b) kind -> 'c layout -> int64 -> ('a, 'b, 'c) Array1.t\n    val dim : ('a, 'b, 'c) Array1.t -> int64\n    val get : ('a, 'b, 'c) Array1.t -> int64 -> 'a\n    val set : ('a, 'b, 'c) Array1.t -> int64 -> 'a -> unit\n    val sub : ('a, 'b, 'c) Array1.t -> int64 -> int64 -> ('a, 'b, 'c) Array1.t\n  end\nend\n\nmodule Option :\nsig\n  val get : 'a option -> 'a -> 'a\n  val force : 'a option -> 'a (* raises Invalid_argument *)\n  val map : ('a -> 'b) -> 'a option -> 'b option\n  val app : ('a -> unit) -> 'a option -> unit\nend\n\nmodule Int :\nsig\n  val log2 : int -> int\n  val is_power_of_two : int -> bool\nend\n\nmodule String :\nsig\n  val implode : char list -> string\n  val explode : string -> char list\n  val split : string -> char -> string list\n  val breakup : string -> int -> string list\n  val find_from_opt : (char -> bool) -> string -> int -> int option\nend\n"
  },
  {
    "path": "interpreter/util/sexpr.ml",
    "content": "type sexpr = Atom of string | Node of string * sexpr list\n\ntype rope = Leaf of string | Concat of rope list\nlet (^+) s r = Concat [Leaf s; r]\nlet (+^) r s = Concat [r; Leaf s]\n\nlet rec iter f = function\n  | Leaf s -> f s\n  | Concat rs -> List.iter (iter f) rs\n\nlet rec concat = function\n  | Leaf s -> s\n  | Concat rs -> String.concat \"\" (List.map concat rs)\n\nlet rec pp off width = function\n  | Atom s -> String.length s, Leaf s\n  | Node (s, xs) ->\n    let lens, rs = List.split (List.map (pp (off + 2) width) xs) in\n    let len = String.length s + List.length rs + List.fold_left (+) 2 lens in\n    let sep, fin =\n      if off + len <= width then \" \", \"\"\n      else let indent = String.make off ' ' in \"\\n  \" ^ indent, \"\\n\" ^ indent\n    in len, \"(\" ^+ s ^+ Concat (List.map (fun r -> sep ^+ r) rs) +^ fin +^ \")\"\n\nlet output oc width x =\n  iter (output_string oc) (snd (pp 0 width x));\n  output_string oc \"\\n\";\n  flush oc\n\nlet print = output stdout\n\nlet to_string width x = concat (snd (pp 0 width x)) ^ \"\\n\"\n"
  },
  {
    "path": "interpreter/util/sexpr.mli",
    "content": "type sexpr = Atom of string | Node of string * sexpr list\n\nval output : out_channel -> int -> sexpr -> unit\nval print : int -> sexpr -> unit\nval to_string : int -> sexpr -> string\n"
  },
  {
    "path": "interpreter/util/source.ml",
    "content": "type pos = {file : string; line : int; column : int}\ntype region = {left : pos; right : pos}\ntype 'a phrase = {at : region; it : 'a}\n\nlet (@@) x region = {it = x; at = region}\nlet at region x = x @@ region\n\n\n(* Positions and regions *)\n\nlet no_pos = {file = \"\"; line = 0; column = 0}\nlet no_region = {left = no_pos; right = no_pos}\n\nlet string_of_pos pos =\n  if pos.line = -1 then\n    Printf.sprintf \"0x%x\" pos.column\n  else\n    string_of_int pos.line ^ \".\" ^ string_of_int (pos.column + 1)\n\nlet string_of_region r =\n  r.left.file ^ \":\" ^ string_of_pos r.left ^\n  (if r.right = r.left then \"\" else \"-\" ^ string_of_pos r.right)\n"
  },
  {
    "path": "interpreter/util/source.mli",
    "content": "type pos = {file : string; line : int; column : int}\ntype region = {left : pos; right : pos}\ntype 'a phrase = {at : region; it : 'a}\n\nval no_pos : pos\nval no_region : region\n\nval string_of_pos : pos -> string\nval string_of_region : region -> string\n\nval (@@) : 'a -> region -> 'a phrase\nval at : region -> 'a -> 'a phrase\n"
  },
  {
    "path": "interpreter/valid/valid.ml",
    "content": "open Ast\nopen Source\nopen Types\n\n\n(* Errors *)\n\nmodule Invalid = Error.Make ()\nexception Invalid = Invalid.Error\n\nlet error = Invalid.error\nlet require b at s = if not b then error at s\n\n\n(* Context *)\n\ntype context =\n{\n  types : func_type list;\n  funcs : func_type list;\n  tables : table_type list;\n  memories : memory_type list;\n  globals : global_type list;\n  elems : ref_type list;\n  datas : unit list;\n  locals : value_type list;\n  results : value_type list;\n  labels : result_type list;\n  refs : Free.t;\n}\n\nlet empty_context =\n  { types = []; funcs = []; tables = []; memories = [];\n    globals = []; elems = []; datas = [];\n    locals = []; results = []; labels = [];\n    refs = Free.empty\n  }\n\nlet lookup category list x =\n  try Lib.List32.nth list x.it with Failure _ ->\n    error x.at (\"unknown \" ^ category ^ \" \" ^ I32.to_string_u x.it)\n\nlet type_ (c : context) x = lookup \"type\" c.types x\nlet func (c : context) x = lookup \"function\" c.funcs x\nlet table (c : context) x = lookup \"table\" c.tables x\nlet memory (c : context) x = lookup \"memory\" c.memories x\nlet global (c : context) x = lookup \"global\" c.globals x\nlet elem (c : context) x = lookup \"elem segment\" c.elems x\nlet data (c : context) x = lookup \"data segment\" c.datas x\nlet local (c : context) x = lookup \"local\" c.locals x\nlet label (c : context) x = lookup \"label\" c.labels x\n\nlet refer category (s : Free.Set.t) x =\n  if not (Free.Set.mem x.it s) then\n    error x.at\n      (\"undeclared \" ^ category ^ \" reference \" ^ Int32.to_string x.it)\n\nlet refer_func (c : context) x = refer \"function\" c.refs.Free.funcs x\n\n\n(* Stack typing *)\n\n(*\n * Note: The declarative typing rules are non-deterministic, that is, they\n * have the liberty to locally \"guess\" the right types implied by the context.\n * In the algorithmic formulation required here, stack types are hence modelled\n * as lists of _options_ of types, where `None` represents a locally\n * unknown type. Furthermore, an ellipses flag represents arbitrary sequences\n * of unknown types, in order to handle stack polymorphism algorithmically.\n *)\n\ntype ellipses = NoEllipses | Ellipses\ntype infer_result_type = ellipses * value_type option list\ntype op_type = {ins : infer_result_type; outs : infer_result_type}\n\nlet known = List.map (fun t -> Some t)\nlet stack ts = (NoEllipses, known ts)\nlet (-~>) ts1 ts2 = {ins = NoEllipses, ts1; outs = NoEllipses, ts2}\nlet (-->) ts1 ts2 = {ins = NoEllipses, known ts1; outs = NoEllipses, known ts2}\nlet (-~>...) ts1 ts2 = {ins = Ellipses, ts1; outs = Ellipses, ts2}\nlet (-->...) ts1 ts2 = {ins = Ellipses, known ts1; outs = Ellipses, known ts2}\n\nlet string_of_infer_type t =\n  Lib.Option.get (Lib.Option.map string_of_value_type t) \"_\"\nlet string_of_infer_types ts =\n  \"[\" ^ String.concat \" \" (List.map string_of_infer_type ts) ^ \"]\"\n\nlet eq_ty t1 t2 = (t1 = t2 || t1 = None || t2 = None)\nlet check_stack ts1 ts2 at =\n  require (List.length ts1 = List.length ts2 && List.for_all2 eq_ty ts1 ts2) at\n    (\"type mismatch: instruction requires \" ^ string_of_infer_types ts1 ^\n     \" but stack has \" ^ string_of_infer_types ts2)\n\nlet pop (ell1, ts1) (ell2, ts2) at =\n  let n1 = List.length ts1 in\n  let n2 = List.length ts2 in\n  let n = min n1 n2 in\n  let n3 = if ell2 = Ellipses then (n1 - n) else 0 in\n  check_stack ts1 (Lib.List.make n3 None @ Lib.List.drop (n2 - n) ts2) at;\n  (ell2, if ell1 = Ellipses then [] else Lib.List.take (n2 - n) ts2)\n\nlet push (ell1, ts1) (ell2, ts2) =\n  assert (ell1 = NoEllipses || ts2 = []);\n  (if ell1 = Ellipses || ell2 = Ellipses then Ellipses else NoEllipses),\n  ts2 @ ts1\n\nlet peek i (ell, ts) =\n  try List.nth (List.rev ts) i with Failure _ -> None\n\n\n(* Type Synthesis *)\n\nlet type_num = Values.type_of_num\nlet type_unop = Values.type_of_num\nlet type_binop = Values.type_of_num\nlet type_testop = Values.type_of_num\nlet type_relop = Values.type_of_num\n\nlet type_cvtop at = function\n  | Values.I32 cvtop ->\n    let open I32Op in\n    (match cvtop with\n    | ExtendSI32 | ExtendUI32 -> error at \"invalid conversion\"\n    | WrapI64 -> I64Type\n    | TruncSF32 | TruncUF32 | TruncSatSF32 | TruncSatUF32\n    | ReinterpretFloat -> F32Type\n    | TruncSF64 | TruncUF64 | TruncSatSF64 | TruncSatUF64 -> F64Type\n    ), I32Type\n  | Values.I64 cvtop ->\n    let open I64Op in\n    (match cvtop with\n    | ExtendSI32 | ExtendUI32 -> I32Type\n    | WrapI64 -> error at \"invalid conversion\"\n    | TruncSF32 | TruncUF32 | TruncSatSF32 | TruncSatUF32 -> F32Type\n    | TruncSF64 | TruncUF64 | TruncSatSF64 | TruncSatUF64\n    | ReinterpretFloat -> F64Type\n    ), I64Type\n  | Values.F32 cvtop ->\n    let open F32Op in\n    (match cvtop with\n    | ConvertSI32 | ConvertUI32 | ReinterpretInt -> I32Type\n    | ConvertSI64 | ConvertUI64 -> I64Type\n    | PromoteF32 -> error at \"invalid conversion\"\n    | DemoteF64 -> F64Type\n    ), F32Type\n  | Values.F64 cvtop ->\n    let open F64Op in\n    (match cvtop with\n    | ConvertSI32 | ConvertUI32 -> I32Type\n    | ConvertSI64 | ConvertUI64 | ReinterpretInt -> I64Type\n    | PromoteF32 -> F32Type\n    | DemoteF64 -> error at \"invalid conversion\"\n    ), F64Type\n\n\n(* Expressions *)\n\nlet check_pack sz t at =\n  require (packed_size sz < size t) at \"invalid sign extension\"\n\nlet check_unop unop at =\n  match unop with\n  | Values.I32 (IntOp.ExtendS sz) | Values.I64 (IntOp.ExtendS sz) ->\n    check_pack sz (Values.type_of_num unop) at\n  | _ -> ()\n\nlet check_memop (c : context) (memop : 'a memop) get_sz at =\n  let _mt = memory c (0l @@ at) in\n  let size =\n    match get_sz memop.sz with\n    | None -> size memop.ty\n    | Some sz ->\n      check_pack sz memop.ty at;\n      packed_size sz\n  in\n  require (1 lsl memop.align <= size) at\n    \"alignment must not be larger than natural\"\n\n\n(*\n * Conventions:\n *   c  : context\n *   e  : instr\n *   es : instr list\n *   v  : value\n *   t  : value_type var\n *   ts : result_type\n *   x  : variable\n *\n * Note: To deal with the non-determinism in some of the declarative rules,\n * the function takes the current stack `s` as an additional argument, allowing\n * it to \"peek\" when it would otherwise have to guess an input type.\n *\n * Furthermore, stack-polymorphic types are given with the `-->...` operator:\n * a type `ts1 -->... ts2` expresses any type `(ts1' @ ts1) -> (ts2' @ ts2)`\n * where `ts1'` and `ts2'` would be chosen non-deterministically in the\n * declarative typing rules.\n *)\n\nlet check_block_type (c : context) (bt : block_type) : func_type =\n  match bt with\n  | VarBlockType x -> type_ c x\n  | ValBlockType None -> FuncType ([], [])\n  | ValBlockType (Some t) -> FuncType ([], [t])\n\nlet rec check_instr (c : context) (e : instr) (s : infer_result_type) : op_type =\n  match e.it with\n  | Unreachable ->\n    [] -->... []\n\n  | Nop ->\n    [] --> []\n\n  | Drop ->\n    [peek 0 s] -~> []\n\n  | Select None ->\n    let t = peek 1 s in\n    require (match t with None -> true | Some t -> is_num_type t) e.at\n      (\"type mismatch: instruction requires numeric type\" ^\n       \" but stack has \" ^ string_of_infer_type t);\n    [t; t; Some (NumType I32Type)] -~> [t]\n\n  | Select (Some ts) ->\n    require (List.length ts = 1) e.at \"invalid result arity other than 1 is not (yet) allowed\";\n    (ts @ ts @ [NumType I32Type]) --> ts\n\n  | Block (bt, es) ->\n    let FuncType (ts1, ts2) as ft = check_block_type c bt in\n    check_block {c with labels = ts2 :: c.labels} es ft e.at;\n    ts1 --> ts2\n\n  | Loop (bt, es) ->\n    let FuncType (ts1, ts2) as ft = check_block_type c bt in\n    check_block {c with labels = ts1 :: c.labels} es ft e.at;\n    ts1 --> ts2\n\n  | If (bt, es1, es2) ->\n    let FuncType (ts1, ts2) as ft = check_block_type c bt in\n    check_block {c with labels = ts2 :: c.labels} es1 ft e.at;\n    check_block {c with labels = ts2 :: c.labels} es2 ft e.at;\n    (ts1 @ [NumType I32Type]) --> ts2\n\n  | Br x ->\n    label c x -->... []\n\n  | BrIf x ->\n    (label c x @ [NumType I32Type]) --> label c x\n\n  | BrTable (xs, x) ->\n    let n = List.length (label c x) in\n    let ts = Lib.List.table n (fun i -> peek (n - i) s) in\n    check_stack ts (known (label c x)) x.at;\n    List.iter (fun x' -> check_stack ts (known (label c x')) x'.at) xs;\n    (ts @ [Some (NumType I32Type)]) -~>... []\n\n  | Return ->\n    c.results -->... []\n\n  | Call x ->\n    let FuncType (ts1, ts2) = func c x in\n    ts1 --> ts2\n\n  | CallIndirect (x, y) ->\n    let TableType (lim, t) = table c x in\n    let FuncType (ts1, ts2) = type_ c y in\n    require (t = FuncRefType) x.at\n      (\"type mismatch: instruction requires table of functions\" ^\n       \" but table has \" ^ string_of_ref_type t);\n    (ts1 @ [NumType I32Type]) --> ts2\n\n  | LocalGet x ->\n    [] --> [local c x]\n\n  | LocalSet x ->\n    [local c x] --> []\n\n  | LocalTee x ->\n    [local c x] --> [local c x]\n\n  | GlobalGet x ->\n    let GlobalType (t, _mut) = global c x in\n    [] --> [t]\n\n  | GlobalSet x ->\n    let GlobalType (t, mut) = global c x in\n    require (mut = Mutable) x.at \"global is immutable\";\n    [t] --> []\n\n  | TableGet x ->\n    let TableType (_lim, t) = table c x in\n    [NumType I32Type] --> [RefType t]\n\n  | TableSet x ->\n    let TableType (_lim, t) = table c x in\n    [NumType I32Type; RefType t] --> []\n\n  | TableSize x ->\n    let _tt = table c x in\n    [] --> [NumType I32Type]\n\n  | TableGrow x ->\n    let TableType (_lim, t) = table c x in\n    [RefType t; NumType I32Type] --> [NumType I32Type]\n\n  | TableFill x ->\n    let TableType (_lim, t) = table c x in\n    [NumType I32Type; RefType t; NumType I32Type] --> []\n\n  | TableCopy (x, y) ->\n    let TableType (_lim1, t1) = table c x in\n    let TableType (_lim2, t2) = table c y in\n    require (t1 = t2) x.at\n      (\"type mismatch: source element type \" ^ string_of_ref_type t1 ^\n       \" does not match destination element type \" ^ string_of_ref_type t2);\n    [NumType I32Type; NumType I32Type; NumType I32Type] --> []\n\n  | TableInit (x, y) ->\n    let TableType (_lim1, t1) = table c x in\n    let t2 = elem c y in\n    require (t1 = t2) x.at\n      (\"type mismatch: element segment's type \" ^ string_of_ref_type t1 ^\n       \" does not match table's element type \" ^ string_of_ref_type t2);\n    [NumType I32Type; NumType I32Type; NumType I32Type] --> []\n\n  | ElemDrop x ->\n    ignore (elem c x);\n    [] --> []\n\n  | Load memop ->\n    check_memop c memop (Lib.Option.map fst) e.at;\n    [NumType I32Type] --> [NumType memop.ty]\n\n  | Store memop ->\n    check_memop c memop (fun sz -> sz) e.at;\n    [NumType I32Type; NumType memop.ty] --> []\n\n  | MemorySize ->\n    let _mt = memory c (0l @@ e.at) in\n    [] --> [NumType I32Type]\n\n  | MemoryGrow ->\n    let _mt = memory c (0l @@ e.at) in\n    [NumType I32Type] --> [NumType I32Type]\n\n  | MemoryFill ->\n    ignore (memory c (0l @@ e.at));\n    [NumType I32Type; NumType I32Type; NumType I32Type] --> []\n\n  | MemoryCopy ->\n    ignore (memory c (0l @@ e.at));\n    [NumType I32Type; NumType I32Type; NumType I32Type] --> []\n\n  | MemoryInit x ->\n    ignore (memory c (0l @@ e.at));\n    ignore (data c x);\n    [NumType I32Type; NumType I32Type; NumType I32Type] --> []\n\n  | DataDrop x ->\n    ignore (data c x);\n    [] --> []\n\n  | RefNull t ->\n    [] --> [RefType t]\n\n  | RefIsNull ->\n    let t = peek 0 s in\n    require (match t with None -> true | Some t -> is_ref_type t) e.at\n      (\"type mismatch: instruction requires reference type\" ^\n       \" but stack has \" ^ string_of_infer_type t);\n    [t] -~> [Some (NumType I32Type)]\n\n  | RefFunc x ->\n    let _ft = func c x in\n    refer_func c x;\n    [] --> [RefType FuncRefType]\n\n  | Const v ->\n    let t = NumType (type_num v.it) in\n    [] --> [t]\n\n  | Test testop ->\n    let t = NumType (type_testop testop) in\n    [t] --> [NumType I32Type]\n\n  | Compare relop ->\n    let t = NumType (type_relop relop) in\n    [t; t] --> [NumType I32Type]\n\n  | Unary unop ->\n    check_unop unop e.at;\n    let t = NumType (type_unop unop) in\n    [t] --> [t]\n\n  | Binary binop ->\n    let t = NumType (type_binop binop) in\n    [t; t] --> [t]\n\n  | Convert cvtop ->\n    let t1, t2 = type_cvtop e.at cvtop in\n    [NumType t1] --> [NumType t2]\n\nand check_seq (c : context) (s : infer_result_type) (es : instr list)\n  : infer_result_type =\n  match es with\n  | [] ->\n    s\n\n  | _ ->\n    let es', e = Lib.List.split_last es in\n    let s' = check_seq c s es' in\n    let {ins; outs} = check_instr c e s' in\n    push outs (pop ins s' e.at)\n\nand check_block (c : context) (es : instr list) (ft : func_type) at =\n  let FuncType (ts1, ts2) = ft in\n  let s = check_seq c (stack ts1) es in\n  let s' = pop (stack ts2) s at in\n  require (snd s' = []) at\n    (\"type mismatch: block requires \" ^ string_of_result_type ts2 ^\n     \" but stack has \" ^ string_of_infer_types (snd s))\n\n\n(* Types *)\n\nlet check_limits {min; max} range at msg =\n  require (I32.le_u min range) at msg;\n  match max with\n  | None -> ()\n  | Some max ->\n    require (I32.le_u max range) at msg;\n    require (I32.le_u min max) at\n      \"size minimum must not be greater than maximum\"\n\nlet check_num_type (t : num_type) at =\n  ()\n\nlet check_ref_type (t : ref_type) at =\n  ()\n\nlet check_value_type (t : value_type) at =\n  match t with\n  | NumType t' -> check_num_type t' at\n  | RefType t' -> check_ref_type t' at\n\nlet check_func_type (ft : func_type) at =\n  let FuncType (ts1, ts2) = ft in\n  List.iter (fun t -> check_value_type t at) ts1;\n  List.iter (fun t -> check_value_type t at) ts2\n\nlet check_table_type (tt : table_type) at =\n  let TableType (lim, t) = tt in\n  check_limits lim 0xffff_ffffl at \"table size must be at most 2^32-1\";\n  check_ref_type t at\n\nlet check_memory_type (mt : memory_type) at =\n  let MemoryType lim = mt in\n  check_limits lim 0x1_0000l at\n    \"memory size must be at most 65536 pages (4GiB)\"\n\nlet check_global_type (gt : global_type) at =\n  let GlobalType (t, mut) = gt in\n  check_value_type t at\n\n\nlet check_type (t : type_) =\n  check_func_type t.it t.at\n\n\n(* Functions & Constants *)\n\n(*\n * Conventions:\n *   c : context\n *   m : module_\n *   f : func\n *   e : instr\n *   v : value\n *   t : value_type\n *   s : func_type\n *   x : variable\n *)\n\nlet check_func (c : context) (f : func) =\n  let {ftype; locals; body} = f.it in\n  let FuncType (ts1, ts2) = type_ c ftype in\n  let c' = {c with locals = ts1 @ locals; results = ts2; labels = [ts2]} in\n  check_block c' body (FuncType ([], ts2)) f.at\n\n\nlet is_const (c : context) (e : instr) =\n  match e.it with\n  | RefNull _\n  | RefFunc _\n  | Const _ -> true\n  | GlobalGet x -> let GlobalType (_, mut) = global c x in mut = Immutable\n  | _ -> false\n\nlet check_const (c : context) (const : const) (t : value_type) =\n  require (List.for_all (is_const c) const.it) const.at\n    \"constant expression required\";\n  check_block c const.it (FuncType ([], [t])) const.at\n\n\n(* Tables, Memories, & Globals *)\n\nlet check_table (c : context) (tab : table) =\n  let {ttype} = tab.it in\n  check_table_type ttype tab.at\n\nlet check_memory (c : context) (mem : memory) =\n  let {mtype} = mem.it in\n  check_memory_type mtype mem.at\n\nlet check_elem_mode (c : context) (t : ref_type) (mode : segment_mode) =\n  match mode.it with\n  | Passive -> ()\n  | Active {index; offset} ->\n    let TableType (_, et) = table c index in\n    require (t = et) mode.at\n      (\"type mismatch: element segment's type \" ^ string_of_ref_type t ^\n       \" does not match table's element type \" ^ string_of_ref_type et);\n    check_const c offset (NumType I32Type)\n  | Declarative -> ()\n\nlet check_elem (c : context) (seg : elem_segment) =\n  let {etype; einit; emode} = seg.it in\n  List.iter (fun const -> check_const c const (RefType etype)) einit;\n  check_elem_mode c etype emode\n\nlet check_data_mode (c : context) (mode : segment_mode) =\n  match mode.it with\n  | Passive -> ()\n  | Active {index; offset} ->\n    ignore (memory c index);\n    check_const c offset (NumType I32Type)\n  | Declarative -> assert false\n\nlet check_data (c : context) (seg : data_segment) =\n  let {dinit; dmode} = seg.it in\n  check_data_mode c dmode\n\nlet check_global (c : context) (glob : global) =\n  let {gtype; ginit} = glob.it in\n  let GlobalType (t, mut) = gtype in\n  check_const c ginit t\n\n\n(* Modules *)\n\nlet check_start (c : context) (start : var option) =\n  Lib.Option.app (fun x ->\n    require (func c x = FuncType ([], [])) x.at\n      \"start function must not have parameters or results\"\n  ) start\n\nlet check_import (im : import) (c : context) : context =\n  let {module_name = _; item_name = _; idesc} = im.it in\n  match idesc.it with\n  | FuncImport x ->\n    {c with funcs = type_ c x :: c.funcs}\n  | TableImport tt ->\n    check_table_type tt idesc.at;\n    {c with tables = tt :: c.tables}\n  | MemoryImport mt ->\n    check_memory_type mt idesc.at;\n    {c with memories = mt :: c.memories}\n  | GlobalImport gt ->\n    check_global_type gt idesc.at;\n    {c with globals = gt :: c.globals}\n\nmodule NameSet = Set.Make(struct type t = Ast.name let compare = compare end)\n\nlet check_export (c : context) (set : NameSet.t) (ex : export) : NameSet.t =\n  let {name; edesc} = ex.it in\n  (match edesc.it with\n  | FuncExport x -> ignore (func c x)\n  | TableExport x -> ignore (table c x)\n  | MemoryExport x -> ignore (memory c x)\n  | GlobalExport x -> ignore (global c x)\n  );\n  require (not (NameSet.mem name set)) ex.at \"duplicate export name\";\n  NameSet.add name set\n\nlet check_module (m : module_) =\n  let\n    { types; imports; tables; memories; globals; funcs; start; elems; datas;\n      exports } = m.it\n  in\n  let c0 =\n    List.fold_right check_import imports\n      { empty_context with\n        refs = Free.module_ ({m.it with funcs = []; start = None} @@ m.at);\n        types = List.map (fun ty -> ty.it) types;\n      }\n  in\n  let c1 =\n    { c0 with\n      funcs = c0.funcs @ List.map (fun f -> type_ c0 f.it.ftype) funcs;\n      tables = c0.tables @ List.map (fun tab -> tab.it.ttype) tables;\n      memories = c0.memories @ List.map (fun mem -> mem.it.mtype) memories;\n      elems = List.map (fun elem -> elem.it.etype) elems;\n      datas = List.map (fun _data -> ()) datas;\n    }\n  in\n  let c =\n    { c1 with globals = c1.globals @ List.map (fun g -> g.it.gtype) globals }\n  in\n  List.iter check_type types;\n  List.iter (check_global c1) globals;\n  List.iter (check_table c1) tables;\n  List.iter (check_memory c1) memories;\n  List.iter (check_elem c1) elems;\n  List.iter (check_data c1) datas;\n  List.iter (check_func c) funcs;\n  check_start c start;\n  ignore (List.fold_left (check_export c) NameSet.empty exports);\n  require (List.length c.memories <= 1) m.at\n    \"multiple memories are not allowed (yet)\"\n"
  },
  {
    "path": "interpreter/valid/valid.mli",
    "content": "exception Invalid of Source.region * string\n\nval check_module : Ast.module_ -> unit (* raises Invalid *)\n"
  },
  {
    "path": "interpreter/winmake.bat",
    "content": "rem Auto-generated from Makefile!\nset NAME=wasm\nif '%1' neq '' set NAME=%1\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/numeric_error.cmo exec/numeric_error.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/int.cmo exec/int.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I util -I main -I syntax -I text -I binary -I exec -I script -I runtime -I host -I valid -o util/lib.cmi util/lib.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/i32.cmo exec/i32.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/float.cmo exec/float.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I syntax -I main -I text -I binary -I exec -I script -I runtime -I util -I host -I valid -o syntax/types.cmo syntax/types.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/f32.cmo exec/f32.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/f64.cmo exec/f64.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/i64.cmo exec/i64.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I syntax -I main -I text -I binary -I exec -I script -I runtime -I util -I host -I valid -o syntax/values.cmo syntax/values.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I runtime -I main -I syntax -I text -I binary -I exec -I script -I util -I host -I valid -o runtime/memory.cmi runtime/memory.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I util -I main -I syntax -I text -I binary -I exec -I script -I runtime -I host -I valid -o util/source.cmi util/source.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I syntax -I main -I text -I binary -I exec -I script -I runtime -I util -I host -I valid -o syntax/ast.cmo syntax/ast.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I runtime -I main -I syntax -I text -I binary -I exec -I script -I util -I host -I valid -o runtime/func.cmi runtime/func.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I runtime -I main -I syntax -I text -I binary -I exec -I script -I util -I host -I valid -o runtime/global.cmi runtime/global.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I runtime -I main -I syntax -I text -I binary -I exec -I script -I util -I host -I valid -o runtime/table.cmi runtime/table.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I runtime -I main -I syntax -I text -I binary -I exec -I script -I util -I host -I valid -o runtime/instance.cmo runtime/instance.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/eval.cmi exec/eval.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I binary -I main -I syntax -I text -I exec -I script -I runtime -I util -I host -I valid -o binary/utf8.cmi binary/utf8.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I host -I main -I syntax -I text -I binary -I exec -I script -I runtime -I util -I valid -o host/env.cmo host/env.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I main -I syntax -I text -I binary -I exec -I script -I runtime -I util -I host -I valid -o main/flags.cmo main/flags.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I script -I main -I syntax -I text -I binary -I exec -I runtime -I util -I host -I valid -o script/import.cmi script/import.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I script -I main -I syntax -I text -I binary -I exec -I runtime -I util -I host -I valid -o script/run.cmi script/run.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I host -I main -I syntax -I text -I binary -I exec -I script -I runtime -I util -I valid -o host/spectest.cmo host/spectest.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I main -I syntax -I text -I binary -I exec -I script -I runtime -I util -I host -I valid -o main/main.cmo main/main.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I util -I main -I syntax -I text -I binary -I exec -I script -I runtime -I host -I valid -o util/error.cmi util/error.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I script -I main -I syntax -I text -I binary -I exec -I runtime -I util -I host -I valid -o script/script.cmo script/script.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I binary -I main -I syntax -I text -I exec -I script -I runtime -I util -I host -I valid -o binary/decode.cmi binary/decode.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I binary -I main -I syntax -I text -I exec -I script -I runtime -I util -I host -I valid -o binary/encode.cmi binary/encode.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I script -I main -I syntax -I text -I binary -I exec -I runtime -I util -I host -I valid -o script/js.cmi script/js.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I text -I main -I syntax -I binary -I exec -I script -I runtime -I util -I host -I valid -o text/parse.cmi text/parse.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I text -I main -I syntax -I binary -I exec -I script -I runtime -I util -I host -I valid -o text/print.cmi text/print.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I valid -I main -I syntax -I text -I binary -I exec -I script -I runtime -I util -I host -o valid/valid.cmi valid/valid.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I script -I main -I syntax -I text -I binary -I exec -I runtime -I util -I host -I valid -o script/import.cmo script/import.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I script -I main -I syntax -I text -I binary -I exec -I runtime -I util -I host -I valid -o script/run.cmo script/run.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I binary -I main -I syntax -I text -I exec -I script -I runtime -I util -I host -I valid -o binary/utf8.cmo binary/utf8.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/eval_numeric.cmi exec/eval_numeric.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/i64_convert.cmi exec/i64_convert.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/eval.cmo exec/eval.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I runtime -I main -I syntax -I text -I binary -I exec -I script -I util -I host -I valid -o runtime/func.cmo runtime/func.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I util -I main -I syntax -I text -I binary -I exec -I script -I runtime -I host -I valid -o util/source.cmo util/source.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/f32_convert.cmi exec/f32_convert.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/f64_convert.cmi exec/f64_convert.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/i32_convert.cmi exec/i32_convert.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I util -I main -I syntax -I text -I binary -I exec -I script -I runtime -I host -I valid -o util/error.cmo util/error.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/eval_numeric.cmo exec/eval_numeric.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I runtime -I main -I syntax -I text -I binary -I exec -I script -I util -I host -I valid -o runtime/global.cmo runtime/global.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/i64_convert.cmo exec/i64_convert.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I util -I main -I syntax -I text -I binary -I exec -I script -I runtime -I host -I valid -o util/lib.cmo util/lib.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I runtime -I main -I syntax -I text -I binary -I exec -I script -I util -I host -I valid -o runtime/memory.cmo runtime/memory.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I runtime -I main -I syntax -I text -I binary -I exec -I script -I util -I host -I valid -o runtime/table.cmo runtime/table.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/f32_convert.cmo exec/f32_convert.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/f64_convert.cmo exec/f64_convert.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I exec -I main -I syntax -I text -I binary -I script -I runtime -I util -I host -I valid -o exec/i32_convert.cmo exec/i32_convert.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I syntax -I main -I text -I binary -I exec -I script -I runtime -I util -I host -I valid -o syntax/operators.cmo syntax/operators.ml\nocamlyacc text/parser.mly\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I text -I main -I syntax -I binary -I exec -I script -I runtime -I util -I host -I valid -o text/parser.cmi text/parser.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I text -I main -I syntax -I binary -I exec -I script -I runtime -I util -I host -I valid -o text/lexer.cmi text/lexer.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I util -I main -I syntax -I text -I binary -I exec -I script -I runtime -I host -I valid -o util/sexpr.cmi util/sexpr.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I text -I main -I syntax -I binary -I exec -I script -I runtime -I util -I host -I valid -o text/arrange.cmi text/arrange.mli\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I binary -I main -I syntax -I text -I exec -I script -I runtime -I util -I host -I valid -o binary/decode.cmo binary/decode.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I binary -I main -I syntax -I text -I exec -I script -I runtime -I util -I host -I valid -o binary/encode.cmo binary/encode.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I script -I main -I syntax -I text -I binary -I exec -I runtime -I util -I host -I valid -o script/js.cmo script/js.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I text -I main -I syntax -I binary -I exec -I script -I runtime -I util -I host -I valid -o text/parse.cmo text/parse.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I text -I main -I syntax -I binary -I exec -I script -I runtime -I util -I host -I valid -o text/print.cmo text/print.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I valid -I main -I syntax -I text -I binary -I exec -I script -I runtime -I util -I host -o valid/valid.cmo valid/valid.ml\nocamllex.opt -q text/lexer.mll\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I text -I main -I syntax -I binary -I exec -I script -I runtime -I util -I host -I valid -o text/lexer.cmo text/lexer.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I text -I main -I syntax -I binary -I exec -I script -I runtime -I util -I host -I valid -o text/parser.cmo text/parser.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I text -I main -I syntax -I binary -I exec -I script -I runtime -I util -I host -I valid -o text/arrange.cmo text/arrange.ml\nocamlc.opt -c -w +a-3-4-27-42-44-45 -warn-error +a -I util -I main -I syntax -I text -I binary -I exec -I script -I runtime -I host -I valid -o util/sexpr.cmo util/sexpr.ml\nocamlc.opt bigarray.cma -I util -I binary -I exec -I syntax -I runtime -I host -I main -I script -I text -I valid util/lib.cmo binary/utf8.cmo exec/float.cmo exec/f32.cmo exec/f64.cmo exec/numeric_error.cmo exec/int.cmo exec/i32.cmo exec/i64.cmo exec/i32_convert.cmo exec/f32_convert.cmo exec/i64_convert.cmo exec/f64_convert.cmo syntax/types.cmo syntax/values.cmo runtime/memory.cmo util/source.cmo syntax/ast.cmo exec/eval_numeric.cmo runtime/func.cmo runtime/global.cmo runtime/table.cmo runtime/instance.cmo util/error.cmo exec/eval.cmo host/env.cmo host/spectest.cmo main/flags.cmo script/import.cmo binary/encode.cmo syntax/operators.cmo binary/decode.cmo script/script.cmo text/parser.cmo text/lexer.cmo text/parse.cmo script/js.cmo util/sexpr.cmo text/arrange.cmo text/print.cmo valid/valid.cmo script/run.cmo main/main.cmo -o main/main.byte\n"
  },
  {
    "path": "papers/LICENSE",
    "content": "This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.\n"
  },
  {
    "path": "papers/README.md",
    "content": "* [Bringing the Web up to Speed with WebAssembly](pldi2017.pdf)\n\n  Andreas Haas, Andreas Rossberg, Derek Schuff, Ben Titzer, Dan Gohman, Luke Wagner, Alon Zakai, JF Bastien, Michael Holman\n\n  ACM-SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2017)\n\n  *Describes the WebAssembly design, its formalisation, and initial implementations.*\n\n* [Weakening WebAssembly](oopsla2019.pdf)\n\n  Conrad Watt, Andreas Rossberg, Jean Pichon-Pharabod\n\n  ACM-SIGPLAN Conference on Object-Oriented Programming, Systems, Language and Architectures (OOSPLA 2019)\n\n  *Describes and formalises the extension of WebAssembly with threads and a suitable memory model.*\n"
  },
  {
    "path": "proposals/README.md",
    "content": "# Proposals\n\nThis directory contains overviews for post-MVP proposals that are included in this repository.\n"
  },
  {
    "path": "proposals/bulk-memory-operations/Overview.md",
    "content": "# Bulk Memory Operations and Conditional Segment Initialization\n\n## Motivation for Bulk Memory Operations\n\nSome people have mentioned that `memcpy` and `memmove` functions are hot\nwhen profiling some WebAssembly benchmarks. Some examples:\n\n- https://github.com/WebAssembly/design/issues/236#issuecomment-283279499\n\n> I've been looking at perf profiles for wasm unity benchmark a bit recently and see that some\n  of the hottest functions are doing memcpy or memset like things. If this is any indication of\n  normal wasm code patterns, I think we could see significant improvement with an intrinsic so\n  it may be worth prioritizing.\n\n- https://github.com/WebAssembly/design/issues/977#issue-204960079\n\n> In a number of game engines I've been optimizing and benchmarking, interestingly the performance\n  of memcpy() does show up relatively high in profiles. (~2%-5% of total execution time)\n\n### Bulk Memory Operations Prototype\n\nI implemented a prototype implementation of a `memory.copy` instruction in v8 which just calls out\nto v8's [`MemMove` function](https://cs.chromium.org/chromium/src/v8/src/utils.h?l=446). I compared\nthis to an implementation [generated by emscripten](https://gist.github.com/binji/c57dc945bba60985439ef8e5b574eee0) and currently used in the Unity demo. This implementation aligns then performs copies using `i32.load` and `i32.store`. I've also included performance achieved by unrolling this loop manually and increasing the size to `i64`.\n\nEach test copies `size` bytes from one address to another, non-overlapping. This is repeated `N` times. Each row copies a total of 1 Gib of data, and only touches 1 Mib of memory in the source and destination ranges.\n\nThis is the core loop:\n\n```javascript\n  let mask = Mib - 1;\n  let start = performance.now();\n  for (let i = 0; i < N; ++i) {\n    f(dst_base + dst, src_base + src, size);\n    dst = (dst + size) & mask;\n    src = (src + size) & mask;\n  }\n  let end = performance.now();\n```\n\nThe code for the benchmark can be found [here](https://gist.github.com/binji/b8e8bc0c0121235d9f1668bc447c7f8c).\nNote that this will not run properly without a WebAssembly implementation of `memory.copy`. For my tests, I\nhacked a version of v8 to replace any exported function called `memcpy` or `memmove` with a new function with\nthe following contents:\n\n```wasm\n(func (param $dst i32) (param $src i32) (param $size i32) (result i32)\n  local.get $dst\n  local.get $src\n  local.get $size\n  memory.copy\n  local.get $dst)\n```\n\nHere are the results on my machine (x86_64, 2.9GHz, L1 32k, L2 256k, L3 256k):\n\n| | intrinsic | i64 load/store x 4 | i64 load/store x 2 | i32 load/store x 2 | i32 load/store |\n| --- | --- | --- | --- | --- | --- |\n| size=32b, N=33554432 | 1.382 Gib/s | 1.565 Gib/s | 1.493 Gib/s | 1.275 Gib/s | 1.166 Gib/s |\n| size=64b, N=16777216 | 3.285 Gib/s | 2.669 Gib/s | 2.383 Gib/s | 1.861 Gib/s | 1.639 Gib/s |\n| size=128b, N=8388608 | 6.162 Gib/s | 3.993 Gib/s | 3.480 Gib/s | 2.433 Gib/s | 2.060 Gib/s |\n| size=256b, N=4194304 | 9.939 Gib/s | 5.323 Gib/s | 4.462 Gib/s | 2.724 Gib/s | 2.213 Gib/s |\n| size=512b, N=2097152 | 15.777 Gib/s | 6.377 Gib/s | 4.913 Gib/s | 3.231 Gib/s | 2.457 Gib/s |\n| size=1.0Kib, N=1048576 | 17.902 Gib/s | 7.010 Gib/s | 6.112 Gib/s | 3.568 Gib/s | 2.614 Gib/s |\n| size=2.0Kib, N=524288 | 19.870 Gib/s | 8.248 Gib/s | 6.915 Gib/s | 3.764 Gib/s | 2.699 Gib/s |\n| size=4.0Kib, N=262144 | 20.940 Gib/s | 9.145 Gib/s | 7.400 Gib/s | 3.871 Gib/s | 2.729 Gib/s |\n| size=8.0Kib, N=131072 | 21.162 Gib/s | 9.258 Gib/s | 7.672 Gib/s | 3.925 Gib/s | 2.763 Gib/s |\n| size=16.0Kib, N=65536 | 20.991 Gib/s | 9.758 Gib/s | 7.756 Gib/s | 3.945 Gib/s | 2.773 Gib/s |\n| size=32.0Kib, N=32768 | 22.504 Gib/s | 9.956 Gib/s | 7.861 Gib/s | 3.966 Gib/s | 2.780 Gib/s |\n| size=64.0Kib, N=16384 | 22.534 Gib/s | 10.088 Gib/s | 7.931 Gib/s | 3.974 Gib/s | 2.782 Gib/s |\n| size=128.0Kib, N=8192 | 29.728 Gib/s | 10.032 Gib/s | 7.934 Gib/s | 3.975 Gib/s | 2.782 Gib/s |\n| size=256.0Kib, N=4096 | 29.742 Gib/s | 10.116 Gib/s | 7.625 Gib/s | 3.886 Gib/s | 2.781 Gib/s |\n| size=512.0Kib, N=2048 | 29.994 Gib/s | 10.090 Gib/s | 7.627 Gib/s | 3.985 Gib/s | 2.785 Gib/s |\n| size=1.0Mib, N=1024 | 11.760 Gib/s | 10.091 Gib/s | 7.959 Gib/s | 3.989 Gib/s | 2.787 Gib/s |\n\n\n## Motivation for Conditional Segment Initialization\n\nUnder the current [threading proposal](https://github.com/WebAssembly/threads),\nto share a module between multiple agents, the module must be instantiated\nmultiple times: once per agent. Instantiation initializes linear memory with\nthe contents in the module's data segments. If the memory is shared between\nmultiple agents, it will be initialized multiple times, potentially overwriting\nstores that occurred after the previous initializations.\n\nFor example:\n\n```webassembly\n;; The module.\n(module\n  (memory (export \"memory\") 1)\n\n  ;; Some value used as a counter.\n  (data (i32.const 0) \"\\0\")\n\n  ;; Add one to the counter.\n  (func (export \"addOne\")\n    (i32.store8\n      (i32.const 0)\n      (i32.add\n        (i32.load8_u (i32.const 0))\n        (i32.const 1)))\n  )\n)\n```\n\n```javascript\n// main.js\nlet moduleBytes = ...;\n\nWebAssembly.instantiate(moduleBytes).then(\n  ({module, instance}) => {\n    // Increment our counter.\n    instance.exports.addOne();\n\n    // Spawn a new Worker.\n    let worker = new Worker('worker.js');\n\n    // Send the module to the new Worker.\n    worker.postMessage(module);\n  });\n\n// worker.js\n\nfunction onmessage(event) {\n  let module = event.data;\n\n  // Use the module to create another instance.\n  WebAssembly.instantiate(module).then(\n    (instance) => {\n      // Oops, our counter has been clobbered.\n    });\n}\n\n```\n\nThis can be worked around by storing the data segments in a separate module\nwhich is only instantiated once, then exporting this memory to be used by\nanother module that contains only code. This works, but it cumbersome since it\nrequires two modules where one should be enough.\n\n\n## Motivation for combining Bulk Memory Operations + Conditional Segment Initialization Proposals\n\nWhen [discussing the design of Conditional Segment Initialization](https://github.com/WebAssembly/threads/issues/62),\nwe found that programmatic memory initialization from a read-only data segment\n(via the `memory.init` instruction, described below) has similar behavior to the\nproposed instruction to copy memory regions from linear memory (`memory.copy`,\nalso described below.)\n\n## Design\n\nCopying between regions in linear memory or a table is accomplished with the\nnew `*.copy` instructions:\n\n* `memory.copy`: copy from one region of linear memory to another\n* `table.copy`: copy from one region of a table to another\n\nFilling a memory region can be accomplished with `memory.fill`:\n\n* `memory.fill`: fill a region of linear memory with a given byte value\n\nThe [binary format for the data\nsection](https://webassembly.github.io/spec/core/binary/modules.html#binary-datasec)\ncurrently has a collection of segments, each of which has a memory index, an\ninitializer expression for its offset, and its raw data.\n\nSince WebAssembly currently does not allow for multiple memories, the memory\nindex of each segment must be zero. We can repurpose this 32-bit integer as a\nflags field where new meaning is attached to nonzero values.\n\nWhen the low bit of the new flags field is `1`, this segment is _passive_. A\npassive segment will not be automatically copied into the memory or table on\ninstantiation, and must instead be applied manually using the following new\ninstructions:\n\n* `memory.init`: copy a region from a data segment\n* `table.init`: copy a region from an element segment\n\nA passive segment has no initializer expression, since it will be specified\nas an operand to `memory.init` or `table.init`.\n\nSegments can also be shrunk to size zero by using the following new instructions:\n\n* `data.drop`: discard the data in an data segment\n* `elem.drop`: discard the data in an element segment\n\nAn active segment is equivalent to a passive segment, but with an implicit\n`memory.init` followed by a `data.drop` (or `table.init` followed by a\n`elem.drop`) that is prepended to the module's start function.\n\nAdditionally, the reference-types proposal introduces the notion of a function\nreference (a function whose address is a program value).  To support this,\nelement segments can have several encodings, and can also be used to\nforward-declare functions whose address will be taken; see below.\n\nThe reference-types proposal also introduces the bulk instructions `table.fill`\nand `table.grow`, both of which take a function reference as an initializer\nargument.\n\n### Data segments\n\nThe meaning of the bits of the flag field (a `varuint32`) for data segments is:\n\n| Bit | Meaning                                        |\n| -   | -                                              |\n| 0   | 0=is active, 1=is passive                      |\n| 1   | if bit 0 clear: 0=memory 0, 1=has memory index |\n\nwhich yields this view, with the fields carried by each flag value:\n\n| Flags | Meaning                  | Memory index | Offset in memory | Count       | Payload |\n| -     | -                        | -            | -                | -           | -       |\n| 0     | Active                   |              | `init_expr`      | `varuint32` | `u8`*   |\n| 1     | Passive                  |              |                  | `varuint32` | `u8`*   |\n| 2     | Active with memory index | `varuint32`  | `init_expr`      | `varuint32` | `u8`*   |\n\nAll other flag values are illegal.  At present the memory index must be zero,\nbut the upcoming multi-memory proposal changes that.\n\n\n### Element segments\n\nThe meaning of the bits of the flag field (a `varuint32`) for element segments is:\n\n| Bit | Meaning                                          |\n| -   | -                                                |\n| 0   | 0=is active, 1=is passive                        |\n| 1   | if bit 0 clear: 0=table 0, 1=has table index     | \n|     | if bit 0 set: 0=active, 1=declared               |\n| 2   | 0=carries indicies; 1=carries elemexprs          |\n\nwhich yields this view, with the fields carried by each flag value:\n\n| Flag | Meaning                          | Table index | Offset in table | Encoding      | Count       | Payload      |\n| -    | -                                | -           | -               | -             | -           | -            |\n| 0    | Legacy active, funcref externval |             | `init_expr`     |               | `varuint32` | `idx`*       |\n| 1    | Passive, externval               |             |                 | `extern_kind` | `varuint32` | `idx`*       |\n| 2    | Active, externval                | `varuint32` | `init_expr`     | `extern_kind` | `varuint32` | `idx`*       |\n| 3    | Declared, externval              |             |                 | `extern_kind` | `varuint32` | `idx`*       |\n| 4    | Legacy active, funcref elemexpr  |             | `init_expr`     |               | `varuint32` | `elem_expr`* |\n| 5    | Passive, elemexpr                |             |                 | `elem_type`   | `varuint32` | `elem_expr`* |\n| 6    | Active, elemexpr                 | `varuint32` | `init_expr`     | `elem_type`   | `varuint32` | `elem_expr`* |\n| 7    | Declared, elemexpr               |             |                 | `elem_type`   | `varuint32` | `elem_expr`* |\n\nAll other flag values are illegal.  Note that the \"declared\" attribute\nis not used by this proposal, but is used by the reference-types\nproposal.\n\nThe `extern_kind` must be zero, signifying a function definition.  An `idx` is a\n`varuint32` that references an entity in the module, currently only its function\ntable.\n\nAt present the table index must be zero, but the reference-types\nproposal introduces a notion of multiple tables.\n\nAn `elem_expr` is like an `init_expr`, but can only contain expressions of the following sequences:\n\n| Binary                | Text                    | Description                                |\n| -                     | -                       | -                                          |\n| `0xd0 0x0b`           | `ref.null end`          | Returns a null reference                   |\n| `0xd2 varuint32 0x0b` | `ref.func $funcidx end` | Returns a reference to function `$funcidx` |\n\n### Segment Initialization\n\nIn the MVP, segments are initialized during module instantiation. If any segment\nwould be initialized out-of-bounds, then the memory or table instance is not\nmodified.\n\nThis behavior is changed in the bulk memory proposal:\n\nEach active segment is initialized in module-definition order. For\neach segment, if reading the source or writing the destination would\ngo out of bounds, then instantiation fails at that point.  Data that\nhad already been written for previous (in-bounds) segments stays\nwritten.\n\n### `memory.init` instruction\n\nThe `memory.init` instruction copies data from a given passive segment into a target\nmemory. The target memory and source segment are given as immediates.\n\nThe instruction has the signature `[i32 i32 i32] -> []`. The parameters are, in order:\n\n- top-2: destination address\n- top-1: offset into the source segment\n- top-0: size of memory region in bytes\n\nIt is a validation error to use `memory.init` with an out-of-bounds segment index.\n\nA trap occurs if:\n\n* the source offset plus size is greater than the length of the source data segment;\n  this includes the case that the segment has been dropped via `data.drop`\n* the destination offset plus size is greater than the length of the target memory\n\nThe order of writing is unspecified, though this is currently unobservable.\n\nNote that it is allowed to use `memory.init` on the same data segment more than\nonce.\n\n### `data.drop` instruction\n\nThe `data.drop` instruction shrinks the size of the segment to zero. After a\ndata segment has been dropped, it can still be used in a `memory.init`\ninstruction, but only a zero-length access at offset zero will not trap.  This\ninstruction is intended to be used as an optimization hint to the WebAssembly\nimplementation. After a memory segment is dropped its data can no longer be\nretrieved, so the memory used by this segment may be freed.\n\nIt is a validation error to use `data.drop` with an out-of-bounds segment index.\n\n### `memory.copy` instruction\n\nCopy data from a source memory region to destination region.  The\nregions are said to overlap if they are in the same memory and the\nstart address of one region is one of the addresses that's read or\nwritten (by the copy operation) in the other region.\n\nThis instruction has two immediate arguments: the source and\ndestination memory indices. They currently both must be zero.\n\nCopying takes place as if an intermediate buffer were used, allowing the\ndestination and source to overlap.\n\nThe instruction has the signature `[i32 i32 i32] -> []`. The parameters are, in order:\n\n- top-2: destination address\n- top-1: source address\n- top-0: size of memory region in bytes\n\nA trap occurs if:\n\n* the source offset plus size is greater than the length of the source memory   \n* the destination offset plus size is greater than the length of the target memory   \n\nThe bounds check is performed before any data are written.\n\n### `memory.fill` instruction\n\nSet all bytes in a memory region to a given byte. This instruction has an\nimmediate argument of which memory to operate on, and it must be zero for now.\n\nThe instruction has the signature `[i32 i32 i32] -> []`. The parameters are, in order:\n\n- top-2: destination address\n- top-1: byte value to set\n- top-0: size of memory region in bytes\n\nA trap occurs if:\n\n* the destination offset plus size is greater than the length of the target memory\n\nThe bounds check is performed before any data are written.\n\n\n### `table.init`, `elem.drop`, and `table.copy` instructions\n\nThe `table.*` instructions behave similary to the `memory.*` instructions, with\nthe difference that they operate on element segments and tables, instead of\ndata segments and memories. The offset and length operands of `table.init` and\n`table.copy` have element units instead of bytes as well.\n\n## Passive Segment Initialization Example\n\nConsider if there are two data sections, the first is always active and the\nsecond is conditionally active if global 0 has a non-zero value. This could be\nimplemented as follows:\n\n```webassembly\n(import \"a\" \"global\" (global i32))  ;; global 0\n(memory 1)\n(data (i32.const 0) \"hello\")   ;; data segment 0, is active so always copied\n(data passive \"goodbye\")       ;; data segment 1, is passive\n\n(func $start\n  (if (global.get 0)\n\n    ;; copy data segment 1 into memory 0 (the 0 is implicit)\n    (memory.init 1\n      (i32.const 16)    ;; target offset\n      (i32.const 0)     ;; source offset\n      (i32.const 7))    ;; length\n\n    ;; The memory used by this segment is no longer needed, so this segment can\n    ;; be dropped.\n    (data.drop 1))\n)\n```\n\n### Instruction encoding\n\nAll bulk memory instructions are encoded as a 0xfc prefix byte, followed by\nanother opcode, optionally followed by more immediates:\n\n```\ninstr ::= ...\n        | 0xfc operation:uint8 ...\n```\n\n| Name | Opcode | Immediate | Description |\n| ---- | ---- | ---- | ---- |\n| `memory.init` | `0xfc 0x08` | `segment:varuint32`, `memory:0x00` | copy from a passive data segment to linear memory |\n| `data.drop` | `0xfc 0x09` | `segment:varuint32` | prevent further use of passive data segment |\n| `memory.copy` | `0xfc 0x0a` | `memory_dst:0x00` `memory_src:0x00` | copy from one region of linear memory to another region |\n| `memory.fill` | `0xfc 0x0b` | `memory:0x00` | fill a region of linear memory with a given byte value |\n| `table.init` | `0xfc 0x0c` | `segment:varuint32`, `table:0x00` | copy from a passive element segment to a table |\n| `elem.drop` | `0xfc 0x0d` | `segment:varuint32` | prevent further use of a passive element segment |\n| `table.copy` | `0xfc 0x0e` | `table_dst:0x00` `table_src:0x00` | copy from one region of a table to another region |\n\n### `DataCount` section\n\nThe WebAssembly binary format is designed to be validated in a single pass. If\na section requires information to validate, it is guaranteed that this\ninformation will be present in a previous section.\n\nThe `memory.{init,drop}` instructions break this guarantee. Both of these\ninstructions are used in the `Code` section. They each have a data segment\nindex immediate, but the vector of data segments is not available until the\n`Data` section is parsed, which occurs after the `Code` section.\n\nTo keep single-pass validation, the number of data segments defined in the\n`Data` section must be available before the `Code` section. This information is\nprovided in a new `DataCount` section with the code `12`.\n\nLike all sections, the `DataCount` section is optional. If present, it must\nappear in the following order:\n\n| Section Name | Code | Description |\n| ------------ | ---- | ----------- |\n| Type | `1` | Function signature declarations |\n| Import | `2` | Import declarations |\n| Function | `3` | Function declarations |\n| Table | `4` | Indirect function table and other tables |\n| Memory | `5` | Memory attributes |\n| Global | `6` | Global declarations |\n| Export | `7` | Exports |\n| Start | `8` | Start function declaration |\n| Element | `9` | Elements section |\n| DataCount | `12` | Data segment count |\n| Code | `10` | Function bodies (code) |\n| Data | `11` | Data segments |\n\nThe `DataCount` section has just one field that specifies the number of data\nsegments in the `Data` section:\n\n| Field | Type | Description |\n| ----- | ---- | ----------- |\n| count | `varuint32` | count of data segments in `Data` section |\n\nThe binary is malformed if `count` is not equal to the number of data segments\nin the `Data` section. The binary is also malformed if the `DataCount` section\nis omitted and a `memory.init` or `data.drop` instruction is used.\n"
  },
  {
    "path": "proposals/multi-value/Overview.md",
    "content": "# Multi-value Extension\n\n## Introduction\n\n### Background\n\n* Currently, functions and instructions consume multiple operands but can produce at most one result\n  - functions: `value* -> value?`\n  - instructions: `value* -> value?`\n  - blocks: `[] -> value?`\n\n* In a stack machine, these asymmetries are artifical restrictions\n  - were imposed to simplify the initial WebAssembly release (multiple results deferred to post-MVP)\n  - can easily be lifted by generalising to value* -> value*\n\n* Generalised semantics is well-understood\n  - https://github.com/WebAssembly/spec/tree/master/papers/pldi2017.pdf\n\n* Semi-complete implementation of multiple results in V8\n\n\n### Motivation\n\n* Multiple return values for functions:\n  - enable unboxing of tuples or structs returned by value\n  - efficient compilation of multiple return values\n\n* Multiple results for instructions:\n  - enable instructions producing several results (divmod, arithmetics with carry)\n\n* Inputs to blocks:\n  - loop labels can have arguments\n  - can represent phis on backward edges\n  - enable future `pick` operator to cross block boundary\n  - macro definability of instructons with inputs\n    * `i32.select3` = `dup if ... else ... end`\n\n\n## Examples\n\n### Functions with multiple return Values\n\nA simple swap function.\n```wasm\n(func $swap (param i32 i32) (result i32 i32)\n\t(get_local 1) (get_local 0)\n)\n```\n\nAn addition function returning an additional carry bit.\n```wasm\n(func $add64_u_with_carry (param $i i64) (param $j i64) (param $c i32) (result i64 i32)\n\t(local $k i64)\n\t(set_local $k\n\t\t(i64.add (i64.add (get_local $i) (get_local $j)) (i64.extend_u/i32 (get_local $c)))\n\t)\n\t(return (get_local $k) (i64.lt_u (get_local $k) (get_local $i)))\n)\n```\n\n### Instructions with multiple results\n\n* `iNN.divrem` : \\[iNN iNN\\] -> \\[iNN iNN\\]\n* `iNN.add_carry` : \\[iNN iNN i32\\] -> \\[iNN i32\\]\n* `iNN.sub_carry` : \\[iNN iNN i32\\] -> \\[iNN i32\\]\n* etc.\n\n\n### Blocks with inputs\n\nConditionally manipulating a stack operand without using a local.\n```wasm\n(func $add64_u_saturated (param i64 i64) (result i64)\n\t($i64.add_u_carry (get_local 0) (get_local 1) (i32.const 0))\n\t(if (param i64) (result i64)\n\t\t(then (drop) (i64.const 0xffff_ffff_ffff_ffff))\n\t)\n)\n```\n\nAn iterative factorial function whose loop doesn't use locals, but uses arguments like phis.\n```wasm\n(func $fac (param i64) (result i64)\n\t(i64.const 1) (get_local 0)\n\t(loop $l (param i64 i64) (result i64)\n\t\t(pick 1) (pick 1) (i64.mul)\n\t\t(pick 1) (i64.const 1) (i64.sub)\n\t\t(pick 0) (i64.const 0) (i64.gt_u)\n\t\t(br_if $l)\n\t\t(pick 1) (return)\n\t)\n)\n```\n\nMacro definition of an instruction expanding into an `if`.\n```\ni64.select3  =\n     dup if (param i64 i64 i64 i32) (result i64) … select ... else … end\n```\n\nMacro expansion of `if` itself.\n```\nif (param t*) (result u*) A else B end  =\n      block (param t* i32) (result u*)\n          block (param t* i32) (result t*) (br_if 0)  B  (br 1) end  A\n      end\n```\n\n\n## Spec Changes\n\n### Structure\n\nThe structure of the language is mostly unaffected. The only changes are to the type syntax:\n\n* *resulttype* is generalised from \\[*valtype*?\\] to \\[*valtype*\\*\\]\n* block types (in `block`, `loop`, `if` instructions) are generalised from *resulttype* to *functype*\n\n\n### Validation\n\nArity restrictions are removed:\n\n* no arity check is imposed for valid *functype*\n* all occurrences of superscript \"?\" are replaced with superscript \"\\*\" (e.g. blocks, calls, return)\n\nValidation for block instructions is generalised:\n\n* The type of `block`, `loop`, and `if` is the *functype* \\[t1\\*\\] -> \\[t2\\*\\] given as the block type\n* The type of the label of `block` and `if` is \\[t2\\*\\]\n* The type of the label of `loop` is \\[t1\\*\\]\n\n\n### Execution\n\nNothing much needs to be done for multiple results:\n\n* replace all occurrences of superscript \"?\" with superscript \"\\*\".\n\nThe only non-mechanical change involves entering blocks with operands:\n\n* The operand values are popped of the stack, and pushed right back after the label.\n* See paper for formulation of formal reduction rules\n\n\n### Binary Format\n\nThe binary requires a change to allow function types as block types. That requires extending the current ad-hoc encoding to allow references to function types.\n\n* `blocktype` is extended to the following format:\n  ```\n  blocktype ::= 0x40       => [] -> []\n             |  t:valtype  => [] -> [t]\n             |  ft:typeidx => ft\n  ```\n\n### Text Format\n\nThe text format is mostly unaffected, except that the syntax for block types is generalised:\n\n* `resulttype` is replaced with `blocktype`, whose syntax is\n  ```\n  blocktype ::= vec(param) vec(result)\n  ```\n\n* `block`, `loop`, and `if` instructions contain a `blocktype` instead of `resulttype`.\n\n* The existing abbreviations for functions apply to block types.\n\n\n### Soundness Proof\n\nThe typing of administrative instructions need to be generalised, see the paper.\n\n\n## Possible Alternatives and Extensions\n\n### More Flexible Block and Function Types\n\n* Instead of inline function types, could use references to the type section\n  - more bureaucracy in the semantics, but otherwise no problem\n\n* Could also allow both\n  - inline function types are slightly more compact for one-off uses\n\n* Could even unify the encoding of block types with function types everywhere\n  - allow inline types even for functions, for the same benefits\n\n\n## Open Questions\n\n* Destructuring or reshuffling multiple values requires locals, is that enough?\n  - could add `pick` instruction (generalised `dup`)\n  - could add `let` instruction (if you squint, a generalised `swap`)\n  - different use cases?\n\n"
  },
  {
    "path": "proposals/nontrapping-float-to-int-conversion/Overview.md",
    "content": "# Non-trapping Float-to-int Conversions\n\n## Introduction\n\n### Motivation\n\nThe primary motivations are:\n\n - LLVM’s float-to-int conversion has an undefined result, rather than undefined behavior, and it seems LLVM does speculate it under certain conditions.\n - For the SIMD proposal, it’s more SIMD-hardware-like if no SIMD operations trap. This proposal would establish a convention for saturating operations which SIMD could share, to avoid introducing trapping.\n\nThis proposal is not motivated by performance data.\n\nIt's plausible that LLVM could be changed, to have something like an \"nsw\" flag for the \"fptosi\" instruction, especially with some of the recent proposals to modify the poison concept in LLVM. However, no one is currently working on this.\n\n### Background\n\nThis issue has been discussed in several areas including here:\n\nhttps://github.com/WebAssembly/design/issues/986\n\nWhile performance concerns initially motivated the discussion, the performance\neffects were due to a particular implementation detail which has since been\nfixed.\n\nSince then, no real-world performance problems related to this issue have\nbeen reported.\n\nThis topic was discussed at the CG-05 meeting:\n\nhttps://github.com/WebAssembly/meetings/pull/3\n\nand\n\nhttps://github.com/WebAssembly/meetings/blob/master/2017/CG-05.md#non-trapping-float-to-int\n\nwhich made decisions about which semantics to choose, and which encoding strategy.\n\nThese decisions were captured in a design repo PR:\n\nhttps://github.com/WebAssembly/design/pull/1089\n\nAt the CG-07-06 meeting it was decided that a full spec repo fork should be\ncreated to follow the new process for new features:\n\nhttps://github.com/WebAssembly/meetings/blob/master/2017/CG-07-06.md#float-to-int-conversion\n\nThis led to the creation of the present repo:\n\nhttps://github.com/WebAssembly/nontrapping-float-to-int-conversions\n\n### Design\n\nThis proposal introduces 8 new instructions:\n\n - `i32.trunc_sat_f32_s`\n - `i32.trunc_sat_f32_u`\n - `i32.trunc_sat_f64_s`\n - `i32.trunc_sat_f64_u`\n - `i64.trunc_sat_f32_s`\n - `i64.trunc_sat_f32_u`\n - `i64.trunc_sat_f64_s`\n - `i64.trunc_sat_f64_u`\n\nThe semantics are the same as the corresponding non-`_sat` instructions, except:\n - Instead of trapping on positive or negative overflow, they return the maximum\n   or minimum integer value, respectively, and do not trap. (This behavior is\n   also referred to as \"saturating\".)\n - Instead of trapping on NaN, they return 0 and do not trap.\n\n### Encoding\n\nThis proposal introduces a new prefix byte:\n\n| Prefix | Name    | Description |\n| ------ | ------- | ----------- |\n| `0xfc` | misc    | Miscellaneous operations :bowling: |\n\nwhich is intended to be used as a prefix for other future miscellaneous operations\nas well.\n\nThe encodings for the new instructions use this new prefix and are as follows:\n\n| Name | Opcode | Immediate | Description |\n| ---- | ---- | ---- | ---- |\n| `i32.trunc_sat_f32_s` | `0xfc` `0x00` | | :bowling: saturating form of `i32.trunc_f32_s` |\n| `i32.trunc_sat_f32_u` | `0xfc` `0x01` | | :bowling: saturating form of `i32.trunc_f32_u` |\n| `i32.trunc_sat_f64_s` | `0xfc` `0x02` | | :bowling: saturating form of `i32.trunc_f64_s` |\n| `i32.trunc_sat_f64_u` | `0xfc` `0x03` | | :bowling: saturating form of `i32.trunc_f64_u` |\n| `i64.trunc_sat_f32_s` | `0xfc` `0x04` | | :bowling: saturating form of `i64.trunc_f32_s` |\n| `i64.trunc_sat_f32_u` | `0xfc` `0x05` | | :bowling: saturating form of `i64.trunc_f32_u` |\n| `i64.trunc_sat_f64_s` | `0xfc` `0x06` | | :bowling: saturating form of `i64.trunc_f64_s` |\n| `i64.trunc_sat_f64_u` | `0xfc` `0x07` | | :bowling: saturating form of `i64.trunc_f64_u` |\n"
  },
  {
    "path": "proposals/reference-types/Overview.md",
    "content": "# Reference Types for WebAssembly\n\nTODO: more text, motivation, explanation\n\n## Introduction\n\nMotivation:\n\n* Easier and more efficient interop with host environment (see e.g. the [Interface Types proposal](https://github.com/WebAssembly/interface-types/blob/master/proposals/interface-types/Explainer.md))\n  - allow host references to be represented directly by type `externref` (see [here](https://github.com/WebAssembly/interface-types/issues/9))\n  - without having to go through tables, allocating slots, and maintaining index bijections at the boundaries\n\n* Basic manipulation of tables inside Wasm\n  - allow representing data structures containing references\nby repurposing tables as a general memory for opaque data types\n  - allow manipulating function tables from within Wasm.\n  - add instructions missing from [bulk operations proposal](https://github.com/WebAssembly/bulk-memory-operations/blob/master/proposals/bulk-memory-operations/Overview.md)\n\n* Set the stage for later additions:\n\n  - Typed function references (see [below](#typed-function-references))\n  - Exception references (see the [exception handling proposal](https://github.com/WebAssembly/exception-handling/blob/master/proposals/Exceptions.md) and [here](https://github.com/WebAssembly/interface-types/issues/10))\n  - A smoother transition path to GC (see the [GC proposal](https://github.com/WebAssembly/gc/blob/master/proposals/gc/Overview.md))\n\nGet the most important parts soon!\n\nSummary:\n* Add new type `externref` that can be used as both a value types and a table element type.\n\n* Also allow `funcref` as a value type.\n\n* Introduce instructions to get and set table slots.\n\n* Add missing table size, grow, fill instructions.\n\n* Allow multiple tables.\n\nNotes:\n\n* This extension does not imply GC by itself, only if host refs are GCed pointers!\n\n* Reference types are *opaque*, i.e., their value is abstract and they cannot be stored into linear memory. Tables are used as the equivalent.\n\n\n## Language Extensions\n\nTyping extensions:\n\n* Introduce `funcref` and `externref` as a new class of *reference types*.\n  - `reftype ::= funcref | externref`\n\n* Value types (of locals, globals, function parameters and results) can now be either numeric types or reference types.\n  - `numtype ::= i32 | i64 | f32 | f64`\n  - `valtype ::= <numtype> | <reftype>`\n  - locals with reference type are initialised with `null`\n\n* Element types (of tables) are equated with reference types.\n  - `elemtype ::= <reftype>`\n\n\nNew/extended instructions:\n\n* The `select` instruction now optionally takes a value type immediate. Only annotated `select` can be used with reference types.\n  - `select : [t t i32] -> [t]`\n    - iff `t` is a `numtype`\n  - `select t : [t t i32] -> [t]`\n\n* The new instruction `ref.null` evaluates to the null reference constant.\n  - `ref.null rt : [] -> [rtref]`\n    - iff `rt = func` or `rt = extern`\n  - allowed in constant expressions\n\n* The new instruction `ref.is_null` checks for null.\n  - `ref.is_null : [rtref] -> [i32]`\n\n* The new instruction `ref.func` creates a reference to a given function.\n  - `ref.func $x : [] -> [funcref]`\n    - iff `$x : func $t`\n  - allowed in constant expressions\n  - Note: the result type of this instruction may be refined by future proposals (e.g., to `[(ref $t)]`)\n\n* The new instructions `table.get` and `table.set` access tables.\n  - `table.get $x : [i32] -> [t]`\n    - iff `$x : table t`\n  - `table.set $x : [i32 t] -> []`\n    - iff `$x : table t`\n\n* The new instructions `table.size`and `table.grow` manipulate the size of a table.\n  - `table.size $x : [] -> [i32]`\n    - iff `$x : table t`\n  - `table.grow $x : [t i32] -> [i32]`\n    - iff `$x : table t`\n  - the first operand of `table.grow` is an initialisation value (for compatibility with future extensions to the type system, such as non-nullable references)\n\n* The new instruction `table.fill` fills a range in a table with a value.\n  - `table.fill $x : [i32 t i32] -> []`\n    - iff `$x : table t`\n  - the first operand is the start index of the range, the third operand its length (analoguous to `memory.fill`)\n  - traps when range+length > size of the table, but only after filling range up to size (analoguous to `memory.fill`)\n\n* The `table.init` instruction takes an additional table index as immediate.\n  - `table.init $x $y : [i32 i32 i32] -> []`\n    - iff `$x : table t`\n    - and `$y : elem t'`\n    - and `t' <: t`\n\n* The `table.copy` instruction takes two additional table indices as immediate.\n  - `table.copy $x $y : [i32 i32 i32] -> []`\n    - iff `$x : table t`\n    - and `$y : table t'`\n    - and `t' <: t`\n\n* The `call_indirect` instruction takes a table index as immediate.\n  - `call_indirect $x (type $t) : [t1* i32] -> [t2*]`\n    - iff `$t = [t1*] -> [t2*]`\n    - and `$x : table t'`\n    - and `t' <: funcref`\n\n* In all instructions, table indices can be omitted and default to 0.\n\nNote:\n- In the binary format, space for the additional table indices is already reserved.\n- For backwards compatibility, all table indices may be omitted in the text format, in which case they default to 0 (for `table.copy`, both indices must be either present or absent).\n\n\nTable extensions:\n\n* A module may define, import, and export multiple tables.\n  - As usual, the imports come first in the index space.\n  - This is already representable in the binary format.\n\n* Element segments take a table index as immediate that identifies the table they apply to.\n  - In the binary format, space for the index is already reserved.\n  - For backwards compatibility, the index may be omitted in the text format, in which case it defaults to 0.\n\n\nJS API extensions:\n\n* Any JS value can be passed as `externref` to a Wasm function, stored in a global, or in a table.\n\n* Any Wasm exported function object or `null` can be passed as `funcref` to a Wasm function, stored in a global, or in a table.\n\n* The `WebAssembly.Table#grow` method takes an additional initialisation argument.\n  - optional for backwards compatibility, defaults to default value of respective type\n\n\n## Possible Future Extensions\n\n\n### Subtyping\n\nMotivation:\n\n* Enable various extensions (see below).\n\nAdditions:\n\n* Introduce a simple subtype relation between reference types.\n  - reflexive transitive closure of the following rules\n  - `t <: anyref` for all reftypes `t`\n\n\n### Equality on references\n\nMotivation:\n\n* Allow references to be compared by identity.\n* However, not all reference types should be comparable, since that may make implementation details observable in a non-deterministic fashion (consider e.g. host JavaScript strings).\n\n\nAdditions:\n\n* Add `eqref` as the type of comparable references\n  - `reftype ::= ... | eqref`\n* It is a subtype of `anyref`\n  - `eqref < anyref`\n* Add `ref.eq` instruction.\n  - `ref.eq : [eqref eqref] -> [i32]`\n\nAPI changes:\n\n* Any JS object (non-primitive value) or symbol or `null` can be passed as `eqref` to a Wasm function, stored in a global, or in a table.\n\n\nQuestions:\n\n* Interaction with type imports/exports: do they need to distinguish equality types from non-equality now?\n\n* Similarly, the JS API for `WebAssembly.Type` below would need to enable the distinction.\n\n\n### Typed function references\n\nSee the [typed function references proposal](https://github.com/WebAssembly/function-references/blob/master/proposals/function-references/Overview.md)\n\nMotivation:\n\n* Allow function pointers to be expressed directly without going through table and dynamic type check.\n* Enable functions to be passed to other modules easily.\n\nAdditions:\n\n* Add `(ref $t)` as a reference type\n  - `reftype ::= ... | ref <typeidx>`\n* Refine `(ref.func $f)` instruction\n  - `ref.func $f : [] -> (ref $t)` iff `$f : $t`\n* Add `(call_ref)` instruction\n  - `call_ref : [ts1 (ref $t)] -> [ts2]` iff `$t = [ts1] -> [ts2]`\n* Introduce subtyping `ref <functype> < funcref`\n* Subtying between concrete and universal reference types\n  - `ref $t < anyref`\n  - `ref <functype> < funcref`\n  - Note: reference types are not necessarily subtypes of `eqref`, including functions\n\n* Typed function references cannot be null!\n\n\n### Type Import/Export\n\nMotivation:\n\n* Allow the host (or Wasm modules) to distinguish different reference types.\n\nAdditions:\n\n* Add `(type)` external type, enables types to be imported and exported\n  - `externtype ::= ... | type`\n  - `(ref $t)` can now denote an abstract type or a function reference\n  - imported types have index starting from 0.\n  - reserve byte in binary format to allow refinements later\n\n* Add abstract type definitions in type section\n  - `deftype ::= <functype> | new`\n  - creates unique abstract type\n\n* Add `WebAssembly.Type` class to JS API\n  - constructor `new WebAssembly.Type(name)` creates unique abstract type\n\n* Subtyping `ref <abstype>` < `anyref`\n\n\nQuestions:\n\n* Do we need to impose constraints on the order of imports, to stratify section dependencies? Should type import and export be separate sections instead?\n\n* Do we need a nullable `(optref $t)` type to allow use with locals etc.? Could a `(nullable T)` type constructor work instead?\n  - Unclear how `nullable` constructor would integrate exactly. Would it only allow (non-nullable) reference types as argument? Does this require a kind system? Should `anyref` be different from `(nullable anyref)`, or the latter disallowed? What about `funcref`?\n  - Semantically, thinking of `(nullable T)` as `T | nullref` could answer these questions, but we cannot support arbitrary unions in Wasm.\n\n* Should we add `(new)` definitional type to enable Wasm modules to define new types, too?\n\n* Do `new` definition types and the `WebAssembly.Type` constructor need to take a \"comparable\" flag controlling whether references to a type can be compared?\n\n* Should JS API allow specifying subtyping between new types?\n\n\n### Down Casts\n\nMotivation:\n\n* Allow to implement generics by using `anyref` as a top type.\n\nAddition:\n\n* Add a `cast` instruction that checks whether its operand can be cast to a lower type and converts its type accordingly if so; otherwise, goes to an else branch.\n  - `cast <resulttype> <reftype1> <reftype2> <instr1>* else <instr2>* end: [<reftypet1>] -> <resulttype>` iff `<reftype2> < <reftype1>` and `<instr1>* : [<reftype2>] -> <resulttype>` and `<instr2>* : [<reftype1>] -> <resulttype>`\n  - could later be generalised to non-reference types?\n\nNote:\n\n* Can decompose `call_indirect` (assuming multi-value proposal):\n  - `(call_indirect $x (type $t))` reduces to `(table.get $x) (cast $t anyref (ref $t) (then (call_ref (ref $t))) (else (unreachable)))`\n\n\n### GC Types\n\nSee [GC proposal](https://github.com/WebAssembly/gc/blob/master/proposals/gc/Overview.md).\n\n\n### Further possible generalisations\n\n* Introduce reference types pointing to tables, memories, or globals.\n  - `deftype ::= ... | global <globaltype> | table <tabletype> | memory <memtype>`\n  - `ref.global $g : [] -> (ref $t)` iff `$g : $t`\n  - `ref.table $x : [] -> (ref $t)` iff `$x : $t`\n  - `ref.mem $m : [] -> (ref $t)` iff `$m : $t`\n  - yields first-class tables, memories, globals\n  - would requires duplicating all respective instructions\n\n* Allow all value types as element types.\n  - `deftype := ... | globaltype | tabletype | memtype`\n  - would unify element types with value types\n"
  },
  {
    "path": "proposals/sign-extension-ops/Overview.md",
    "content": "# Sign-extension operators proposal for WebAssembly\n\nThis page describes a proposal for the post-MVP\n[sign-extension operator feature][future sext].\n\nThis proposal adds five new integer instructions for sign-extending 8-bit,\n16-bit, and 32-bit values.\n\n## New Sign-extending Operators\n\nTo support sign-extending, five new sign-extension operators are added:\n\n  * `i32.extend8_s`: extend a signed 8-bit integer to a 32-bit integer\n  * `i32.extend16_s`: extend a signed 16-bit integer to a 32-bit integer\n  * `i64.extend8_s`: extend a signed 8-bit integer to a 64-bit integer\n  * `i64.extend16_s`: extend a signed 16-bit integer to a 64-bit integer\n  * `i64.extend32_s`: extend a signed 32-bit integer to a 64-bit integer\n  \nNote that `i64.extend32_s` was not originally included when this proposal was\ndiscussed in the May 2017 CG meeting. The reason given was that \nthe behavior matches `i64.extend_s/i32`. It was later discovered that this is\nnot correct, as `i64.extend_s/i32` sign-extends an `i32` value to `i64`,\nwhereas `i64.extend32_s` sign-extends an `i64` value to `i64`. The behavior\nof `i64.extend32_s` can be emulated with `i32.wrap/i64` followed by\n`i64.extend_s/i32`, but the same can be said of the sign-extending load\noperations. Therefore, `i64.extend32_s` has been added for consistency.\n\n## [Spec Changes][spec]\n\nThe [instruction syntax][] is modified as follows:\n\n```\ninstr ::= ... |\n          inn.extend8_s | inn.extend16_s | i64.extend32_s\n```\n\nThe [instruction binary format][] is modified as follows:\n\n```\ninstr ::= ...\n        | 0xC0                  =>  i32.extend8_s\n        | 0xC1                  =>  i32.extend16_s\n        | 0xC2                  =>  i64.extend8_s\n        | 0xC3                  =>  i64.extend16_s\n        | 0xC4                  =>  i64.extend32_s\n```\n\n[future sext]: https://github.com/WebAssembly/design/blob/master/FutureFeatures.md#additional-integer-operators\n[instruction syntax]: https://webassembly.github.io/spec/syntax/instructions.html\n[instruction binary format]: https://webassembly.github.io/spec/binary/instructions.html\n[spec]: https://webassembly.github.io/sign-extension-ops/\n"
  },
  {
    "path": "test/LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"{}\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright {yyyy} {name of copyright owner}\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n"
  },
  {
    "path": "test/README.md",
    "content": "This directory contains the WebAssembly test suite. It is split into three\ndirectories:\n\n* [`core/`](core/), tests for the core semantics\n* [`js-api/`](js-api/), tests for the JavaScript API.\n* [`html/`](html/), tests for the JavaScript API in a DOM environment.\n\nA list of to-do's can be found [here](Todo.md).\n\n## Multi-stage testing\n\nThe wast tests can be converted to JavaScript, and the JavaScript tests\nto HTML tests, using the `build.py` script. It will create a `out/` directory\n(checked in in this repository, to be able to use it from github pages),\ncontaining subdirectories with expanded tests, as well as a landing page for\nrunnning all of them in HTML.\n\nThe HTML tests are just [Web Platform Tests](http://testthewebforward.org)\nusing the\n[testharness.js](https://web-platform-tests.org/writing-tests/testharness-api.html)\nlibrary.\n\nEach wast test gets its equivalent JS test, and each JS test (including wast\ntest) gets its equivalent WPT, to be easily run in browser vendors' automation.\n\n## Procedure for adding a new test\n\n- put the test in the right directory according to the above (top) description.\n- ideally, commit here so the actual content commit and build commit are\n  separated.\n- re-run `build.py` so that the landing page is updated and all the cascading\n  happens.\n- re-commit here, if necessary.\n\n## Local HTTP serving of the repository\n\nFrom the root of your clone of this repository:\n\n```\npython -m SimpleHTTPServer 8000\n```\n\nThen open your favorite browser and browse to `http://localhost:8000/test/out`.\n"
  },
  {
    "path": "test/Todo.md",
    "content": "This is a rough list of \"tests to write\". Everything here should either be\nspecified in [Semantics.md](https://github.com/WebAssembly/design/blob/master/Semantics.md),\nhave a link to an open issue/PR, or be obvious. Comments/corrections/additions\nwelcome.\n\nLinear memory semantics:\n - test that one can clobber the entire contents of the linear memory without corrupting: call stack, local variables, program execution.\n\nMisc optimizer bait:\n - test that the scheduler doesn't move a trapping div past a call which may not return\n - test that linearized multidimensional array accesses can have overindexing in interesting ways\n - test that 32-bit loop induction variables that wrap aren't promoted to 64-bit\n - test that code after a non-obviously infinite loop is not executed\n\nMisc x86 optimizer bait:\n - test that oeq handles NaN right in if, if-else, and setcc cases\n\nSIMD (post-MVP):\n - test that SIMD insert/extract don't canonicalize NaNs\n - test that SIMD lanes are in little-endian order\n - test non-constant-index and out-of-bounds shuffle masks\n - test that subnormals work as intended\n - test that byte-misaligned accesses work\n\nThreads (post-MVP):\n - test that thread-local variables are actually thread-local\n - test that atomic operations that isLockFree says are lock-free actually are\n   (is this possible?)\n - test that isLockFree is true for datatypes that the spec says should\n   always be lock-free\n - test that 16-bit and 8-bit cmpxchg does a wrapped 8-bit or 16-bit compare\n\nFMA (post-MVP):\n - http://www.vinc17.org/software/fma-tests.c\n"
  },
  {
    "path": "test/build.py",
    "content": "#!/usr/bin/env python3\n\nimport argparse\nimport sys\nimport os\nimport glob\nimport subprocess\nimport shutil\nimport multiprocessing as mp\n\nSCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))\nINTERPRETER_DIR = os.path.join(SCRIPT_DIR, '..', 'interpreter')\nWASM_EXEC = os.path.join(INTERPRETER_DIR, 'wasm')\n\nWAST_TESTS_DIR = os.path.join(SCRIPT_DIR, 'core')\nHARNESS_DIR = os.path.join(SCRIPT_DIR, 'harness')\n\nHARNESS_FILES = ['testharness.js', 'testharnessreport.js', 'testharness.css']\nWPT_URL_PREFIX = '/resources'\n\n# Helpers.\ndef run(*cmd):\n    return subprocess.run(cmd,\n                          stdout=subprocess.PIPE,\n                          stderr=subprocess.STDOUT,\n                          universal_newlines=True)\ndef call(*cmd):\n    return subprocess.call(cmd,\n                           stdout=subprocess.PIPE,\n                           stderr=subprocess.STDOUT,\n                           universal_newlines=True)\n\n# Preconditions.\ndef ensure_remove_dir(path):\n    if os.path.exists(path):\n        shutil.rmtree(path)\n\ndef ensure_empty_dir(path):\n    ensure_remove_dir(path)\n    os.mkdir(path)\n\ndef compile_wasm_interpreter():\n    print(\"Recompiling the wasm interpreter...\")\n    result = call('make', '-C', INTERPRETER_DIR, 'clean', 'default')\n    if result != 0:\n        print(\"Couldn't recompile wasm spec interpreter\")\n        sys.exit(1)\n    print(\"Done!\")\n\ndef ensure_wasm_executable(path_to_wasm):\n    \"\"\"\n    Ensure we have built the wasm spec interpreter.\n    \"\"\"\n    result = call(path_to_wasm, '-v', '-e', '')\n    if result != 0:\n        print('Unable to run the wasm executable')\n        sys.exit(1)\n\n# JS harness.\ndef convert_one_wast_file(inputs):\n    wast_file, js_file = inputs\n    print('Compiling {} to JS...'.format(wast_file))\n    return run(WASM_EXEC, wast_file, '-h', '-o', js_file)\n\ndef convert_wast_to_js(out_js_dir):\n    \"\"\"Compile all the wast files to JS and store the results in the JS dir.\"\"\"\n\n    inputs = []\n\n    for wast_file in glob.glob(os.path.join(WAST_TESTS_DIR, '*.wast')):\n        # Don't try to compile tests that are supposed to fail.\n        if '.fail.' in wast_file:\n            continue\n\n        js_filename = os.path.basename(wast_file) + '.js'\n        js_file = os.path.join(out_js_dir, js_filename)\n        inputs.append((wast_file, js_file))\n\n    pool = mp.Pool(processes=8)\n    for result in pool.imap_unordered(convert_one_wast_file, inputs):\n        if result.returncode != 0:\n            print('Error when compiling to JS:')\n            print(result.args)\n            if result.stdout:\n                # stderr is piped to stdout via `run`, so we only need to\n                # worry about stdout\n                print(result.stdout)\n    return [js_file for (wast_file, js_file) in inputs]\n\ndef copy_harness_files(out_js_dir, include_harness):\n    harness_dir = os.path.join(out_js_dir, 'harness')\n    ensure_empty_dir(harness_dir)\n\n    print('Copying JS test harness to the JS out dir...')\n    for js_file in glob.glob(os.path.join(HARNESS_DIR, '*')):\n        if os.path.basename(js_file) in HARNESS_FILES and not include_harness:\n            continue\n        shutil.copy(js_file, harness_dir)\n\ndef build_js(out_js_dir):\n    print('Building JS...')\n    convert_wast_to_js(out_js_dir)\n    copy_harness_files(out_js_dir, False)\n    print('Done building JS.')\n\n# HTML harness.\nHTML_HEADER = \"\"\"<!doctype html>\n<html>\n    <head>\n        <meta charset=\"UTF-8\">\n        <title>WebAssembly Web Platform Test</title>\n    </head>\n    <body>\n\n        <script src={WPT_PREFIX}/testharness.js></script>\n        <script src={WPT_PREFIX}/testharnessreport.js></script>\n        <script src={PREFIX}/{JS_HARNESS}></script>\n\n        <div id=log></div>\n\"\"\"\n\nHTML_BOTTOM = \"\"\"\n    </body>\n</html>\n\"\"\"\n\ndef wrap_single_test(js_file):\n    test_func_name = os.path.basename(js_file).replace('.', '_').replace('-', '_')\n\n    content = \"(function {}() {{\\n\".format(test_func_name)\n    with open(js_file, 'r') as f:\n        content += f.read()\n    content += \"reinitializeRegistry();\\n})();\\n\"\n\n    with open(js_file, 'w') as f:\n        f.write(content)\n\ndef build_html_js(out_dir):\n    ensure_empty_dir(out_dir)\n    copy_harness_files(out_dir, True)\n\n    tests = convert_wast_to_js(out_dir)\n    for js_file in tests:\n        wrap_single_test(js_file)\n    return tests\n\ndef build_html_from_js(tests, html_dir, use_sync):\n    for js_file in tests:\n        js_filename = os.path.basename(js_file)\n        html_filename = js_filename + '.html'\n        html_file = os.path.join(html_dir, html_filename)\n        js_harness = \"sync_index.js\" if use_sync else \"async_index.js\"\n        with open(html_file, 'w+') as f:\n            content = HTML_HEADER.replace('{PREFIX}', './js/harness') \\\n                                 .replace('{WPT_PREFIX}', './js/harness') \\\n                                 .replace('{JS_HARNESS}', js_harness)\n            content += \"        <script src=./js/{SCRIPT}></script>\".replace('{SCRIPT}', js_filename)\n            content += HTML_BOTTOM\n            f.write(content)\n\ndef build_html(html_dir, js_dir, use_sync):\n    print(\"Building HTML tests...\")\n\n    js_html_dir = os.path.join(html_dir, 'js')\n\n    tests = build_html_js(js_html_dir)\n\n    print('Building WPT tests from JS tests...')\n    build_html_from_js(tests, html_dir, use_sync)\n\n    print(\"Done building HTML tests.\")\n\n\n# Front page harness.\ndef build_front_page(out_dir, js_dir, use_sync):\n    print('Building front page containing all the HTML tests...')\n\n    js_out_dir = os.path.join(out_dir, 'js')\n\n    tests = build_html_js(js_out_dir)\n\n    front_page = os.path.join(out_dir, 'index.html')\n    js_harness = \"sync_index.js\" if use_sync else \"async_index.js\"\n    with open(front_page, 'w+') as f:\n        content = HTML_HEADER.replace('{PREFIX}', './js/harness') \\\n                             .replace('{WPT_PREFIX}', './js/harness')\\\n                             .replace('{JS_HARNESS}', js_harness)\n        for js_file in tests:\n            filename = os.path.basename(js_file)\n            content += \"        <script src=./js/{SCRIPT}></script>\\n\".replace('{SCRIPT}', filename)\n        content += HTML_BOTTOM\n        f.write(content)\n\n    print('Done building front page!')\n\n# Main program.\ndef process_args():\n    parser = argparse.ArgumentParser(description=\"Helper tool to build the\\\n            multi-stage cross-browser test suite for WebAssembly.\")\n\n    parser.add_argument('--js',\n                        dest=\"js_dir\",\n                        help=\"Relative path to the output directory for the pure JS tests.\",\n                        type=str)\n\n    parser.add_argument('--html',\n                        dest=\"html_dir\",\n                        help=\"Relative path to the output directory for the Web Platform tests.\",\n                        type=str)\n\n    parser.add_argument('--front',\n                        dest=\"front_dir\",\n                        help=\"Relative path to the output directory for the front page.\",\n                        type=str)\n\n    parser.add_argument('--dont-recompile',\n                        action=\"store_const\",\n                        dest=\"compile\",\n                        help=\"Don't recompile the wasm spec interpreter (by default, it is)\",\n                        const=False,\n                        default=True)\n\n    parser.add_argument('--use-sync',\n                        action=\"store_const\",\n                        dest=\"use_sync\",\n                        help=\"Let the tests use the synchronous JS API (by default, it does not)\",\n                        const=True,\n                        default=False)\n\n    return parser.parse_args(), parser\n\nif __name__ == '__main__':\n    args, parser = process_args()\n\n    js_dir = args.js_dir\n    html_dir = args.html_dir\n    front_dir = args.front_dir\n\n    if front_dir is None and js_dir is None and html_dir is None:\n        print('At least one mode must be selected.\\n')\n        parser.print_help()\n        sys.exit(1)\n\n    if args.compile:\n        compile_wasm_interpreter()\n\n    ensure_wasm_executable(WASM_EXEC)\n\n    if js_dir is not None:\n        ensure_empty_dir(js_dir)\n        build_js(js_dir)\n\n    if html_dir is not None:\n        ensure_empty_dir(html_dir)\n        build_html(html_dir, js_dir, args.use_sync)\n\n    if front_dir is not None:\n        ensure_empty_dir(front_dir)\n        build_front_page(front_dir, js_dir, args.use_sync)\n\n    print('Done!')\n"
  },
  {
    "path": "test/core/.gitignore",
    "content": "output"
  },
  {
    "path": "test/core/README.md",
    "content": "This directory contains tests for the core WebAssembly semantics, as described in [Semantics.md](https://github.com/WebAssembly/design/blob/master/Semantics.md) and specified by the [spec interpreter](https://github.com/WebAssembly/spec/blob/master/interpreter).\n\nTests are written in the [S-Expression script format](https://github.com/WebAssembly/spec/blob/master/interpreter/README.md#s-expression-syntax) defined by the interpreter.\n\nThe test suite can be run with the spec interpreter as follows:\n```\n./run.py --wasm <path-to-wasm-interpreter>\n```\nwhere the path points to the spec interpreter executable (or a tool that understands similar options). If the binary is in the working directory, this option can be omitted.\n\nIn addition, the option `--js <path-to-js-interpreter>` can be given to point to a stand-alone JavaScript interpreter supporting the WebAssembly API. If provided, all tests are also executed in JavaScript.\n"
  },
  {
    "path": "test/core/address.wast",
    "content": ";; Load i32 data with different offset/align arguments\n\n(module\n  (memory 1)\n  (data (i32.const 0) \"abcdefghijklmnopqrstuvwxyz\")\n\n  (func (export \"8u_good1\") (param $i i32) (result i32)\n    (i32.load8_u offset=0 (local.get $i))                   ;; 97 'a'\n  )\n  (func (export \"8u_good2\") (param $i i32) (result i32)\n    (i32.load8_u align=1 (local.get $i))                    ;; 97 'a'\n  )\n  (func (export \"8u_good3\") (param $i i32) (result i32)\n    (i32.load8_u offset=1 align=1 (local.get $i))           ;; 98 'b'\n  )\n  (func (export \"8u_good4\") (param $i i32) (result i32)\n    (i32.load8_u offset=2 align=1 (local.get $i))           ;; 99 'c'\n  )\n  (func (export \"8u_good5\") (param $i i32) (result i32)\n    (i32.load8_u offset=25 align=1 (local.get $i))          ;; 122 'z'\n  )\n\n  (func (export \"8s_good1\") (param $i i32) (result i32)\n    (i32.load8_s offset=0 (local.get $i))                   ;; 97 'a'\n  )\n  (func (export \"8s_good2\") (param $i i32) (result i32)\n    (i32.load8_s align=1 (local.get $i))                    ;; 97 'a'\n  )\n  (func (export \"8s_good3\") (param $i i32) (result i32)\n    (i32.load8_s offset=1 align=1 (local.get $i))           ;; 98 'b'\n  )\n  (func (export \"8s_good4\") (param $i i32) (result i32)\n    (i32.load8_s offset=2 align=1 (local.get $i))           ;; 99 'c'\n  )\n  (func (export \"8s_good5\") (param $i i32) (result i32)\n    (i32.load8_s offset=25 align=1 (local.get $i))          ;; 122 'z'\n  )\n\n  (func (export \"16u_good1\") (param $i i32) (result i32)\n    (i32.load16_u offset=0 (local.get $i))                  ;; 25185 'ab'\n  )\n  (func (export \"16u_good2\") (param $i i32) (result i32)\n    (i32.load16_u align=1 (local.get $i))                   ;; 25185 'ab'\n  )\n  (func (export \"16u_good3\") (param $i i32) (result i32)\n    (i32.load16_u offset=1 align=1 (local.get $i))          ;; 25442 'bc'\n  )\n  (func (export \"16u_good4\") (param $i i32) (result i32)\n    (i32.load16_u offset=2 align=2 (local.get $i))          ;; 25699 'cd'\n  )\n  (func (export \"16u_good5\") (param $i i32) (result i32)\n    (i32.load16_u offset=25 align=2 (local.get $i))         ;; 122 'z\\0'\n  )\n\n  (func (export \"16s_good1\") (param $i i32) (result i32)\n    (i32.load16_s offset=0 (local.get $i))                  ;; 25185 'ab'\n  )\n  (func (export \"16s_good2\") (param $i i32) (result i32)\n    (i32.load16_s align=1 (local.get $i))                   ;; 25185 'ab'\n  )\n  (func (export \"16s_good3\") (param $i i32) (result i32)\n    (i32.load16_s offset=1 align=1 (local.get $i))          ;; 25442 'bc'\n  )\n  (func (export \"16s_good4\") (param $i i32) (result i32)\n    (i32.load16_s offset=2 align=2 (local.get $i))          ;; 25699 'cd'\n  )\n  (func (export \"16s_good5\") (param $i i32) (result i32)\n    (i32.load16_s offset=25 align=2 (local.get $i))         ;; 122 'z\\0'\n  )\n\n  (func (export \"32_good1\") (param $i i32) (result i32)\n    (i32.load offset=0 (local.get $i))                      ;; 1684234849 'abcd'\n  )\n  (func (export \"32_good2\") (param $i i32) (result i32)\n    (i32.load align=1 (local.get $i))                       ;; 1684234849 'abcd'\n  )\n  (func (export \"32_good3\") (param $i i32) (result i32)\n    (i32.load offset=1 align=1 (local.get $i))              ;; 1701077858 'bcde'\n  )\n  (func (export \"32_good4\") (param $i i32) (result i32)\n    (i32.load offset=2 align=2 (local.get $i))              ;; 1717920867 'cdef'\n  )\n  (func (export \"32_good5\") (param $i i32) (result i32)\n    (i32.load offset=25 align=4 (local.get $i))             ;; 122 'z\\0\\0\\0'\n  )\n\n  (func (export \"8u_bad\") (param $i i32)\n    (drop (i32.load8_u offset=4294967295 (local.get $i)))\n  )\n  (func (export \"8s_bad\") (param $i i32)\n    (drop (i32.load8_s offset=4294967295 (local.get $i)))\n  )\n  (func (export \"16u_bad\") (param $i i32)\n    (drop (i32.load16_u offset=4294967295 (local.get $i)))\n  )\n  (func (export \"16s_bad\") (param $i i32)\n    (drop (i32.load16_s offset=4294967295 (local.get $i)))\n  )\n  (func (export \"32_bad\") (param $i i32)\n    (drop (i32.load offset=4294967295 (local.get $i)))\n  )\n)\n\n(assert_return (invoke \"8u_good1\" (i32.const 0)) (i32.const 97))\n(assert_return (invoke \"8u_good2\" (i32.const 0)) (i32.const 97))\n(assert_return (invoke \"8u_good3\" (i32.const 0)) (i32.const 98))\n(assert_return (invoke \"8u_good4\" (i32.const 0)) (i32.const 99))\n(assert_return (invoke \"8u_good5\" (i32.const 0)) (i32.const 122))\n\n(assert_return (invoke \"8s_good1\" (i32.const 0)) (i32.const 97))\n(assert_return (invoke \"8s_good2\" (i32.const 0)) (i32.const 97))\n(assert_return (invoke \"8s_good3\" (i32.const 0)) (i32.const 98))\n(assert_return (invoke \"8s_good4\" (i32.const 0)) (i32.const 99))\n(assert_return (invoke \"8s_good5\" (i32.const 0)) (i32.const 122))\n\n(assert_return (invoke \"16u_good1\" (i32.const 0)) (i32.const 25185))\n(assert_return (invoke \"16u_good2\" (i32.const 0)) (i32.const 25185))\n(assert_return (invoke \"16u_good3\" (i32.const 0)) (i32.const 25442))\n(assert_return (invoke \"16u_good4\" (i32.const 0)) (i32.const 25699))\n(assert_return (invoke \"16u_good5\" (i32.const 0)) (i32.const 122))\n\n(assert_return (invoke \"16s_good1\" (i32.const 0)) (i32.const 25185))\n(assert_return (invoke \"16s_good2\" (i32.const 0)) (i32.const 25185))\n(assert_return (invoke \"16s_good3\" (i32.const 0)) (i32.const 25442))\n(assert_return (invoke \"16s_good4\" (i32.const 0)) (i32.const 25699))\n(assert_return (invoke \"16s_good5\" (i32.const 0)) (i32.const 122))\n\n(assert_return (invoke \"32_good1\" (i32.const 0)) (i32.const 1684234849))\n(assert_return (invoke \"32_good2\" (i32.const 0)) (i32.const 1684234849))\n(assert_return (invoke \"32_good3\" (i32.const 0)) (i32.const 1701077858))\n(assert_return (invoke \"32_good4\" (i32.const 0)) (i32.const 1717920867))\n(assert_return (invoke \"32_good5\" (i32.const 0)) (i32.const 122))\n\n(assert_return (invoke \"8u_good1\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"8u_good2\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"8u_good3\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"8u_good4\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"8u_good5\" (i32.const 65507)) (i32.const 0))\n\n(assert_return (invoke \"8s_good1\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"8s_good2\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"8s_good3\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"8s_good4\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"8s_good5\" (i32.const 65507)) (i32.const 0))\n\n(assert_return (invoke \"16u_good1\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"16u_good2\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"16u_good3\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"16u_good4\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"16u_good5\" (i32.const 65507)) (i32.const 0))\n\n(assert_return (invoke \"16s_good1\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"16s_good2\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"16s_good3\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"16s_good4\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"16s_good5\" (i32.const 65507)) (i32.const 0))\n\n(assert_return (invoke \"32_good1\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"32_good2\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"32_good3\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"32_good4\" (i32.const 65507)) (i32.const 0))\n(assert_return (invoke \"32_good5\" (i32.const 65507)) (i32.const 0))\n\n(assert_return (invoke \"8u_good1\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"8u_good2\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"8u_good3\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"8u_good4\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"8u_good5\" (i32.const 65508)) (i32.const 0))\n\n(assert_return (invoke \"8s_good1\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"8s_good2\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"8s_good3\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"8s_good4\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"8s_good5\" (i32.const 65508)) (i32.const 0))\n\n(assert_return (invoke \"16u_good1\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"16u_good2\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"16u_good3\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"16u_good4\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"16u_good5\" (i32.const 65508)) (i32.const 0))\n\n(assert_return (invoke \"16s_good1\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"16s_good2\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"16s_good3\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"16s_good4\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"16s_good5\" (i32.const 65508)) (i32.const 0))\n\n(assert_return (invoke \"32_good1\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"32_good2\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"32_good3\" (i32.const 65508)) (i32.const 0))\n(assert_return (invoke \"32_good4\" (i32.const 65508)) (i32.const 0))\n(assert_trap (invoke \"32_good5\" (i32.const 65508)) \"out of bounds memory access\")\n\n(assert_trap (invoke \"8u_good3\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"8s_good3\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"16u_good3\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"16s_good3\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"32_good3\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"32_good3\" (i32.const -1)) \"out of bounds memory access\")\n\n(assert_trap (invoke \"8u_bad\" (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"8s_bad\" (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"16u_bad\" (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"16s_bad\" (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"32_bad\" (i32.const 0)) \"out of bounds memory access\")\n\n(assert_trap (invoke \"8u_bad\" (i32.const 1)) \"out of bounds memory access\")\n(assert_trap (invoke \"8s_bad\" (i32.const 1)) \"out of bounds memory access\")\n(assert_trap (invoke \"16u_bad\" (i32.const 1)) \"out of bounds memory access\")\n(assert_trap (invoke \"16s_bad\" (i32.const 1)) \"out of bounds memory access\")\n(assert_trap (invoke \"32_bad\" (i32.const 1)) \"out of bounds memory access\")\n\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (drop (i32.load offset=4294967296 (i32.const 0))))\"\n  )\n  \"i32 constant\"\n)\n\n;; Load i64 data with different offset/align arguments\n\n(module\n  (memory 1)\n  (data (i32.const 0) \"abcdefghijklmnopqrstuvwxyz\")\n\n  (func (export \"8u_good1\") (param $i i32) (result i64)\n    (i64.load8_u offset=0 (local.get $i))                   ;; 97 'a'\n  )\n  (func (export \"8u_good2\") (param $i i32) (result i64)\n    (i64.load8_u align=1 (local.get $i))                    ;; 97 'a'\n  )\n  (func (export \"8u_good3\") (param $i i32) (result i64)\n    (i64.load8_u offset=1 align=1 (local.get $i))           ;; 98 'b'\n  )\n  (func (export \"8u_good4\") (param $i i32) (result i64)\n    (i64.load8_u offset=2 align=1 (local.get $i))           ;; 99 'c'\n  )\n  (func (export \"8u_good5\") (param $i i32) (result i64)\n    (i64.load8_u offset=25 align=1 (local.get $i))          ;; 122 'z'\n  )\n\n  (func (export \"8s_good1\") (param $i i32) (result i64)\n    (i64.load8_s offset=0 (local.get $i))                   ;; 97 'a'\n  )\n  (func (export \"8s_good2\") (param $i i32) (result i64)\n    (i64.load8_s align=1 (local.get $i))                    ;; 97 'a'\n  )\n  (func (export \"8s_good3\") (param $i i32) (result i64)\n    (i64.load8_s offset=1 align=1 (local.get $i))           ;; 98 'b'\n  )\n  (func (export \"8s_good4\") (param $i i32) (result i64)\n    (i64.load8_s offset=2 align=1 (local.get $i))           ;; 99 'c'\n  )\n  (func (export \"8s_good5\") (param $i i32) (result i64)\n    (i64.load8_s offset=25 align=1 (local.get $i))          ;; 122 'z'\n  )\n\n  (func (export \"16u_good1\") (param $i i32) (result i64)\n    (i64.load16_u offset=0 (local.get $i))                 ;; 25185 'ab'\n  )\n  (func (export \"16u_good2\") (param $i i32) (result i64)\n    (i64.load16_u align=1 (local.get $i))                  ;; 25185 'ab'\n  )\n  (func (export \"16u_good3\") (param $i i32) (result i64)\n    (i64.load16_u offset=1 align=1 (local.get $i))         ;; 25442 'bc'\n  )\n  (func (export \"16u_good4\") (param $i i32) (result i64)\n    (i64.load16_u offset=2 align=2 (local.get $i))         ;; 25699 'cd'\n  )\n  (func (export \"16u_good5\") (param $i i32) (result i64)\n    (i64.load16_u offset=25 align=2 (local.get $i))        ;; 122 'z\\0'\n  )\n\n  (func (export \"16s_good1\") (param $i i32) (result i64)\n    (i64.load16_s offset=0 (local.get $i))                 ;; 25185 'ab'\n  )\n  (func (export \"16s_good2\") (param $i i32) (result i64)\n    (i64.load16_s align=1 (local.get $i))                  ;; 25185 'ab'\n  )\n  (func (export \"16s_good3\") (param $i i32) (result i64)\n    (i64.load16_s offset=1 align=1 (local.get $i))         ;; 25442 'bc'\n  )\n  (func (export \"16s_good4\") (param $i i32) (result i64)\n    (i64.load16_s offset=2 align=2 (local.get $i))         ;; 25699 'cd'\n  )\n  (func (export \"16s_good5\") (param $i i32) (result i64)\n    (i64.load16_s offset=25 align=2 (local.get $i))        ;; 122 'z\\0'\n  )\n\n  (func (export \"32u_good1\") (param $i i32) (result i64)\n    (i64.load32_u offset=0 (local.get $i))                 ;; 1684234849 'abcd'\n  )\n  (func (export \"32u_good2\") (param $i i32) (result i64)\n    (i64.load32_u align=1 (local.get $i))                  ;; 1684234849 'abcd'\n  )\n  (func (export \"32u_good3\") (param $i i32) (result i64)\n    (i64.load32_u offset=1 align=1 (local.get $i))         ;; 1701077858 'bcde'\n  )\n  (func (export \"32u_good4\") (param $i i32) (result i64)\n    (i64.load32_u offset=2 align=2 (local.get $i))         ;; 1717920867 'cdef'\n  )\n  (func (export \"32u_good5\") (param $i i32) (result i64)\n    (i64.load32_u offset=25 align=4 (local.get $i))        ;; 122 'z\\0\\0\\0'\n  )\n\n  (func (export \"32s_good1\") (param $i i32) (result i64)\n    (i64.load32_s offset=0 (local.get $i))                 ;; 1684234849 'abcd'\n  )\n  (func (export \"32s_good2\") (param $i i32) (result i64)\n    (i64.load32_s align=1 (local.get $i))                  ;; 1684234849 'abcd'\n  )\n  (func (export \"32s_good3\") (param $i i32) (result i64)\n    (i64.load32_s offset=1 align=1 (local.get $i))         ;; 1701077858 'bcde'\n  )\n  (func (export \"32s_good4\") (param $i i32) (result i64)\n    (i64.load32_s offset=2 align=2 (local.get $i))         ;; 1717920867 'cdef'\n  )\n  (func (export \"32s_good5\") (param $i i32) (result i64)\n    (i64.load32_s offset=25 align=4 (local.get $i))        ;; 122 'z\\0\\0\\0'\n  )\n\n  (func (export \"64_good1\") (param $i i32) (result i64)\n    (i64.load offset=0 (local.get $i))                     ;; 0x6867666564636261 'abcdefgh'\n  )\n  (func (export \"64_good2\") (param $i i32) (result i64)\n    (i64.load align=1 (local.get $i))                      ;; 0x6867666564636261 'abcdefgh'\n  )\n  (func (export \"64_good3\") (param $i i32) (result i64)\n    (i64.load offset=1 align=1 (local.get $i))             ;; 0x6968676665646362 'bcdefghi'\n  )\n  (func (export \"64_good4\") (param $i i32) (result i64)\n    (i64.load offset=2 align=2 (local.get $i))             ;; 0x6a69686766656463 'cdefghij'\n  )\n  (func (export \"64_good5\") (param $i i32) (result i64)\n    (i64.load offset=25 align=8 (local.get $i))            ;; 122 'z\\0\\0\\0\\0\\0\\0\\0'\n  )\n\n  (func (export \"8u_bad\") (param $i i32)\n    (drop (i64.load8_u offset=4294967295 (local.get $i)))\n  )\n  (func (export \"8s_bad\") (param $i i32)\n    (drop (i64.load8_s offset=4294967295 (local.get $i)))\n  )\n  (func (export \"16u_bad\") (param $i i32)\n    (drop (i64.load16_u offset=4294967295 (local.get $i)))\n  )\n  (func (export \"16s_bad\") (param $i i32)\n    (drop (i64.load16_s offset=4294967295 (local.get $i)))\n  )\n  (func (export \"32u_bad\") (param $i i32)\n    (drop (i64.load32_u offset=4294967295 (local.get $i)))\n  )\n  (func (export \"32s_bad\") (param $i i32)\n    (drop (i64.load32_s offset=4294967295 (local.get $i)))\n  )\n  (func (export \"64_bad\") (param $i i32)\n    (drop (i64.load offset=4294967295 (local.get $i)))\n  )\n)\n\n(assert_return (invoke \"8u_good1\" (i32.const 0)) (i64.const 97))\n(assert_return (invoke \"8u_good2\" (i32.const 0)) (i64.const 97))\n(assert_return (invoke \"8u_good3\" (i32.const 0)) (i64.const 98))\n(assert_return (invoke \"8u_good4\" (i32.const 0)) (i64.const 99))\n(assert_return (invoke \"8u_good5\" (i32.const 0)) (i64.const 122))\n\n(assert_return (invoke \"8s_good1\" (i32.const 0)) (i64.const 97))\n(assert_return (invoke \"8s_good2\" (i32.const 0)) (i64.const 97))\n(assert_return (invoke \"8s_good3\" (i32.const 0)) (i64.const 98))\n(assert_return (invoke \"8s_good4\" (i32.const 0)) (i64.const 99))\n(assert_return (invoke \"8s_good5\" (i32.const 0)) (i64.const 122))\n\n(assert_return (invoke \"16u_good1\" (i32.const 0)) (i64.const 25185))\n(assert_return (invoke \"16u_good2\" (i32.const 0)) (i64.const 25185))\n(assert_return (invoke \"16u_good3\" (i32.const 0)) (i64.const 25442))\n(assert_return (invoke \"16u_good4\" (i32.const 0)) (i64.const 25699))\n(assert_return (invoke \"16u_good5\" (i32.const 0)) (i64.const 122))\n\n(assert_return (invoke \"16s_good1\" (i32.const 0)) (i64.const 25185))\n(assert_return (invoke \"16s_good2\" (i32.const 0)) (i64.const 25185))\n(assert_return (invoke \"16s_good3\" (i32.const 0)) (i64.const 25442))\n(assert_return (invoke \"16s_good4\" (i32.const 0)) (i64.const 25699))\n(assert_return (invoke \"16s_good5\" (i32.const 0)) (i64.const 122))\n\n(assert_return (invoke \"32u_good1\" (i32.const 0)) (i64.const 1684234849))\n(assert_return (invoke \"32u_good2\" (i32.const 0)) (i64.const 1684234849))\n(assert_return (invoke \"32u_good3\" (i32.const 0)) (i64.const 1701077858))\n(assert_return (invoke \"32u_good4\" (i32.const 0)) (i64.const 1717920867))\n(assert_return (invoke \"32u_good5\" (i32.const 0)) (i64.const 122))\n\n(assert_return (invoke \"32s_good1\" (i32.const 0)) (i64.const 1684234849))\n(assert_return (invoke \"32s_good2\" (i32.const 0)) (i64.const 1684234849))\n(assert_return (invoke \"32s_good3\" (i32.const 0)) (i64.const 1701077858))\n(assert_return (invoke \"32s_good4\" (i32.const 0)) (i64.const 1717920867))\n(assert_return (invoke \"32s_good5\" (i32.const 0)) (i64.const 122))\n\n(assert_return (invoke \"64_good1\" (i32.const 0)) (i64.const 0x6867666564636261))\n(assert_return (invoke \"64_good2\" (i32.const 0)) (i64.const 0x6867666564636261))\n(assert_return (invoke \"64_good3\" (i32.const 0)) (i64.const 0x6968676665646362))\n(assert_return (invoke \"64_good4\" (i32.const 0)) (i64.const 0x6a69686766656463))\n(assert_return (invoke \"64_good5\" (i32.const 0)) (i64.const 122))\n\n(assert_return (invoke \"8u_good1\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"8u_good2\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"8u_good3\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"8u_good4\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"8u_good5\" (i32.const 65503)) (i64.const 0))\n\n(assert_return (invoke \"8s_good1\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"8s_good2\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"8s_good3\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"8s_good4\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"8s_good5\" (i32.const 65503)) (i64.const 0))\n\n(assert_return (invoke \"16u_good1\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"16u_good2\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"16u_good3\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"16u_good4\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"16u_good5\" (i32.const 65503)) (i64.const 0))\n\n(assert_return (invoke \"16s_good1\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"16s_good2\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"16s_good3\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"16s_good4\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"16s_good5\" (i32.const 65503)) (i64.const 0))\n\n(assert_return (invoke \"32u_good1\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"32u_good2\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"32u_good3\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"32u_good4\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"32u_good5\" (i32.const 65503)) (i64.const 0))\n\n(assert_return (invoke \"32s_good1\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"32s_good2\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"32s_good3\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"32s_good4\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"32s_good5\" (i32.const 65503)) (i64.const 0))\n\n(assert_return (invoke \"64_good1\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"64_good2\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"64_good3\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"64_good4\" (i32.const 65503)) (i64.const 0))\n(assert_return (invoke \"64_good5\" (i32.const 65503)) (i64.const 0))\n\n(assert_return (invoke \"8u_good1\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"8u_good2\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"8u_good3\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"8u_good4\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"8u_good5\" (i32.const 65504)) (i64.const 0))\n\n(assert_return (invoke \"8s_good1\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"8s_good2\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"8s_good3\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"8s_good4\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"8s_good5\" (i32.const 65504)) (i64.const 0))\n\n(assert_return (invoke \"16u_good1\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"16u_good2\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"16u_good3\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"16u_good4\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"16u_good5\" (i32.const 65504)) (i64.const 0))\n\n(assert_return (invoke \"16s_good1\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"16s_good2\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"16s_good3\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"16s_good4\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"16s_good5\" (i32.const 65504)) (i64.const 0))\n\n(assert_return (invoke \"32u_good1\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"32u_good2\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"32u_good3\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"32u_good4\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"32u_good5\" (i32.const 65504)) (i64.const 0))\n\n(assert_return (invoke \"32s_good1\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"32s_good2\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"32s_good3\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"32s_good4\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"32s_good5\" (i32.const 65504)) (i64.const 0))\n\n(assert_return (invoke \"64_good1\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"64_good2\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"64_good3\" (i32.const 65504)) (i64.const 0))\n(assert_return (invoke \"64_good4\" (i32.const 65504)) (i64.const 0))\n(assert_trap (invoke \"64_good5\" (i32.const 65504)) \"out of bounds memory access\")\n\n(assert_trap (invoke \"8u_good3\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"8s_good3\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"16u_good3\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"16s_good3\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"32u_good3\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"32s_good3\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"64_good3\" (i32.const -1)) \"out of bounds memory access\")\n\n(assert_trap (invoke \"8u_bad\" (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"8s_bad\" (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"16u_bad\" (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"16s_bad\" (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"32u_bad\" (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"32s_bad\" (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"64_bad\" (i32.const 0)) \"out of bounds memory access\")\n\n(assert_trap (invoke \"8u_bad\" (i32.const 1)) \"out of bounds memory access\")\n(assert_trap (invoke \"8s_bad\" (i32.const 1)) \"out of bounds memory access\")\n(assert_trap (invoke \"16u_bad\" (i32.const 1)) \"out of bounds memory access\")\n(assert_trap (invoke \"16s_bad\" (i32.const 1)) \"out of bounds memory access\")\n(assert_trap (invoke \"32u_bad\" (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"32s_bad\" (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"64_bad\" (i32.const 1)) \"out of bounds memory access\")\n\n;; Load f32 data with different offset/align arguments\n\n(module\n  (memory 1)\n  (data (i32.const 0) \"\\00\\00\\00\\00\\00\\00\\a0\\7f\\01\\00\\d0\\7f\")\n\n  (func (export \"32_good1\") (param $i i32) (result f32)\n    (f32.load offset=0 (local.get $i))                   ;; 0.0 '\\00\\00\\00\\00'\n  )\n  (func (export \"32_good2\") (param $i i32) (result f32)\n    (f32.load align=1 (local.get $i))                    ;; 0.0 '\\00\\00\\00\\00'\n  )\n  (func (export \"32_good3\") (param $i i32) (result f32)\n    (f32.load offset=1 align=1 (local.get $i))           ;; 0.0 '\\00\\00\\00\\00'\n  )\n  (func (export \"32_good4\") (param $i i32) (result f32)\n    (f32.load offset=2 align=2 (local.get $i))           ;; 0.0 '\\00\\00\\00\\00'\n  )\n  (func (export \"32_good5\") (param $i i32) (result f32)\n    (f32.load offset=8 align=4 (local.get $i))           ;; nan:0x500001 '\\01\\00\\d0\\7f'\n  )\n  (func (export \"32_bad\") (param $i i32)\n    (drop (f32.load offset=4294967295 (local.get $i)))\n  )\n)\n\n(assert_return (invoke \"32_good1\" (i32.const 0)) (f32.const 0.0))\n(assert_return (invoke \"32_good2\" (i32.const 0)) (f32.const 0.0))\n(assert_return (invoke \"32_good3\" (i32.const 0)) (f32.const 0.0))\n(assert_return (invoke \"32_good4\" (i32.const 0)) (f32.const 0.0))\n(assert_return (invoke \"32_good5\" (i32.const 0)) (f32.const nan:0x500001))\n\n(assert_return (invoke \"32_good1\" (i32.const 65524)) (f32.const 0.0))\n(assert_return (invoke \"32_good2\" (i32.const 65524)) (f32.const 0.0))\n(assert_return (invoke \"32_good3\" (i32.const 65524)) (f32.const 0.0))\n(assert_return (invoke \"32_good4\" (i32.const 65524)) (f32.const 0.0))\n(assert_return (invoke \"32_good5\" (i32.const 65524)) (f32.const 0.0))\n\n(assert_return (invoke \"32_good1\" (i32.const 65525)) (f32.const 0.0))\n(assert_return (invoke \"32_good2\" (i32.const 65525)) (f32.const 0.0))\n(assert_return (invoke \"32_good3\" (i32.const 65525)) (f32.const 0.0))\n(assert_return (invoke \"32_good4\" (i32.const 65525)) (f32.const 0.0))\n(assert_trap (invoke \"32_good5\" (i32.const 65525)) \"out of bounds memory access\")\n\n(assert_trap (invoke \"32_good3\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"32_good3\" (i32.const -1)) \"out of bounds memory access\")\n\n(assert_trap (invoke \"32_bad\" (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"32_bad\" (i32.const 1)) \"out of bounds memory access\")\n\n;; Load f64 data with different offset/align arguments\n\n(module\n  (memory 1)\n  (data (i32.const 0) \"\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\f4\\7f\\01\\00\\00\\00\\00\\00\\fc\\7f\")\n\n  (func (export \"64_good1\") (param $i i32) (result f64)\n    (f64.load offset=0 (local.get $i))                     ;; 0.0 '\\00\\00\\00\\00\\00\\00\\00\\00'\n  )\n  (func (export \"64_good2\") (param $i i32) (result f64)\n    (f64.load align=1 (local.get $i))                      ;; 0.0 '\\00\\00\\00\\00\\00\\00\\00\\00'\n  )\n  (func (export \"64_good3\") (param $i i32) (result f64)\n    (f64.load offset=1 align=1 (local.get $i))             ;; 0.0 '\\00\\00\\00\\00\\00\\00\\00\\00'\n  )\n  (func (export \"64_good4\") (param $i i32) (result f64)\n    (f64.load offset=2 align=2 (local.get $i))             ;; 0.0 '\\00\\00\\00\\00\\00\\00\\00\\00'\n  )\n  (func (export \"64_good5\") (param $i i32) (result f64)\n    (f64.load offset=18 align=8 (local.get $i))            ;; nan:0xc000000000001 '\\01\\00\\00\\00\\00\\00\\fc\\7f'\n  )\n  (func (export \"64_bad\") (param $i i32)\n    (drop (f64.load offset=4294967295 (local.get $i)))\n  )\n)\n\n(assert_return (invoke \"64_good1\" (i32.const 0)) (f64.const 0.0))\n(assert_return (invoke \"64_good2\" (i32.const 0)) (f64.const 0.0))\n(assert_return (invoke \"64_good3\" (i32.const 0)) (f64.const 0.0))\n(assert_return (invoke \"64_good4\" (i32.const 0)) (f64.const 0.0))\n(assert_return (invoke \"64_good5\" (i32.const 0)) (f64.const nan:0xc000000000001))\n\n(assert_return (invoke \"64_good1\" (i32.const 65510)) (f64.const 0.0))\n(assert_return (invoke \"64_good2\" (i32.const 65510)) (f64.const 0.0))\n(assert_return (invoke \"64_good3\" (i32.const 65510)) (f64.const 0.0))\n(assert_return (invoke \"64_good4\" (i32.const 65510)) (f64.const 0.0))\n(assert_return (invoke \"64_good5\" (i32.const 65510)) (f64.const 0.0))\n\n(assert_return (invoke \"64_good1\" (i32.const 65511)) (f64.const 0.0))\n(assert_return (invoke \"64_good2\" (i32.const 65511)) (f64.const 0.0))\n(assert_return (invoke \"64_good3\" (i32.const 65511)) (f64.const 0.0))\n(assert_return (invoke \"64_good4\" (i32.const 65511)) (f64.const 0.0))\n(assert_trap (invoke \"64_good5\" (i32.const 65511)) \"out of bounds memory access\")\n\n(assert_trap (invoke \"64_good3\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"64_good3\" (i32.const -1)) \"out of bounds memory access\")\n\n(assert_trap (invoke \"64_bad\" (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"64_bad\" (i32.const 1)) \"out of bounds memory access\")\n"
  },
  {
    "path": "test/core/align.wast",
    "content": ";; Test alignment annotation rules\n\n(module (memory 0) (func (drop (i32.load8_s align=1 (i32.const 0)))))\n(module (memory 0) (func (drop (i32.load8_u align=1 (i32.const 0)))))\n(module (memory 0) (func (drop (i32.load16_s align=2 (i32.const 0)))))\n(module (memory 0) (func (drop (i32.load16_u align=2 (i32.const 0)))))\n(module (memory 0) (func (drop (i32.load align=4 (i32.const 0)))))\n(module (memory 0) (func (drop (i64.load8_s align=1 (i32.const 0)))))\n(module (memory 0) (func (drop (i64.load8_u align=1 (i32.const 0)))))\n(module (memory 0) (func (drop (i64.load16_s align=2 (i32.const 0)))))\n(module (memory 0) (func (drop (i64.load16_u align=2 (i32.const 0)))))\n(module (memory 0) (func (drop (i64.load32_s align=4 (i32.const 0)))))\n(module (memory 0) (func (drop (i64.load32_u align=4 (i32.const 0)))))\n(module (memory 0) (func (drop (i64.load align=8 (i32.const 0)))))\n(module (memory 0) (func (drop (f32.load align=4 (i32.const 0)))))\n(module (memory 0) (func (drop (f64.load align=8 (i32.const 0)))))\n(module (memory 0) (func (i32.store8 align=1 (i32.const 0) (i32.const 1))))\n(module (memory 0) (func (i32.store16 align=2 (i32.const 0) (i32.const 1))))\n(module (memory 0) (func (i32.store align=4 (i32.const 0) (i32.const 1))))\n(module (memory 0) (func (i64.store8 align=1 (i32.const 0) (i64.const 1))))\n(module (memory 0) (func (i64.store16 align=2 (i32.const 0) (i64.const 1))))\n(module (memory 0) (func (i64.store32 align=4 (i32.const 0) (i64.const 1))))\n(module (memory 0) (func (i64.store align=8 (i32.const 0) (i64.const 1))))\n(module (memory 0) (func (f32.store align=4 (i32.const 0) (f32.const 1.0))))\n(module (memory 0) (func (f64.store align=8 (i32.const 0) (f64.const 1.0))))\n\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i32.load8_s align=0 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i32.load8_s align=7 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i32.load8_u align=0 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i32.load8_u align=7 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i32.load16_s align=0 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i32.load16_s align=7 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i32.load16_u align=0 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i32.load16_u align=7 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i32.load align=0 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i32.load align=7 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i64.load8_s align=0 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i64.load8_s align=7 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i64.load8_u align=0 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i64.load8_u align=7 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i64.load16_s align=0 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i64.load16_s align=7 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i64.load16_u align=0 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i64.load16_u align=7 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i64.load32_s align=0 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i64.load32_s align=7 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i64.load32_u align=0 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i64.load32_u align=7 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i64.load align=0 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (i64.load align=7 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (f32.load align=0 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (f32.load align=7 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (f64.load align=0 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (drop (f64.load align=7 (i32.const 0)))))\"\n  )\n  \"alignment\"\n)\n\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (i32.store8 align=0 (i32.const 0) (i32.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (i32.store8 align=7 (i32.const 0) (i32.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (i32.store16 align=0 (i32.const 0) (i32.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (i32.store16 align=7 (i32.const 0) (i32.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (i32.store align=0 (i32.const 0) (i32.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (i32.store align=7 (i32.const 0) (i32.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (i64.store8 align=0 (i32.const 0) (i64.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (i64.store8 align=7 (i32.const 0) (i64.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (i64.store16 align=0 (i32.const 0) (i64.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (i64.store16 align=7 (i32.const 0) (i64.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (i64.store32 align=0 (i32.const 0) (i64.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (i64.store32 align=7 (i32.const 0) (i64.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (i64.store align=0 (i32.const 0) (i64.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (i64.store align=7 (i32.const 0) (i64.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (f32.store align=0 (i32.const 0) (f32.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (f32.store align=7 (i32.const 0) (f32.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (f64.store align=0 (i32.const 0) (f32.const 0))))\"\n  )\n  \"alignment\"\n)\n(assert_malformed\n  (module quote\n    \"(module (memory 0) (func (f64.store align=7 (i32.const 0) (f32.const 0))))\"\n  )\n  \"alignment\"\n)\n\n(assert_invalid\n  (module (memory 0) (func (drop (i32.load8_s align=2 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i32.load8_u align=2 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i32.load16_s align=4 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i32.load16_u align=4 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i32.load align=8 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i64.load8_s align=2 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i64.load8_u align=2 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i64.load16_s align=4 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i64.load16_u align=4 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i64.load32_s align=8 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i64.load32_u align=8 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i64.load align=16 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (f32.load align=8 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (f64.load align=16 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n\n(assert_invalid\n  (module (memory 0) (func (drop (i32.load8_s align=2 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i32.load8_u align=2 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i32.load16_s align=4 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i32.load16_u align=4 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i32.load align=8 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i64.load8_s align=2 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i64.load8_u align=2 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i64.load16_s align=4 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i64.load16_u align=4 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i64.load32_s align=8 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i64.load32_u align=8 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (i64.load align=16 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (f32.load align=8 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (drop (f64.load align=16 (i32.const 0)))))\n  \"alignment must not be larger than natural\"\n)\n\n(assert_invalid\n  (module (memory 0) (func (i32.store8 align=2 (i32.const 0) (i32.const 0))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (i32.store16 align=4 (i32.const 0) (i32.const 0))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (i32.store align=8 (i32.const 0) (i32.const 0))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (i64.store8 align=2 (i32.const 0) (i64.const 0))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (i64.store16 align=4 (i32.const 0) (i64.const 0))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (i64.store32 align=8 (i32.const 0) (i64.const 0))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (i64.store align=16 (i32.const 0) (i64.const 0))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (f32.store align=8 (i32.const 0) (f32.const 0))))\n  \"alignment must not be larger than natural\"\n)\n(assert_invalid\n  (module (memory 0) (func (f64.store align=16 (i32.const 0) (f64.const 0))))\n  \"alignment must not be larger than natural\"\n)\n\n;; Test aligned and unaligned read/write\n\n(module\n  (memory 1)\n\n  ;; $default: natural alignment, $1: align=1, $2: align=2, $4: align=4, $8: align=8\n\n  (func (export \"f32_align_switch\") (param i32) (result f32)\n    (local f32 f32)\n    (local.set 1 (f32.const 10.0))\n    (block $4\n      (block $2\n        (block $1\n          (block $default\n            (block $0\n              (br_table $0 $default $1 $2 $4 (local.get 0))\n            ) ;; 0\n            (f32.store (i32.const 0) (local.get 1))\n            (local.set 2 (f32.load (i32.const 0)))\n            (br $4)\n          ) ;; default\n          (f32.store align=1 (i32.const 0) (local.get 1))\n          (local.set 2 (f32.load align=1 (i32.const 0)))\n          (br $4)\n        ) ;; 1\n        (f32.store align=2 (i32.const 0) (local.get 1))\n        (local.set 2 (f32.load align=2 (i32.const 0)))\n        (br $4)\n      ) ;; 2\n      (f32.store align=4 (i32.const 0) (local.get 1))\n      (local.set 2 (f32.load align=4 (i32.const 0)))\n    ) ;; 4\n    (local.get 2)\n  )\n\n  (func (export \"f64_align_switch\") (param i32) (result f64)\n    (local f64 f64)\n    (local.set 1 (f64.const 10.0))\n    (block $8\n      (block $4\n        (block $2\n          (block $1\n            (block $default\n              (block $0\n                (br_table $0 $default $1 $2 $4 $8 (local.get 0))\n              ) ;; 0\n              (f64.store (i32.const 0) (local.get 1))\n              (local.set 2 (f64.load (i32.const 0)))\n              (br $8)\n            ) ;; default\n            (f64.store align=1 (i32.const 0) (local.get 1))\n            (local.set 2 (f64.load align=1 (i32.const 0)))\n            (br $8)\n          ) ;; 1\n          (f64.store align=2 (i32.const 0) (local.get 1))\n          (local.set 2 (f64.load align=2 (i32.const 0)))\n          (br $8)\n        ) ;; 2\n        (f64.store align=4 (i32.const 0) (local.get 1))\n        (local.set 2 (f64.load align=4 (i32.const 0)))\n        (br $8)\n      ) ;; 4\n      (f64.store align=8 (i32.const 0) (local.get 1))\n      (local.set 2 (f64.load align=8 (i32.const 0)))\n    ) ;; 8\n    (local.get 2)\n  )\n\n  ;; $8s: i32/i64.load8_s, $8u: i32/i64.load8_u, $16s: i32/i64.load16_s, $16u: i32/i64.load16_u, $32: i32.load\n  ;; $32s: i64.load32_s, $32u: i64.load32_u, $64: i64.load\n\n  (func (export \"i32_align_switch\") (param i32 i32) (result i32)\n    (local i32 i32)\n    (local.set 2 (i32.const 10))\n    (block $32\n      (block $16u\n        (block $16s\n          (block $8u\n            (block $8s\n              (block $0\n                (br_table $0 $8s $8u $16s $16u $32 (local.get 0))\n              ) ;; 0\n              (if (i32.eq (local.get 1) (i32.const 0))\n                (then\n                  (i32.store8 (i32.const 0) (local.get 2))\n                  (local.set 3 (i32.load8_s (i32.const 0)))\n                )\n              )\n              (if (i32.eq (local.get 1) (i32.const 1))\n                (then\n                  (i32.store8 align=1 (i32.const 0) (local.get 2))\n                  (local.set 3 (i32.load8_s align=1 (i32.const 0)))\n                )\n              )\n              (br $32)\n            ) ;; 8s\n            (if (i32.eq (local.get 1) (i32.const 0))\n              (then\n                (i32.store8 (i32.const 0) (local.get 2))\n                (local.set 3 (i32.load8_u (i32.const 0)))\n              )\n            )\n            (if (i32.eq (local.get 1) (i32.const 1))\n              (then\n                (i32.store8 align=1 (i32.const 0) (local.get 2))\n                (local.set 3 (i32.load8_u align=1 (i32.const 0)))\n              )\n            )\n            (br $32)\n          ) ;; 8u\n          (if (i32.eq (local.get 1) (i32.const 0))\n            (then\n              (i32.store16 (i32.const 0) (local.get 2))\n              (local.set 3 (i32.load16_s (i32.const 0)))\n            )\n          )\n          (if (i32.eq (local.get 1) (i32.const 1))\n            (then\n              (i32.store16 align=1 (i32.const 0) (local.get 2))\n              (local.set 3 (i32.load16_s align=1 (i32.const 0)))\n            )\n          )\n          (if (i32.eq (local.get 1) (i32.const 2))\n            (then\n              (i32.store16 align=2 (i32.const 0) (local.get 2))\n              (local.set 3 (i32.load16_s align=2 (i32.const 0)))\n            )\n          )\n          (br $32)\n        ) ;; 16s\n        (if (i32.eq (local.get 1) (i32.const 0))\n          (then\n            (i32.store16 (i32.const 0) (local.get 2))\n            (local.set 3 (i32.load16_u (i32.const 0)))\n          )\n        )\n        (if (i32.eq (local.get 1) (i32.const 1))\n          (then\n            (i32.store16 align=1 (i32.const 0) (local.get 2))\n            (local.set 3 (i32.load16_u align=1 (i32.const 0)))\n          )\n        )\n        (if (i32.eq (local.get 1) (i32.const 2))\n          (then\n            (i32.store16 align=2 (i32.const 0) (local.get 2))\n            (local.set 3 (i32.load16_u align=2 (i32.const 0)))\n          )\n        )\n        (br $32)\n      ) ;; 16u\n      (if (i32.eq (local.get 1) (i32.const 0))\n        (then\n          (i32.store (i32.const 0) (local.get 2))\n          (local.set 3 (i32.load (i32.const 0)))\n        )\n      )\n      (if (i32.eq (local.get 1) (i32.const 1))\n        (then\n          (i32.store align=1 (i32.const 0) (local.get 2))\n          (local.set 3 (i32.load align=1 (i32.const 0)))\n        )\n      )\n      (if (i32.eq (local.get 1) (i32.const 2))\n        (then\n          (i32.store align=2 (i32.const 0) (local.get 2))\n          (local.set 3 (i32.load align=2 (i32.const 0)))\n        )\n      )\n      (if (i32.eq (local.get 1) (i32.const 4))\n        (then\n          (i32.store align=4 (i32.const 0) (local.get 2))\n          (local.set 3 (i32.load align=4 (i32.const 0)))\n        )\n      )\n    ) ;; 32\n    (local.get 3)\n  )\n\n  (func (export \"i64_align_switch\") (param i32 i32) (result i64)\n    (local i64 i64)\n    (local.set 2 (i64.const 10))\n    (block $64\n      (block $32u\n        (block $32s\n          (block $16u\n            (block $16s\n              (block $8u\n                (block $8s\n                  (block $0\n                    (br_table $0 $8s $8u $16s $16u $32s $32u $64 (local.get 0))\n                  ) ;; 0\n                  (if (i32.eq (local.get 1) (i32.const 0))\n                    (then\n                      (i64.store8 (i32.const 0) (local.get 2))\n                      (local.set 3 (i64.load8_s (i32.const 0)))\n                    )\n                  )\n                  (if (i32.eq (local.get 1) (i32.const 1))\n                    (then\n                      (i64.store8 align=1 (i32.const 0) (local.get 2))\n                      (local.set 3 (i64.load8_s align=1 (i32.const 0)))\n                    )\n                  )\n                  (br $64)\n                ) ;; 8s\n                (if (i32.eq (local.get 1) (i32.const 0))\n                  (then\n                    (i64.store8 (i32.const 0) (local.get 2))\n                    (local.set 3 (i64.load8_u (i32.const 0)))\n                  )\n                )\n                (if (i32.eq (local.get 1) (i32.const 1))\n                  (then\n                    (i64.store8 align=1 (i32.const 0) (local.get 2))\n                    (local.set 3 (i64.load8_u align=1 (i32.const 0)))\n                  )\n                )\n                (br $64)\n              ) ;; 8u\n              (if (i32.eq (local.get 1) (i32.const 0))\n                (then\n                  (i64.store16 (i32.const 0) (local.get 2))\n                  (local.set 3 (i64.load16_s (i32.const 0)))\n                )\n              )\n              (if (i32.eq (local.get 1) (i32.const 1))\n                (then\n                  (i64.store16 align=1 (i32.const 0) (local.get 2))\n                  (local.set 3 (i64.load16_s align=1 (i32.const 0)))\n                )\n              )\n              (if (i32.eq (local.get 1) (i32.const 2))\n                (then\n                  (i64.store16 align=2 (i32.const 0) (local.get 2))\n                  (local.set 3 (i64.load16_s align=2 (i32.const 0)))\n                )\n              )\n              (br $64)\n            ) ;; 16s\n            (if (i32.eq (local.get 1) (i32.const 0))\n              (then\n                (i64.store16 (i32.const 0) (local.get 2))\n                (local.set 3 (i64.load16_u (i32.const 0)))\n              )\n            )\n            (if (i32.eq (local.get 1) (i32.const 1))\n              (then\n                (i64.store16 align=1 (i32.const 0) (local.get 2))\n                (local.set 3 (i64.load16_u align=1 (i32.const 0)))\n              )\n            )\n            (if (i32.eq (local.get 1) (i32.const 2))\n              (then\n                (i64.store16 align=2 (i32.const 0) (local.get 2))\n                (local.set 3 (i64.load16_u align=2 (i32.const 0)))\n              )\n            )\n            (br $64)\n          ) ;; 16u\n          (if (i32.eq (local.get 1) (i32.const 0))\n            (then\n              (i64.store32 (i32.const 0) (local.get 2))\n              (local.set 3 (i64.load32_s (i32.const 0)))\n            )\n          )\n          (if (i32.eq (local.get 1) (i32.const 1))\n            (then\n              (i64.store32 align=1 (i32.const 0) (local.get 2))\n              (local.set 3 (i64.load32_s align=1 (i32.const 0)))\n            )\n          )\n          (if (i32.eq (local.get 1) (i32.const 2))\n            (then\n              (i64.store32 align=2 (i32.const 0) (local.get 2))\n              (local.set 3 (i64.load32_s align=2 (i32.const 0)))\n            )\n          )\n          (if (i32.eq (local.get 1) (i32.const 4))\n            (then\n              (i64.store32 align=4 (i32.const 0) (local.get 2))\n              (local.set 3 (i64.load32_s align=4 (i32.const 0)))\n            )\n          )\n          (br $64)\n        ) ;; 32s\n        (if (i32.eq (local.get 1) (i32.const 0))\n          (then\n            (i64.store32 (i32.const 0) (local.get 2))\n            (local.set 3 (i64.load32_u (i32.const 0)))\n          )\n        )\n        (if (i32.eq (local.get 1) (i32.const 1))\n          (then\n            (i64.store32 align=1 (i32.const 0) (local.get 2))\n            (local.set 3 (i64.load32_u align=1 (i32.const 0)))\n          )\n        )\n        (if (i32.eq (local.get 1) (i32.const 2))\n          (then\n            (i64.store32 align=2 (i32.const 0) (local.get 2))\n            (local.set 3 (i64.load32_u align=2 (i32.const 0)))\n          )\n        )\n        (if (i32.eq (local.get 1) (i32.const 4))\n          (then\n            (i64.store32 align=4 (i32.const 0) (local.get 2))\n            (local.set 3 (i64.load32_u align=4 (i32.const 0)))\n          )\n        )\n        (br $64)\n      ) ;; 32u\n      (if (i32.eq (local.get 1) (i32.const 0))\n        (then\n          (i64.store (i32.const 0) (local.get 2))\n          (local.set 3 (i64.load (i32.const 0)))\n        )\n      )\n      (if (i32.eq (local.get 1) (i32.const 1))\n        (then\n          (i64.store align=1 (i32.const 0) (local.get 2))\n          (local.set 3 (i64.load align=1 (i32.const 0)))\n        )\n      )\n      (if (i32.eq (local.get 1) (i32.const 2))\n        (then\n          (i64.store align=2 (i32.const 0) (local.get 2))\n          (local.set 3 (i64.load align=2 (i32.const 0)))\n        )\n      )\n      (if (i32.eq (local.get 1) (i32.const 4))\n        (then\n          (i64.store align=4 (i32.const 0) (local.get 2))\n          (local.set 3 (i64.load align=4 (i32.const 0)))\n        )\n      )\n      (if (i32.eq (local.get 1) (i32.const 8))\n        (then\n          (i64.store align=8 (i32.const 0) (local.get 2))\n          (local.set 3 (i64.load align=8 (i32.const 0)))\n        )\n      )\n    ) ;; 64\n    (local.get 3)\n  )\n)\n\n(assert_return (invoke \"f32_align_switch\" (i32.const 0)) (f32.const 10.0))\n(assert_return (invoke \"f32_align_switch\" (i32.const 1)) (f32.const 10.0))\n(assert_return (invoke \"f32_align_switch\" (i32.const 2)) (f32.const 10.0))\n(assert_return (invoke \"f32_align_switch\" (i32.const 3)) (f32.const 10.0))\n\n(assert_return (invoke \"f64_align_switch\" (i32.const 0)) (f64.const 10.0))\n(assert_return (invoke \"f64_align_switch\" (i32.const 1)) (f64.const 10.0))\n(assert_return (invoke \"f64_align_switch\" (i32.const 2)) (f64.const 10.0))\n(assert_return (invoke \"f64_align_switch\" (i32.const 3)) (f64.const 10.0))\n(assert_return (invoke \"f64_align_switch\" (i32.const 4)) (f64.const 10.0))\n\n(assert_return (invoke \"i32_align_switch\" (i32.const 0) (i32.const 0)) (i32.const 10))\n(assert_return (invoke \"i32_align_switch\" (i32.const 0) (i32.const 1)) (i32.const 10))\n(assert_return (invoke \"i32_align_switch\" (i32.const 1) (i32.const 0)) (i32.const 10))\n(assert_return (invoke \"i32_align_switch\" (i32.const 1) (i32.const 1)) (i32.const 10))\n(assert_return (invoke \"i32_align_switch\" (i32.const 2) (i32.const 0)) (i32.const 10))\n(assert_return (invoke \"i32_align_switch\" (i32.const 2) (i32.const 1)) (i32.const 10))\n(assert_return (invoke \"i32_align_switch\" (i32.const 2) (i32.const 2)) (i32.const 10))\n(assert_return (invoke \"i32_align_switch\" (i32.const 3) (i32.const 0)) (i32.const 10))\n(assert_return (invoke \"i32_align_switch\" (i32.const 3) (i32.const 1)) (i32.const 10))\n(assert_return (invoke \"i32_align_switch\" (i32.const 3) (i32.const 2)) (i32.const 10))\n(assert_return (invoke \"i32_align_switch\" (i32.const 4) (i32.const 0)) (i32.const 10))\n(assert_return (invoke \"i32_align_switch\" (i32.const 4) (i32.const 1)) (i32.const 10))\n(assert_return (invoke \"i32_align_switch\" (i32.const 4) (i32.const 2)) (i32.const 10))\n(assert_return (invoke \"i32_align_switch\" (i32.const 4) (i32.const 4)) (i32.const 10))\n\n(assert_return (invoke \"i64_align_switch\" (i32.const 0) (i32.const 0)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 0) (i32.const 1)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 1) (i32.const 0)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 1) (i32.const 1)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 2) (i32.const 0)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 2) (i32.const 1)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 2) (i32.const 2)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 3) (i32.const 0)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 3) (i32.const 1)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 3) (i32.const 2)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 4) (i32.const 0)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 4) (i32.const 1)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 4) (i32.const 2)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 4) (i32.const 4)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 5) (i32.const 0)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 5) (i32.const 1)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 5) (i32.const 2)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 5) (i32.const 4)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 6) (i32.const 0)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 6) (i32.const 1)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 6) (i32.const 2)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 6) (i32.const 4)) (i64.const 10))\n(assert_return (invoke \"i64_align_switch\" (i32.const 6) (i32.const 8)) (i64.const 10))\n\n;; Test that an i64 store with 4-byte alignment that's 4 bytes out of bounds traps without storing anything\n\n(module\n  (memory 1)\n  (func (export \"store\") (param i32 i64)\n    (i64.store align=4 (local.get 0) (local.get 1))\n  )\n  (func (export \"load\") (param i32) (result i32)\n    (i32.load (local.get 0))\n  )\n)\n\n(assert_trap (invoke \"store\" (i32.const 65532) (i64.const -1)) \"out of bounds memory access\")\n;; No memory was changed\n(assert_return (invoke \"load\" (i32.const 65532)) (i32.const 0))\n"
  },
  {
    "path": "test/core/binary-leb128.wast",
    "content": ";; Unsigned LEB128 can have non-minimal length\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\05\\04\\01\"                          ;; Memory section with 1 entry\n  \"\\00\\82\\00\"                          ;; no max, minimum 2\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\05\\07\\01\"                          ;; Memory section with 1 entry\n  \"\\00\\82\\80\\80\\80\\00\"                 ;; no max, minimum 2\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\05\\06\\01\"                          ;; Memory section with 1 entry\n  \"\\01\\82\\00\"                          ;; minimum 2\n  \"\\82\\00\"                             ;; max 2\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\05\\09\\01\"                          ;; Memory section with 1 entry\n  \"\\01\\82\\00\"                          ;; minimum 2\n  \"\\82\\80\\80\\80\\00\"                    ;; max 2\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\05\\03\\01\"                          ;; Memory section with 1 entry\n  \"\\00\\00\"                             ;; no max, minimum 0\n  \"\\0b\\07\\01\"                          ;; Data section with 1 entry\n  \"\\80\\00\"                             ;; Memory index 0, encoded with 2 bytes\n  \"\\41\\00\\0b\\00\"                       ;; (i32.const 0) with contents \"\"\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\04\\04\\01\"                          ;; Table section with 1 entry\n  \"\\70\\00\\00\"                          ;; no max, minimum 0, funcref\n  \"\\09\\09\\01\"                          ;; Element section with 1 entry\n  \"\\02\"                                ;; Element with explicit table index\n  \"\\80\\00\"                             ;; Table index 0, encoded with 2 bytes\n  \"\\41\\00\\0b\\00\\00\"                    ;; (i32.const 0) with no elements\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\00\"                                ;; custom section\n  \"\\8a\\00\"                             ;; section size 10, encoded with 2 bytes\n  \"\\01\"                                ;; name byte count\n  \"1\"                                  ;; name\n  \"23456789\"                           ;; sequence of bytes\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\00\"                                ;; custom section\n  \"\\0b\"                                ;; section size\n  \"\\88\\00\"                             ;; name byte count 8, encoded with 2 bytes\n  \"12345678\"                           ;; name\n  \"9\"                                  ;; sequence of bytes\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\08\\01\"                          ;; type section\n  \"\\60\"                                ;; func type\n  \"\\82\\00\"                             ;; num params 2, encoded with 2 bytes\n  \"\\7f\\7e\"                             ;; param type\n  \"\\01\"                                ;; num results\n  \"\\7f\"                                ;; result type\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\08\\01\"                          ;; type section\n  \"\\60\"                                ;; func type\n  \"\\02\"                                ;; num params\n  \"\\7f\\7e\"                             ;; param type\n  \"\\81\\00\"                             ;; num results 1, encoded with 2 bytes\n  \"\\7f\"                                ;; result type\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\05\\01\"                          ;; type section\n  \"\\60\\01\\7f\\00\"                       ;; function type\n  \"\\02\\17\\01\"                          ;; import section\n  \"\\88\\00\"                             ;; module name length 8, encoded with 2 bytes\n  \"\\73\\70\\65\\63\\74\\65\\73\\74\"           ;; module name\n  \"\\09\"                                ;; entity name length\n  \"\\70\\72\\69\\6e\\74\\5f\\69\\33\\32\"        ;; entity name\n  \"\\00\"                                ;; import kind\n  \"\\00\"                                ;; import signature index\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\05\\01\"                          ;; type section\n  \"\\60\\01\\7f\\00\"                       ;; function type\n  \"\\02\\17\\01\"                          ;; import section\n  \"\\08\"                                ;; module name length\n  \"\\73\\70\\65\\63\\74\\65\\73\\74\"           ;; module name\n  \"\\89\\00\"                             ;; entity name length 9, encoded with 2 bytes\n  \"\\70\\72\\69\\6e\\74\\5f\\69\\33\\32\"        ;; entity name\n  \"\\00\"                                ;; import kind\n  \"\\00\"                                ;; import signature index\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\05\\01\"                          ;; type section\n  \"\\60\\01\\7f\\00\"                       ;; function type\n  \"\\02\\17\\01\"                          ;; import section\n  \"\\08\"                                ;; module name length\n  \"\\73\\70\\65\\63\\74\\65\\73\\74\"           ;; module name\n  \"\\09\"                                ;; entity name length 9\n  \"\\70\\72\\69\\6e\\74\\5f\\69\\33\\32\"        ;; entity name\n  \"\\00\"                                ;; import kind\n  \"\\80\\00\"                             ;; import signature index, encoded with 2 bytes\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\04\\01\"                          ;; type section\n  \"\\60\\00\\00\"                          ;; function type\n  \"\\03\\03\\01\"                          ;; function section\n  \"\\80\\00\"                             ;; function 0 signature index, encoded with 2 bytes\n  \"\\0a\\04\\01\"                          ;; code section\n  \"\\02\\00\\0b\"                          ;; function body\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\04\\01\"                          ;; type section\n  \"\\60\\00\\00\"                          ;; fun type\n  \"\\03\\02\\01\\00\"                       ;; function section\n  \"\\07\\07\\01\"                          ;; export section\n  \"\\82\\00\"                             ;; string length 2, encoded with 2 bytes\n  \"\\66\\31\"                             ;; export name f1\n  \"\\00\"                                ;; export kind\n  \"\\00\"                                ;; export func index\n  \"\\0a\\04\\01\"                          ;; code section\n  \"\\02\\00\\0b\"                          ;; function body\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\04\\01\"                          ;; type section\n  \"\\60\\00\\00\"                          ;; fun type\n  \"\\03\\02\\01\\00\"                       ;; function section\n  \"\\07\\07\\01\"                          ;; export section\n  \"\\02\"                                ;; string length 2\n  \"\\66\\31\"                             ;; export name f1\n  \"\\00\"                                ;; export kind\n  \"\\80\\00\"                             ;; export func index, encoded with 2 bytes\n  \"\\0a\\04\\01\"                          ;; code section\n  \"\\02\\00\\0b\"                          ;; function body\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\04\\01\"                          ;; type section\n  \"\\60\\00\\00\"                          ;; fun type\n  \"\\03\\02\\01\\00\"                       ;; function section\n  \"\\0a\"                                ;; code section\n  \"\\05\"                                ;; section size\n  \"\\81\\00\"                             ;; num functions, encoded with 2 bytes\n  \"\\02\\00\\0b\"                          ;; function body\n)\n\n;; Signed LEB128 can have non-minimal length\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\07\\01\"                          ;; Global section with 1 entry\n  \"\\7f\\00\"                             ;; i32, immutable\n  \"\\41\\80\\00\"                          ;; i32.const 0\n  \"\\0b\"                                ;; end\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\07\\01\"                          ;; Global section with 1 entry\n  \"\\7f\\00\"                             ;; i32, immutable\n  \"\\41\\ff\\7f\"                          ;; i32.const -1\n  \"\\0b\"                                ;; end\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\0a\\01\"                          ;; Global section with 1 entry\n  \"\\7f\\00\"                             ;; i32, immutable\n  \"\\41\\80\\80\\80\\80\\00\"                 ;; i32.const 0\n  \"\\0b\"                                ;; end\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\0a\\01\"                          ;; Global section with 1 entry\n  \"\\7f\\00\"                             ;; i32, immutable\n  \"\\41\\ff\\ff\\ff\\ff\\7f\"                 ;; i32.const -1\n  \"\\0b\"                                ;; end\n)\n\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\07\\01\"                          ;; Global section with 1 entry\n  \"\\7e\\00\"                             ;; i64, immutable\n  \"\\42\\80\\00\"                          ;; i64.const 0 with unused bits set\n  \"\\0b\"                                ;; end\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\07\\01\"                          ;; Global section with 1 entry\n  \"\\7e\\00\"                             ;; i64, immutable\n  \"\\42\\ff\\7f\"                          ;; i64.const -1 with unused bits unset\n  \"\\0b\"                                ;; end\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n  \"\\7e\\00\"                             ;; i64, immutable\n  \"\\42\\80\\80\\80\\80\\80\\80\\80\\80\\80\\00\"  ;; i64.const 0 with unused bits set\n  \"\\0b\"                                ;; end\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n  \"\\7e\\00\"                             ;; i64, immutable\n  \"\\42\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\7f\"  ;; i64.const -1 with unused bits unset\n  \"\\0b\"                                ;; end\n)\n\n;; Unsigned LEB128 must not be overlong\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\08\\01\"                          ;; Memory section with 1 entry\n    \"\\00\\82\\80\\80\\80\\80\\00\"              ;; no max, minimum 2 with one byte too many\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\0a\\01\"                          ;; Memory section with 1 entry\n    \"\\01\\82\\00\"                          ;; minimum 2\n    \"\\82\\80\\80\\80\\80\\00\"                 ;; max 2 with one byte too many\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\03\\01\"                          ;; Memory section with 1 entry\n    \"\\00\\00\"                             ;; no max, minimum 0\n    \"\\0b\\0b\\01\"                          ;; Data section with 1 entry\n    \"\\80\\80\\80\\80\\80\\00\"                 ;; Memory index 0 with one byte too many\n    \"\\41\\00\\0b\\00\"                       ;; (i32.const 0) with contents \"\"\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\04\\04\\01\"                          ;; Table section with 1 entry\n    \"\\70\\00\\00\"                          ;; no max, minimum 0, funcref\n    \"\\09\\0b\\01\"                          ;; Element section with 1 entry\n    \"\\80\\80\\80\\80\\80\\00\"                 ;; Table index 0 with one byte too many\n    \"\\41\\00\\0b\\00\"                       ;; (i32.const 0) with no elements\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\"                                ;; custom section\n    \"\\83\\80\\80\\80\\80\\00\"                 ;; section size 3 with one byte too many\n    \"\\01\"                                ;; name byte count\n    \"1\"                                  ;; name\n    \"2\"                                  ;; sequence of bytes\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\"                                ;; custom section\n    \"\\0A\"                                ;; section size\n    \"\\83\\80\\80\\80\\80\\00\"                 ;; name byte count 3 with one byte too many\n    \"123\"                                ;; name\n    \"4\"                                  ;; sequence of bytes\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\0c\\01\"                          ;; type section\n    \"\\60\"                                ;; func type\n    \"\\82\\80\\80\\80\\80\\00\"                 ;; num params 2 with one byte too many\n    \"\\7f\\7e\"                             ;; param type\n    \"\\01\"                                ;; num result\n    \"\\7f\"                                ;; result type\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\08\\01\"                          ;; type section\n    \"\\60\"                                ;; func type\n    \"\\02\"                                ;; num params\n    \"\\7f\\7e\"                             ;; param type\n    \"\\81\\80\\80\\80\\80\\00\"                 ;; num result 1 with one byte too many\n    \"\\7f\"                                ;; result type\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\05\\01\"                          ;; type section\n    \"\\60\\01\\7f\\00\"                       ;; function type\n    \"\\02\\1b\\01\"                          ;; import section\n    \"\\88\\80\\80\\80\\80\\00\"                 ;; module name length 8 with one byte too many\n    \"\\73\\70\\65\\63\\74\\65\\73\\74\"           ;; module name\n    \"\\09\"                                ;; entity name length\n    \"\\70\\72\\69\\6e\\74\\5f\\69\\33\\32\"        ;; entity name\n    \"\\00\"                                ;; import kind\n    \"\\00\"                                ;; import signature index\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\05\\01\"                          ;; type section\n    \"\\60\\01\\7f\\00\"                       ;; function type\n    \"\\02\\1b\\01\"                          ;; import section\n    \"\\08\"                                ;; module name length\n    \"\\73\\70\\65\\63\\74\\65\\73\\74\"           ;; module name\n    \"\\89\\80\\80\\80\\80\\00\"                 ;; entity name length 9 with one byte too many\n    \"\\70\\72\\69\\6e\\74\\5f\\69\\33\\32\"        ;; entity name\n    \"\\00\"                                ;; import kind\n    \"\\00\"                                ;; import signature index\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\05\\01\"                          ;; type section\n    \"\\60\\01\\7f\\00\"                       ;; function type\n    \"\\02\\1b\\01\"                          ;; import section\n    \"\\08\"                                ;; module name length\n    \"\\73\\70\\65\\63\\74\\65\\73\\74\"           ;; module name\n    \"\\09\"                                ;; entity name length 9\n    \"\\70\\72\\69\\6e\\74\\5f\\69\\33\\32\"        ;; entity name\n    \"\\00\"                                ;; import kind\n    \"\\80\\80\\80\\80\\80\\00\"                 ;; import signature index 0 with one byte too many\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\"                          ;; type section\n    \"\\60\\00\\00\"                          ;; function type\n    \"\\03\\03\\01\"                          ;; function section\n    \"\\80\\80\\80\\80\\80\\00\"                 ;; function 0 signature index with one byte too many\n    \"\\0a\\04\\01\"                          ;; code section\n    \"\\02\\00\\0b\"                          ;; function body\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\"                          ;; type section\n    \"\\60\\00\\00\"                          ;; fun type\n    \"\\03\\02\\01\\00\"                       ;; function section\n    \"\\07\\0b\\01\"                          ;; export section\n    \"\\82\\80\\80\\80\\80\\00\"                 ;; string length 2 with one byte too many\n    \"\\66\\31\"                             ;; export name f1\n    \"\\00\"                                ;; export kind\n    \"\\00\"                                ;; export func index\n    \"\\0a\\04\\01\"                          ;; code section\n    \"\\02\\00\\0b\"                          ;; function body\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\"                          ;; type section\n    \"\\60\\00\\00\"                          ;; fun type\n    \"\\03\\02\\01\\00\"                       ;; function section\n    \"\\07\\0b\\01\"                          ;; export section\n    \"\\02\"                                ;; string length 2\n    \"\\66\\31\"                             ;; export name f1\n    \"\\00\"                                ;; export kind\n    \"\\80\\80\\80\\80\\80\\00\"                 ;; export func index 0 with one byte too many\n    \"\\0a\\04\\01\"                          ;; code section\n    \"\\02\\00\\0b\"                          ;; function body\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\"                          ;; type section\n    \"\\60\\00\\00\"                          ;; fun type\n    \"\\03\\02\\01\\00\"                       ;; function section\n    \"\\0a\"                                ;; code section\n    \"\\05\"                                ;; section size\n    \"\\81\\80\\80\\80\\80\\00\"                 ;; num functions 1 with one byte too many\n    \"\\02\\00\\0b\"                          ;; function body\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\11\\01\"                ;; Code section\n    ;; function 0\n    \"\\0f\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\28\"                      ;; i32.load\n    \"\\02\"                      ;; alignment 2\n    \"\\82\\80\\80\\80\\80\\00\"       ;; offset 2 with one byte too many\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\11\\01\"                ;; Code section\n    ;; function 0\n    \"\\0f\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\28\"                      ;; i32.load\n    \"\\82\\80\\80\\80\\80\\00\"       ;; alignment 2 with one byte too many\n    \"\\00\"                      ;; offset 0\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\12\\01\"                ;; Code section\n    ;; function 0\n    \"\\10\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\41\\03\"                   ;; i32.const 3\n    \"\\36\"                      ;; i32.store\n    \"\\82\\80\\80\\80\\80\\00\"       ;; alignment 2 with one byte too many\n    \"\\03\"                      ;; offset 3\n    \"\\0b\"                      ;; end\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\12\\01\"                ;; Code section\n    ;; function 0\n    \"\\10\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\41\\03\"                   ;; i32.const 3\n    \"\\36\"                      ;; i32.store\n    \"\\02\"                      ;; alignment 2\n    \"\\82\\80\\80\\80\\80\\00\"       ;; offset 2 with one byte too many\n    \"\\0b\"                      ;; end\n  )\n  \"integer representation too long\"\n)\n\n;; Signed LEB128 must not be overlong\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0b\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\80\\80\\80\\80\\80\\00\"              ;; i32.const 0 with one byte too many\n    \"\\0b\"                                ;; end\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0b\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\ff\\ff\\ff\\ff\\ff\\7f\"              ;; i32.const -1 with one byte too many\n    \"\\0b\"                                ;; end\n  )\n  \"integer representation too long\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\10\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\80\\80\\80\\80\\80\\80\\80\\80\\80\\80\\00\"  ;; i64.const 0 with one byte too many\n    \"\\0b\"                                ;; end\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\10\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\7f\"  ;; i64.const -1 with one byte too many\n    \"\\0b\"                                ;; end\n  )\n  \"integer representation too long\"\n)\n\n;; Unsigned LEB128s zero-extend\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\07\\01\"                          ;; Memory section with 1 entry\n    \"\\00\\82\\80\\80\\80\\70\"                 ;; no max, minimum 2 with unused bits set\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\07\\01\"                          ;; Memory section with 1 entry\n    \"\\00\\82\\80\\80\\80\\40\"                 ;; no max, minimum 2 with some unused bits set\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\09\\01\"                          ;; Memory section with 1 entry\n    \"\\01\\82\\00\"                          ;; minimum 2\n    \"\\82\\80\\80\\80\\10\"                    ;; max 2 with unused bits set\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\09\\01\"                          ;; Memory section with 1 entry\n    \"\\01\\82\\00\"                          ;; minimum 2\n    \"\\82\\80\\80\\80\\40\"                    ;; max 2 with some unused bits set\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\03\\01\"                          ;; Memory section with 1 entry\n    \"\\00\\00\"                             ;; no max, minimum 0\n    \"\\0b\\0a\\01\"                          ;; Data section with 1 entry\n    \"\\80\\80\\80\\80\\10\"                    ;; Memory index 0 with unused bits set\n    \"\\41\\00\\0b\\00\"                       ;; (i32.const 0) with contents \"\"\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\04\\04\\01\"                          ;; Table section with 1 entry\n    \"\\70\\00\\00\"                          ;; no max, minimum 0, funcref\n    \"\\09\\0a\\01\"                          ;; Element section with 1 entry\n    \"\\80\\80\\80\\80\\10\"                    ;; Table index 0 with unused bits set\n    \"\\41\\00\\0b\\00\"                       ;; (i32.const 0) with no elements\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\"                                ;; custom section\n    \"\\83\\80\\80\\80\\10\"                    ;; section size 3 with unused bits set\n    \"\\01\"                                ;; name byte count\n    \"1\"                                  ;; name\n    \"2\"                                  ;; sequence of bytes\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\"                                ;; custom section\n    \"\\09\"                                ;; section size\n    \"\\83\\80\\80\\80\\40\"                    ;; name byte count 3 with unused bits set\n    \"123\"                                ;; name\n    \"4\"                                  ;; sequence of bytes\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\0b\\01\"                          ;; type section\n    \"\\60\"                                ;; func type\n    \"\\82\\80\\80\\80\\10\"                    ;; num params 2 with unused bits set\n    \"\\7f\\7e\"                             ;; param type\n    \"\\01\"                                ;; num result\n    \"\\7f\"                                ;; result type\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\0b\\01\"                          ;; type section\n    \"\\60\"                                ;; func type\n    \"\\02\"                                ;; num params\n    \"\\7f\\7e\"                             ;; param type\n    \"\\81\\80\\80\\80\\40\"                    ;; num result 1 with unused bits set\n    \"\\7f\"                                ;; result type\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\05\\01\"                          ;; type section\n    \"\\60\\01\\7f\\00\"                       ;; function type\n    \"\\02\\1a\\01\"                          ;; import section\n    \"\\88\\80\\80\\80\\10\"                    ;; module name length 8 with unused bits set\n    \"\\73\\70\\65\\63\\74\\65\\73\\74\"           ;; module name\n    \"\\09\"                                ;; entity name length\n    \"\\70\\72\\69\\6e\\74\\5f\\69\\33\\32\"        ;; entity name\n    \"\\00\"                                ;; import kind\n    \"\\00\"                                ;; import signature index\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\05\\01\"                          ;; type section\n    \"\\60\\01\\7f\\00\"                       ;; function type\n    \"\\02\\1a\\01\"                          ;; import section\n    \"\\08\"                                ;; module name length\n    \"\\73\\70\\65\\63\\74\\65\\73\\74\"           ;; module name\n    \"\\89\\80\\80\\80\\40\"                    ;; entity name length 9 with unused bits set\n    \"\\70\\72\\69\\6e\\74\\5f\\69\\33\\32\"        ;; entity name\n    \"\\00\"                                ;; import kind\n    \"\\00\"                                ;; import signature index\n  )\n  \"integer too large\"\n)\n(assert_malformed\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\05\\01\"                          ;; type section\n  \"\\60\\01\\7f\\00\"                       ;; function type\n  \"\\02\\1a\\01\"                          ;; import section\n  \"\\08\"                                ;; module name length\n  \"\\73\\70\\65\\63\\74\\65\\73\\74\"           ;; module name\n  \"\\09\"                                ;; entity name length 9\n  \"\\70\\72\\69\\6e\\74\\5f\\69\\33\\32\"        ;; entity name\n  \"\\00\"                                ;; import kind\n  \"\\80\\80\\80\\80\\10\"                    ;; import signature index 0 with unused bits set\n)\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\"                          ;; type section\n    \"\\60\\00\\00\"                          ;; function type\n    \"\\03\\06\\01\"                          ;; function section\n    \"\\80\\80\\80\\80\\10\"                    ;; function 0 signature index with unused bits set\n    \"\\0a\\04\\01\"                          ;; code section\n    \"\\02\\00\\0b\"                          ;; function body\n  )\n  \"integer too large\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\"                          ;; type section\n    \"\\60\\00\\00\"                          ;; fun type\n    \"\\03\\02\\01\\00\"                       ;; function section\n    \"\\07\\0a\\01\"                          ;; export section\n    \"\\82\\80\\80\\80\\10\"                    ;; string length 2 with unused bits set\n    \"\\66\\31\"                             ;; export name f1\n    \"\\00\"                                ;; export kind\n    \"\\00\"                                ;; export func index\n    \"\\0a\\04\\01\"                          ;; code section\n    \"\\02\\00\\0b\"                          ;; function body\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\"                          ;; type section\n    \"\\60\\00\\00\"                          ;; fun type\n    \"\\03\\02\\01\\00\"                       ;; function section\n    \"\\07\\0a\\01\"                          ;; export section\n    \"\\02\"                                ;; string length 2\n    \"\\66\\31\"                             ;; export name f1\n    \"\\00\"                                ;; export kind\n    \"\\80\\80\\80\\80\\10\"                    ;; export func index with unused bits set\n    \"\\0a\\04\\01\"                          ;; code section\n    \"\\02\\00\\0b\"                          ;; function body\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\"                          ;; type section\n    \"\\60\\00\\00\"                          ;; fun type\n    \"\\03\\02\\01\\00\"                       ;; function section\n    \"\\0a\"                                ;; code section\n    \"\\08\"                                ;; section size\n    \"\\81\\80\\80\\80\\10\"                    ;; num functions 1 with unused bits set\n    \"\\02\\00\\0b\"                          ;; function body\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\10\\01\"                ;; Code section\n    ;; function 0\n    \"\\0e\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\28\"                      ;; i32.load\n    \"\\02\"                      ;; alignment 2\n    \"\\82\\80\\80\\80\\10\"          ;; offset 2 with unused bits set\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\10\\01\"                ;; Code section\n    ;; function 0\n    \"\\0e\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\28\"                      ;; i32.load\n    \"\\02\"                      ;; alignment 2\n    \"\\82\\80\\80\\80\\40\"          ;; offset 2 with some unused bits set\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\10\\01\"                ;; Code section\n    \"\\0e\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\28\"                      ;; i32.load\n    \"\\82\\80\\80\\80\\10\"          ;; alignment 2 with unused bits set\n    \"\\00\"                      ;; offset 0\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\10\\01\"                ;; Code section\n    ;; function 0\n    \"\\0e\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\28\"                      ;; i32.load\n    \"\\82\\80\\80\\80\\40\"          ;; alignment 2 with some unused bits set\n    \"\\00\"                      ;; offset 0\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\11\\01\"                ;; Code section\n    ;; function 0\n    \"\\0f\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\41\\03\"                   ;; i32.const 3\n    \"\\36\"                      ;; i32.store\n    \"\\82\\80\\80\\80\\10\"          ;; alignment 2 with unused bits set\n    \"\\03\"                      ;; offset 3\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\11\\01\"                ;; Code section\n    ;; function 0\n    \"\\0f\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\41\\03\"                   ;; i32.const 3\n    \"\\36\"                      ;; i32.store\n    \"\\82\\80\\80\\80\\40\"          ;; alignment 2 with some unused bits set\n    \"\\03\"                      ;; offset 3\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\11\\01\"                ;; Code section\n    ;; function 0\n    \"\\0f\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\41\\03\"                   ;; i32.const 3\n    \"\\36\"                      ;; i32.store\n    \"\\02\"                      ;; alignment 2\n    \"\\82\\80\\80\\80\\10\"          ;; offset 2 with unused bits set\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\11\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\0f\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\41\\03\"                   ;; i32.const 3\n    \"\\36\"                      ;; i32.store\n    \"\\02\"                      ;; alignment 2\n    \"\\82\\80\\80\\80\\40\"          ;; offset 2 with some unused bits set\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n\n;; Signed LEB128s sign-extend\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0a\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\80\\80\\80\\80\\70\"                 ;; i32.const 0 with unused bits set\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0a\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\ff\\ff\\ff\\ff\\0f\"                 ;; i32.const -1 with unused bits unset\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0a\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\80\\80\\80\\80\\1f\"                 ;; i32.const 0 with some unused bits set\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0a\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\ff\\ff\\ff\\ff\\4f\"                 ;; i32.const -1 with some unused bits unset\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\80\\80\\80\\80\\80\\80\\80\\80\\80\\7e\"  ;; i64.const 0 with unused bits set\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\01\"  ;; i64.const -1 with unused bits unset\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\80\\80\\80\\80\\80\\80\\80\\80\\80\\02\"  ;; i64.const 0 with some unused bits set\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\41\"  ;; i64.const -1 with some unused bits unset\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n\n\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\04\\01\"                          ;; type section\n  \"\\60\\00\\00\"                          ;; empty function type\n  \"\\03\\02\\01\"                          ;; function section\n  \"\\00\"                                ;; function 0, type 0\n  \"\\0a\\1b\\01\\19\"                       ;; code section\n  \"\\00\"                                ;; no locals\n  \"\\00\"                                ;; unreachable\n  \"\\fc\\80\\00\"                          ;; i32_trunc_sat_f32_s with 2 bytes\n  \"\\00\"                                ;; unreachable\n  \"\\fc\\81\\80\\00\"                       ;; i32_trunc_sat_f32_u with 3 bytes\n  \"\\00\"                                ;; unreachable\n  \"\\fc\\86\\80\\80\\00\"                    ;; i64_trunc_sat_f64_s with 4 bytes\n  \"\\00\"                                ;; unreachable\n  \"\\fc\\87\\80\\80\\80\\00\"                 ;; i64_trunc_sat_f64_u with 5 bytes\n  \"\\00\"                                ;; unreachable\n  \"\\0b\"                                ;; end\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\"                          ;; type section\n    \"\\60\\00\\00\"                          ;; empty function type\n    \"\\03\\02\\01\"                          ;; function section\n    \"\\00\"                                ;; function 0, type 0\n    \"\\0a\\0d\\01\\0b\"                       ;; code section\n    \"\\00\"                                ;; no locals\n    \"\\00\"                                ;; unreachable\n    \"\\fc\\87\\80\\80\\80\\80\\00\"              ;; i64_trunc_sat_f64_u with 6 bytes\n    \"\\00\"                                ;; unreachable\n    \"\\0b\"                                ;; end\n  )\n  \"integer representation too long\"\n)\n"
  },
  {
    "path": "test/core/binary.wast",
    "content": "(module binary \"\\00asm\\01\\00\\00\\00\")\n(module binary \"\\00asm\" \"\\01\\00\\00\\00\")\n(module $M1 binary \"\\00asm\\01\\00\\00\\00\")\n(module $M2 binary \"\\00asm\" \"\\01\\00\\00\\00\")\n\n(assert_malformed (module binary \"\") \"unexpected end\")\n(assert_malformed (module binary \"\\01\") \"unexpected end\")\n(assert_malformed (module binary \"\\00as\") \"unexpected end\")\n(assert_malformed (module binary \"asm\\00\") \"magic header not detected\")\n(assert_malformed (module binary \"msa\\00\") \"magic header not detected\")\n(assert_malformed (module binary \"msa\\00\\01\\00\\00\\00\") \"magic header not detected\")\n(assert_malformed (module binary \"msa\\00\\00\\00\\00\\01\") \"magic header not detected\")\n(assert_malformed (module binary \"asm\\01\\00\\00\\00\\00\") \"magic header not detected\")\n(assert_malformed (module binary \"wasm\\01\\00\\00\\00\") \"magic header not detected\")\n(assert_malformed (module binary \"\\7fasm\\01\\00\\00\\00\") \"magic header not detected\")\n(assert_malformed (module binary \"\\80asm\\01\\00\\00\\00\") \"magic header not detected\")\n(assert_malformed (module binary \"\\82asm\\01\\00\\00\\00\") \"magic header not detected\")\n(assert_malformed (module binary \"\\ffasm\\01\\00\\00\\00\") \"magic header not detected\")\n\n;; 8-byte endian-reversed.\n(assert_malformed (module binary \"\\00\\00\\00\\01msa\\00\") \"magic header not detected\")\n\n;; Middle-endian byte orderings.\n(assert_malformed (module binary \"a\\00ms\\00\\01\\00\\00\") \"magic header not detected\")\n(assert_malformed (module binary \"sm\\00a\\00\\00\\01\\00\") \"magic header not detected\")\n\n;; Upper-cased.\n(assert_malformed (module binary \"\\00ASM\\01\\00\\00\\00\") \"magic header not detected\")\n\n;; EBCDIC-encoded magic.\n(assert_malformed (module binary \"\\00\\81\\a2\\94\\01\\00\\00\\00\") \"magic header not detected\")\n\n;; Leading UTF-8 BOM.\n(assert_malformed (module binary \"\\ef\\bb\\bf\\00asm\\01\\00\\00\\00\") \"magic header not detected\")\n\n;; Malformed binary version.\n(assert_malformed (module binary \"\\00asm\") \"unexpected end\")\n(assert_malformed (module binary \"\\00asm\\01\") \"unexpected end\")\n(assert_malformed (module binary \"\\00asm\\01\\00\\00\") \"unexpected end\")\n(assert_malformed (module binary \"\\00asm\\00\\00\\00\\00\") \"unknown binary version\")\n(assert_malformed (module binary \"\\00asm\\0d\\00\\00\\00\") \"unknown binary version\")\n(assert_malformed (module binary \"\\00asm\\0e\\00\\00\\00\") \"unknown binary version\")\n(assert_malformed (module binary \"\\00asm\\00\\01\\00\\00\") \"unknown binary version\")\n(assert_malformed (module binary \"\\00asm\\00\\00\\01\\00\") \"unknown binary version\")\n(assert_malformed (module binary \"\\00asm\\00\\00\\00\\01\") \"unknown binary version\")\n\n;; Invalid section id.\n(assert_malformed (module binary \"\\00asm\" \"\\01\\00\\00\\00\" \"\\0d\\00\") \"malformed section id\")\n(assert_malformed (module binary \"\\00asm\" \"\\01\\00\\00\\00\" \"\\7f\\00\") \"malformed section id\")\n(assert_malformed (module binary \"\\00asm\" \"\\01\\00\\00\\00\" \"\\80\\00\\01\\00\") \"malformed section id\")\n(assert_malformed (module binary \"\\00asm\" \"\\01\\00\\00\\00\" \"\\81\\00\\01\\00\") \"malformed section id\")\n(assert_malformed (module binary \"\\00asm\" \"\\01\\00\\00\\00\" \"\\ff\\00\\01\\00\") \"malformed section id\")\n\n;; Unsigned LEB128 can have non-minimal length\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\05\\04\\01\"                          ;; Memory section with 1 entry\n  \"\\00\\82\\00\"                          ;; no max, minimum 2\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\05\\07\\01\"                          ;; Memory section with 1 entry\n  \"\\00\\82\\80\\80\\80\\00\"                 ;; no max, minimum 2\n)\n\n;; Signed LEB128 can have non-minimal length\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\07\\01\"                          ;; Global section with 1 entry\n  \"\\7f\\00\"                             ;; i32, immutable\n  \"\\41\\80\\00\"                          ;; i32.const 0\n  \"\\0b\"                                ;; end\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\07\\01\"                          ;; Global section with 1 entry\n  \"\\7f\\00\"                             ;; i32, immutable\n  \"\\41\\ff\\7f\"                          ;; i32.const -1\n  \"\\0b\"                                ;; end\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\0a\\01\"                          ;; Global section with 1 entry\n  \"\\7f\\00\"                             ;; i32, immutable\n  \"\\41\\80\\80\\80\\80\\00\"                 ;; i32.const 0\n  \"\\0b\"                                ;; end\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\0a\\01\"                          ;; Global section with 1 entry\n  \"\\7f\\00\"                             ;; i32, immutable\n  \"\\41\\ff\\ff\\ff\\ff\\7f\"                 ;; i32.const -1\n  \"\\0b\"                                ;; end\n)\n\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\07\\01\"                          ;; Global section with 1 entry\n  \"\\7e\\00\"                             ;; i64, immutable\n  \"\\42\\80\\00\"                          ;; i64.const 0 with unused bits set\n  \"\\0b\"                                ;; end\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\07\\01\"                          ;; Global section with 1 entry\n  \"\\7e\\00\"                             ;; i64, immutable\n  \"\\42\\ff\\7f\"                          ;; i64.const -1 with unused bits unset\n  \"\\0b\"                                ;; end\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n  \"\\7e\\00\"                             ;; i64, immutable\n  \"\\42\\80\\80\\80\\80\\80\\80\\80\\80\\80\\00\"  ;; i64.const 0 with unused bits set\n  \"\\0b\"                                ;; end\n)\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n  \"\\7e\\00\"                             ;; i64, immutable\n  \"\\42\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\7f\"  ;; i64.const -1 with unused bits unset\n  \"\\0b\"                                ;; end\n)\n\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\05\\03\\01\"                          ;; Memory section with 1 entry\n  \"\\00\\00\"                             ;; no max, minimum 0\n  \"\\0b\\06\\01\"                          ;; Data section with 1 entry\n  \"\\00\"                                ;; Memory index 0\n  \"\\41\\00\\0b\\00\"                       ;; (i32.const 0) with contents \"\"\n)\n\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\04\\04\\01\"                          ;; Table section with 1 entry\n  \"\\70\\00\\00\"                          ;; no max, minimum 0, funcref\n  \"\\09\\06\\01\"                          ;; Element section with 1 entry\n  \"\\00\"                                ;; Table index 0\n  \"\\41\\00\\0b\\00\"                       ;; (i32.const 0) with no elements\n)\n\n;; Data segment memory index can have non-minimal length\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\05\\03\\01\"                          ;; Memory section with 1 entry\n  \"\\00\\00\"                             ;; no max, minimum 0\n  \"\\0b\\07\\01\"                          ;; Data section with 1 entry\n  \"\\80\\00\"                             ;; Memory index 0, encoded with 2 bytes\n  \"\\41\\00\\0b\\00\"                       ;; (i32.const 0) with contents \"\"\n)\n\n;; Element segment table index can have non-minimal length\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\04\\04\\01\"                          ;; Table section with 1 entry\n  \"\\70\\00\\00\"                          ;; no max, minimum 0, funcref\n  \"\\09\\09\\01\"                          ;; Element section with 1 entry\n  \"\\02\\80\\00\"                          ;; Table index 0, encoded with 2 bytes\n  \"\\41\\00\\0b\\00\\00\"                    ;; (i32.const 0) with no elements\n)\n\n;; Type section with signed LEB128 encoded type\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\"                     ;; Type section id\n    \"\\05\"                     ;; Type section length\n    \"\\01\"                     ;; Types vector length\n    \"\\e0\\7f\"                  ;; Malformed functype, -0x20 in signed LEB128 encoding\n    \"\\00\\00\"\n  )\n  \"integer representation too long\"\n)\n\n;; Unsigned LEB128 must not be overlong\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\08\\01\"                          ;; Memory section with 1 entry\n    \"\\00\\82\\80\\80\\80\\80\\00\"              ;; no max, minimum 2 with one byte too many\n  )\n  \"integer representation too long\"\n)\n\n;; Signed LEB128 must not be overlong\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0b\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\80\\80\\80\\80\\80\\00\"              ;; i32.const 0 with one byte too many\n    \"\\0b\"                                ;; end\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0b\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\ff\\ff\\ff\\ff\\ff\\7f\"              ;; i32.const -1 with one byte too many\n    \"\\0b\"                                ;; end\n  )\n  \"integer representation too long\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\10\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\80\\80\\80\\80\\80\\80\\80\\80\\80\\80\\00\"  ;; i64.const 0 with one byte too many\n    \"\\0b\"                                ;; end\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\10\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\7f\"  ;; i64.const -1 with one byte too many\n    \"\\0b\"                                ;; end\n  )\n  \"integer representation too long\"\n)\n\n;; Unsigned LEB128s zero-extend\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\07\\01\"                          ;; Memory section with 1 entry\n    \"\\00\\82\\80\\80\\80\\70\"                 ;; no max, minimum 2 with unused bits set\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\07\\01\"                          ;; Memory section with 1 entry\n    \"\\00\\82\\80\\80\\80\\40\"                 ;; no max, minimum 2 with some unused bits set\n  )\n  \"integer too large\"\n)\n\n;; Signed LEB128s sign-extend\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0a\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\80\\80\\80\\80\\70\"                 ;; i32.const 0 with unused bits set\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0a\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\ff\\ff\\ff\\ff\\0f\"                 ;; i32.const -1 with unused bits unset\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0a\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\80\\80\\80\\80\\1f\"                 ;; i32.const 0 with some unused bits set\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0a\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\ff\\ff\\ff\\ff\\4f\"                 ;; i32.const -1 with some unused bits unset\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\80\\80\\80\\80\\80\\80\\80\\80\\80\\7e\"  ;; i64.const 0 with unused bits set\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\01\"  ;; i64.const -1 with unused bits unset\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\80\\80\\80\\80\\80\\80\\80\\80\\80\\02\"  ;; i64.const 0 with some unused bits set\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\41\"  ;; i64.const -1 with some unused bits unset\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\80\\80\\80\\80\\80\\80\\80\\80\\80\\7e\"  ;; i64.const 0 with unused bits set\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\01\"  ;; i64.const -1 with unused bits unset\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\80\\80\\80\\80\\80\\80\\80\\80\\80\\02\"  ;; i64.const 0 with some unused bits set\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\41\"  ;; i64.const -1 with some unused bits unset\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n\n\n;; Unsigned LEB128 must not be overlong\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\08\\01\"                          ;; Memory section with 1 entry\n    \"\\00\\82\\80\\80\\80\\80\\00\"              ;; no max, minimum 2 with one byte too many\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\11\\01\"                ;; Code section\n    ;; function 0\n    \"\\0f\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\28\"                      ;; i32.load\n    \"\\02\"                      ;; alignment 2\n    \"\\82\\80\\80\\80\\80\\00\"       ;; offset 2 with one byte too many\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\11\\01\"                ;; Code section\n    ;; function 0\n    \"\\0f\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\28\"                      ;; i32.load\n    \"\\82\\80\\80\\80\\80\\00\"       ;; alignment 2 with one byte too many\n    \"\\00\"                      ;; offset 0\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\12\\01\"                ;; Code section\n    ;; function 0\n    \"\\10\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\41\\03\"                   ;; i32.const 3\n    \"\\36\"                      ;; i32.store\n    \"\\82\\80\\80\\80\\80\\00\"       ;; alignment 2 with one byte too many\n    \"\\03\"                      ;; offset 3\n    \"\\0b\"                      ;; end\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\12\\01\"                ;; Code section\n    ;; function 0\n    \"\\10\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\41\\03\"                   ;; i32.const 3\n    \"\\36\"                      ;; i32.store\n    \"\\02\"                      ;; alignment 2\n    \"\\82\\80\\80\\80\\80\\00\"       ;; offset 2 with one byte too many\n    \"\\0b\"                      ;; end\n  )\n  \"integer representation too long\"\n)\n\n;; Signed LEB128 must not be overlong\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0b\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\80\\80\\80\\80\\80\\00\"              ;; i32.const 0 with one byte too many\n    \"\\0b\"                                ;; end\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0b\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\ff\\ff\\ff\\ff\\ff\\7f\"              ;; i32.const -1 with one byte too many\n    \"\\0b\"                                ;; end\n  )\n  \"integer representation too long\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\10\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\80\\80\\80\\80\\80\\80\\80\\80\\80\\80\\00\"  ;; i64.const 0 with one byte too many\n    \"\\0b\"                                ;; end\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\10\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\7f\"  ;; i64.const -1 with one byte too many\n    \"\\0b\"                                ;; end\n  )\n  \"integer representation too long\"\n)\n\n;; Unsigned LEB128s zero-extend\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\07\\01\"                          ;; Memory section with 1 entry\n    \"\\00\\82\\80\\80\\80\\70\"                 ;; no max, minimum 2 with unused bits set\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\07\\01\"                          ;; Memory section with 1 entry\n    \"\\00\\82\\80\\80\\80\\40\"                 ;; no max, minimum 2 with some unused bits set\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\10\\01\"                ;; Code section\n    ;; function 0\n    \"\\0e\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\28\"                      ;; i32.load\n    \"\\02\"                      ;; alignment 2\n    \"\\82\\80\\80\\80\\10\"          ;; offset 2 with unused bits set\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\10\\01\"                ;; Code section\n    ;; function 0\n    \"\\0e\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\28\"                      ;; i32.load\n    \"\\02\"                      ;; alignment 2\n    \"\\82\\80\\80\\80\\40\"          ;; offset 2 with some unused bits set\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\10\\01\"                ;; Code section\n    \"\\0e\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\28\"                      ;; i32.load\n    \"\\82\\80\\80\\80\\10\"          ;; alignment 2 with unused bits set\n    \"\\00\"                      ;; offset 0\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\10\\01\"                ;; Code section\n    ;; function 0\n    \"\\0e\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\28\"                      ;; i32.load\n    \"\\82\\80\\80\\80\\40\"          ;; alignment 2 with some unused bits set\n    \"\\00\"                      ;; offset 0\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\11\\01\"                ;; Code section\n    ;; function 0\n    \"\\0f\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\41\\03\"                   ;; i32.const 3\n    \"\\36\"                      ;; i32.store\n    \"\\82\\80\\80\\80\\10\"          ;; alignment 2 with unused bits set\n    \"\\03\"                      ;; offset 3\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\11\\01\"                ;; Code section\n    ;; function 0\n    \"\\0f\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\41\\03\"                   ;; i32.const 3\n    \"\\36\"                      ;; i32.store\n    \"\\82\\80\\80\\80\\40\"          ;; alignment 2 with some unused bits set\n    \"\\03\"                      ;; offset 3\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\11\\01\"                ;; Code section\n    ;; function 0\n    \"\\0f\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\41\\03\"                   ;; i32.const 3\n    \"\\36\"                      ;; i32.store\n    \"\\03\"                      ;; alignment 2\n    \"\\82\\80\\80\\80\\10\"          ;; offset 2 with unused bits set\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\01\"          ;; Memory section\n    \"\\0a\\11\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\0f\\01\\01\"                ;; local type count\n    \"\\7f\"                      ;; i32\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\41\\03\"                   ;; i32.const 3\n    \"\\36\"                      ;; i32.store\n    \"\\02\"                      ;; alignment 2\n    \"\\82\\80\\80\\80\\40\"          ;; offset 2 with some unused bits set\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n\n;; Signed LEB128s sign-extend\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0a\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\80\\80\\80\\80\\70\"                 ;; i32.const 0 with unused bits set\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0a\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\ff\\ff\\ff\\ff\\0f\"                 ;; i32.const -1 with unused bits unset\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0a\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\80\\80\\80\\80\\1f\"                 ;; i32.const 0 with some unused bits set\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0a\\01\"                          ;; Global section with 1 entry\n    \"\\7f\\00\"                             ;; i32, immutable\n    \"\\41\\ff\\ff\\ff\\ff\\4f\"                 ;; i32.const -1 with some unused bits unset\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\80\\80\\80\\80\\80\\80\\80\\80\\80\\7e\"  ;; i64.const 0 with unused bits set\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\01\"  ;; i64.const -1 with unused bits unset\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\80\\80\\80\\80\\80\\80\\80\\80\\80\\02\"  ;; i64.const 0 with some unused bits set\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0f\\01\"                          ;; Global section with 1 entry\n    \"\\7e\\00\"                             ;; i64, immutable\n    \"\\42\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\ff\\41\"  ;; i64.const -1 with some unused bits unset\n    \"\\0b\"                                ;; end\n  )\n  \"integer too large\"\n)\n\n;; memory.grow reserved byte equal to zero.\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\00\"          ;; Memory section\n    \"\\0a\\09\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\07\\00\"\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\40\"                      ;; memory.grow\n    \"\\01\"                      ;; memory.grow reserved byte is not equal to zero!\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"zero byte expected\"\n)\n\n;; memory.grow reserved byte should not be a \"long\" LEB128 zero.\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\00\"          ;; Memory section\n    \"\\0a\\0a\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\08\\00\"\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\40\"                      ;; memory.grow\n    \"\\80\\00\"                   ;; memory.grow reserved byte\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"zero byte expected\"\n)\n\n;; Same as above for 3, 4, and 5-byte zero encodings.\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\00\"          ;; Memory section\n    \"\\0a\\0b\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\09\\00\"\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\40\"                      ;; memory.grow\n    \"\\80\\80\\00\"                ;; memory.grow reserved byte\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"zero byte expected\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\00\"          ;; Memory section\n    \"\\0a\\0c\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\0a\\00\"\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\40\"                      ;; memory.grow\n    \"\\80\\80\\80\\00\"             ;; memory.grow reserved byte\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"zero byte expected\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\00\"          ;; Memory section\n    \"\\0a\\0d\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\0b\\00\"\n    \"\\41\\00\"                   ;; i32.const 0\n    \"\\40\"                      ;; memory.grow\n    \"\\80\\80\\80\\80\\00\"          ;; memory.grow reserved byte\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"zero byte expected\"\n)\n\n;; memory.size reserved byte equal to zero.\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\00\"          ;; Memory section\n    \"\\0a\\07\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\05\\00\"\n    \"\\3f\"                      ;; memory.size\n    \"\\01\"                      ;; memory.size reserved byte is not equal to zero!\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"zero byte expected\"\n)\n\n;; memory.size reserved byte should not be a \"long\" LEB128 zero.\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\00\"          ;; Memory section\n    \"\\0a\\08\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\06\\00\"\n    \"\\3f\"                      ;; memory.size\n    \"\\80\\00\"                   ;; memory.size reserved byte\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"zero byte expected\"\n)\n\n;; Same as above for 3, 4, and 5-byte zero encodings.\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\00\"          ;; Memory section\n    \"\\0a\\09\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\07\\00\"\n    \"\\3f\"                      ;; memory.size\n    \"\\80\\80\\00\"                ;; memory.size reserved byte\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"zero byte expected\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\00\"          ;; Memory section\n    \"\\0a\\0a\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\08\\00\"\n    \"\\3f\"                      ;; memory.size\n    \"\\80\\80\\80\\00\"             ;; memory.size reserved byte\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"zero byte expected\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\00\"          ;; Memory section\n    \"\\0a\\0b\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\09\\00\"\n    \"\\3f\"                      ;; memory.size\n    \"\\80\\80\\80\\80\\00\"          ;; memory.size reserved byte\n    \"\\1a\"                      ;; drop\n    \"\\0b\"                      ;; end\n  )\n  \"zero byte expected\"\n)\n\n;; Local number is unsigned 32 bit\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\0a\\0c\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\0a\\02\"\n    \"\\80\\80\\80\\80\\10\\7f\"       ;; 0x100000000 i32\n    \"\\02\\7e\"                   ;; 0x00000002 i64\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n\n;; Local number is unsigned 32 bit\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\0a\\0c\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\0a\\02\"\n    \"\\80\\80\\80\\80\\10\\7f\"       ;; 0x100000000 i32\n    \"\\02\\7e\"                   ;; 0x00000002 i64\n    \"\\0b\"                      ;; end\n  )\n  \"integer too large\"\n)\n\n;; No more than 2^32-1 locals.\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\0a\\0c\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\0a\\02\"\n    \"\\ff\\ff\\ff\\ff\\0f\\7f\"       ;; 0xFFFFFFFF i32\n    \"\\02\\7e\"                   ;; 0x00000002 i64\n    \"\\0b\"                      ;; end\n  )\n  \"too many locals\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\06\\01\\60\\02\\7f\\7f\\00\" ;; Type section: (param i32 i32)\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\0a\\1c\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\1a\\04\"\n    \"\\80\\80\\80\\80\\04\\7f\"       ;; 0x40000000 i32\n    \"\\80\\80\\80\\80\\04\\7e\"       ;; 0x40000000 i64\n    \"\\80\\80\\80\\80\\04\\7d\"       ;; 0x40000000 f32\n    \"\\80\\80\\80\\80\\04\\7c\"       ;; 0x40000000 f64\n    \"\\0b\"                      ;; end\n  )\n  \"too many locals\"\n)\n\n;; Local count can be 0.\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\04\\01\\60\\00\\00\"     ;; Type section\n  \"\\03\\02\\01\\00\"           ;; Function section\n  \"\\0a\\0a\\01\"              ;; Code section\n\n  ;; function 0\n  \"\\08\\03\"\n  \"\\00\\7f\"                 ;; 0 i32\n  \"\\00\\7e\"                 ;; 0 i64\n  \"\\02\\7d\"                 ;; 2 f32\n  \"\\0b\"                    ;; end\n)\n\n;; Function section has non-zero count, but code section is absent.\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"  ;; Type section\n    \"\\03\\03\\02\\00\\00\"     ;; Function section with 2 functions\n  )\n  \"function and code section have inconsistent lengths\"\n)\n\n;; Code section has non-zero count, but function section is absent.\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\0a\\04\\01\\02\\00\\0b\"  ;; Code section with 1 empty function\n  )\n  \"function and code section have inconsistent lengths\"\n)\n\n;; Function section count > code section count\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"  ;; Type section\n    \"\\03\\03\\02\\00\\00\"     ;; Function section with 2 functions\n    \"\\0a\\04\\01\\02\\00\\0b\"  ;; Code section with 1 empty function\n  )\n  \"function and code section have inconsistent lengths\"\n)\n\n;; Function section count < code section count\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"           ;; Type section\n    \"\\03\\02\\01\\00\"                 ;; Function section with 1 function\n    \"\\0a\\07\\02\\02\\00\\0b\\02\\00\\0b\"  ;; Code section with 2 empty functions\n  )\n  \"function and code section have inconsistent lengths\"\n)\n\n;; Function section has zero count, and code section is absent.\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\03\\01\\00\"  ;; Function section with 0 functions\n)\n\n;; Code section has zero count, and function section is absent.\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\0a\\01\\00\"  ;; Code section with 0 functions\n)\n\n;; Fewer passive segments than datacount\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\0c\\01\\03\"                   ;; Datacount section with value \"3\"\n    \"\\0b\\05\\02\"                   ;; Data section with two entries\n    \"\\01\\00\"                      ;; Passive data section\n    \"\\01\\00\")                     ;; Passive data section\n  \"data count and data section have inconsistent lengths\")\n\n;; More passive segments than datacount\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\0c\\01\\01\"                   ;; Datacount section with value \"1\"\n    \"\\0b\\05\\02\"                   ;; Data section with two entries\n    \"\\01\\00\"                      ;; Passive data section\n    \"\\01\\00\")                     ;; Passive data section\n  \"data count and data section have inconsistent lengths\")\n\n;; memory.init requires a datacount section\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\00\"          ;; Memory section\n    \"\\0a\\0e\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\0c\\00\"\n    \"\\41\\00\"                   ;; zero args\n    \"\\41\\00\"\n    \"\\41\\00\"\n    \"\\fc\\08\\00\\00\"             ;; memory.init\n    \"\\0b\"\n\n    \"\\0b\\03\\01\\01\\00\"          ;; Data section\n  )                            ;; end\n  \"data count section required\")\n\n;; data.drop requires a datacount section\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\05\\03\\01\\00\\00\"          ;; Memory section\n    \"\\0a\\07\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\05\\00\"\n    \"\\fc\\09\\00\"                ;; data.drop\n    \"\\0b\"\n\n    \"\\0b\\03\\01\\01\\00\"          ;; Data section\n  )                            ;; end\n  \"data count section required\")\n\n;; passive element segment containing opcode other than ref.func or ref.null\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n\n    \"\\03\\02\\01\\00\"             ;; Function section\n\n    \"\\04\\04\\01\"                ;; Table section with 1 entry\n    \"\\70\\00\\00\"                ;; no max, minimum 0, funcref\n\n    \"\\05\\03\\01\\00\\00\"          ;; Memory section\n\n    \"\\09\\07\\01\"                ;; Element section with one segment\n    \"\\05\\70\"                   ;; Passive, funcref\n    \"\\01\"                      ;; 1 element\n    \"\\d3\\00\\0b\"                ;; bad opcode, index 0, end\n\n    \"\\0a\\04\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\02\\00\"\n    \"\\0b\")                     ;; end\n  \"illegal opcode\")\n\n;; passive element segment containing type other than funcref\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n\n    \"\\03\\02\\01\\00\"             ;; Function section\n\n    \"\\04\\04\\01\"                ;; Table section with 1 entry\n    \"\\70\\00\\00\"                ;; no max, minimum 0, funcref\n\n    \"\\05\\03\\01\\00\\00\"          ;; Memory section\n\n    \"\\09\\07\\01\"                ;; Element section with one segment\n    \"\\05\\7f\"                   ;; Passive, i32\n    \"\\01\"                      ;; 1 element\n    \"\\d2\\00\\0b\"                ;; ref.func, index 0, end\n\n    \"\\0a\\04\\01\"                ;; Code section\n\n    ;; function 0\n    \"\\02\\00\"\n    \"\\0b\")                     ;; end\n  \"malformed reference type\")\n\n;; passive element segment containing opcode ref.func\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n\n  \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n\n  \"\\03\\02\\01\\00\"             ;; Function section\n\n  \"\\04\\04\\01\"                ;; Table section with 1 entry\n  \"\\70\\00\\00\"                ;; no max, minimum 0, funcref\n\n  \"\\05\\03\\01\\00\\00\"          ;; Memory section\n\n  \"\\09\\07\\01\"                ;; Element section with one segment\n  \"\\05\\70\"                   ;; Passive, funcref\n  \"\\01\"                      ;; 1 element\n  \"\\d2\\00\\0b\"                ;; ref.func, index 0, end\n\n  \"\\0a\\04\\01\"                ;; Code section\n\n  ;; function 0\n  \"\\02\\00\"\n  \"\\0b\")                     ;; end\n\n;; passive element segment containing opcode ref.null\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n\n  \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n\n  \"\\03\\02\\01\\00\"             ;; Function section\n\n  \"\\04\\04\\01\"                ;; Table section with 1 entry\n  \"\\70\\00\\00\"                ;; no max, minimum 0, funcref\n\n  \"\\05\\03\\01\\00\\00\"          ;; Memory section\n\n  \"\\09\\07\\01\"                ;; Element section with one segment\n  \"\\05\\70\"                   ;; Passive, funcref\n  \"\\01\"                      ;; 1 element\n  \"\\d0\\70\\0b\"                ;; ref.null, end\n\n  \"\\0a\\04\\01\"                ;; Code section\n\n  ;; function 0\n  \"\\02\\00\"\n  \"\\0b\")                     ;; end\n\n\n;; Type count can be zero\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\01\\00\"                               ;; type count can be zero\n)\n\n;; 2 type declared, 1 given\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\07\\02\"                             ;; type section with inconsistent count (2 declared, 1 given)\n    \"\\60\\00\\00\"                             ;; 1st type\n    ;; \"\\60\\00\\00\"                          ;; 2nd type (missed)\n  )\n  \"unexpected end of section or function\"\n)\n\n;; 1 type declared, 2 given\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\07\\01\"                             ;; type section with inconsistent count (1 declared, 2 given)\n    \"\\60\\00\\00\"                             ;; 1st type\n    \"\\60\\00\\00\"                             ;; 2nd type (redundant)\n  )\n  \"section size mismatch\"\n)\n\n;; Import count can be zero\n(module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\05\\01\"                             ;; type section\n    \"\\60\\01\\7f\\00\"                          ;; type 0\n    \"\\02\\01\\00\"                             ;; import count can be zero\n)\n\n;; Malformed import kind\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\02\\04\\01\"                           ;; import section with single entry\n      \"\\00\"                                 ;; string length 0\n      \"\\00\"                                 ;; string length 0\n      \"\\04\"                                 ;; malformed import kind\n  )\n  \"malformed import kind\"\n)\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\02\\05\\01\"                           ;; import section with single entry\n      \"\\00\"                                 ;; string length 0\n      \"\\00\"                                 ;; string length 0\n      \"\\04\"                                 ;; malformed import kind\n      \"\\00\"                                 ;; dummy byte\n  )\n  \"malformed import kind\"\n)\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\02\\04\\01\"                           ;; import section with single entry\n      \"\\00\"                                 ;; string length 0\n      \"\\00\"                                 ;; string length 0\n      \"\\05\"                                 ;; malformed import kind\n  )\n  \"malformed import kind\"\n)\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\02\\05\\01\"                           ;; import section with single entry\n      \"\\00\"                                 ;; string length 0\n      \"\\00\"                                 ;; string length 0\n      \"\\05\"                                 ;; malformed import kind\n      \"\\00\"                                 ;; dummy byte\n  )\n  \"malformed import kind\"\n)\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\02\\04\\01\"                           ;; import section with single entry\n      \"\\00\"                                 ;; string length 0\n      \"\\00\"                                 ;; string length 0\n      \"\\80\"                                 ;; malformed import kind\n  )\n  \"malformed import kind\"\n)\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\02\\05\\01\"                           ;; import section with single entry\n      \"\\00\"                                 ;; string length 0\n      \"\\00\"                                 ;; string length 0\n      \"\\80\"                                 ;; malformed import kind\n      \"\\00\"                                 ;; dummy byte\n  )\n  \"malformed import kind\"\n)\n\n;; 2 import declared, 1 given\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\01\\05\\01\"                           ;; type section\n      \"\\60\\01\\7f\\00\"                        ;; type 0\n      \"\\02\\16\\02\"                           ;; import section with inconsistent count (2 declared, 1 given)\n      ;; 1st import\n      \"\\08\"                                 ;; string length\n      \"\\73\\70\\65\\63\\74\\65\\73\\74\"            ;; spectest\n      \"\\09\"                                 ;; string length\n      \"\\70\\72\\69\\6e\\74\\5f\\69\\33\\32\"         ;; print_i32\n      \"\\00\\00\"                              ;; import kind, import signature index\n      ;; 2nd import\n      ;; (missed)\n  )\n  \"unexpected end of section or function\"\n)\n\n;; 1 import declared, 2 given\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\01\\09\\02\"                           ;; type section\n      \"\\60\\01\\7f\\00\"                        ;; type 0\n      \"\\60\\01\\7d\\00\"                        ;; type 1\n      \"\\02\\2b\\01\"                           ;; import section with inconsistent count (1 declared, 2 given)\n      ;; 1st import\n      \"\\08\"                                 ;; string length\n      \"\\73\\70\\65\\63\\74\\65\\73\\74\"            ;; spectest\n      \"\\09\"                                 ;; string length\n      \"\\70\\72\\69\\6e\\74\\5f\\69\\33\\32\"         ;; print_i32\n      \"\\00\\00\"                              ;; import kind, import signature index\n      ;; 2nd import\n      ;; (redundant)\n      \"\\08\"                                 ;; string length\n      \"\\73\\70\\65\\63\\74\\65\\73\\74\"            ;; spectest\n      \"\\09\"                                 ;; string length\n      \"\\70\\72\\69\\6e\\74\\5f\\66\\33\\32\"         ;; print_f32\n      \"\\00\\01\"                              ;; import kind, import signature index\n  )\n  \"section size mismatch\"\n)\n\n;; Table count can be zero\n(module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\04\\01\\00\"                             ;; table count can be zero\n)\n\n;; 1 table declared, 0 given\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\04\\01\\01\"                           ;; table section with inconsistent count (1 declared, 0 given)\n      ;; \"\\70\\01\\00\\00\"                     ;; table entity\n  )\n  \"unexpected end of section or function\"\n)\n\n;; Malformed table limits flag\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\05\\03\\01\"                           ;; table section with one entry\n      \"\\70\"                                 ;; anyfunc\n      \"\\02\"                                 ;; malformed table limits flag\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\05\\04\\01\"                           ;; table section with one entry\n      \"\\70\"                                 ;; anyfunc\n      \"\\02\"                                 ;; malformed table limits flag\n      \"\\00\"                                 ;; dummy byte\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\05\\06\\01\"                           ;; table section with one entry\n      \"\\70\"                                 ;; anyfunc\n      \"\\81\\00\"                              ;; malformed table limits flag as LEB128\n      \"\\00\\00\"                              ;; dummy bytes\n  )\n  \"integer too large\"\n)\n\n;; Memory count can be zero\n(module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\01\\00\"                             ;; memory count can be zero\n)\n\n;; 1 memory declared, 0 given\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\05\\01\\01\"                           ;; memory section with inconsistent count (1 declared, 0 given)\n      ;; \"\\00\\00\"                           ;; memory 0 (missed)\n  )\n  \"unexpected end of section or function\"\n)\n\n;; Malformed memory limits flag\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\05\\02\\01\"                           ;; memory section with one entry\n      \"\\02\"                                 ;; malformed memory limits flag\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\05\\03\\01\"                           ;; memory section with one entry\n      \"\\02\"                                 ;; malformed memory limits flag\n      \"\\00\"                                 ;; dummy byte\n  )\n  \"integer too large\"\n)\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\05\\05\\01\"                           ;; memory section with one entry\n      \"\\81\\00\"                              ;; malformed memory limits flag as LEB128\n      \"\\00\\00\"                              ;; dummy bytes\n  )\n  \"integer representation too long\"\n)\n(assert_malformed\n  (module binary\n      \"\\00asm\" \"\\01\\00\\00\\00\"\n      \"\\05\\05\\01\"                           ;; memory section with one entry\n      \"\\81\\01\"                              ;; malformed memory limits flag as LEB128\n      \"\\00\\00\"                              ;; dummy bytes\n  )\n  \"integer representation too long\"\n)\n\n;; Global count can be zero\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\06\\01\\00\"                               ;; global count can be zero\n)\n\n;; 2 global declared, 1 given\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\06\\02\"                             ;; global section with inconsistent count (2 declared, 1 given)\n    \"\\7f\\00\\41\\00\\0b\"                       ;; global 0\n    ;; \"\\7f\\00\\41\\00\\0b\"                    ;; global 1 (missed)\n  )\n  \"unexpected end of section or function\"\n)\n\n;; 1 global declared, 2 given\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\0b\\01\"                             ;; global section with inconsistent count (1 declared, 2 given)\n    \"\\7f\\00\\41\\00\\0b\"                       ;; global 0\n    \"\\7f\\00\\41\\00\\0b\"                       ;; global 1 (redundant)\n  )\n  \"section size mismatch\"\n)\n\n;; Export count can be 0\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\04\\01\"                               ;; type section\n  \"\\60\\00\\00\"                               ;; type 0\n  \"\\03\\03\\02\\00\\00\"                         ;; func section\n  \"\\07\\01\\00\"                               ;; export count can be zero\n  \"\\0a\\07\\02\"                               ;; code section\n  \"\\02\\00\\0b\"                               ;; function body 0\n  \"\\02\\00\\0b\"                               ;; function body 1\n)\n\n;; 2 export declared, 1 given\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\"                             ;; type section\n    \"\\60\\00\\00\"                             ;; type 0\n    \"\\03\\03\\02\\00\\00\"                       ;; func section\n    \"\\07\\06\\02\"                             ;; export section with inconsistent count (2 declared, 1 given)\n    \"\\02\"                                   ;; export 0\n    \"\\66\\31\"                                ;; export name\n    \"\\00\\00\"                                ;; export kind, export func index\n    ;; \"\\02\"                                ;; export 1 (missed)\n    ;; \"\\66\\32\"                             ;; export name\n    ;; \"\\00\\01\"                             ;; export kind, export func index\n    \"\\0a\\07\\02\"                             ;; code section\n    \"\\02\\00\\0b\"                             ;; function body 0\n    \"\\02\\00\\0b\"                             ;; function body 1\n  )\n  \"unexpected end of section or function\"\n)\n\n;; 1 export declared, 2 given\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\"                             ;; type section\n    \"\\60\\00\\00\"                             ;; type 0\n    \"\\03\\03\\02\\00\\00\"                       ;; func section\n    \"\\07\\0b\\01\"                             ;; export section with inconsistent count (1 declared, 2 given)\n    \"\\02\"                                   ;; export 0\n    \"\\66\\31\"                                ;; export name\n    \"\\00\\00\"                                ;; export kind, export func index\n    \"\\02\"                                   ;; export 1 (redundant)\n    \"\\66\\32\"                                ;; export name\n    \"\\00\\01\"                                ;; export kind, export func index\n    \"\\0a\\07\\02\"                             ;; code section\n    \"\\02\\00\\0b\"                             ;; function body 0\n    \"\\02\\00\\0b\"                             ;; function body 1\n  )\n  \"section size mismatch\"\n)\n\n;; elem segment count can be zero\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\04\\01\"                               ;; type section\n  \"\\60\\00\\00\"                               ;; type 0\n  \"\\03\\02\\01\\00\"                            ;; func section\n  \"\\04\\04\\01\"                               ;; table section\n  \"\\70\\00\\01\"                               ;; table 0\n  \"\\09\\01\\00\"                               ;; elem segment count can be zero\n  \"\\0a\\04\\01\"                               ;; code section\n  \"\\02\\00\\0b\"                               ;; function body\n)\n\n;; 2 elem segment declared, 1 given\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\"                             ;; type section\n    \"\\60\\00\\00\"                             ;; type 0\n    \"\\03\\02\\01\\00\"                          ;; func section\n    \"\\04\\04\\01\"                             ;; table section\n    \"\\70\\00\\01\"                             ;; table 0\n    \"\\09\\07\\02\"                             ;; elem with inconsistent segment count (2 declared, 1 given)\n    \"\\00\\41\\00\\0b\\01\\00\"                    ;; elem 0\n    ;; \"\\00\\41\\00\\0b\\01\\00\"                 ;; elem 1 (missed)\n  )\n  \"unexpected end\"\n)\n\n;; 2 elem segment declared, 1.5 given\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\"                             ;; type section\n    \"\\60\\00\\00\"                             ;; type 0\n    \"\\03\\02\\01\\00\"                          ;; func section\n    \"\\04\\04\\01\"                             ;; table section\n    \"\\70\\00\\01\"                             ;; table 0\n    \"\\09\\07\\02\"                             ;; elem with inconsistent segment count (2 declared, 1 given)\n    \"\\00\\41\\00\\0b\\01\\00\"                    ;; elem 0\n    \"\\00\\41\\00\"                             ;; elem 1 (partial)\n    ;; \"\\0b\\01\\00\"                          ;; elem 1 (missing part)\n  )\n  \"unexpected end\"\n)\n\n;; 1 elem segment declared, 2 given\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\"                             ;; type section\n    \"\\60\\00\\00\"                             ;; type 0\n    \"\\03\\02\\01\\00\"                          ;; func section\n    \"\\04\\04\\01\"                             ;; table section\n    \"\\70\\00\\01\"                             ;; table 0\n    \"\\09\\0d\\01\"                             ;; elem with inconsistent segment count (1 declared, 2 given)\n    \"\\00\\41\\00\\0b\\01\\00\"                    ;; elem 0\n    \"\\00\\41\\00\\0b\\01\\00\"                    ;; elem 1 (redundant)\n    \"\\0a\\04\\01\"                             ;; code section\n    \"\\02\\00\\0b\"                             ;; function body\n  )\n  \"section size mismatch\"\n)\n\n;; data segment count can be zero\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\05\\03\\01\"                               ;; memory section\n  \"\\00\\01\"                                  ;; memory 0\n  \"\\0b\\01\\00\"                               ;; data segment count can be zero\n)\n\n;; 2 data segment declared, 1 given\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\03\\01\"                             ;; memory section\n    \"\\00\\01\"                                ;; memory 0\n    \"\\0b\\07\\02\"                             ;; data with inconsistent segment count (2 declared, 1 given)\n    \"\\00\\41\\00\\0b\\01\\61\"                    ;; data 0\n    ;; \"\\00\\41\\01\\0b\\01\\62\"                 ;; data 1 (missed)\n  )\n  \"unexpected end of section or function\"\n)\n\n;; 1 data segment declared, 2 given\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\03\\01\"                             ;; memory section\n    \"\\00\\01\"                                ;; memory 0\n    \"\\0b\\0d\\01\"                             ;; data with inconsistent segment count (1 declared, 2 given)\n    \"\\00\\41\\00\\0b\\01\\61\"                    ;; data 0\n    \"\\00\\41\\01\\0b\\01\\62\"                    ;; data 1 (redundant)\n  )\n  \"section size mismatch\"\n)\n\n;; data segment has 7 bytes declared, but 6 bytes given\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\03\\01\"                             ;; memory section\n    \"\\00\\01\"                                ;; memory 0\n    \"\\0b\\0c\\01\"                             ;; data section\n    \"\\00\\41\\03\\0b\"                          ;; data segment 0\n    \"\\07\"                                   ;; data segment size with inconsistent lengths (7 declared, 6 given)\n    \"\\61\\62\\63\\64\\65\\66\"                    ;; 6 bytes given\n  )\n  \"unexpected end of section or function\"\n)\n\n;; data segment has 5 bytes declared, but 6 bytes given\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\03\\01\"                             ;; memory section\n    \"\\00\\01\"                                ;; memory 0\n    \"\\0b\\0c\\01\"                             ;; data section\n    \"\\00\\41\\00\\0b\"                          ;; data segment 0\n    \"\\05\"                                   ;; data segment size with inconsistent lengths (5 declared, 6 given)\n    \"\\61\\62\\63\\64\\65\\66\"                    ;; 6 bytes given\n  )\n  \"section size mismatch\"\n)\n\n;; br_table target count can be zero\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\04\\01\"                               ;; type section\n  \"\\60\\00\\00\"                               ;; type 0\n  \"\\03\\02\\01\\00\"                            ;; func section\n  \"\\0a\\11\\01\"                               ;; code section\n  \"\\0f\\00\"                                  ;; func 0\n  \"\\02\\40\"                                  ;; block 0\n  \"\\41\\01\"                                  ;; condition of if 0\n  \"\\04\\40\"                                  ;; if 0\n  \"\\41\\01\"                                  ;; index of br_table element\n  \"\\0e\\00\"                                  ;; br_table target count can be zero\n  \"\\02\"                                     ;; break depth for default\n  \"\\0b\\0b\\0b\"                               ;; end\n)\n\n;; 1 br_table target declared, 2 given\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\"                             ;; type section\n    \"\\60\\00\\00\"                             ;; type 0\n    \"\\03\\02\\01\\00\"                          ;; func section\n    \"\\0a\\12\\01\"                             ;; code section\n    \"\\11\\00\"                                ;; func 0\n    \"\\02\\40\"                                ;; block 0\n    \"\\41\\01\"                                ;; condition of if 0\n    \"\\04\\40\"                                ;; if 0\n    \"\\41\\01\"                                ;; index of br_table element\n    \"\\0e\\01\"                                ;; br_table with inconsistent target count (1 declared, 2 given)\n    \"\\00\"                                   ;; break depth 0\n    \"\\01\"                                   ;; break depth 1\n    \"\\02\"                                   ;; break depth for default\n    \"\\0b\\0b\\0b\"                             ;; end\n  )\n  \"unexpected end\"\n)\n\n;; Start section\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n  \"\\03\\02\\01\\00\"             ;; Function section\n  \"\\08\\01\\00\"                ;; Start section: function 0\n\n  \"\\0a\\04\\01\"                ;; Code section\n  ;; function 0\n  \"\\02\\00\"\n  \"\\0b\"                      ;; end\n)\n\n;; Multiple start sections\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\04\\01\\60\\00\\00\"       ;; Type section\n    \"\\03\\02\\01\\00\"             ;; Function section\n    \"\\08\\01\\00\"                ;; Start section: function 0\n    \"\\08\\01\\00\"                ;; Start section: function 0\n\n    \"\\0a\\04\\01\"                ;; Code section\n    ;; function 0\n    \"\\02\\00\"\n    \"\\0b\"                      ;; end\n  )\n  \"junk after last section\"\n)\n"
  },
  {
    "path": "test/core/block.wast",
    "content": ";; Test `block` operator\n\n(module\n  ;; Auxiliary definition\n  (memory 1)\n\n  (func $dummy)\n\n  (func (export \"empty\")\n    (block)\n    (block $l)\n  )\n\n  (func (export \"singular\") (result i32)\n    (block (nop))\n    (block (result i32) (i32.const 7))\n  )\n\n  (func (export \"multi\") (result i32)\n    (block (call $dummy) (call $dummy) (call $dummy) (call $dummy))\n    (block (result i32)\n      (call $dummy) (call $dummy) (call $dummy) (i32.const 7) (call $dummy)\n    )\n    (drop)\n    (block (result i32 i64 i32)\n      (call $dummy) (call $dummy) (call $dummy) (i32.const 8) (call $dummy)\n      (call $dummy) (call $dummy) (call $dummy) (i64.const 7) (call $dummy)\n      (call $dummy) (call $dummy) (call $dummy) (i32.const 9) (call $dummy)\n    )\n    (drop) (drop)\n  )\n\n  (func (export \"nested\") (result i32)\n    (block (result i32)\n      (block (call $dummy) (block) (nop))\n      (block (result i32) (call $dummy) (i32.const 9))\n    )\n  )\n\n  (func (export \"deep\") (result i32)\n    (block (result i32) (block (result i32)\n      (block (result i32) (block (result i32)\n        (block (result i32) (block (result i32)\n          (block (result i32) (block (result i32)\n            (block (result i32) (block (result i32)\n              (block (result i32) (block (result i32)\n                (block (result i32) (block (result i32)\n                  (block (result i32) (block (result i32)\n                    (block (result i32) (block (result i32)\n                      (block (result i32) (block (result i32)\n                        (block (result i32) (block (result i32)\n                          (block (result i32) (block (result i32)\n                            (block (result i32) (block (result i32)\n                              (block (result i32) (block (result i32)\n                                (block (result i32) (block (result i32)\n                                  (block (result i32) (block (result i32)\n                                    (block (result i32) (block (result i32)\n                                      (block (result i32) (block (result i32)\n                                        (block (result i32) (block (result i32)\n                                          (call $dummy) (i32.const 150)\n                                        ))\n                                      ))\n                                    ))\n                                  ))\n                                ))\n                              ))\n                            ))\n                          ))\n                        ))\n                      ))\n                    ))\n                  ))\n                ))\n              ))\n            ))\n          ))\n        ))\n      ))\n    ))\n  )\n\n  (func (export \"as-select-first\") (result i32)\n    (select (block (result i32) (i32.const 1)) (i32.const 2) (i32.const 3))\n  )\n  (func (export \"as-select-mid\") (result i32)\n    (select (i32.const 2) (block (result i32) (i32.const 1)) (i32.const 3))\n  )\n  (func (export \"as-select-last\") (result i32)\n    (select (i32.const 2) (i32.const 3) (block (result i32) (i32.const 1)))\n  )\n\n  (func (export \"as-loop-first\") (result i32)\n    (loop (result i32) (block (result i32) (i32.const 1)) (call $dummy) (call $dummy))\n  )\n  (func (export \"as-loop-mid\") (result i32)\n    (loop (result i32) (call $dummy) (block (result i32) (i32.const 1)) (call $dummy))\n  )\n  (func (export \"as-loop-last\") (result i32)\n    (loop (result i32) (call $dummy) (call $dummy) (block (result i32) (i32.const 1)))\n  )\n\n  (func (export \"as-if-condition\")\n    (block (result i32) (i32.const 1)) (if (then (call $dummy)))\n  )\n  (func (export \"as-if-then\") (result i32)\n    (if (result i32) (i32.const 1) (then (block (result i32) (i32.const 1))) (else (i32.const 2)))\n  )\n  (func (export \"as-if-else\") (result i32)\n    (if (result i32) (i32.const 1) (then (i32.const 2)) (else (block (result i32) (i32.const 1))))\n  )\n\n  (func (export \"as-br_if-first\") (result i32)\n    (block (result i32) (br_if 0 (block (result i32) (i32.const 1)) (i32.const 2)))\n  )\n  (func (export \"as-br_if-last\") (result i32)\n    (block (result i32) (br_if 0 (i32.const 2) (block (result i32) (i32.const 1))))\n  )\n\n  (func (export \"as-br_table-first\") (result i32)\n    (block (result i32) (block (result i32) (i32.const 1)) (i32.const 2) (br_table 0 0))\n  )\n  (func (export \"as-br_table-last\") (result i32)\n    (block (result i32) (i32.const 2) (block (result i32) (i32.const 1)) (br_table 0 0))\n  )\n\n  (func $func (param i32 i32) (result i32) (local.get 0))\n  (type $check (func (param i32 i32) (result i32)))\n  (table funcref (elem $func))\n  (func (export \"as-call_indirect-first\") (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (block (result i32) (i32.const 1)) (i32.const 2) (i32.const 0)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-mid\") (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (i32.const 2) (block (result i32) (i32.const 1)) (i32.const 0)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-last\") (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (i32.const 1) (i32.const 2) (block (result i32) (i32.const 0))\n      )\n    )\n  )\n\n  (func (export \"as-store-first\")\n    (block (result i32) (i32.const 1)) (i32.const 1) (i32.store)\n  )\n  (func (export \"as-store-last\")\n    (i32.const 10) (block (result i32) (i32.const 1)) (i32.store)\n  )\n\n  (func (export \"as-memory.grow-value\") (result i32)\n    (memory.grow (block (result i32) (i32.const 1)))\n  )\n\n  (func $f (param i32) (result i32) (local.get 0))\n\n  (func (export \"as-call-value\") (result i32)\n    (call $f (block (result i32) (i32.const 1)))\n  )\n  (func (export \"as-return-value\") (result i32)\n    (block (result i32) (i32.const 1)) (return)\n  )\n  (func (export \"as-drop-operand\")\n    (drop (block (result i32) (i32.const 1)))\n  )\n  (func (export \"as-br-value\") (result i32)\n    (block (result i32) (br 0 (block (result i32) (i32.const 1))))\n  )\n  (func (export \"as-local.set-value\") (result i32)\n    (local i32) (local.set 0 (block (result i32) (i32.const 1))) (local.get 0)\n  )\n  (func (export \"as-local.tee-value\") (result i32)\n    (local i32) (local.tee 0 (block (result i32) (i32.const 1)))\n  )\n  (global $a (mut i32) (i32.const 10))\n  (func (export \"as-global.set-value\") (result i32)\n    (global.set $a (block (result i32) (i32.const 1)))\n    (global.get $a)\n  )\n\n  (func (export \"as-load-operand\") (result i32)\n    (i32.load (block (result i32) (i32.const 1)))\n  )\n\n  (func (export \"as-unary-operand\") (result i32)\n    (i32.ctz (block (result i32) (call $dummy) (i32.const 13)))\n  )\n  (func (export \"as-binary-operand\") (result i32)\n    (i32.mul\n      (block (result i32) (call $dummy) (i32.const 3))\n      (block (result i32) (call $dummy) (i32.const 4))\n    )\n  )\n  (func (export \"as-test-operand\") (result i32)\n    (i32.eqz (block (result i32) (call $dummy) (i32.const 13)))\n  )\n  (func (export \"as-compare-operand\") (result i32)\n    (f32.gt\n      (block (result f32) (call $dummy) (f32.const 3))\n      (block (result f32) (call $dummy) (f32.const 3))\n    )\n  )\n  (func (export \"as-binary-operands\") (result i32)\n    (i32.mul\n      (block (result i32 i32)\n        (call $dummy) (i32.const 3) (call $dummy) (i32.const 4)\n      )\n    )\n  )\n  (func (export \"as-compare-operands\") (result i32)\n    (f32.gt\n      (block (result f32 f32)\n        (call $dummy) (f32.const 3) (call $dummy) (f32.const 3)\n      )\n    )\n  )\n  (func (export \"as-mixed-operands\") (result i32)\n    (block (result i32 i32)\n      (call $dummy) (i32.const 3) (call $dummy) (i32.const 4)\n    )\n    (i32.const 5)\n    (i32.add)\n    (i32.mul)\n  )\n\n  (func (export \"break-bare\") (result i32)\n    (block (br 0) (unreachable))\n    (block (br_if 0 (i32.const 1)) (unreachable))\n    (block (br_table 0 (i32.const 0)) (unreachable))\n    (block (br_table 0 0 0 (i32.const 1)) (unreachable))\n    (i32.const 19)\n  )\n  (func (export \"break-value\") (result i32)\n    (block (result i32) (br 0 (i32.const 18)) (i32.const 19))\n  )\n  (func (export \"break-multi-value\") (result i32 i32 i64)\n    (block (result i32 i32 i64)\n      (br 0 (i32.const 18) (i32.const -18) (i64.const 18))\n      (i32.const 19) (i32.const -19) (i64.const 19)\n    )\n  )\n  (func (export \"break-repeated\") (result i32)\n    (block (result i32)\n      (br 0 (i32.const 18))\n      (br 0 (i32.const 19))\n      (drop (br_if 0 (i32.const 20) (i32.const 0)))\n      (drop (br_if 0 (i32.const 20) (i32.const 1)))\n      (br 0 (i32.const 21))\n      (br_table 0 (i32.const 22) (i32.const 4))\n      (br_table 0 0 0 (i32.const 23) (i32.const 1))\n      (i32.const 21)\n    )\n  )\n  (func (export \"break-inner\") (result i32)\n    (local i32)\n    (local.set 0 (i32.const 0))\n    (local.set 0 (i32.add (local.get 0) (block (result i32) (block (result i32) (br 1 (i32.const 0x1))))))\n    (local.set 0 (i32.add (local.get 0) (block (result i32) (block (br 0)) (i32.const 0x2))))\n    (local.set 0\n      (i32.add (local.get 0) (block (result i32) (i32.ctz (br 0 (i32.const 0x4)))))\n    )\n    (local.set 0\n      (i32.add (local.get 0) (block (result i32) (i32.ctz (block (result i32) (br 1 (i32.const 0x8))))))\n    )\n    (local.get 0)\n  )\n\n  (func (export \"param\") (result i32)\n    (i32.const 1)\n    (block (param i32) (result i32)\n      (i32.const 2)\n      (i32.add)\n    )\n  )\n  (func (export \"params\") (result i32)\n    (i32.const 1)\n    (i32.const 2)\n    (block (param i32 i32) (result i32)\n      (i32.add)\n    )\n  )\n  (func (export \"params-id\") (result i32)\n    (i32.const 1)\n    (i32.const 2)\n    (block (param i32 i32) (result i32 i32))\n    (i32.add)\n  )\n  (func (export \"param-break\") (result i32)\n    (i32.const 1)\n    (block (param i32) (result i32)\n      (i32.const 2)\n      (i32.add)\n      (br 0)\n    )\n  )\n  (func (export \"params-break\") (result i32)\n    (i32.const 1)\n    (i32.const 2)\n    (block (param i32 i32) (result i32)\n      (i32.add)\n      (br 0)\n    )\n  )\n  (func (export \"params-id-break\") (result i32)\n    (i32.const 1)\n    (i32.const 2)\n    (block (param i32 i32) (result i32 i32) (br 0))\n    (i32.add)\n  )\n\n  (func (export \"effects\") (result i32)\n    (local i32)\n    (block\n      (local.set 0 (i32.const 1))\n      (local.set 0 (i32.mul (local.get 0) (i32.const 3)))\n      (local.set 0 (i32.sub (local.get 0) (i32.const 5)))\n      (local.set 0 (i32.mul (local.get 0) (i32.const 7)))\n      (br 0)\n      (local.set 0 (i32.mul (local.get 0) (i32.const 100)))\n    )\n    (i32.eq (local.get 0) (i32.const -14))\n  )\n\n  (type $block-sig-1 (func))\n  (type $block-sig-2 (func (result i32)))\n  (type $block-sig-3 (func (param $x i32)))\n  (type $block-sig-4 (func (param i32 f64 i32) (result i32 f64 i32)))\n\n  (func (export \"type-use\")\n    (block (type $block-sig-1))\n    (block (type $block-sig-2) (i32.const 0))\n    (block (type $block-sig-3) (drop))\n    (i32.const 0) (f64.const 0) (i32.const 0)\n    (block (type $block-sig-4))\n    (drop) (drop) (drop)\n    (block (type $block-sig-2) (result i32) (i32.const 0))\n    (block (type $block-sig-3) (param i32) (drop))\n    (i32.const 0) (f64.const 0) (i32.const 0)\n    (block (type $block-sig-4)\n      (param i32) (param f64 i32) (result i32 f64) (result i32)\n    )\n    (drop) (drop) (drop)\n  )\n)\n\n(assert_return (invoke \"empty\"))\n(assert_return (invoke \"singular\") (i32.const 7))\n(assert_return (invoke \"multi\") (i32.const 8))\n(assert_return (invoke \"nested\") (i32.const 9))\n(assert_return (invoke \"deep\") (i32.const 150))\n\n(assert_return (invoke \"as-select-first\") (i32.const 1))\n(assert_return (invoke \"as-select-mid\") (i32.const 2))\n(assert_return (invoke \"as-select-last\") (i32.const 2))\n\n(assert_return (invoke \"as-loop-first\") (i32.const 1))\n(assert_return (invoke \"as-loop-mid\") (i32.const 1))\n(assert_return (invoke \"as-loop-last\") (i32.const 1))\n\n(assert_return (invoke \"as-if-condition\"))\n(assert_return (invoke \"as-if-then\") (i32.const 1))\n(assert_return (invoke \"as-if-else\") (i32.const 2))\n\n(assert_return (invoke \"as-br_if-first\") (i32.const 1))\n(assert_return (invoke \"as-br_if-last\") (i32.const 2))\n\n(assert_return (invoke \"as-br_table-first\") (i32.const 1))\n(assert_return (invoke \"as-br_table-last\") (i32.const 2))\n\n(assert_return (invoke \"as-call_indirect-first\") (i32.const 1))\n(assert_return (invoke \"as-call_indirect-mid\") (i32.const 2))\n(assert_return (invoke \"as-call_indirect-last\") (i32.const 1))\n\n(assert_return (invoke \"as-store-first\"))\n(assert_return (invoke \"as-store-last\"))\n\n(assert_return (invoke \"as-memory.grow-value\") (i32.const 1))\n(assert_return (invoke \"as-call-value\") (i32.const 1))\n(assert_return (invoke \"as-return-value\") (i32.const 1))\n(assert_return (invoke \"as-drop-operand\"))\n(assert_return (invoke \"as-br-value\") (i32.const 1))\n(assert_return (invoke \"as-local.set-value\") (i32.const 1))\n(assert_return (invoke \"as-local.tee-value\") (i32.const 1))\n(assert_return (invoke \"as-global.set-value\") (i32.const 1))\n(assert_return (invoke \"as-load-operand\") (i32.const 1))\n\n(assert_return (invoke \"as-unary-operand\") (i32.const 0))\n(assert_return (invoke \"as-binary-operand\") (i32.const 12))\n(assert_return (invoke \"as-test-operand\") (i32.const 0))\n(assert_return (invoke \"as-compare-operand\") (i32.const 0))\n(assert_return (invoke \"as-binary-operands\") (i32.const 12))\n(assert_return (invoke \"as-compare-operands\") (i32.const 0))\n(assert_return (invoke \"as-mixed-operands\") (i32.const 27))\n\n(assert_return (invoke \"break-bare\") (i32.const 19))\n(assert_return (invoke \"break-value\") (i32.const 18))\n(assert_return (invoke \"break-multi-value\")\n  (i32.const 18) (i32.const -18) (i64.const 18)\n)\n(assert_return (invoke \"break-repeated\") (i32.const 18))\n(assert_return (invoke \"break-inner\") (i32.const 0xf))\n\n(assert_return (invoke \"param\") (i32.const 3))\n(assert_return (invoke \"params\") (i32.const 3))\n(assert_return (invoke \"params-id\") (i32.const 3))\n(assert_return (invoke \"param-break\") (i32.const 3))\n(assert_return (invoke \"params-break\") (i32.const 3))\n(assert_return (invoke \"params-id-break\") (i32.const 3))\n\n(assert_return (invoke \"effects\") (i32.const 1))\n\n(assert_return (invoke \"type-use\"))\n\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0) (block (type $sig) (result i32) (param i32)))\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0) (block (param i32) (type $sig) (result i32)))\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0) (block (param i32) (result i32) (type $sig)))\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0) (block (result i32) (type $sig) (param i32)))\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0) (block (result i32) (param i32) (type $sig)))\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(func (i32.const 0) (block (result i32) (param i32)))\"\n  )\n  \"unexpected token\"\n)\n\n(assert_malformed\n  (module quote \"(func (i32.const 0) (block (param $x i32) (drop)))\")\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func))\"\n    \"(func (block (type $sig) (result i32) (i32.const 0)) (unreachable))\"\n  )\n  \"inline function type\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (block (type $sig) (result i32) (i32.const 0)) (unreachable))\"\n  )\n  \"inline function type\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0) (block (type $sig) (param i32) (drop)) (unreachable))\"\n  )\n  \"inline function type\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32 i32) (result i32)))\"\n    \"(func (i32.const 0) (block (type $sig) (param i32) (result i32)) (unreachable))\"\n  )\n  \"inline function type\"\n)\n\n(assert_invalid\n  (module\n    (type $sig (func))\n    (func (block (type $sig) (i32.const 0)))\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-empty-i32 (result i32) (block)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-i64 (result i64) (block)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-f32 (result f32) (block)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-f64 (result f64) (block)))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-value-i32-vs-void\n    (block (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-i64-vs-void\n    (block (i64.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-f32-vs-void\n    (block (f32.const 1.0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-f64-vs-void\n    (block (f64.const 1.0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-nums-vs-void\n    (block (i32.const 1) (i32.const 2))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-empty-vs-i32 (result i32)\n    (block (result i32))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-empty-vs-i64 (result i64)\n    (block (result i64))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-empty-vs-f32 (result f32)\n    (block (result f32))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-empty-vs-f64 (result f64)\n    (block (result f64))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-empty-vs-nums (result i32 i32)\n    (block (result i32 i32))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (func $type-value-empty-in-block\n      (i32.const 0)\n      (block (block (result i32)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-value-empty-in-loop\n      (i32.const 0)\n      (loop (block (result i32)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-value-empty-in-then\n      (i32.const 0) (i32.const 0)\n      (if (then (block (result i32)) (drop)))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-value-void-vs-i32 (result i32)\n    (block (result i32) (nop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-void-vs-i64 (result i64)\n    (block (result i64) (nop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-void-vs-f32 (result f32)\n    (block (result f32) (nop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-void-vs-f64 (result f64)\n    (block (result f64) (nop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-void-vs-nums (result i32 i32)\n    (block (result i32 i32) (nop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-i32-vs-i64 (result i32)\n    (block (result i32) (i64.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-i32-vs-f32 (result i32)\n    (block (result i32) (f32.const 0.0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-i32-vs-f64 (result i32)\n    (block (result i32) (f64.const 0.0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-i64-vs-i32 (result i64)\n    (block (result i64) (i32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-i64-vs-f32 (result i64)\n    (block (result i64) (f32.const 0.0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-i64-vs-f64 (result i64)\n    (block (result i64) (f64.const 0.0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-f32-vs-i32 (result f32)\n    (block (result f32) (i32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-f32-vs-i64 (result f32)\n    (block (result f32) (i64.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-f32-vs-f64 (result f32)\n    (block (result f32) (f64.const 0.0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-f64-vs-i32 (result f64)\n    (block (result f64) (i32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-f64-vs-i64 (result f64)\n    (block (result f64) (i64.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-f64-vs-f32 (result f32)\n    (block (result f64) (f32.const 0.0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-num-vs-nums (result i32 i32)\n    (block (result i32 i32) (i32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-partial-vs-nums (result i32 i32)\n    (i32.const 1) (block (result i32 i32) (i32.const 2))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-nums-vs-num (result i32)\n    (block (result i32) (i32.const 1) (i32.const 2))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-value-unreached-select-i32-i64 (result i32)\n    (block (result i64) (select (unreachable) (unreachable) (unreachable)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-unreached-select-i32-f32 (result i32)\n    (block (result f32) (select (unreachable) (unreachable) (unreachable)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-unreached-select-i32-f64 (result i32)\n    (block (result f64) (select (unreachable) (unreachable) (unreachable)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-unreached-select-i64-i32 (result i64)\n    (block (result i32) (select (unreachable) (unreachable) (unreachable)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-unreached-select-i64-f32 (result i64)\n    (block (result f32) (select (unreachable) (unreachable) (unreachable)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-unreached-select-i64-f64 (result i64)\n    (block (result f64) (select (unreachable) (unreachable) (unreachable)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-unreached-select-f32-i32 (result f32)\n    (block (result i32) (select (unreachable) (unreachable) (unreachable)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-unreached-select-f32-i64 (result f32)\n    (block (result i64) (select (unreachable) (unreachable) (unreachable)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-unreached-select-f32-f64 (result f32)\n    (block (result f64) (select (unreachable) (unreachable) (unreachable)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-unreached-select-f64-i32 (result f64)\n    (block (result i32) (select (unreachable) (unreachable) (unreachable)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-unreached-select-f64-i64 (result f64)\n    (block (result i64) (select (unreachable) (unreachable) (unreachable)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-unreached-select-f64-f32 (result f64)\n    (block (result f32) (select (unreachable) (unreachable) (unreachable)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-break-last-void-vs-i32 (result i32)\n    (block (result i32) (br 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-last-void-vs-i64 (result i64)\n    (block (result i64) (br 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-last-void-vs-f32 (result f32)\n    (block (result f32) (br 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-last-void-vs-f64 (result f64)\n    (block (result f64) (br 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-last-void-vs-nums (result i32 i32)\n    (block (result i32 i32) (br 0))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-break-empty-vs-i32 (result i32)\n    (block (result i32) (br 0) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-empty-vs-i64 (result i64)\n    (block (result i64) (br 0) (i64.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-empty-vs-f32 (result f32)\n    (block (result f32) (br 0) (f32.const 1.0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-empty-vs-f64 (result f64)\n    (block (result f64) (br 0) (f64.const 1.0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-empty-vs-nums (result i32 i32)\n    (block (result i32 i32) (br 0) (i32.const 1) (i32.const 2))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-break-void-vs-i32 (result i32)\n    (block (result i32) (br 0 (nop)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-void-vs-i64 (result i64)\n    (block (result i64) (br 0 (nop)) (i64.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-void-vs-f32 (result f32)\n    (block (result f32) (br 0 (nop)) (f32.const 1.0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-void-vs-f64 (result f64)\n    (block (result f64) (br 0 (nop)) (f64.const 1.0))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-break-i32-vs-i64 (result i32)\n    (block (result i32) (br 0 (i64.const 1)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-i32-vs-f32 (result i32)\n    (block (result i32) (br 0 (f32.const 1.0)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-i32-vs-f64 (result i32)\n    (block (result i32) (br 0 (f64.const 1.0)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-i64-vs-i32 (result i64)\n    (block (result i64) (br 0 (i32.const 1)) (i64.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-i64-vs-f32 (result i64)\n    (block (result i64) (br 0 (f32.const 1.0)) (i64.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-i64-vs-f64 (result i64)\n    (block (result i64) (br 0 (f64.const 1.0)) (i64.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-f32-vs-i32 (result f32)\n    (block (result f32) (br 0 (i32.const 1)) (f32.const 1.0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-f32-vs-i64 (result f32)\n    (block (result f32) (br 0 (i64.const 1)) (f32.const 1.0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-f32-vs-f64 (result f32)\n    (block (result f32) (br 0 (f64.const 1.0)) (f32.const 1.0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-f64-vs-i32 (result f64)\n    (block (result i64) (br 0 (i32.const 1)) (f64.const 1.0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-f64-vs-i64 (result f64)\n    (block (result f64) (br 0 (i64.const 1)) (f64.const 1.0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-f64-vs-f32 (result f64)\n    (block (result f64) (br 0 (f32.const 1.0)) (f64.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-num-vs-nums (result i32 i32)\n    (block (result i32 i32) (br 0 (i32.const 0)) (i32.const 1) (i32.const 2))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-partial-vs-nums (result i32 i32)\n    (i32.const 1) (block (result i32 i32) (br 0 (i32.const 0)) (i32.const 2))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-break-first-void-vs-i32 (result i32)\n    (block (result i32) (br 0 (nop)) (br 0 (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-void-vs-i64 (result i64)\n    (block (result i64) (br 0 (nop)) (br 0 (i64.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-void-vs-f32 (result f32)\n    (block (result f32) (br 0 (nop)) (br 0 (f32.const 1.0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-void-vs-f64 (result f64)\n    (block (result f64) (br 0 (nop)) (br 0 (f64.const 1.0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-void-vs-nums (result i32 i32)\n    (block (result i32 i32) (br 0 (nop)) (br 0 (i32.const 1) (i32.const 2)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-break-first-i32-vs-i64 (result i32)\n    (block (result i32) (br 0 (i64.const 1)) (br 0 (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-i32-vs-f32 (result i32)\n    (block (result i32) (br 0 (f32.const 1.0)) (br 0 (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-i32-vs-f64 (result i32)\n    (block (result i32) (br 0 (f64.const 1.0)) (br 0 (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-i64-vs-i32 (result i64)\n    (block (result i64) (br 0 (i32.const 1)) (br 0 (i64.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-i64-vs-f32 (result i64)\n    (block (result i64) (br 0 (f32.const 1.0)) (br 0 (i64.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-i64-vs-f64 (result i64)\n    (block (result i64) (br 0 (f64.const 1.0)) (br 0 (i64.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-f32-vs-i32 (result f32)\n    (block (result f32) (br 0 (i32.const 1)) (br 0 (f32.const 1.0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-f32-vs-i64 (result f32)\n    (block (result f32) (br 0 (i64.const 1)) (br 0 (f32.const 1.0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-f32-vs-f64 (result f32)\n    (block (result f32) (br 0 (f64.const 1.0)) (br 0 (f32.const 1.0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-f64-vs-i32 (result f64)\n    (block (result f64) (br 0 (i32.const 1)) (br 0 (f64.const 1.0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-f64-vs-i64 (result f64)\n    (block (result f64) (br 0 (i64.const 1)) (br 0 (f64.const 1.0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-f64-vs-f32 (result f64)\n    (block (result f64) (br 0 (f32.const 1.0)) (br 0 (f64.const 1.0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-num-vs-nums (result i32 i32)\n    (block (result i32 i32) (br 0 (i32.const 0)) (br 0 (i32.const 1) (i32.const 2)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-break-nested-i32-vs-void\n    (block (result i32) (block (result i32) (br 1 (i32.const 1))) (br 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-i64-vs-void\n    (block (result i64) (block (result i64) (br 1 (i64.const 1))) (br 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-f32-vs-void\n    (block (result f32) (block (result f32) (br 1 (f32.const 1.0))) (br 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-f64-vs-void\n    (block (result f64) (block (result f64) (br 1 (f64.const 1.0))) (br 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-nums-vs-void\n    (block (result i32 i32) (block (result i32 i32) (br 1 (i32.const 1) (i32.const 2))) (br 0))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-break-nested-empty-vs-i32 (result i32)\n    (block (result i32) (block (br 1)) (br 0 (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-empty-vs-i64 (result i64)\n    (block (result i64) (block (br 1)) (br 0 (i64.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-empty-vs-f32 (result f32)\n    (block (result f32) (block (br 1)) (br 0 (f32.const 1.0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-empty-vs-f64 (result f64)\n    (block (result f64) (block (br 1)) (br 0 (f64.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-empty-vs-nums (result i32 i32)\n    (block (result i32 i32) (block (br 1)) (br 0 (i32.const 1) (i32.const 2)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-break-nested-void-vs-i32 (result i32)\n    (block (result i32) (block (result i32) (br 1 (nop))) (br 0 (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-void-vs-i64 (result i64)\n    (block (result i64) (block (result i64) (br 1 (nop))) (br 0 (i64.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-void-vs-f32 (result f32)\n    (block (result f32) (block (result f32) (br 1 (nop))) (br 0 (f32.const 1.0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-void-vs-f64 (result f64)\n    (block (result f64) (block (result f64) (br 1 (nop))) (br 0 (f64.const 1.0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-void-vs-nums (result i32 i32)\n    (block (result i32 i32) (block (result i32 i32) (br 1 (nop))) (br 0 (i32.const 1) (i32.const 2)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-break-nested-i32-vs-i64 (result i32)\n    (block (result i32)\n      (block (result i32) (br 1 (i64.const 1))) (br 0 (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-i32-vs-f32 (result i32)\n    (block (result i32)\n      (block (result i32) (br 1 (f32.const 1.0))) (br 0 (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-i32-vs-f64 (result i32)\n    (block (result i32)\n      (block (result i32) (br 1 (f64.const 1.0))) (br 0 (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-i64-vs-i32 (result i64)\n    (block (result i64)\n      (block (result i64) (br 1 (i32.const 1))) (br 0 (i64.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-i64-vs-f32 (result i64)\n    (block (result i64)\n      (block (result i64) (br 1 (f32.const 1.0))) (br 0 (i64.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-i64-vs-f64 (result i64)\n    (block (result i64)\n      (block (result i64) (br 1 (f64.const 1.0))) (br 0 (i64.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-f32-vs-i32 (result f32)\n    (block (result f32)\n      (block (result f32) (br 1 (i32.const 1))) (br 0 (f32.const 1.0))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-f32-vs-i64 (result f32)\n    (block (result f32)\n      (block (result f32) (br 1 (i64.const 1))) (br 0 (f32.const 1.0))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-f32-vs-f64 (result f32)\n    (block (result f32)\n      (block (result f32) (br 1 (f64.const 1.0))) (br 0 (f32.const 1.0))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-f64-vs-i32 (result f64)\n    (block (result f64)\n      (block (result f64) (br 1 (i32.const 1))) (br 0 (f64.const 1.0))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-f64-vs-i64 (result f64)\n    (block (result f64)\n      (block (result f64) (br 1 (i64.const 1))) (br 0 (f64.const 1.0))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-f64-vs-f32 (result f64)\n    (block (result f64)\n      (block (result f64) (br 1 (f32.const 1.0))) (br 0 (f64.const 1.0))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-num-vs-nums (result i32 i32)\n    (block (result i32 i32)\n      (block (result i32 i32) (br 1 (i32.const 0))) (br 0 (i32.const 1) (i32.const 2))\n    )\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-break-operand-empty-vs-i32 (result i32)\n    (i32.ctz (block (br 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-empty-vs-i64 (result i64)\n    (i64.ctz (block (br 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-empty-vs-f32 (result f32)\n    (f32.floor (block (br 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-empty-vs-f64 (result f64)\n    (f64.floor (block (br 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-empty-vs-nums (result i32)\n    (i32.add (block (br 0)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-break-operand-void-vs-i32 (result i32)\n    (i32.ctz (block (br 0 (nop))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-void-vs-i64 (result i64)\n    (i64.ctz (block (br 0 (nop))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-void-vs-f32 (result f32)\n    (f32.floor (block (br 0 (nop))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-void-vs-f64 (result f64)\n    (f64.floor (block (br 0 (nop))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-void-vs-nums (result i32)\n    (i32.add (block (br 0 (nop))))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-break-operand-i32-vs-i64 (result i32)\n    (i64.ctz (block (br 0 (i64.const 9))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-i32-vs-f32 (result i32)\n    (f32.floor (block (br 0 (f32.const 9.0))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-i32-vs-f64 (result i32)\n    (f64.floor (block (br 0 (f64.const 9.0))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-i64-vs-i32 (result i64)\n    (i32.ctz (block (br 0 (i32.const 9))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-i64-vs-f32 (result i64)\n    (f32.floor (block (br 0 (f32.const 9.0))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-i64-vs-f64 (result i64)\n    (f64.floor (block (br 0 (f64.const 9.0))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-f32-vs-i32 (result f32)\n    (i32.ctz (block (br 0 (i32.const 9))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-f32-vs-i64 (result f32)\n    (i64.ctz (block (br 0 (i64.const 9))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-f32-vs-f64 (result f32)\n    (f64.floor (block (br 0 (f64.const 9.0))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-f64-vs-i32 (result f64)\n    (i32.ctz (block (br 0 (i32.const 9))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-f64-vs-i64 (result f64)\n    (i64.ctz (block (br 0 (i64.const 9))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-f64-vs-f32 (result f64)\n    (f32.floor (block (br 0 (f32.const 9.0))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-operand-num-vs-nums (result i32)\n    (i32.add (block (br 0 (i64.const 9) (i32.const 10))))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-param-void-vs-num\n    (block (param i32) (drop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-void-vs-nums\n    (block (param i32 f64) (drop) (drop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-num\n    (f32.const 0) (block (param i32) (drop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-nums\n    (f32.const 0) (block (param f32 i32) (drop) (drop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-nested-void-vs-num\n    (block (block (param i32) (drop)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-void-vs-nums\n    (block (block (param i32 f64) (drop) (drop)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-num\n    (block (f32.const 0) (block (param i32) (drop)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-nums\n    (block (f32.const 0) (block (param f32 i32) (drop) (drop)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_malformed\n  (module quote \"(func (param i32) (result i32) block (param $x i32) end)\")\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote \"(func (param i32) (result i32) (block (param $x i32)))\")\n  \"unexpected token\"\n)\n\n\n(assert_malformed\n  (module quote \"(func block end $l)\")\n  \"mismatching label\"\n)\n(assert_malformed\n  (module quote \"(func block $a end $l)\")\n  \"mismatching label\"\n)\n"
  },
  {
    "path": "test/core/br.wast",
    "content": ";; Test `br` operator\n\n(module\n  ;; Auxiliary definition\n  (func $dummy)\n\n  (func (export \"type-i32\") (block (drop (i32.ctz (br 0)))))\n  (func (export \"type-i64\") (block (drop (i64.ctz (br 0)))))\n  (func (export \"type-f32\") (block (drop (f32.neg (br 0)))))\n  (func (export \"type-f64\") (block (drop (f64.neg (br 0)))))\n  (func (export \"type-i32-i32\") (block (drop (i32.add (br 0)))))\n  (func (export \"type-i64-i64\") (block (drop (i64.add (br 0)))))\n  (func (export \"type-f32-f32\") (block (drop (f32.add (br 0)))))\n  (func (export \"type-f64-f64\") (block (drop (f64.add (br 0)))))\n\n  (func (export \"type-i32-value\") (result i32)\n    (block (result i32) (i32.ctz (br 0 (i32.const 1))))\n  )\n  (func (export \"type-i64-value\") (result i64)\n    (block (result i64) (i64.ctz (br 0 (i64.const 2))))\n  )\n  (func (export \"type-f32-value\") (result f32)\n    (block (result f32) (f32.neg (br 0 (f32.const 3))))\n  )\n  (func (export \"type-f64-value\") (result f64)\n    (block (result f64) (f64.neg (br 0 (f64.const 4))))\n  )\n  (func (export \"type-f64-f64-value\") (result f64 f64)\n    (block (result f64 f64)\n      (f64.add (br 0 (f64.const 4) (f64.const 5))) (f64.const 6)\n    )\n  )\n\n  (func (export \"as-block-first\")\n    (block (br 0) (call $dummy))\n  )\n  (func (export \"as-block-mid\")\n    (block (call $dummy) (br 0) (call $dummy))\n  )\n  (func (export \"as-block-last\")\n    (block (nop) (call $dummy) (br 0))\n  )\n  (func (export \"as-block-value\") (result i32)\n    (block (result i32) (nop) (call $dummy) (br 0 (i32.const 2)))\n  )\n\n  (func (export \"as-loop-first\") (result i32)\n    (block (result i32) (loop (result i32) (br 1 (i32.const 3)) (i32.const 2)))\n  )\n  (func (export \"as-loop-mid\") (result i32)\n    (block (result i32)\n      (loop (result i32) (call $dummy) (br 1 (i32.const 4)) (i32.const 2))\n    )\n  )\n  (func (export \"as-loop-last\") (result i32)\n    (block (result i32)\n      (loop (result i32) (nop) (call $dummy) (br 1 (i32.const 5)))\n    )\n  )\n\n  (func (export \"as-br-value\") (result i32)\n    (block (result i32) (br 0 (br 0 (i32.const 9))))\n  )\n\n  (func (export \"as-br_if-cond\")\n    (block (br_if 0 (br 0)))\n  )\n  (func (export \"as-br_if-value\") (result i32)\n    (block (result i32)\n      (drop (br_if 0 (br 0 (i32.const 8)) (i32.const 1))) (i32.const 7)\n    )\n  )\n  (func (export \"as-br_if-value-cond\") (result i32)\n    (block (result i32)\n      (drop (br_if 0 (i32.const 6) (br 0 (i32.const 9)))) (i32.const 7)\n    )\n  )\n\n  (func (export \"as-br_table-index\")\n    (block (br_table 0 0 0 (br 0)))\n  )\n  (func (export \"as-br_table-value\") (result i32)\n    (block (result i32)\n      (br_table 0 0 0 (br 0 (i32.const 10)) (i32.const 1)) (i32.const 7)\n    )\n  )\n  (func (export \"as-br_table-value-index\") (result i32)\n    (block (result i32)\n      (br_table 0 0 (i32.const 6) (br 0 (i32.const 11))) (i32.const 7)\n    )\n  )\n\n  (func (export \"as-return-value\") (result i64)\n    (block (result i64) (return (br 0 (i64.const 7))))\n  )\n  (func (export \"as-return-values\") (result i32 i64)\n    (i32.const 2)\n    (block (result i64) (return (br 0 (i32.const 1) (i64.const 7))))\n  )\n\n  (func (export \"as-if-cond\") (result i32)\n    (block (result i32)\n      (if (result i32) (br 0 (i32.const 2))\n        (then (i32.const 0))\n        (else (i32.const 1))\n      )\n    )\n  )\n  (func (export \"as-if-then\") (param i32 i32) (result i32)\n    (block (result i32)\n      (if (result i32) (local.get 0)\n        (then (br 1 (i32.const 3)))\n        (else (local.get 1))\n      )\n    )\n  )\n  (func (export \"as-if-else\") (param i32 i32) (result i32)\n    (block (result i32)\n      (if (result i32) (local.get 0)\n        (then (local.get 1))\n        (else (br 1 (i32.const 4)))\n      )\n    )\n  )\n\n  (func (export \"as-select-first\") (param i32 i32) (result i32)\n    (block (result i32)\n      (select (br 0 (i32.const 5)) (local.get 0) (local.get 1))\n    )\n  )\n  (func (export \"as-select-second\") (param i32 i32) (result i32)\n    (block (result i32)\n      (select (local.get 0) (br 0 (i32.const 6)) (local.get 1))\n    )\n  )\n  (func (export \"as-select-cond\") (result i32)\n    (block (result i32)\n      (select (i32.const 0) (i32.const 1) (br 0 (i32.const 7)))\n    )\n  )\n  (func (export \"as-select-all\") (result i32)\n    (block (result i32) (select (br 0 (i32.const 8))))\n  )\n\n  (func $f (param i32 i32 i32) (result i32) (i32.const -1))\n  (func (export \"as-call-first\") (result i32)\n    (block (result i32)\n      (call $f (br 0 (i32.const 12)) (i32.const 2) (i32.const 3))\n    )\n  )\n  (func (export \"as-call-mid\") (result i32)\n    (block (result i32)\n      (call $f (i32.const 1) (br 0 (i32.const 13)) (i32.const 3))\n    )\n  )\n  (func (export \"as-call-last\") (result i32)\n    (block (result i32)\n      (call $f (i32.const 1) (i32.const 2) (br 0 (i32.const 14)))\n    )\n  )\n  (func (export \"as-call-all\") (result i32)\n    (block (result i32) (call $f (br 0 (i32.const 15))))\n  )\n\n  (type $sig (func (param i32 i32 i32) (result i32)))\n  (table funcref (elem $f))\n  (func (export \"as-call_indirect-func\") (result i32)\n    (block (result i32)\n      (call_indirect (type $sig)\n        (br 0 (i32.const 20))\n        (i32.const 1) (i32.const 2) (i32.const 3)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-first\") (result i32)\n    (block (result i32)\n      (call_indirect (type $sig)\n        (i32.const 0)\n        (br 0 (i32.const 21)) (i32.const 2) (i32.const 3)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-mid\") (result i32)\n    (block (result i32)\n      (call_indirect (type $sig)\n        (i32.const 0)\n        (i32.const 1) (br 0 (i32.const 22)) (i32.const 3)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-last\") (result i32)\n    (block (result i32)\n      (call_indirect (type $sig)\n        (i32.const 0)\n        (i32.const 1) (i32.const 2) (br 0 (i32.const 23))\n      )\n    )\n  )\n  (func (export \"as-call_indirect-all\") (result i32)\n    (block (result i32) (call_indirect (type $sig) (br 0 (i32.const 24))))\n  )\n\n  (func (export \"as-local.set-value\") (result i32) (local f32)\n    (block (result i32) (local.set 0 (br 0 (i32.const 17))) (i32.const -1))\n  )\n  (func (export \"as-local.tee-value\") (result i32) (local i32)\n    (block (result i32) (local.tee 0 (br 0 (i32.const 1))))\n  )\n  (global $a (mut i32) (i32.const 10))\n  (func (export \"as-global.set-value\") (result i32)\n    (block (result i32) (global.set $a (br 0 (i32.const 1))))\n  )\n\n  (memory 1)\n  (func (export \"as-load-address\") (result f32)\n    (block (result f32) (f32.load (br 0 (f32.const 1.7))))\n  )\n  (func (export \"as-loadN-address\") (result i64)\n    (block (result i64) (i64.load8_s (br 0 (i64.const 30))))\n  )\n\n  (func (export \"as-store-address\") (result i32)\n    (block (result i32)\n      (f64.store (br 0 (i32.const 30)) (f64.const 7)) (i32.const -1)\n    )\n  )\n  (func (export \"as-store-value\") (result i32)\n    (block (result i32)\n      (i64.store (i32.const 2) (br 0 (i32.const 31))) (i32.const -1)\n    )\n  )\n  (func (export \"as-store-both\") (result i32)\n    (block (result i32)\n      (i64.store (br 0 (i32.const 32))) (i32.const -1)\n    )\n  )\n\n  (func (export \"as-storeN-address\") (result i32)\n    (block (result i32)\n      (i32.store8 (br 0 (i32.const 32)) (i32.const 7)) (i32.const -1)\n    )\n  )\n  (func (export \"as-storeN-value\") (result i32)\n    (block (result i32)\n      (i64.store16 (i32.const 2) (br 0 (i32.const 33))) (i32.const -1)\n    )\n  )\n  (func (export \"as-storeN-both\") (result i32)\n    (block (result i32)\n      (i64.store16 (br 0 (i32.const 34))) (i32.const -1)\n    )\n  )\n\n  (func (export \"as-unary-operand\") (result f32)\n    (block (result f32) (f32.neg (br 0 (f32.const 3.4))))\n  )\n\n  (func (export \"as-binary-left\") (result i32)\n    (block (result i32) (i32.add (br 0 (i32.const 3)) (i32.const 10)))\n  )\n  (func (export \"as-binary-right\") (result i64)\n    (block (result i64) (i64.sub (i64.const 10) (br 0 (i64.const 45))))\n  )\n  (func (export \"as-binary-both\") (result i32)\n    (block (result i32) (i32.add (br 0 (i32.const 46))))\n  )\n\n  (func (export \"as-test-operand\") (result i32)\n    (block (result i32) (i32.eqz (br 0 (i32.const 44))))\n  )\n\n  (func (export \"as-compare-left\") (result i32)\n    (block (result i32) (f64.le (br 0 (i32.const 43)) (f64.const 10)))\n  )\n  (func (export \"as-compare-right\") (result i32)\n    (block (result i32) (f32.ne (f32.const 10) (br 0 (i32.const 42))))\n  )\n  (func (export \"as-compare-both\") (result i32)\n    (block (result i32) (f64.le (br 0 (i32.const 44))))\n  )\n\n  (func (export \"as-convert-operand\") (result i32)\n    (block (result i32) (i32.wrap_i64 (br 0 (i32.const 41))))\n  )\n\n  (func (export \"as-memory.grow-size\") (result i32)\n    (block (result i32) (memory.grow (br 0 (i32.const 40))))\n  )\n\n  (func (export \"nested-block-value\") (result i32)\n    (i32.add\n      (i32.const 1)\n      (block (result i32)\n        (call $dummy)\n        (i32.add (i32.const 4) (br 0 (i32.const 8)))\n      )\n    )\n  )\n\n  (func (export \"nested-br-value\") (result i32)\n    (i32.add\n      (i32.const 1)\n      (block (result i32)\n        (drop (i32.const 2))\n        (drop\n          (block (result i32)\n            (drop (i32.const 4))\n            (br 0 (br 1 (i32.const 8)))\n          )\n        )\n        (i32.const 16)\n      )\n    )\n  )\n\n  (func (export \"nested-br_if-value\") (result i32)\n    (i32.add\n      (i32.const 1)\n      (block (result i32)\n        (drop (i32.const 2))\n        (drop\n          (block (result i32)\n            (drop (i32.const 4))\n            (drop (br_if 0 (br 1 (i32.const 8)) (i32.const 1)))\n            (i32.const 32)\n          )\n        )\n        (i32.const 16)\n      )\n    )\n  )\n\n  (func (export \"nested-br_if-value-cond\") (result i32)\n    (i32.add\n      (i32.const 1)\n      (block (result i32)\n        (drop (i32.const 2))\n        (drop (br_if 0 (i32.const 4) (br 0 (i32.const 8))))\n        (i32.const 16)\n      )\n    )\n  )\n\n  (func (export \"nested-br_table-value\") (result i32)\n    (i32.add\n      (i32.const 1)\n      (block (result i32)\n        (drop (i32.const 2))\n        (drop\n          (block (result i32)\n            (drop (i32.const 4))\n            (br_table 0 (br 1 (i32.const 8)) (i32.const 1))\n          )\n        )\n        (i32.const 16)\n      )\n    )\n  )\n\n  (func (export \"nested-br_table-value-index\") (result i32)\n    (i32.add\n      (i32.const 1)\n      (block (result i32)\n        (drop (i32.const 2))\n        (br_table 0 (i32.const 4) (br 0 (i32.const 8)))\n        (i32.const 16)\n      )\n    )\n  )\n)\n\n(assert_return (invoke \"type-i32\"))\n(assert_return (invoke \"type-i64\"))\n(assert_return (invoke \"type-f32\"))\n(assert_return (invoke \"type-f64\"))\n(assert_return (invoke \"type-i32-i32\"))\n(assert_return (invoke \"type-i64-i64\"))\n(assert_return (invoke \"type-f32-f32\"))\n(assert_return (invoke \"type-f64-f64\"))\n\n(assert_return (invoke \"type-i32-value\") (i32.const 1))\n(assert_return (invoke \"type-i64-value\") (i64.const 2))\n(assert_return (invoke \"type-f32-value\") (f32.const 3))\n(assert_return (invoke \"type-f64-value\") (f64.const 4))\n(assert_return (invoke \"type-f64-f64-value\") (f64.const 4) (f64.const 5))\n\n(assert_return (invoke \"as-block-first\"))\n(assert_return (invoke \"as-block-mid\"))\n(assert_return (invoke \"as-block-last\"))\n(assert_return (invoke \"as-block-value\") (i32.const 2))\n\n(assert_return (invoke \"as-loop-first\") (i32.const 3))\n(assert_return (invoke \"as-loop-mid\") (i32.const 4))\n(assert_return (invoke \"as-loop-last\") (i32.const 5))\n\n(assert_return (invoke \"as-br-value\") (i32.const 9))\n\n(assert_return (invoke \"as-br_if-cond\"))\n(assert_return (invoke \"as-br_if-value\") (i32.const 8))\n(assert_return (invoke \"as-br_if-value-cond\") (i32.const 9))\n\n(assert_return (invoke \"as-br_table-index\"))\n(assert_return (invoke \"as-br_table-value\") (i32.const 10))\n(assert_return (invoke \"as-br_table-value-index\") (i32.const 11))\n\n(assert_return (invoke \"as-return-value\") (i64.const 7))\n(assert_return (invoke \"as-return-values\") (i32.const 2) (i64.const 7))\n\n(assert_return (invoke \"as-if-cond\") (i32.const 2))\n(assert_return (invoke \"as-if-then\" (i32.const 1) (i32.const 6)) (i32.const 3))\n(assert_return (invoke \"as-if-then\" (i32.const 0) (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"as-if-else\" (i32.const 0) (i32.const 6)) (i32.const 4))\n(assert_return (invoke \"as-if-else\" (i32.const 1) (i32.const 6)) (i32.const 6))\n\n(assert_return (invoke \"as-select-first\" (i32.const 0) (i32.const 6)) (i32.const 5))\n(assert_return (invoke \"as-select-first\" (i32.const 1) (i32.const 6)) (i32.const 5))\n(assert_return (invoke \"as-select-second\" (i32.const 0) (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"as-select-second\" (i32.const 1) (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"as-select-cond\") (i32.const 7))\n(assert_return (invoke \"as-select-all\") (i32.const 8))\n\n(assert_return (invoke \"as-call-first\") (i32.const 12))\n(assert_return (invoke \"as-call-mid\") (i32.const 13))\n(assert_return (invoke \"as-call-last\") (i32.const 14))\n(assert_return (invoke \"as-call-all\") (i32.const 15))\n\n(assert_return (invoke \"as-call_indirect-func\") (i32.const 20))\n(assert_return (invoke \"as-call_indirect-first\") (i32.const 21))\n(assert_return (invoke \"as-call_indirect-mid\") (i32.const 22))\n(assert_return (invoke \"as-call_indirect-last\") (i32.const 23))\n(assert_return (invoke \"as-call_indirect-all\") (i32.const 24))\n\n(assert_return (invoke \"as-local.set-value\") (i32.const 17))\n(assert_return (invoke \"as-local.tee-value\") (i32.const 1))\n(assert_return (invoke \"as-global.set-value\") (i32.const 1))\n\n(assert_return (invoke \"as-load-address\") (f32.const 1.7))\n(assert_return (invoke \"as-loadN-address\") (i64.const 30))\n\n(assert_return (invoke \"as-store-address\") (i32.const 30))\n(assert_return (invoke \"as-store-value\") (i32.const 31))\n(assert_return (invoke \"as-store-both\") (i32.const 32))\n(assert_return (invoke \"as-storeN-address\") (i32.const 32))\n(assert_return (invoke \"as-storeN-value\") (i32.const 33))\n(assert_return (invoke \"as-storeN-both\") (i32.const 34))\n\n(assert_return (invoke \"as-unary-operand\") (f32.const 3.4))\n\n(assert_return (invoke \"as-binary-left\") (i32.const 3))\n(assert_return (invoke \"as-binary-right\") (i64.const 45))\n(assert_return (invoke \"as-binary-both\") (i32.const 46))\n\n(assert_return (invoke \"as-test-operand\") (i32.const 44))\n\n(assert_return (invoke \"as-compare-left\") (i32.const 43))\n(assert_return (invoke \"as-compare-right\") (i32.const 42))\n(assert_return (invoke \"as-compare-both\") (i32.const 44))\n\n(assert_return (invoke \"as-convert-operand\") (i32.const 41))\n\n(assert_return (invoke \"as-memory.grow-size\") (i32.const 40))\n\n(assert_return (invoke \"nested-block-value\") (i32.const 9))\n(assert_return (invoke \"nested-br-value\") (i32.const 9))\n(assert_return (invoke \"nested-br_if-value\") (i32.const 9))\n(assert_return (invoke \"nested-br_if-value-cond\") (i32.const 9))\n(assert_return (invoke \"nested-br_table-value\") (i32.const 9))\n(assert_return (invoke \"nested-br_table-value-index\") (i32.const 9))\n\n(assert_invalid\n  (module (func $type-arg-empty-vs-num (result i32)\n    (block (result i32) (br 0) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-arg-void-vs-num (result i32)\n    (block (result i32) (br 0 (nop)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-arg-void-vs-num-nested (result i32)\n    (block (result i32) (i32.const 0) (block (br 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-arg-num-vs-num (result i32)\n    (block (result i32) (br 0 (i64.const 1)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (func $type-arg-empty-in-br\n      (i32.const 0)\n      (block (result i32) (br 0 (br 0))) (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-arg-empty-in-br_if\n      (i32.const 0)\n      (block (result i32) (br_if 0 (br 0) (i32.const 1))) (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-arg-empty-in-br_table\n      (i32.const 0)\n      (block (result i32) (br_table 0 (br 0))) (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-arg-empty-in-return\n      (block (result i32)\n        (return (br 0))\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-arg-empty-in-select\n      (block (result i32)\n        (select (br 0) (i32.const 1) (i32.const 2))\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-arg-empty-in-call\n      (block (result i32)\n        (call 1 (br 0))\n      )\n      (i32.eqz) (drop)\n    )\n    (func (param i32) (result i32) (local.get 0))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $f (param i32) (result i32) (local.get 0))\n    (type $sig (func (param i32) (result i32)))\n    (table funcref (elem $f))\n    (func $type-arg-empty-in-call_indirect\n      (block (result i32)\n        (call_indirect (type $sig)\n          (br 0) (i32.const 0)\n        )\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-arg-empty-in-local.set\n      (local i32)\n      (block (result i32)\n        (local.set 0 (br 0)) (local.get 0)\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-arg-empty-in-local.tee\n      (local i32)\n      (block (result i32)\n        (local.tee 0 (br 0))\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-arg-empty-in-global.set\n      (block (result i32)\n        (global.set $x (br 0)) (global.get $x)\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-arg-empty-in-memory.grow\n      (block (result i32)\n        (memory.grow (br 0))\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-arg-empty-in-load\n      (block (result i32)\n        (i32.load (br 0))\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-arg-empty-in-store\n      (block (result i32)\n        (i32.store (br 0) (i32.const 0))\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $unbound-label (br 1)))\n  \"unknown label\"\n)\n(assert_invalid\n  (module (func $unbound-nested-label (block (block (br 5)))))\n  \"unknown label\"\n)\n(assert_invalid\n  (module (func $large-label (br 0x10000001)))\n  \"unknown label\"\n)\n"
  },
  {
    "path": "test/core/br_if.wast",
    "content": ";; Test `br_if` operator\n\n(module\n  (func $dummy)\n\n  (func (export \"type-i32\")\n    (block (drop (i32.ctz (br_if 0 (i32.const 0) (i32.const 1)))))\n  )\n  (func (export \"type-i64\")\n    (block (drop (i64.ctz (br_if 0 (i64.const 0) (i32.const 1)))))\n  )\n  (func (export \"type-f32\")\n    (block (drop (f32.neg (br_if 0 (f32.const 0) (i32.const 1)))))\n  )\n  (func (export \"type-f64\")\n    (block (drop (f64.neg (br_if 0 (f64.const 0) (i32.const 1)))))\n  )\n\n  (func (export \"type-i32-value\") (result i32)\n    (block (result i32) (i32.ctz (br_if 0 (i32.const 1) (i32.const 1))))\n  )\n  (func (export \"type-i64-value\") (result i64)\n    (block (result i64) (i64.ctz (br_if 0 (i64.const 2) (i32.const 1))))\n  )\n  (func (export \"type-f32-value\") (result f32)\n    (block (result f32) (f32.neg (br_if 0 (f32.const 3) (i32.const 1))))\n  )\n  (func (export \"type-f64-value\") (result f64)\n    (block (result f64) (f64.neg (br_if 0 (f64.const 4) (i32.const 1))))\n  )\n\n  (func (export \"as-block-first\") (param i32) (result i32)\n    (block (br_if 0 (local.get 0)) (return (i32.const 2))) (i32.const 3)\n  )\n  (func (export \"as-block-mid\") (param i32) (result i32)\n    (block (call $dummy) (br_if 0 (local.get 0)) (return (i32.const 2)))\n    (i32.const 3)\n  )\n  (func (export \"as-block-last\") (param i32)\n    (block (call $dummy) (call $dummy) (br_if 0 (local.get 0)))\n  )\n  (func (export \"as-block-first-value\") (param i32) (result i32)\n    (block (result i32)\n      (drop (br_if 0 (i32.const 10) (local.get 0))) (return (i32.const 11))\n    )\n  )\n  (func (export \"as-block-mid-value\") (param i32) (result i32)\n    (block (result i32)\n      (call $dummy)\n      (drop (br_if 0 (i32.const 20) (local.get 0)))\n      (return (i32.const 21))\n    )\n  )\n  (func (export \"as-block-last-value\") (param i32) (result i32)\n    (block (result i32)\n      (call $dummy) (call $dummy) (br_if 0 (i32.const 11) (local.get 0))\n    )\n  )\n\n  (func (export \"as-loop-first\") (param i32) (result i32)\n    (block (loop (br_if 1 (local.get 0)) (return (i32.const 2)))) (i32.const 3)\n  )\n  (func (export \"as-loop-mid\") (param i32) (result i32)\n    (block (loop (call $dummy) (br_if 1 (local.get 0)) (return (i32.const 2))))\n    (i32.const 4)\n  )\n  (func (export \"as-loop-last\") (param i32)\n    (loop (call $dummy) (br_if 1 (local.get 0)))\n  )\n\n  (func (export \"as-br-value\") (result i32)\n    (block (result i32) (br 0 (br_if 0 (i32.const 1) (i32.const 2))))\n  )\n\n  (func (export \"as-br_if-cond\")\n    (block (br_if 0 (br_if 0 (i32.const 1) (i32.const 1))))\n  )\n  (func (export \"as-br_if-value\") (result i32)\n    (block (result i32)\n      (drop (br_if 0 (br_if 0 (i32.const 1) (i32.const 2)) (i32.const 3)))\n      (i32.const 4)\n    )\n  )\n  (func (export \"as-br_if-value-cond\") (param i32) (result i32)\n    (block (result i32)\n      (drop (br_if 0 (i32.const 2) (br_if 0 (i32.const 1) (local.get 0))))\n      (i32.const 4)\n    )\n  )\n\n  (func (export \"as-br_table-index\")\n    (block (br_table 0 0 0 (br_if 0 (i32.const 1) (i32.const 2))))\n  )\n  (func (export \"as-br_table-value\") (result i32)\n    (block (result i32)\n      (br_table 0 0 0 (br_if 0 (i32.const 1) (i32.const 2)) (i32.const 3)) (i32.const 4)\n    )\n  )\n  (func (export \"as-br_table-value-index\") (result i32)\n    (block (result i32)\n      (br_table 0 0 (i32.const 2) (br_if 0 (i32.const 1) (i32.const 3))) (i32.const 4)\n    )\n  )\n  (func (export \"as-return-value\") (result i64)\n    (block (result i64) (return (br_if 0 (i64.const 1) (i32.const 2))))\n  )\n\n  (func (export \"as-if-cond\") (param i32) (result i32)\n    (block (result i32)\n      (if (result i32)\n        (br_if 0 (i32.const 1) (local.get 0))\n        (then (i32.const 2))\n        (else (i32.const 3))\n      )\n    )\n  )\n  (func (export \"as-if-then\") (param i32 i32)\n    (block\n      (if (local.get 0) (then (br_if 1 (local.get 1))) (else (call $dummy)))\n    )\n  )\n  (func (export \"as-if-else\") (param i32 i32)\n    (block\n      (if (local.get 0) (then (call $dummy)) (else (br_if 1 (local.get 1))))\n    )\n  )\n\n  (func (export \"as-select-first\") (param i32) (result i32)\n    (block (result i32)\n      (select (br_if 0 (i32.const 3) (i32.const 10)) (i32.const 2) (local.get 0))\n    )\n  )\n  (func (export \"as-select-second\") (param i32) (result i32)\n    (block (result i32)\n      (select (i32.const 1) (br_if 0 (i32.const 3) (i32.const 10)) (local.get 0))\n    )\n  )\n  (func (export \"as-select-cond\") (result i32)\n    (block (result i32)\n      (select (i32.const 1) (i32.const 2) (br_if 0 (i32.const 3) (i32.const 10)))\n    )\n  )\n\n (func $f (param i32 i32 i32) (result i32) (i32.const -1))\n  (func (export \"as-call-first\") (result i32)\n    (block (result i32)\n      (call $f\n        (br_if 0 (i32.const 12) (i32.const 1)) (i32.const 2) (i32.const 3)\n      )\n    )\n  )\n  (func (export \"as-call-mid\") (result i32)\n    (block (result i32)\n      (call $f\n        (i32.const 1) (br_if 0 (i32.const 13) (i32.const 1)) (i32.const 3)\n      )\n    )\n  )\n  (func (export \"as-call-last\") (result i32)\n    (block (result i32)\n      (call $f\n        (i32.const 1) (i32.const 2) (br_if 0 (i32.const 14) (i32.const 1))\n      )\n    )\n  )\n\n  (func $func (param i32 i32 i32) (result i32) (local.get 0))\n  (type $check (func (param i32 i32 i32) (result i32)))\n  (table funcref (elem $func))\n  (func (export \"as-call_indirect-func\") (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (br_if 0 (i32.const 4) (i32.const 10))\n        (i32.const 1) (i32.const 2) (i32.const 0)\n      )\n    )\n  )\n\n  (func (export \"as-call_indirect-first\") (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (i32.const 1) (br_if 0 (i32.const 4) (i32.const 10)) (i32.const 2) (i32.const 0)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-mid\") (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (i32.const 1) (i32.const 2) (br_if 0 (i32.const 4) (i32.const 10)) (i32.const 0)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-last\") (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (i32.const 1) (i32.const 2) (i32.const 3) (br_if 0 (i32.const 4) (i32.const 10))\n      )\n    )\n  )\n\n  (func (export \"as-local.set-value\") (param i32) (result i32)\n    (local i32)\n    (block (result i32)\n      (local.set 0 (br_if 0 (i32.const 17) (local.get 0)))\n      (i32.const -1)\n    )\n  )\n  (func (export \"as-local.tee-value\") (param i32) (result i32)\n    (block (result i32)\n      (local.tee 0 (br_if 0 (i32.const 1) (local.get 0)))\n      (return (i32.const -1))\n    )\n  )\n  (global $a (mut i32) (i32.const 10))\n  (func (export \"as-global.set-value\") (param i32) (result i32)\n    (block (result i32)\n      (global.set $a (br_if 0 (i32.const 1) (local.get 0)))\n      (return (i32.const -1))\n    )\n  )\n\n  (memory 1)\n  (func (export \"as-load-address\") (result i32)\n    (block (result i32) (i32.load (br_if 0 (i32.const 1) (i32.const 1))))\n  )\n  (func (export \"as-loadN-address\") (result i32)\n    (block (result i32) (i32.load8_s (br_if 0 (i32.const 30) (i32.const 1))))\n  )\n\n  (func (export \"as-store-address\") (result i32)\n    (block (result i32)\n      (i32.store (br_if 0 (i32.const 30) (i32.const 1)) (i32.const 7)) (i32.const -1)\n    )\n  )\n  (func (export \"as-store-value\") (result i32)\n    (block (result i32)\n      (i32.store (i32.const 2) (br_if 0 (i32.const 31) (i32.const 1))) (i32.const -1)\n    )\n  )\n\n  (func (export \"as-storeN-address\") (result i32)\n    (block (result i32)\n      (i32.store8 (br_if 0 (i32.const 32) (i32.const 1)) (i32.const 7)) (i32.const -1)\n    )\n  )\n  (func (export \"as-storeN-value\") (result i32)\n    (block (result i32)\n      (i32.store16 (i32.const 2) (br_if 0 (i32.const 33) (i32.const 1))) (i32.const -1)\n    )\n  )\n\n  (func (export \"as-unary-operand\") (result f64)\n    (block (result f64) (f64.neg (br_if 0 (f64.const 1.0) (i32.const 1))))\n  )\n  (func (export \"as-binary-left\") (result i32)\n    (block (result i32) (i32.add (br_if 0 (i32.const 1) (i32.const 1)) (i32.const 10)))\n  )\n  (func (export \"as-binary-right\") (result i32)\n    (block (result i32) (i32.sub (i32.const 10) (br_if 0 (i32.const 1) (i32.const 1))))\n  )\n  (func (export \"as-test-operand\") (result i32)\n    (block (result i32) (i32.eqz (br_if 0 (i32.const 0) (i32.const 1))))\n  )\n  (func (export \"as-compare-left\") (result i32)\n    (block (result i32) (i32.le_u (br_if 0 (i32.const 1) (i32.const 1)) (i32.const 10)))\n  )\n  (func (export \"as-compare-right\") (result i32)\n    (block (result i32) (i32.ne (i32.const 10) (br_if 0 (i32.const 1) (i32.const 42))))\n  )\n\n  (func (export \"as-memory.grow-size\") (result i32)\n    (block (result i32) (memory.grow (br_if 0 (i32.const 1) (i32.const 1))))\n  )\n\n  (func (export \"nested-block-value\") (param i32) (result i32)\n    (i32.add\n      (i32.const 1)\n      (block (result i32)\n        (drop (i32.const 2))\n        (i32.add\n          (i32.const 4)\n          (block (result i32)\n            (drop (br_if 1 (i32.const 8) (local.get 0)))\n            (i32.const 16)\n          )\n        )\n      )\n    )\n  )\n\n  (func (export \"nested-br-value\") (param i32) (result i32)\n    (i32.add\n      (i32.const 1)\n      (block (result i32)\n        (drop (i32.const 2))\n        (br 0\n          (block (result i32)\n            (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 4)\n          )\n        )\n        (i32.const 16)\n      )\n    )\n  )\n\n  (func (export \"nested-br_if-value\") (param i32) (result i32)\n    (i32.add\n      (i32.const 1)\n      (block (result i32)\n        (drop (i32.const 2))\n        (drop (br_if 0\n          (block (result i32)\n            (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 4)\n          )\n          (i32.const 1)\n        ))\n        (i32.const 16)\n      )\n    )\n  )\n\n  (func (export \"nested-br_if-value-cond\") (param i32) (result i32)\n    (i32.add\n      (i32.const 1)\n      (block (result i32)\n        (drop (i32.const 2))\n        (drop (br_if 0\n          (i32.const 4)\n          (block (result i32)\n            (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 1)\n          )\n        ))\n        (i32.const 16)\n      )\n    )\n  )\n\n  (func (export \"nested-br_table-value\") (param i32) (result i32)\n    (i32.add\n      (i32.const 1)\n      (block (result i32)\n        (drop (i32.const 2))\n        (br_table 0\n          (block (result i32)\n            (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 4)\n          )\n          (i32.const 1)\n        )\n        (i32.const 16)\n      )\n    )\n  )\n\n  (func (export \"nested-br_table-value-index\") (param i32) (result i32)\n    (i32.add\n      (i32.const 1)\n      (block (result i32)\n        (drop (i32.const 2))\n        (br_table 0\n          (i32.const 4)\n          (block (result i32)\n            (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 1)\n          )\n        )\n        (i32.const 16)\n      )\n    )\n  )\n\n)\n\n(assert_return (invoke \"type-i32\"))\n(assert_return (invoke \"type-i64\"))\n(assert_return (invoke \"type-f32\"))\n(assert_return (invoke \"type-f64\"))\n\n(assert_return (invoke \"type-i32-value\") (i32.const 1))\n(assert_return (invoke \"type-i64-value\") (i64.const 2))\n(assert_return (invoke \"type-f32-value\") (f32.const 3))\n(assert_return (invoke \"type-f64-value\") (f64.const 4))\n\n(assert_return (invoke \"as-block-first\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-block-first\" (i32.const 1)) (i32.const 3))\n(assert_return (invoke \"as-block-mid\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-block-mid\" (i32.const 1)) (i32.const 3))\n(assert_return (invoke \"as-block-last\" (i32.const 0)))\n(assert_return (invoke \"as-block-last\" (i32.const 1)))\n\n(assert_return (invoke \"as-block-first-value\" (i32.const 0)) (i32.const 11))\n(assert_return (invoke \"as-block-first-value\" (i32.const 1)) (i32.const 10))\n(assert_return (invoke \"as-block-mid-value\" (i32.const 0)) (i32.const 21))\n(assert_return (invoke \"as-block-mid-value\" (i32.const 1)) (i32.const 20))\n(assert_return (invoke \"as-block-last-value\" (i32.const 0)) (i32.const 11))\n(assert_return (invoke \"as-block-last-value\" (i32.const 1)) (i32.const 11))\n\n(assert_return (invoke \"as-loop-first\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-loop-first\" (i32.const 1)) (i32.const 3))\n(assert_return (invoke \"as-loop-mid\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-loop-mid\" (i32.const 1)) (i32.const 4))\n(assert_return (invoke \"as-loop-last\" (i32.const 0)))\n(assert_return (invoke \"as-loop-last\" (i32.const 1)))\n\n(assert_return (invoke \"as-br-value\") (i32.const 1))\n\n(assert_return (invoke \"as-br_if-cond\"))\n(assert_return (invoke \"as-br_if-value\") (i32.const 1))\n(assert_return (invoke \"as-br_if-value-cond\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-br_if-value-cond\" (i32.const 1)) (i32.const 1))\n\n(assert_return (invoke \"as-br_table-index\"))\n(assert_return (invoke \"as-br_table-value\") (i32.const 1))\n(assert_return (invoke \"as-br_table-value-index\") (i32.const 1))\n\n(assert_return (invoke \"as-return-value\") (i64.const 1))\n\n(assert_return (invoke \"as-if-cond\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-if-cond\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-if-then\" (i32.const 0) (i32.const 0)))\n(assert_return (invoke \"as-if-then\" (i32.const 4) (i32.const 0)))\n(assert_return (invoke \"as-if-then\" (i32.const 0) (i32.const 1)))\n(assert_return (invoke \"as-if-then\" (i32.const 4) (i32.const 1)))\n(assert_return (invoke \"as-if-else\" (i32.const 0) (i32.const 0)))\n(assert_return (invoke \"as-if-else\" (i32.const 3) (i32.const 0)))\n(assert_return (invoke \"as-if-else\" (i32.const 0) (i32.const 1)))\n(assert_return (invoke \"as-if-else\" (i32.const 3) (i32.const 1)))\n\n(assert_return (invoke \"as-select-first\" (i32.const 0)) (i32.const 3))\n(assert_return (invoke \"as-select-first\" (i32.const 1)) (i32.const 3))\n(assert_return (invoke \"as-select-second\" (i32.const 0)) (i32.const 3))\n(assert_return (invoke \"as-select-second\" (i32.const 1)) (i32.const 3))\n(assert_return (invoke \"as-select-cond\") (i32.const 3))\n\n(assert_return (invoke \"as-call-first\") (i32.const 12))\n(assert_return (invoke \"as-call-mid\") (i32.const 13))\n(assert_return (invoke \"as-call-last\") (i32.const 14))\n\n(assert_return (invoke \"as-call_indirect-func\") (i32.const 4))\n(assert_return (invoke \"as-call_indirect-first\") (i32.const 4))\n(assert_return (invoke \"as-call_indirect-mid\") (i32.const 4))\n(assert_return (invoke \"as-call_indirect-last\") (i32.const 4))\n\n(assert_return (invoke \"as-local.set-value\" (i32.const 0)) (i32.const -1))\n(assert_return (invoke \"as-local.set-value\" (i32.const 1)) (i32.const 17))\n\n(assert_return (invoke \"as-local.tee-value\" (i32.const 0)) (i32.const -1))\n(assert_return (invoke \"as-local.tee-value\" (i32.const 1)) (i32.const 1))\n\n(assert_return (invoke \"as-global.set-value\" (i32.const 0)) (i32.const -1))\n(assert_return (invoke \"as-global.set-value\" (i32.const 1)) (i32.const 1))\n\n(assert_return (invoke \"as-load-address\") (i32.const 1))\n(assert_return (invoke \"as-loadN-address\") (i32.const 30))\n\n(assert_return (invoke \"as-store-address\") (i32.const 30))\n(assert_return (invoke \"as-store-value\") (i32.const 31))\n(assert_return (invoke \"as-storeN-address\") (i32.const 32))\n(assert_return (invoke \"as-storeN-value\") (i32.const 33))\n\n(assert_return (invoke \"as-unary-operand\") (f64.const 1.0))\n(assert_return (invoke \"as-binary-left\") (i32.const 1))\n(assert_return (invoke \"as-binary-right\") (i32.const 1))\n(assert_return (invoke \"as-test-operand\") (i32.const 0))\n(assert_return (invoke \"as-compare-left\") (i32.const 1))\n(assert_return (invoke \"as-compare-right\") (i32.const 1))\n(assert_return (invoke \"as-memory.grow-size\") (i32.const 1))\n\n(assert_return (invoke \"nested-block-value\" (i32.const 0)) (i32.const 21))\n(assert_return (invoke \"nested-block-value\" (i32.const 1)) (i32.const 9))\n(assert_return (invoke \"nested-br-value\" (i32.const 0)) (i32.const 5))\n(assert_return (invoke \"nested-br-value\" (i32.const 1)) (i32.const 9))\n(assert_return (invoke \"nested-br_if-value\" (i32.const 0)) (i32.const 5))\n(assert_return (invoke \"nested-br_if-value\" (i32.const 1)) (i32.const 9))\n(assert_return (invoke \"nested-br_if-value-cond\" (i32.const 0)) (i32.const 5))\n(assert_return (invoke \"nested-br_if-value-cond\" (i32.const 1)) (i32.const 9))\n(assert_return (invoke \"nested-br_table-value\" (i32.const 0)) (i32.const 5))\n(assert_return (invoke \"nested-br_table-value\" (i32.const 1)) (i32.const 9))\n(assert_return (invoke \"nested-br_table-value-index\" (i32.const 0)) (i32.const 5))\n(assert_return (invoke \"nested-br_table-value-index\" (i32.const 1)) (i32.const 9))\n\n(assert_invalid\n  (module (func $type-false-i32 (block (i32.ctz (br_if 0 (i32.const 0))))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-false-i64 (block (i64.ctz (br_if 0 (i32.const 0))))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-false-f32 (block (f32.neg (br_if 0 (i32.const 0))))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-false-f64 (block (f64.neg (br_if 0 (i32.const 0))))))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-true-i32 (block (i32.ctz (br_if 0 (i32.const 1))))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-true-i64 (block (i64.ctz (br_if 0 (i64.const 1))))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-true-f32 (block (f32.neg (br_if 0 (f32.const 1))))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-true-f64 (block (f64.neg (br_if 0 (i64.const 1))))))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-false-arg-void-vs-num (result i32)\n    (block (result i32) (br_if 0 (i32.const 0)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-true-arg-void-vs-num (result i32)\n    (block (result i32) (br_if 0 (i32.const 1)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-false-arg-num-vs-void\n    (block (br_if 0 (i32.const 0) (i32.const 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-true-arg-num-vs-void\n    (block (br_if 0 (i32.const 0) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-false-arg-void-vs-num (result i32)\n    (block (result i32) (br_if 0 (nop) (i32.const 0)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-true-arg-void-vs-num (result i32)\n    (block (result i32) (br_if 0 (nop) (i32.const 1)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-false-arg-num-vs-num (result i32)\n    (block (result i32)\n      (drop (br_if 0 (i64.const 1) (i32.const 0))) (i32.const 1)\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-true-arg-num-vs-num (result i32)\n    (block (result i32)\n      (drop (br_if 0 (i64.const 1) (i32.const 0))) (i32.const 1)\n    )\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-cond-empty-vs-i32\n    (block (br_if 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-cond-void-vs-i32\n    (block (br_if 0 (nop)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-cond-num-vs-i32\n    (block (br_if 0 (i64.const 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-arg-cond-void-vs-i32 (result i32)\n    (block (result i32) (br_if 0 (i32.const 0) (nop)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-arg-void-vs-num-nested (result i32)\n    (block (result i32) (i32.const 0) (block (br_if 1 (i32.const 1))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-arg-cond-num-vs-i32 (result i32)\n    (block (result i32) (br_if 0 (i32.const 0) (i64.const 0)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (func $type-1st-cond-empty-in-then\n      (block\n        (i32.const 0) (i32.const 0)\n        (if (result i32) (then (br_if 0)))\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-2nd-cond-empty-in-then\n      (block\n        (i32.const 0) (i32.const 0)\n        (if (result i32) (then (br_if 0 (i32.const 1))))\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-1st-cond-empty-in-return\n      (block (result i32)\n        (return (br_if 0))\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-2nd-cond-empty-in-return\n      (block (result i32)\n        (return (br_if 0 (i32.const 1)))\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n\n\n(assert_invalid\n  (module (func $unbound-label (br_if 1 (i32.const 1))))\n  \"unknown label\"\n)\n(assert_invalid\n  (module (func $unbound-nested-label (block (block (br_if 5 (i32.const 1))))))\n  \"unknown label\"\n)\n(assert_invalid\n  (module (func $large-label (br_if 0x10000001 (i32.const 1))))\n  \"unknown label\"\n)\n\n"
  },
  {
    "path": "test/core/br_table.wast",
    "content": ";; Test `br_table` operator\n\n(module\n  ;; Auxiliary definition\n  (func $dummy)\n\n  (func (export \"type-i32\")\n    (block (drop (i32.ctz (br_table 0 0 (i32.const 0)))))\n  )\n  (func (export \"type-i64\")\n    (block (drop (i64.ctz (br_table 0 0 (i32.const 0)))))\n  )\n  (func (export \"type-f32\")\n    (block (drop (f32.neg (br_table 0 0 (i32.const 0)))))\n  )\n  (func (export \"type-f64\")\n    (block (drop (f64.neg (br_table 0 0 (i32.const 0)))))\n  )\n\n  (func (export \"type-i32-value\") (result i32)\n    (block (result i32) (i32.ctz (br_table 0 0 (i32.const 1) (i32.const 0))))\n  )\n  (func (export \"type-i64-value\") (result i64)\n    (block (result i64) (i64.ctz (br_table 0 0 (i64.const 2) (i32.const 0))))\n  )\n  (func (export \"type-f32-value\") (result f32)\n    (block (result f32) (f32.neg (br_table 0 0 (f32.const 3) (i32.const 0))))\n  )\n  (func (export \"type-f64-value\") (result f64)\n    (block (result f64) (f64.neg (br_table 0 0 (f64.const 4) (i32.const 0))))\n  )\n\n  (func (export \"empty\") (param i32) (result i32)\n    (block (br_table 0 (local.get 0)) (return (i32.const 21)))\n    (i32.const 22)\n  )\n  (func (export \"empty-value\") (param i32) (result i32)\n    (block (result i32)\n      (br_table 0 (i32.const 33) (local.get 0)) (i32.const 31)\n    )\n  )\n\n  (func (export \"singleton\") (param i32) (result i32)\n    (block\n      (block\n        (br_table 1 0 (local.get 0))\n        (return (i32.const 21))\n      )\n      (return (i32.const 20))\n    )\n    (i32.const 22)\n  )\n\n  (func (export \"singleton-value\") (param i32) (result i32)\n    (block (result i32)\n      (drop\n        (block (result i32)\n          (br_table 0 1 (i32.const 33) (local.get 0))\n          (return (i32.const 31))\n        )\n      )\n      (i32.const 32)\n    )\n  )\n\n  (func (export \"multiple\") (param i32) (result i32)\n    (block\n      (block\n        (block\n          (block\n            (block\n              (br_table 3 2 1 0 4 (local.get 0))\n              (return (i32.const 99))\n            )\n            (return (i32.const 100))\n          )\n          (return (i32.const 101))\n        )\n        (return (i32.const 102))\n      )\n      (return (i32.const 103))\n    )\n    (i32.const 104)\n  )\n\n  (func (export \"multiple-value\") (param i32) (result i32)\n    (local i32)\n    (local.set 1 (block (result i32)\n      (local.set 1 (block (result i32)\n        (local.set 1 (block (result i32)\n          (local.set 1 (block (result i32)\n            (local.set 1 (block (result i32)\n              (br_table 3 2 1 0 4 (i32.const 200) (local.get 0))\n              (return (i32.add (local.get 1) (i32.const 99)))\n            ))\n            (return (i32.add (local.get 1) (i32.const 10)))\n          ))\n          (return (i32.add (local.get 1) (i32.const 11)))\n        ))\n        (return (i32.add (local.get 1) (i32.const 12)))\n      ))\n      (return (i32.add (local.get 1) (i32.const 13)))\n    ))\n    (i32.add (local.get 1) (i32.const 14))\n  )\n\n  (func (export \"large\") (param i32) (result i32)\n    (block\n      (block\n        (br_table\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n          (local.get 0)\n        )\n        (return (i32.const -1))\n      )\n      (return (i32.const 0))\n    )\n    (return (i32.const 1))\n  )\n\n  (func (export \"as-block-first\")\n    (block (br_table 0 0 0 (i32.const 0)) (call $dummy))\n  )\n  (func (export \"as-block-mid\")\n    (block (call $dummy) (br_table 0 0 0 (i32.const 0)) (call $dummy))\n  )\n  (func (export \"as-block-last\")\n    (block (nop) (call $dummy) (br_table 0 0 0 (i32.const 0)))\n  )\n  (func (export \"as-block-value\") (result i32)\n    (block (result i32)\n      (nop) (call $dummy) (br_table 0 0 0 (i32.const 2) (i32.const 0))\n    )\n  )\n\n  (func (export \"as-loop-first\") (result i32)\n    (loop (result i32) (br_table 1 1 (i32.const 3) (i32.const 0)) (i32.const 1))\n  )\n  (func (export \"as-loop-mid\") (result i32)\n    (loop (result i32)\n      (call $dummy)\n      (br_table 1 1 1 (i32.const 4) (i32.const -1))\n      (i32.const 2)\n    )\n  )\n  (func (export \"as-loop-last\") (result i32)\n    (loop (result i32)\n      (nop) (call $dummy) (br_table 1 1 1 (i32.const 5) (i32.const 1))\n    )\n  )\n\n  (func (export \"as-br-value\") (result i32)\n    (block (result i32) (br 0 (br_table 0 (i32.const 9) (i32.const 0))))\n  )\n\n  (func (export \"as-br_if-cond\")\n    (block (br_if 0 (br_table 0 0 0 (i32.const 1))))\n  )\n  (func (export \"as-br_if-value\") (result i32)\n    (block (result i32)\n      (drop (br_if 0 (br_table 0 (i32.const 8) (i32.const 0)) (i32.const 1)))\n      (i32.const 7)\n    )\n  )\n  (func (export \"as-br_if-value-cond\") (result i32)\n    (block (result i32)\n      (drop (br_if 0 (i32.const 6) (br_table 0 0 (i32.const 9) (i32.const 0))))\n      (i32.const 7)\n    )\n  )\n\n  (func (export \"as-br_table-index\")\n    (block (br_table 0 0 0 (br_table 0 (i32.const 1))))\n  )\n  (func (export \"as-br_table-value\") (result i32)\n    (block (result i32)\n      (br_table 0 0 0 (br_table 0 (i32.const 10) (i32.const 0)) (i32.const 1))\n      (i32.const 7)\n    )\n  )\n  (func (export \"as-br_table-value-index\") (result i32)\n    (block (result i32)\n      (br_table 0 0 (i32.const 6) (br_table 0 (i32.const 11) (i32.const 1)))\n      (i32.const 7)\n    )\n  )\n\n  (func (export \"as-return-value\") (result i64)\n    (block (result i64) (return (br_table 0 (i64.const 7) (i32.const 0))))\n  )\n\n  (func (export \"as-if-cond\") (result i32)\n    (block (result i32)\n      (if (result i32)\n        (br_table 0 (i32.const 2) (i32.const 0))\n        (then (i32.const 0))\n        (else (i32.const 1))\n      )\n    )\n  )\n  (func (export \"as-if-then\") (param i32 i32) (result i32)\n    (block (result i32)\n      (if (result i32)\n        (local.get 0)\n        (then (br_table 1 (i32.const 3) (i32.const 0)))\n        (else (local.get 1))\n      )\n    )\n  )\n  (func (export \"as-if-else\") (param i32 i32) (result i32)\n    (block (result i32)\n      (if (result i32)\n        (local.get 0)\n        (then (local.get 1))\n        (else (br_table 1 0 (i32.const 4) (i32.const 0)))\n      )\n    )\n  )\n\n  (func (export \"as-select-first\") (param i32 i32) (result i32)\n    (block (result i32)\n      (select\n        (br_table 0 (i32.const 5) (i32.const 0)) (local.get 0) (local.get 1)\n      )\n    )\n  )\n  (func (export \"as-select-second\") (param i32 i32) (result i32)\n    (block (result i32)\n      (select\n        (local.get 0) (br_table 0 (i32.const 6) (i32.const 1)) (local.get 1)\n      )\n    )\n  )\n  (func (export \"as-select-cond\") (result i32)\n    (block (result i32)\n      (select\n        (i32.const 0) (i32.const 1) (br_table 0 (i32.const 7) (i32.const 1))\n      )\n    )\n  )\n\n  (func $f (param i32 i32 i32) (result i32) (i32.const -1))\n  (func (export \"as-call-first\") (result i32)\n    (block (result i32)\n      (call $f\n        (br_table 0 (i32.const 12) (i32.const 1)) (i32.const 2) (i32.const 3)\n      )\n    )\n  )\n  (func (export \"as-call-mid\") (result i32)\n    (block (result i32)\n      (call $f\n        (i32.const 1) (br_table 0 (i32.const 13) (i32.const 1)) (i32.const 3)\n      )\n    )\n  )\n  (func (export \"as-call-last\") (result i32)\n    (block (result i32)\n      (call $f\n        (i32.const 1) (i32.const 2) (br_table 0 (i32.const 14) (i32.const 1))\n      )\n    )\n  )\n\n  (type $sig (func (param i32 i32 i32) (result i32)))\n  (table funcref (elem $f))\n  (func (export \"as-call_indirect-first\") (result i32)\n    (block (result i32)\n      (call_indirect (type $sig)\n        (br_table 0 (i32.const 20) (i32.const 1)) (i32.const 1) (i32.const 2)\n        (i32.const 3)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-mid\") (result i32)\n    (block (result i32)\n      (call_indirect (type $sig)\n        (i32.const 0) (br_table 0 (i32.const 21) (i32.const 1)) (i32.const 2)\n        (i32.const 3)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-last\") (result i32)\n    (block (result i32)\n      (call_indirect (type $sig)\n        (i32.const 0) (i32.const 1) (br_table 0 (i32.const 22) (i32.const 1))\n        (i32.const 3)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-func\") (result i32)\n    (block (result i32)\n      (call_indirect (type $sig)\n        (i32.const 0) (i32.const 1) (i32.const 2)\n        (br_table 0 (i32.const 23) (i32.const 1))\n      )\n    )\n  )\n\n  (func (export \"as-local.set-value\") (result i32)\n    (local f32)\n    (block (result i32)\n      (local.set 0 (br_table 0 (i32.const 17) (i32.const 1)))\n      (i32.const -1)\n    )\n  )\n  (func (export \"as-local.tee-value\") (result i32)\n    (local i32)\n    (block (result i32)\n      (local.set 0 (br_table 0 (i32.const 1) (i32.const 1)))\n      (i32.const -1)\n    )\n  )\n  (global $a (mut i32) (i32.const 10))\n  (func (export \"as-global.set-value\") (result i32)\n    (block (result i32)\n      (global.set $a (br_table 0 (i32.const 1) (i32.const 1)))\n      (i32.const -1)\n    )\n  )\n\n  (memory 1)\n  (func (export \"as-load-address\") (result f32)\n    (block (result f32) (f32.load (br_table 0 (f32.const 1.7) (i32.const 1))))\n  )\n  (func (export \"as-loadN-address\") (result i64)\n    (block (result i64) (i64.load8_s (br_table 0 (i64.const 30) (i32.const 1))))\n  )\n\n  (func (export \"as-store-address\") (result i32)\n    (block (result i32)\n      (f64.store (br_table 0 (i32.const 30) (i32.const 1)) (f64.const 7))\n      (i32.const -1)\n    )\n  )\n  (func (export \"as-store-value\") (result i32)\n    (block (result i32)\n      (i64.store (i32.const 2) (br_table 0 (i32.const 31) (i32.const 1)))\n      (i32.const -1)\n     )\n  )\n\n  (func (export \"as-storeN-address\") (result i32)\n    (block (result i32)\n      (i32.store8 (br_table 0 (i32.const 32) (i32.const 0)) (i32.const 7))\n      (i32.const -1)\n    )\n  )\n  (func (export \"as-storeN-value\") (result i32)\n    (block (result i32)\n      (i64.store16 (i32.const 2) (br_table 0 (i32.const 33) (i32.const 0)))\n      (i32.const -1)\n    )\n  )\n\n  (func (export \"as-unary-operand\") (result f32)\n    (block (result f32) (f32.neg (br_table 0 (f32.const 3.4) (i32.const 0))))\n  )\n\n  (func (export \"as-binary-left\") (result i32)\n    (block (result i32)\n      (i32.add (br_table 0 0 (i32.const 3) (i32.const 0)) (i32.const 10))\n    )\n  )\n  (func (export \"as-binary-right\") (result i64)\n    (block (result i64)\n      (i64.sub (i64.const 10) (br_table 0 (i64.const 45) (i32.const 0)))\n    )\n  )\n\n  (func (export \"as-test-operand\") (result i32)\n    (block (result i32) (i32.eqz (br_table 0 (i32.const 44) (i32.const 0))))\n  )\n\n  (func (export \"as-compare-left\") (result i32)\n    (block (result i32)\n      (f64.le (br_table 0 0 (i32.const 43) (i32.const 0)) (f64.const 10))\n    )\n  )\n  (func (export \"as-compare-right\") (result i32)\n    (block (result i32)\n      (f32.ne (f32.const 10) (br_table 0 (i32.const 42) (i32.const 0)))\n    )\n  )\n\n  (func (export \"as-convert-operand\") (result i32)\n    (block (result i32)\n      (i32.wrap_i64 (br_table 0 (i32.const 41) (i32.const 0)))\n    )\n  )\n\n  (func (export \"as-memory.grow-size\") (result i32)\n    (block (result i32) (memory.grow (br_table 0 (i32.const 40) (i32.const 0))))\n  )\n\n  (func (export \"nested-block-value\") (param i32) (result i32)\n    (block (result i32)\n      (drop (i32.const -1))\n      (i32.add\n        (i32.const 1)\n        (block (result i32)\n          (i32.add\n            (i32.const 2)\n            (block (result i32)\n              (drop (i32.const 4))\n              (i32.add\n                (i32.const 8)\n                (br_table 0 1 2 (i32.const 16) (local.get 0))\n              )\n            )\n          )\n        )\n      )\n    )\n  )\n\n  (func (export \"nested-br-value\") (param i32) (result i32)\n    (block (result i32)\n      (i32.add\n        (i32.const 1)\n        (block (result i32)\n          (drop (i32.const 2))\n          (drop\n            (block (result i32)\n              (drop (i32.const 4))\n              (br 0 (br_table 2 1 0 (i32.const 8) (local.get 0)))\n            )\n          )\n          (i32.const 16)\n        )\n      )\n    )\n  )\n\n  (func (export \"nested-br_if-value\") (param i32) (result i32)\n    (block (result i32)\n      (i32.add\n        (i32.const 1)\n        (block (result i32)\n          (drop (i32.const 2))\n          (drop\n            (block (result i32)\n              (drop (i32.const 4))\n              (drop\n                (br_if 0\n                  (br_table 0 1 2 (i32.const 8) (local.get 0))\n                  (i32.const 1)\n                )\n              )\n              (i32.const 32)\n            )\n          )\n          (i32.const 16)\n        )\n      )\n    )\n  )\n\n  (func (export \"nested-br_if-value-cond\") (param i32) (result i32)\n    (block (result i32)\n      (i32.add\n        (i32.const 1)\n        (block (result i32)\n          (drop (i32.const 2))\n          (drop\n            (br_if 0 (i32.const 4) (br_table 0 1 0 (i32.const 8) (local.get 0)))\n          )\n          (i32.const 16)\n        )\n      )\n    )\n  )\n\n  (func (export \"nested-br_table-value\") (param i32) (result i32)\n    (block (result i32)\n      (i32.add\n        (i32.const 1)\n        (block (result i32)\n          (drop (i32.const 2))\n          (drop\n            (block (result i32)\n              (drop (i32.const 4))\n              (br_table 0 (br_table 0 1 2 (i32.const 8) (local.get 0)) (i32.const 1))\n              (i32.const 32)\n            )\n          )\n          (i32.const 16)\n        )\n      )\n    )\n  )\n\n  (func (export \"nested-br_table-value-index\") (param i32) (result i32)\n    (block (result i32)\n      (i32.add\n        (i32.const 1)\n        (block (result i32)\n          (drop (i32.const 2))\n          (br_table 0 (i32.const 4) (br_table 0 1 0 (i32.const 8) (local.get 0)))\n          (i32.const 16)\n        )\n      )\n    )\n  )\n\n  (func (export \"nested-br_table-loop-block\") (param i32) (result i32)\n    (local.set 0\n      (loop (result i32)\n        (block\n          (br_table 1 0 0 (local.get 0))\n        )\n        (i32.const 0)\n      )\n    )\n    (loop (result i32)\n      (block\n        (br_table 0 1 1 (local.get 0))\n      )\n      (i32.const 3)\n    )\n  )\n\n  (func (export \"meet-externref\") (param i32) (param externref) (result externref)\n    (block $l1 (result externref)\n      (block $l2 (result externref)\n        (br_table $l1 $l2 $l1 (local.get 1) (local.get 0))\n      )\n    )\n  )\n\n  (func (export \"meet-bottom\")\n    (block (result f64)\n      (block (result f32)\n        (unreachable)\n        (br_table 0 1 1 (i32.const 1))\n      )\n      (drop)\n      (f64.const 0)\n    )\n    (drop)\n  )\n)\n\n(assert_return (invoke \"type-i32\"))\n(assert_return (invoke \"type-i64\"))\n(assert_return (invoke \"type-f32\"))\n(assert_return (invoke \"type-f64\"))\n\n(assert_return (invoke \"type-i32-value\") (i32.const 1))\n(assert_return (invoke \"type-i64-value\") (i64.const 2))\n(assert_return (invoke \"type-f32-value\") (f32.const 3))\n(assert_return (invoke \"type-f64-value\") (f64.const 4))\n\n(assert_return (invoke \"empty\" (i32.const 0)) (i32.const 22))\n(assert_return (invoke \"empty\" (i32.const 1)) (i32.const 22))\n(assert_return (invoke \"empty\" (i32.const 11)) (i32.const 22))\n(assert_return (invoke \"empty\" (i32.const -1)) (i32.const 22))\n(assert_return (invoke \"empty\" (i32.const -100)) (i32.const 22))\n(assert_return (invoke \"empty\" (i32.const 0xffffffff)) (i32.const 22))\n\n(assert_return (invoke \"empty-value\" (i32.const 0)) (i32.const 33))\n(assert_return (invoke \"empty-value\" (i32.const 1)) (i32.const 33))\n(assert_return (invoke \"empty-value\" (i32.const 11)) (i32.const 33))\n(assert_return (invoke \"empty-value\" (i32.const -1)) (i32.const 33))\n(assert_return (invoke \"empty-value\" (i32.const -100)) (i32.const 33))\n(assert_return (invoke \"empty-value\" (i32.const 0xffffffff)) (i32.const 33))\n\n(assert_return (invoke \"singleton\" (i32.const 0)) (i32.const 22))\n(assert_return (invoke \"singleton\" (i32.const 1)) (i32.const 20))\n(assert_return (invoke \"singleton\" (i32.const 11)) (i32.const 20))\n(assert_return (invoke \"singleton\" (i32.const -1)) (i32.const 20))\n(assert_return (invoke \"singleton\" (i32.const -100)) (i32.const 20))\n(assert_return (invoke \"singleton\" (i32.const 0xffffffff)) (i32.const 20))\n\n(assert_return (invoke \"singleton-value\" (i32.const 0)) (i32.const 32))\n(assert_return (invoke \"singleton-value\" (i32.const 1)) (i32.const 33))\n(assert_return (invoke \"singleton-value\" (i32.const 11)) (i32.const 33))\n(assert_return (invoke \"singleton-value\" (i32.const -1)) (i32.const 33))\n(assert_return (invoke \"singleton-value\" (i32.const -100)) (i32.const 33))\n(assert_return (invoke \"singleton-value\" (i32.const 0xffffffff)) (i32.const 33))\n\n(assert_return (invoke \"multiple\" (i32.const 0)) (i32.const 103))\n(assert_return (invoke \"multiple\" (i32.const 1)) (i32.const 102))\n(assert_return (invoke \"multiple\" (i32.const 2)) (i32.const 101))\n(assert_return (invoke \"multiple\" (i32.const 3)) (i32.const 100))\n(assert_return (invoke \"multiple\" (i32.const 4)) (i32.const 104))\n(assert_return (invoke \"multiple\" (i32.const 5)) (i32.const 104))\n(assert_return (invoke \"multiple\" (i32.const 6)) (i32.const 104))\n(assert_return (invoke \"multiple\" (i32.const 10)) (i32.const 104))\n(assert_return (invoke \"multiple\" (i32.const -1)) (i32.const 104))\n(assert_return (invoke \"multiple\" (i32.const 0xffffffff)) (i32.const 104))\n\n(assert_return (invoke \"multiple-value\" (i32.const 0)) (i32.const 213))\n(assert_return (invoke \"multiple-value\" (i32.const 1)) (i32.const 212))\n(assert_return (invoke \"multiple-value\" (i32.const 2)) (i32.const 211))\n(assert_return (invoke \"multiple-value\" (i32.const 3)) (i32.const 210))\n(assert_return (invoke \"multiple-value\" (i32.const 4)) (i32.const 214))\n(assert_return (invoke \"multiple-value\" (i32.const 5)) (i32.const 214))\n(assert_return (invoke \"multiple-value\" (i32.const 6)) (i32.const 214))\n(assert_return (invoke \"multiple-value\" (i32.const 10)) (i32.const 214))\n(assert_return (invoke \"multiple-value\" (i32.const -1)) (i32.const 214))\n(assert_return (invoke \"multiple-value\" (i32.const 0xffffffff)) (i32.const 214))\n\n(assert_return (invoke \"large\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"large\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"large\" (i32.const 100)) (i32.const 0))\n(assert_return (invoke \"large\" (i32.const 101)) (i32.const 1))\n(assert_return (invoke \"large\" (i32.const 10000)) (i32.const 0))\n(assert_return (invoke \"large\" (i32.const 10001)) (i32.const 1))\n(assert_return (invoke \"large\" (i32.const 1000000)) (i32.const 1))\n(assert_return (invoke \"large\" (i32.const 1000001)) (i32.const 1))\n\n(assert_return (invoke \"as-block-first\"))\n(assert_return (invoke \"as-block-mid\"))\n(assert_return (invoke \"as-block-last\"))\n(assert_return (invoke \"as-block-value\") (i32.const 2))\n\n(assert_return (invoke \"as-loop-first\") (i32.const 3))\n(assert_return (invoke \"as-loop-mid\") (i32.const 4))\n(assert_return (invoke \"as-loop-last\") (i32.const 5))\n\n(assert_return (invoke \"as-br-value\") (i32.const 9))\n\n(assert_return (invoke \"as-br_if-cond\"))\n(assert_return (invoke \"as-br_if-value\") (i32.const 8))\n(assert_return (invoke \"as-br_if-value-cond\") (i32.const 9))\n\n(assert_return (invoke \"as-br_table-index\"))\n(assert_return (invoke \"as-br_table-value\") (i32.const 10))\n(assert_return (invoke \"as-br_table-value-index\") (i32.const 11))\n\n(assert_return (invoke \"as-return-value\") (i64.const 7))\n\n(assert_return (invoke \"as-if-cond\") (i32.const 2))\n(assert_return (invoke \"as-if-then\" (i32.const 1) (i32.const 6)) (i32.const 3))\n(assert_return (invoke \"as-if-then\" (i32.const 0) (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"as-if-else\" (i32.const 0) (i32.const 6)) (i32.const 4))\n(assert_return (invoke \"as-if-else\" (i32.const 1) (i32.const 6)) (i32.const 6))\n\n(assert_return (invoke \"as-select-first\" (i32.const 0) (i32.const 6)) (i32.const 5))\n(assert_return (invoke \"as-select-first\" (i32.const 1) (i32.const 6)) (i32.const 5))\n(assert_return (invoke \"as-select-second\" (i32.const 0) (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"as-select-second\" (i32.const 1) (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"as-select-cond\") (i32.const 7))\n\n(assert_return (invoke \"as-call-first\") (i32.const 12))\n(assert_return (invoke \"as-call-mid\") (i32.const 13))\n(assert_return (invoke \"as-call-last\") (i32.const 14))\n\n(assert_return (invoke \"as-call_indirect-first\") (i32.const 20))\n(assert_return (invoke \"as-call_indirect-mid\") (i32.const 21))\n(assert_return (invoke \"as-call_indirect-last\") (i32.const 22))\n(assert_return (invoke \"as-call_indirect-func\") (i32.const 23))\n\n(assert_return (invoke \"as-local.set-value\") (i32.const 17))\n(assert_return (invoke \"as-local.tee-value\") (i32.const 1))\n(assert_return (invoke \"as-global.set-value\") (i32.const 1))\n\n(assert_return (invoke \"as-load-address\") (f32.const 1.7))\n(assert_return (invoke \"as-loadN-address\") (i64.const 30))\n\n(assert_return (invoke \"as-store-address\") (i32.const 30))\n(assert_return (invoke \"as-store-value\") (i32.const 31))\n(assert_return (invoke \"as-storeN-address\") (i32.const 32))\n(assert_return (invoke \"as-storeN-value\") (i32.const 33))\n\n(assert_return (invoke \"as-unary-operand\") (f32.const 3.4))\n\n(assert_return (invoke \"as-binary-left\") (i32.const 3))\n(assert_return (invoke \"as-binary-right\") (i64.const 45))\n\n(assert_return (invoke \"as-test-operand\") (i32.const 44))\n\n(assert_return (invoke \"as-compare-left\") (i32.const 43))\n(assert_return (invoke \"as-compare-right\") (i32.const 42))\n\n(assert_return (invoke \"as-convert-operand\") (i32.const 41))\n\n(assert_return (invoke \"as-memory.grow-size\") (i32.const 40))\n\n(assert_return (invoke \"nested-block-value\" (i32.const 0)) (i32.const 19))\n(assert_return (invoke \"nested-block-value\" (i32.const 1)) (i32.const 17))\n(assert_return (invoke \"nested-block-value\" (i32.const 2)) (i32.const 16))\n(assert_return (invoke \"nested-block-value\" (i32.const 10)) (i32.const 16))\n(assert_return (invoke \"nested-block-value\" (i32.const -1)) (i32.const 16))\n(assert_return (invoke \"nested-block-value\" (i32.const 100000)) (i32.const 16))\n\n(assert_return (invoke \"nested-br-value\" (i32.const 0)) (i32.const 8))\n(assert_return (invoke \"nested-br-value\" (i32.const 1)) (i32.const 9))\n(assert_return (invoke \"nested-br-value\" (i32.const 2)) (i32.const 17))\n(assert_return (invoke \"nested-br-value\" (i32.const 11)) (i32.const 17))\n(assert_return (invoke \"nested-br-value\" (i32.const -4)) (i32.const 17))\n(assert_return (invoke \"nested-br-value\" (i32.const 10213210)) (i32.const 17))\n\n(assert_return (invoke \"nested-br_if-value\" (i32.const 0)) (i32.const 17))\n(assert_return (invoke \"nested-br_if-value\" (i32.const 1)) (i32.const 9))\n(assert_return (invoke \"nested-br_if-value\" (i32.const 2)) (i32.const 8))\n(assert_return (invoke \"nested-br_if-value\" (i32.const 9)) (i32.const 8))\n(assert_return (invoke \"nested-br_if-value\" (i32.const -9)) (i32.const 8))\n(assert_return (invoke \"nested-br_if-value\" (i32.const 999999)) (i32.const 8))\n\n(assert_return (invoke \"nested-br_if-value-cond\" (i32.const 0)) (i32.const 9))\n(assert_return (invoke \"nested-br_if-value-cond\" (i32.const 1)) (i32.const 8))\n(assert_return (invoke \"nested-br_if-value-cond\" (i32.const 2)) (i32.const 9))\n(assert_return (invoke \"nested-br_if-value-cond\" (i32.const 3)) (i32.const 9))\n(assert_return (invoke \"nested-br_if-value-cond\" (i32.const -1000000)) (i32.const 9))\n(assert_return (invoke \"nested-br_if-value-cond\" (i32.const 9423975)) (i32.const 9))\n\n(assert_return (invoke \"nested-br_table-value\" (i32.const 0)) (i32.const 17))\n(assert_return (invoke \"nested-br_table-value\" (i32.const 1)) (i32.const 9))\n(assert_return (invoke \"nested-br_table-value\" (i32.const 2)) (i32.const 8))\n(assert_return (invoke \"nested-br_table-value\" (i32.const 9)) (i32.const 8))\n(assert_return (invoke \"nested-br_table-value\" (i32.const -9)) (i32.const 8))\n(assert_return (invoke \"nested-br_table-value\" (i32.const 999999)) (i32.const 8))\n\n(assert_return (invoke \"nested-br_table-value-index\" (i32.const 0)) (i32.const 9))\n(assert_return (invoke \"nested-br_table-value-index\" (i32.const 1)) (i32.const 8))\n(assert_return (invoke \"nested-br_table-value-index\" (i32.const 2)) (i32.const 9))\n(assert_return (invoke \"nested-br_table-value-index\" (i32.const 3)) (i32.const 9))\n(assert_return (invoke \"nested-br_table-value-index\" (i32.const -1000000)) (i32.const 9))\n(assert_return (invoke \"nested-br_table-value-index\" (i32.const 9423975)) (i32.const 9))\n\n(assert_return (invoke \"nested-br_table-loop-block\" (i32.const 1)) (i32.const 3))\n\n(assert_return (invoke \"meet-externref\" (i32.const 0) (ref.extern 1)) (ref.extern 1))\n(assert_return (invoke \"meet-externref\" (i32.const 1) (ref.extern 1)) (ref.extern 1))\n(assert_return (invoke \"meet-externref\" (i32.const 2) (ref.extern 1)) (ref.extern 1))\n\n(assert_invalid\n  (module (func $type-arg-void-vs-num (result i32)\n    (block (br_table 0 (i32.const 1)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-arg-empty-vs-num (result i32)\n    (block (br_table 0) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-arg-void-vs-num (result i32)\n    (block (result i32) (br_table 0 (nop) (i32.const 1)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-arg-num-vs-num (result i32)\n    (block (result i32)\n      (br_table 0 0 0 (i64.const 1) (i32.const 1)) (i32.const 1)\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-arg-num-vs-arg-num\n    (block\n      (block (result f32)\n        (br_table 0 1 (f32.const 0) (i32.const 0))\n      )\n      (drop)\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func\n    (block (result i32)\n      (block (result i64)\n        (br_table 0 1 (i32.const 0) (i32.const 0))\n      )\n    )\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-index-void-vs-i32\n    (block (br_table 0 0 0 (nop)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-index-num-vs-i32\n    (block (br_table 0 (i64.const 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-arg-index-void-vs-i32 (result i32)\n    (block (result i32) (br_table 0 0 (i32.const 0) (nop)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-arg-void-vs-num-nested (result i32)\n    (block (result i32) (i32.const 0) (block (br_table 1 (i32.const 0))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-arg-index-num-vs-i32 (result i32)\n    (block (result i32)\n      (br_table 0 0 (i32.const 0) (i64.const 0)) (i32.const 1)\n    )\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-arg-void-vs-num (result i32)\n    (block (br_table 0 (i32.const 1)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (func $type-arg-index-empty-in-then\n      (block\n        (i32.const 0) (i32.const 0)\n        (if (result i32) (then (br_table 0)))\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-arg-value-empty-in-then\n      (block\n        (i32.const 0) (i32.const 0)\n        (if (result i32) (then (br_table 0 (i32.const 1))))\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-arg-index-empty-in-return\n      (block (result i32)\n        (return (br_table 0))\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-arg-value-empty-in-return\n      (block (result i32)\n        (return (br_table 0 (i32.const 1)))\n      )\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (func (param i32) (result i32)\n      (loop (result i32)\n        (block (result i32)\n          (br_table 0 1 (i32.const 1) (local.get 0))\n        )\n      )\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func (param i32) (result i32)\n      (block (result i32)\n        (loop (result i32)\n          (br_table 0 1 (i32.const 1) (local.get 0))\n        )\n      )\n    )\n  )\n  \"type mismatch\"\n)\n\n\n(assert_invalid\n  (module (func $meet-bottom (param i32) (result externref)\n    (block $l1 (result externref)\n      (drop\n        (block $l2 (result i32)\n          (br_table $l2 $l1 $l2 (ref.null extern) (local.get 0))\n        )\n      )\n      (ref.null extern)\n    )\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $unbound-label\n    (block (br_table 2 1 (i32.const 1)))\n  ))\n  \"unknown label\"\n)\n(assert_invalid\n  (module (func $unbound-nested-label\n    (block (block (br_table 0 5 (i32.const 1))))\n  ))\n  \"unknown label\"\n)\n(assert_invalid\n  (module (func $large-label\n    (block (br_table 0 0x10000001 0 (i32.const 1)))\n  ))\n  \"unknown label\"\n)\n\n(assert_invalid\n  (module (func $unbound-label-default\n    (block (br_table 1 2 (i32.const 1)))\n  ))\n  \"unknown label\"\n)\n(assert_invalid\n  (module (func $unbound-nested-label-default\n    (block (block (br_table 0 5 (i32.const 1))))\n  ))\n  \"unknown label\"\n)\n(assert_invalid\n  (module (func $large-label-default\n    (block (br_table 0 0 0x10000001 (i32.const 1)))\n  ))\n  \"unknown label\"\n)\n\n"
  },
  {
    "path": "test/core/bulk.wast",
    "content": ";; segment syntax\n(module\n  (memory 1)\n  (data \"foo\"))\n\n(module\n  (table 3 funcref)\n  (elem funcref (ref.func 0) (ref.null func) (ref.func 1))\n  (func)\n  (func))\n\n;; memory.fill\n(module\n  (memory 1)\n\n  (func (export \"fill\") (param i32 i32 i32)\n    (memory.fill\n      (local.get 0)\n      (local.get 1)\n      (local.get 2)))\n\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0)))\n)\n\n;; Basic fill test.\n(invoke \"fill\" (i32.const 1) (i32.const 0xff) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 0xff))\n(assert_return (invoke \"load8_u\" (i32.const 2)) (i32.const 0xff))\n(assert_return (invoke \"load8_u\" (i32.const 3)) (i32.const 0xff))\n(assert_return (invoke \"load8_u\" (i32.const 4)) (i32.const 0))\n\n;; Fill value is stored as a byte.\n(invoke \"fill\" (i32.const 0) (i32.const 0xbbaa) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0xaa))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 0xaa))\n\n;; Fill all of memory\n(invoke \"fill\" (i32.const 0) (i32.const 0) (i32.const 0x10000))\n\n;; Out-of-bounds writes trap, and nothing is written\n(assert_trap (invoke \"fill\" (i32.const 0xff00) (i32.const 1) (i32.const 0x101))\n    \"out of bounds memory access\")\n(assert_return (invoke \"load8_u\" (i32.const 0xff00)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 0xffff)) (i32.const 0))\n\n;; Succeed when writing 0 bytes at the end of the region.\n(invoke \"fill\" (i32.const 0x10000) (i32.const 0) (i32.const 0))\n\n;; Writing 0 bytes outside the memory traps.\n(assert_trap (invoke \"fill\" (i32.const 0x10001) (i32.const 0) (i32.const 0))\n    \"out of bounds memory access\")\n\n\n;; memory.copy\n(module\n  (memory (data \"\\aa\\bb\\cc\\dd\"))\n\n  (func (export \"copy\") (param i32 i32 i32)\n    (memory.copy\n      (local.get 0)\n      (local.get 1)\n      (local.get 2)))\n\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0)))\n)\n\n;; Non-overlapping copy.\n(invoke \"copy\" (i32.const 10) (i32.const 0) (i32.const 4))\n\n(assert_return (invoke \"load8_u\" (i32.const 9)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 0xaa))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 0xbb))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 0xcc))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 0xdd))\n(assert_return (invoke \"load8_u\" (i32.const 14)) (i32.const 0))\n\n;; Overlap, source > dest\n(invoke \"copy\" (i32.const 8) (i32.const 10) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 8)) (i32.const 0xaa))\n(assert_return (invoke \"load8_u\" (i32.const 9)) (i32.const 0xbb))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 0xcc))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 0xdd))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 0xcc))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 0xdd))\n\n;; Overlap, source < dest\n(invoke \"copy\" (i32.const 10) (i32.const 7) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 0xaa))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 0xbb))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 0xcc))\n(assert_return (invoke \"load8_u\" (i32.const 14)) (i32.const 0xdd))\n(assert_return (invoke \"load8_u\" (i32.const 15)) (i32.const 0xcc))\n(assert_return (invoke \"load8_u\" (i32.const 16)) (i32.const 0))\n\n;; Copy ending at memory limit is ok.\n(invoke \"copy\" (i32.const 0xff00) (i32.const 0) (i32.const 0x100))\n(invoke \"copy\" (i32.const 0xfe00) (i32.const 0xff00) (i32.const 0x100))\n\n;; Succeed when copying 0 bytes at the end of the region.\n(invoke \"copy\" (i32.const 0x10000) (i32.const 0) (i32.const 0))\n(invoke \"copy\" (i32.const 0) (i32.const 0x10000) (i32.const 0))\n\n;; Copying 0 bytes outside the memory traps.\n(assert_trap (invoke \"copy\" (i32.const 0x10001) (i32.const 0) (i32.const 0))\n    \"out of bounds memory access\")\n(assert_trap (invoke \"copy\" (i32.const 0) (i32.const 0x10001) (i32.const 0))\n    \"out of bounds memory access\")\n\n\n;; memory.init\n(module\n  (memory 1)\n  (data \"\\aa\\bb\\cc\\dd\")\n\n  (func (export \"init\") (param i32 i32 i32)\n    (memory.init 0\n      (local.get 0)\n      (local.get 1)\n      (local.get 2)))\n\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0)))\n)\n\n(invoke \"init\" (i32.const 0) (i32.const 1) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0xbb))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 0xcc))\n(assert_return (invoke \"load8_u\" (i32.const 2)) (i32.const 0))\n\n;; Init ending at memory limit and segment limit is ok.\n(invoke \"init\" (i32.const 0xfffc) (i32.const 0) (i32.const 4))\n\n;; Out-of-bounds writes trap, and nothing is written.\n(assert_trap (invoke \"init\" (i32.const 0xfffe) (i32.const 0) (i32.const 3))\n    \"out of bounds memory access\")\n(assert_return (invoke \"load8_u\" (i32.const 0xfffe)) (i32.const 0xcc))\n(assert_return (invoke \"load8_u\" (i32.const 0xffff)) (i32.const 0xdd))\n\n;; Succeed when writing 0 bytes at the end of either region.\n(invoke \"init\" (i32.const 0x10000) (i32.const 0) (i32.const 0))\n(invoke \"init\" (i32.const 0) (i32.const 4) (i32.const 0))\n\n;; Writing 0 bytes outside the memory traps.\n(assert_trap (invoke \"init\" (i32.const 0x10001) (i32.const 0) (i32.const 0))\n    \"out of bounds memory access\")\n(assert_trap (invoke \"init\" (i32.const 0) (i32.const 5) (i32.const 0))\n    \"out of bounds memory access\")\n\n;; data.drop\n(module\n  (memory 1)\n  (data $p \"x\")\n  (data $a (memory 0) (i32.const 0) \"x\")\n\n  (func (export \"drop_passive\") (data.drop $p))\n  (func (export \"init_passive\") (param $len i32)\n    (memory.init $p (i32.const 0) (i32.const 0) (local.get $len)))\n\n  (func (export \"drop_active\") (data.drop $a))\n  (func (export \"init_active\") (param $len i32)\n    (memory.init $a (i32.const 0) (i32.const 0) (local.get $len)))\n)\n\n(invoke \"init_passive\" (i32.const 1))\n(invoke \"drop_passive\")\n(invoke \"drop_passive\")\n(assert_return (invoke \"init_passive\" (i32.const 0)))\n(assert_trap (invoke \"init_passive\" (i32.const 1)) \"out of bounds memory access\")\n(invoke \"init_passive\" (i32.const 0))\n(invoke \"drop_active\")\n(assert_return (invoke \"init_active\" (i32.const 0)))\n(assert_trap (invoke \"init_active\" (i32.const 1)) \"out of bounds memory access\")\n(invoke \"init_active\" (i32.const 0))\n\n;; Test that the data segment index is properly encoded as an unsigned (not\n;; signed) LEB.\n(module\n  ;; 65 data segments. 64 is the smallest positive number that is encoded\n  ;; differently as a signed LEB.\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\")\n  (func (data.drop 64)))\n\n;; No memory is required for the data.drop instruction.\n(module (data \"goodbye\") (func (data.drop 0)))\n\n;; table.init\n(module\n  (table 3 funcref)\n  (elem funcref\n    (ref.func $zero) (ref.func $one) (ref.func $zero) (ref.func $one))\n\n  (func $zero (result i32) (i32.const 0))\n  (func $one (result i32) (i32.const 1))\n\n  (func (export \"init\") (param i32 i32 i32)\n    (table.init 0\n      (local.get 0)\n      (local.get 1)\n      (local.get 2)))\n\n  (func (export \"call\") (param i32) (result i32)\n    (call_indirect (result i32)\n      (local.get 0)))\n)\n\n;; Out-of-bounds stores trap, and nothing is written.\n(assert_trap (invoke \"init\" (i32.const 2) (i32.const 0) (i32.const 2))\n    \"out of bounds table access\")\n(assert_trap (invoke \"call\" (i32.const 2))\n    \"uninitialized element 2\")\n\n(invoke \"init\" (i32.const 0) (i32.const 1) (i32.const 2))\n(assert_return (invoke \"call\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"call\" (i32.const 1)) (i32.const 0))\n(assert_trap (invoke \"call\" (i32.const 2)) \"uninitialized element\")\n\n;; Init ending at table limit and segment limit is ok.\n(invoke \"init\" (i32.const 1) (i32.const 2) (i32.const 2))\n\n;; Succeed when storing 0 elements at the end of either region.\n(invoke \"init\" (i32.const 3) (i32.const 0) (i32.const 0))\n(invoke \"init\" (i32.const 0) (i32.const 4) (i32.const 0))\n\n;; Writing 0 elements outside the table traps.\n(assert_trap (invoke \"init\" (i32.const 4) (i32.const 0) (i32.const 0))\n    \"out of bounds table access\")\n(assert_trap (invoke \"init\" (i32.const 0) (i32.const 5) (i32.const 0))\n    \"out of bounds table access\")\n\n\n;; elem.drop\n(module\n  (table 1 funcref)\n  (func $f)\n  (elem $p funcref (ref.func $f))\n  (elem $a (table 0) (i32.const 0) func $f)\n\n  (func (export \"drop_passive\") (elem.drop $p))\n  (func (export \"init_passive\") (param $len i32)\n    (table.init $p (i32.const 0) (i32.const 0) (local.get $len))\n  )\n\n  (func (export \"drop_active\") (elem.drop $a))\n  (func (export \"init_active\") (param $len i32)\n    (table.init $a (i32.const 0) (i32.const 0) (local.get $len))\n  )\n)\n\n(invoke \"init_passive\" (i32.const 1))\n(invoke \"drop_passive\")\n(invoke \"drop_passive\")\n(assert_return (invoke \"init_passive\" (i32.const 0)))\n(assert_trap (invoke \"init_passive\" (i32.const 1)) \"out of bounds table access\")\n(invoke \"init_passive\" (i32.const 0))\n(invoke \"drop_active\")\n(assert_return (invoke \"init_active\" (i32.const 0)))\n(assert_trap (invoke \"init_active\" (i32.const 1)) \"out of bounds table access\")\n(invoke \"init_active\" (i32.const 0))\n\n;; Test that the elem segment index is properly encoded as an unsigned (not\n;; signed) LEB.\n(module\n  ;; 65 elem segments. 64 is the smallest positive number that is encoded\n  ;; differently as a signed LEB.\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref)\n  (func (elem.drop 64)))\n\n;; No table is required for the elem.drop instruction.\n(module (elem funcref (ref.func 0)) (func (elem.drop 0)))\n\n;; table.copy\n(module\n  (table 10 funcref)\n  (elem (i32.const 0) $zero $one $two)\n  (func $zero (result i32) (i32.const 0))\n  (func $one (result i32) (i32.const 1))\n  (func $two (result i32) (i32.const 2))\n\n  (func (export \"copy\") (param i32 i32 i32)\n    (table.copy\n      (local.get 0)\n      (local.get 1)\n      (local.get 2)))\n\n  (func (export \"call\") (param i32) (result i32)\n    (call_indirect (result i32)\n      (local.get 0)))\n)\n\n;; Non-overlapping copy.\n(invoke \"copy\" (i32.const 3) (i32.const 0) (i32.const 3))\n;; Now [$zero, $one, $two, $zero, $one, $two, ...]\n(assert_return (invoke \"call\" (i32.const 3)) (i32.const 0))\n(assert_return (invoke \"call\" (i32.const 4)) (i32.const 1))\n(assert_return (invoke \"call\" (i32.const 5)) (i32.const 2))\n\n;; Overlap, source > dest\n(invoke \"copy\" (i32.const 0) (i32.const 1) (i32.const 3))\n;; Now [$one, $two, $zero, $zero, $one, $two, ...]\n(assert_return (invoke \"call\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"call\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"call\" (i32.const 2)) (i32.const 0))\n\n;; Overlap, source < dest\n(invoke \"copy\" (i32.const 2) (i32.const 0) (i32.const 3))\n;; Now [$one, $two, $one, $two, $zero, $two, ...]\n(assert_return (invoke \"call\" (i32.const 2)) (i32.const 1))\n(assert_return (invoke \"call\" (i32.const 3)) (i32.const 2))\n(assert_return (invoke \"call\" (i32.const 4)) (i32.const 0))\n\n;; Copy ending at table limit is ok.\n(invoke \"copy\" (i32.const 6) (i32.const 8) (i32.const 2))\n(invoke \"copy\" (i32.const 8) (i32.const 6) (i32.const 2))\n\n;; Succeed when copying 0 elements at the end of the region.\n(invoke \"copy\" (i32.const 10) (i32.const 0) (i32.const 0))\n(invoke \"copy\" (i32.const 0) (i32.const 10) (i32.const 0))\n\n;; Fail on out-of-bounds when copying 0 elements outside of table.\n(assert_trap (invoke \"copy\" (i32.const 11) (i32.const 0) (i32.const 0))\n  \"out of bounds table access\")\n(assert_trap (invoke \"copy\" (i32.const 0) (i32.const 11) (i32.const 0))\n  \"out of bounds table access\")\n"
  },
  {
    "path": "test/core/call.wast",
    "content": ";; Test `call` operator\n\n(module\n  ;; Auxiliary definitions\n  (func $const-i32 (result i32) (i32.const 0x132))\n  (func $const-i64 (result i64) (i64.const 0x164))\n  (func $const-f32 (result f32) (f32.const 0xf32))\n  (func $const-f64 (result f64) (f64.const 0xf64))\n  (func $const-i32-i64 (result i32 i64) (i32.const 0x132) (i64.const 0x164))\n\n  (func $id-i32 (param i32) (result i32) (local.get 0))\n  (func $id-i64 (param i64) (result i64) (local.get 0))\n  (func $id-f32 (param f32) (result f32) (local.get 0))\n  (func $id-f64 (param f64) (result f64) (local.get 0))\n  (func $id-i32-f64 (param i32 f64) (result i32 f64)\n    (local.get 0) (local.get 1)\n  )\n\n  (func $swap-i32-i32 (param i32 i32) (result i32 i32)\n    (local.get 1) (local.get 0)\n  )\n  (func $swap-f32-f64 (param f32 f64) (result f64 f32)\n    (local.get 1) (local.get 0)\n  )\n  (func $swap-f64-i32 (param f64 i32) (result i32 f64)\n    (local.get 1) (local.get 0)\n  )\n\n  (func $f32-i32 (param f32 i32) (result i32) (local.get 1))\n  (func $i32-i64 (param i32 i64) (result i64) (local.get 1))\n  (func $f64-f32 (param f64 f32) (result f32) (local.get 1))\n  (func $i64-f64 (param i64 f64) (result f64) (local.get 1))\n\n  ;; Typing\n\n  (func (export \"type-i32\") (result i32) (call $const-i32))\n  (func (export \"type-i64\") (result i64) (call $const-i64))\n  (func (export \"type-f32\") (result f32) (call $const-f32))\n  (func (export \"type-f64\") (result f64) (call $const-f64))\n  (func (export \"type-i32-i64\") (result i32 i64) (call $const-i32-i64))\n\n  (func (export \"type-first-i32\") (result i32) (call $id-i32 (i32.const 32)))\n  (func (export \"type-first-i64\") (result i64) (call $id-i64 (i64.const 64)))\n  (func (export \"type-first-f32\") (result f32) (call $id-f32 (f32.const 1.32)))\n  (func (export \"type-first-f64\") (result f64) (call $id-f64 (f64.const 1.64)))\n\n  (func (export \"type-second-i32\") (result i32)\n    (call $f32-i32 (f32.const 32.1) (i32.const 32))\n  )\n  (func (export \"type-second-i64\") (result i64)\n    (call $i32-i64 (i32.const 32) (i64.const 64))\n  )\n  (func (export \"type-second-f32\") (result f32)\n    (call $f64-f32 (f64.const 64) (f32.const 32))\n  )\n  (func (export \"type-second-f64\") (result f64)\n    (call $i64-f64 (i64.const 64) (f64.const 64.1))\n  )\n\n  (func (export \"type-all-i32-f64\") (result i32 f64)\n    (call $id-i32-f64 (i32.const 32) (f64.const 1.64))\n  )\n  (func (export \"type-all-i32-i32\") (result i32 i32)\n    (call $swap-i32-i32 (i32.const 1) (i32.const 2))\n  )\n  (func (export \"type-all-f32-f64\") (result f64 f32)\n    (call $swap-f32-f64 (f32.const 1) (f64.const 2))\n  )\n  (func (export \"type-all-f64-i32\") (result i32 f64)\n    (call $swap-f64-i32 (f64.const 1) (i32.const 2))\n  )\n\n  ;; Composition\n\n  (func (export \"as-binary-all-operands\") (result i32)\n    (i32.add (call $swap-i32-i32 (i32.const 3) (i32.const 4)))\n  )\n\n  (func (export \"as-mixed-operands\") (result i32)\n    (call $swap-i32-i32 (i32.const 3) (i32.const 4))\n    (i32.const 5)\n    (i32.add)\n    (i32.mul)\n  )\n\n  (func (export \"as-call-all-operands\") (result i32 i32)\n    (call $swap-i32-i32 (call $swap-i32-i32 (i32.const 3) (i32.const 4)))\n  )\n\n  ;; Recursion\n\n  (func $fac (export \"fac\") (param i64) (result i64)\n    (if (result i64) (i64.eqz (local.get 0))\n      (then (i64.const 1))\n      (else\n        (i64.mul\n          (local.get 0)\n          (call $fac (i64.sub (local.get 0) (i64.const 1)))\n        )\n      )\n    )\n  )\n\n  (func $fac-acc (export \"fac-acc\") (param i64 i64) (result i64)\n    (if (result i64) (i64.eqz (local.get 0))\n      (then (local.get 1))\n      (else\n        (call $fac-acc\n          (i64.sub (local.get 0) (i64.const 1))\n          (i64.mul (local.get 0) (local.get 1))\n        )\n      )\n    )\n  )\n\n  (func $fib (export \"fib\") (param i64) (result i64)\n    (if (result i64) (i64.le_u (local.get 0) (i64.const 1))\n      (then (i64.const 1))\n      (else\n        (i64.add\n          (call $fib (i64.sub (local.get 0) (i64.const 2)))\n          (call $fib (i64.sub (local.get 0) (i64.const 1)))\n        )\n      )\n    )\n  )\n\n  (func $even (export \"even\") (param i64) (result i32)\n    (if (result i32) (i64.eqz (local.get 0))\n      (then (i32.const 44))\n      (else (call $odd (i64.sub (local.get 0) (i64.const 1))))\n    )\n  )\n  (func $odd (export \"odd\") (param i64) (result i32)\n    (if (result i32) (i64.eqz (local.get 0))\n      (then (i32.const 99))\n      (else (call $even (i64.sub (local.get 0) (i64.const 1))))\n    )\n  )\n\n  ;; Stack exhaustion\n\n  ;; Implementations are required to have every call consume some abstract\n  ;; resource towards exhausting some abstract finite limit, such that\n  ;; infinitely recursive test cases reliably trap in finite time. This is\n  ;; because otherwise applications could come to depend on it on those\n  ;; implementations and be incompatible with implementations that don't do\n  ;; it (or don't do it under the same circumstances).\n\n  (func $runaway (export \"runaway\") (call $runaway))\n\n  (func $mutual-runaway1 (export \"mutual-runaway\") (call $mutual-runaway2))\n  (func $mutual-runaway2 (call $mutual-runaway1))\n\n  ;; As parameter of control constructs and instructions\n\n  (memory 1)\n\n  (func (export \"as-select-first\") (result i32)\n    (select (call $const-i32) (i32.const 2) (i32.const 3))\n  )\n  (func (export \"as-select-mid\") (result i32)\n    (select (i32.const 2) (call $const-i32) (i32.const 3))\n  )\n  (func (export \"as-select-last\") (result i32)\n    (select (i32.const 2) (i32.const 3) (call $const-i32))\n  )\n\n  (func (export \"as-if-condition\") (result i32)\n    (if (result i32) (call $const-i32) (then (i32.const 1)) (else (i32.const 2)))\n  )\n\n  (func (export \"as-br_if-first\") (result i32)\n    (block (result i32) (br_if 0 (call $const-i32) (i32.const 2)))\n  )\n  (func (export \"as-br_if-last\") (result i32)\n    (block (result i32) (br_if 0 (i32.const 2) (call $const-i32)))\n  )\n\n  (func (export \"as-br_table-first\") (result i32)\n    (block (result i32) (call $const-i32) (i32.const 2) (br_table 0 0))\n  )\n  (func (export \"as-br_table-last\") (result i32)\n    (block (result i32) (i32.const 2) (call $const-i32) (br_table 0 0))\n  )\n\n  (func $func (param i32 i32) (result i32) (local.get 0))\n  (type $check (func (param i32 i32) (result i32)))\n  (table funcref (elem $func))\n  (func (export \"as-call_indirect-first\") (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (call $const-i32) (i32.const 2) (i32.const 0)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-mid\") (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (i32.const 2) (call $const-i32) (i32.const 0)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-last\") (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (i32.const 1) (i32.const 2) (call $const-i32)\n      )\n    )\n  )\n\n  (func (export \"as-store-first\")\n    (call $const-i32) (i32.const 1) (i32.store)\n  )\n  (func (export \"as-store-last\")\n    (i32.const 10) (call $const-i32) (i32.store)\n  )\n\n  (func (export \"as-memory.grow-value\") (result i32)\n    (memory.grow (call $const-i32))\n  )\n  (func (export \"as-return-value\") (result i32)\n    (call $const-i32) (return)\n  )\n  (func (export \"as-drop-operand\")\n    (call $const-i32) (drop)\n  )\n  (func (export \"as-br-value\") (result i32)\n    (block (result i32) (br 0 (call $const-i32)))\n  )\n  (func (export \"as-local.set-value\") (result i32)\n    (local i32) (local.set 0 (call $const-i32)) (local.get 0)\n  )\n  (func (export \"as-local.tee-value\") (result i32)\n    (local i32) (local.tee 0 (call $const-i32))\n  )\n  (global $a (mut i32) (i32.const 10))\n  (func (export \"as-global.set-value\") (result i32)\n    (global.set $a (call $const-i32))\n    (global.get $a)\n  )\n  (func (export \"as-load-operand\") (result i32)\n    (i32.load (call $const-i32))\n  )\n\n  (func $dummy (param i32) (result i32) (local.get 0))\n  (func $du (param f32) (result f32) (local.get 0))\n  (func (export \"as-unary-operand\") (result f32)\n    (block (result f32) (f32.sqrt (call $du (f32.const 0x0p+0))))\n  )\n\n  (func (export \"as-binary-left\") (result i32)\n    (block (result i32) (i32.add (call $dummy (i32.const 1)) (i32.const 10)))\n  )\n  (func (export \"as-binary-right\") (result i32)\n    (block (result i32) (i32.sub (i32.const 10) (call $dummy (i32.const 1))))\n  )\n\n  (func (export \"as-test-operand\") (result i32)\n    (block (result i32) (i32.eqz (call $dummy (i32.const 1))))\n  )\n\n  (func (export \"as-compare-left\") (result i32)\n    (block (result i32) (i32.le_u (call $dummy (i32.const 1)) (i32.const 10)))\n  )\n  (func (export \"as-compare-right\") (result i32)\n    (block (result i32) (i32.ne (i32.const 10) (call $dummy (i32.const 1))))\n  )\n\n  (func (export \"as-convert-operand\") (result i64)\n    (block (result i64) (i64.extend_i32_s (call $dummy (i32.const 1))))\n  )\n\n  ;; Test correct argument passing\n\n  (func $return-from-long-argument-list-helper (param f32 i32 i32 f64 f32 f32 f32 f64 f32 i32 i32 f32 f64 i64 i64 i32 i64 i64 f32 i64 i64 i64 i32 f32 f32 f32 f64 f32 i32 i64 f32 f64 f64 f32 i32 f32 f32 f64 i64 f64 i32 i64 f32 f64 i32 i32 i32 i64 f64 i32 i64 i64 f64 f64 f64 f64 f64 f64 i32 f32 f64 f64 i32 i64 f32 f32 f32 i32 f64 f64 f64 f64 f64 f32 i64 i64 i32 i32 i32 f32 f64 i32 i64 f32 f32 f32 i32 i32 f32 f64 i64 f32 f64 f32 f32 f32 i32 f32 i64 i32) (result i32)\n    (local.get 99)\n  )\n\n  (func (export \"return-from-long-argument-list\") (param i32) (result i32)\n    (call $return-from-long-argument-list-helper (f32.const 0) (i32.const 0) (i32.const 0) (f64.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f64.const 0) (f32.const 0) (i32.const 0) (i32.const 0) (f32.const 0) (f64.const 0) (i64.const 0) (i64.const 0) (i32.const 0) (i64.const 0) (i64.const 0) (f32.const 0) (i64.const 0) (i64.const 0) (i64.const 0) (i32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f64.const 0) (f32.const 0) (i32.const 0) (i64.const 0) (f32.const 0) (f64.const 0) (f64.const 0) (f32.const 0) (i32.const 0) (f32.const 0) (f32.const 0) (f64.const 0) (i64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (f32.const 0) (f64.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (i64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (i32.const 0) (f32.const 0) (f64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (i32.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f32.const 0) (i64.const 0) (i64.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (f32.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (i32.const 0) (i32.const 0) (f32.const 0) (f64.const 0) (i64.const 0) (f32.const 0) (f64.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (i32.const 0) (f32.const 0) (i64.const 0) (local.get 0))\n  )\n)\n\n(assert_return (invoke \"type-i32\") (i32.const 0x132))\n(assert_return (invoke \"type-i64\") (i64.const 0x164))\n(assert_return (invoke \"type-f32\") (f32.const 0xf32))\n(assert_return (invoke \"type-f64\") (f64.const 0xf64))\n(assert_return (invoke \"type-i32-i64\") (i32.const 0x132) (i64.const 0x164))\n\n(assert_return (invoke \"type-first-i32\") (i32.const 32))\n(assert_return (invoke \"type-first-i64\") (i64.const 64))\n(assert_return (invoke \"type-first-f32\") (f32.const 1.32))\n(assert_return (invoke \"type-first-f64\") (f64.const 1.64))\n\n(assert_return (invoke \"type-second-i32\") (i32.const 32))\n(assert_return (invoke \"type-second-i64\") (i64.const 64))\n(assert_return (invoke \"type-second-f32\") (f32.const 32))\n(assert_return (invoke \"type-second-f64\") (f64.const 64.1))\n\n(assert_return (invoke \"type-all-i32-f64\") (i32.const 32) (f64.const 1.64))\n(assert_return (invoke \"type-all-i32-i32\") (i32.const 2) (i32.const 1))\n(assert_return (invoke \"type-all-f32-f64\") (f64.const 2) (f32.const 1))\n(assert_return (invoke \"type-all-f64-i32\") (i32.const 2) (f64.const 1))\n\n(assert_return (invoke \"as-binary-all-operands\") (i32.const 7))\n(assert_return (invoke \"as-mixed-operands\") (i32.const 32))\n(assert_return (invoke \"as-call-all-operands\") (i32.const 3) (i32.const 4))\n\n(assert_return (invoke \"fac\" (i64.const 0)) (i64.const 1))\n(assert_return (invoke \"fac\" (i64.const 1)) (i64.const 1))\n(assert_return (invoke \"fac\" (i64.const 5)) (i64.const 120))\n(assert_return (invoke \"fac\" (i64.const 25)) (i64.const 7034535277573963776))\n(assert_return (invoke \"fac-acc\" (i64.const 0) (i64.const 1)) (i64.const 1))\n(assert_return (invoke \"fac-acc\" (i64.const 1) (i64.const 1)) (i64.const 1))\n(assert_return (invoke \"fac-acc\" (i64.const 5) (i64.const 1)) (i64.const 120))\n(assert_return\n  (invoke \"fac-acc\" (i64.const 25) (i64.const 1))\n  (i64.const 7034535277573963776)\n)\n\n(assert_return (invoke \"fib\" (i64.const 0)) (i64.const 1))\n(assert_return (invoke \"fib\" (i64.const 1)) (i64.const 1))\n(assert_return (invoke \"fib\" (i64.const 2)) (i64.const 2))\n(assert_return (invoke \"fib\" (i64.const 5)) (i64.const 8))\n(assert_return (invoke \"fib\" (i64.const 20)) (i64.const 10946))\n\n(assert_return (invoke \"even\" (i64.const 0)) (i32.const 44))\n(assert_return (invoke \"even\" (i64.const 1)) (i32.const 99))\n(assert_return (invoke \"even\" (i64.const 100)) (i32.const 44))\n(assert_return (invoke \"even\" (i64.const 77)) (i32.const 99))\n(assert_return (invoke \"odd\" (i64.const 0)) (i32.const 99))\n(assert_return (invoke \"odd\" (i64.const 1)) (i32.const 44))\n(assert_return (invoke \"odd\" (i64.const 200)) (i32.const 99))\n(assert_return (invoke \"odd\" (i64.const 77)) (i32.const 44))\n\n(assert_exhaustion (invoke \"runaway\") \"call stack exhausted\")\n(assert_exhaustion (invoke \"mutual-runaway\") \"call stack exhausted\")\n\n(assert_return (invoke \"as-select-first\") (i32.const 0x132))\n(assert_return (invoke \"as-select-mid\") (i32.const 2))\n(assert_return (invoke \"as-select-last\") (i32.const 2))\n\n(assert_return (invoke \"as-if-condition\") (i32.const 1))\n\n(assert_return (invoke \"as-br_if-first\") (i32.const 0x132))\n(assert_return (invoke \"as-br_if-last\") (i32.const 2))\n\n(assert_return (invoke \"as-br_table-first\") (i32.const 0x132))\n(assert_return (invoke \"as-br_table-last\") (i32.const 2))\n\n(assert_return (invoke \"as-call_indirect-first\") (i32.const 0x132))\n(assert_return (invoke \"as-call_indirect-mid\") (i32.const 2))\n(assert_trap (invoke \"as-call_indirect-last\") \"undefined element\")\n\n(assert_return (invoke \"as-store-first\"))\n(assert_return (invoke \"as-store-last\"))\n\n(assert_return (invoke \"as-memory.grow-value\") (i32.const 1))\n(assert_return (invoke \"as-return-value\") (i32.const 0x132))\n(assert_return (invoke \"as-drop-operand\"))\n(assert_return (invoke \"as-br-value\") (i32.const 0x132))\n(assert_return (invoke \"as-local.set-value\") (i32.const 0x132))\n(assert_return (invoke \"as-local.tee-value\") (i32.const 0x132))\n(assert_return (invoke \"as-global.set-value\") (i32.const 0x132))\n(assert_return (invoke \"as-load-operand\") (i32.const 1))\n\n(assert_return (invoke \"as-unary-operand\") (f32.const 0x0p+0))\n(assert_return (invoke \"as-binary-left\") (i32.const 11))\n(assert_return (invoke \"as-binary-right\") (i32.const 9))\n(assert_return (invoke \"as-test-operand\") (i32.const 0))\n(assert_return (invoke \"as-compare-left\") (i32.const 1))\n(assert_return (invoke \"as-compare-right\") (i32.const 1))\n(assert_return (invoke \"as-convert-operand\") (i64.const 1))\n\n(assert_return (invoke \"return-from-long-argument-list\" (i32.const 42)) (i32.const 42))\n\n;; Invalid typing\n\n(assert_invalid\n  (module\n    (func $type-void-vs-num (i32.eqz (call 1)))\n    (func)\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-num-vs-num (i32.eqz (call 1)))\n    (func (result i64) (i64.const 1))\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (func $arity-0-vs-1 (call 1))\n    (func (param i32))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $arity-0-vs-2 (call 1))\n    (func (param f64 i32))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $arity-1-vs-0 (call 1 (i32.const 1)))\n    (func)\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $arity-2-vs-0 (call 1 (f64.const 2) (i32.const 1)))\n    (func)\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (func $type-first-void-vs-num (call 1 (nop) (i32.const 1)))\n    (func (param i32 i32))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-second-void-vs-num (call 1 (i32.const 1) (nop)))\n    (func (param i32 i32))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-first-num-vs-num (call 1 (f64.const 1) (i32.const 1)))\n    (func (param i32 f64))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-second-num-vs-num (call 1 (i32.const 1) (f64.const 1)))\n    (func (param f64 i32))\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (func $type-first-empty-in-block\n      (block (call 1))\n    )\n    (func (param i32))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-second-empty-in-block\n      (block (call 1 (i32.const 0)))\n    )\n    (func (param i32 i32))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-first-empty-in-loop\n      (loop (call 1))\n    )\n    (func (param i32))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-second-empty-in-loop\n      (loop (call 1 (i32.const 0)))\n    )\n    (func (param i32 i32))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-first-empty-in-then\n      (if (i32.const 0) (then (call 1)))\n    )\n    (func (param i32))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-second-empty-in-then\n      (if (i32.const 0) (then (call 1 (i32.const 0))))\n    )\n    (func (param i32 i32))\n  )\n  \"type mismatch\"\n)\n\n\n;; Unbound function\n\n(assert_invalid\n  (module (func $unbound-func (call 1)))\n  \"unknown function\"\n)\n(assert_invalid\n  (module (func $large-func (call 1012321300)))\n  \"unknown function\"\n)\n"
  },
  {
    "path": "test/core/call_indirect.wast",
    "content": ";; Test `call_indirect` operator\n\n(module\n  ;; Auxiliary definitions\n  (type $proc (func))\n  (type $out-i32 (func (result i32)))\n  (type $out-i64 (func (result i64)))\n  (type $out-f32 (func (result f32)))\n  (type $out-f64 (func (result f64)))\n  (type $out-f64-i32 (func (result f64 i32)))\n  (type $over-i32 (func (param i32) (result i32)))\n  (type $over-i64 (func (param i64) (result i64)))\n  (type $over-f32 (func (param f32) (result f32)))\n  (type $over-f64 (func (param f64) (result f64)))\n  (type $over-i32-f64 (func (param i32 f64) (result i32 f64)))\n  (type $swap-i32-i64 (func (param i32 i64) (result i64 i32)))\n  (type $f32-i32 (func (param f32 i32) (result i32)))\n  (type $i32-i64 (func (param i32 i64) (result i64)))\n  (type $f64-f32 (func (param f64 f32) (result f32)))\n  (type $i64-f64 (func (param i64 f64) (result f64)))\n  (type $over-i32-duplicate (func (param i32) (result i32)))\n  (type $over-i64-duplicate (func (param i64) (result i64)))\n  (type $over-f32-duplicate (func (param f32) (result f32)))\n  (type $over-f64-duplicate (func (param f64) (result f64)))\n\n  (func $const-i32 (type $out-i32) (i32.const 0x132))\n  (func $const-i64 (type $out-i64) (i64.const 0x164))\n  (func $const-f32 (type $out-f32) (f32.const 0xf32))\n  (func $const-f64 (type $out-f64) (f64.const 0xf64))\n  (func $const-f64-i32 (type $out-f64-i32) (f64.const 0xf64) (i32.const 32))\n\n  (func $id-i32 (type $over-i32) (local.get 0))\n  (func $id-i64 (type $over-i64) (local.get 0))\n  (func $id-f32 (type $over-f32) (local.get 0))\n  (func $id-f64 (type $over-f64) (local.get 0))\n  (func $id-i32-f64 (type $over-i32-f64) (local.get 0) (local.get 1))\n  (func $swap-i32-i64 (type $swap-i32-i64) (local.get 1) (local.get 0))\n\n  (func $i32-i64 (type $i32-i64) (local.get 1))\n  (func $i64-f64 (type $i64-f64) (local.get 1))\n  (func $f32-i32 (type $f32-i32) (local.get 1))\n  (func $f64-f32 (type $f64-f32) (local.get 1))\n\n  (func $over-i32-duplicate (type $over-i32-duplicate) (local.get 0))\n  (func $over-i64-duplicate (type $over-i64-duplicate) (local.get 0))\n  (func $over-f32-duplicate (type $over-f32-duplicate) (local.get 0))\n  (func $over-f64-duplicate (type $over-f64-duplicate) (local.get 0))\n\n  (table funcref\n    (elem\n      $const-i32 $const-i64 $const-f32 $const-f64  ;; 0..3\n      $id-i32 $id-i64 $id-f32 $id-f64              ;; 4..7\n      $f32-i32 $i32-i64 $f64-f32 $i64-f64          ;; 9..11\n      $fac-i64 $fib-i64 $even $odd                 ;; 12..15\n      $runaway $mutual-runaway1 $mutual-runaway2   ;; 16..18\n      $over-i32-duplicate $over-i64-duplicate      ;; 19..20\n      $over-f32-duplicate $over-f64-duplicate      ;; 21..22\n      $fac-i32 $fac-f32 $fac-f64                   ;; 23..25\n      $fib-i32 $fib-f32 $fib-f64                   ;; 26..28\n      $const-f64-i32 $id-i32-f64 $swap-i32-i64     ;; 29..31\n    )\n  )\n\n  ;; Syntax\n\n  (func\n    (call_indirect (i32.const 0))\n    (call_indirect (param i64) (i64.const 0) (i32.const 0))\n    (call_indirect (param i64) (param) (param f64 i32 i64)\n      (i64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (i32.const 0)\n    )\n    (call_indirect (result) (i32.const 0))\n    (drop (i32.eqz (call_indirect (result i32) (i32.const 0))))\n    (drop (i32.eqz (call_indirect (result i32) (result) (i32.const 0))))\n    (drop (i32.eqz\n      (call_indirect (param i64) (result i32) (i64.const 0) (i32.const 0))\n    ))\n    (drop (i32.eqz\n      (call_indirect\n        (param) (param i64) (param) (param f64 i32 i64) (param) (param)\n        (result) (result i32) (result) (result)\n        (i64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (i32.const 0)\n      )\n    ))\n    (drop (i64.eqz\n      (call_indirect (type $over-i64) (param i64) (result i64)\n        (i64.const 0) (i32.const 0)\n      )\n    ))\n  )\n\n  ;; Typing\n\n  (func (export \"type-i32\") (result i32)\n    (call_indirect (type $out-i32) (i32.const 0))\n  )\n  (func (export \"type-i64\") (result i64)\n    (call_indirect (type $out-i64) (i32.const 1))\n  )\n  (func (export \"type-f32\") (result f32)\n    (call_indirect (type $out-f32) (i32.const 2))\n  )\n  (func (export \"type-f64\") (result f64)\n    (call_indirect (type $out-f64) (i32.const 3))\n  )\n  (func (export \"type-f64-i32\") (result f64 i32)\n    (call_indirect (type $out-f64-i32) (i32.const 29))\n  )\n\n  (func (export \"type-index\") (result i64)\n    (call_indirect (type $over-i64) (i64.const 100) (i32.const 5))\n  )\n\n  (func (export \"type-first-i32\") (result i32)\n    (call_indirect (type $over-i32) (i32.const 32) (i32.const 4))\n  )\n  (func (export \"type-first-i64\") (result i64)\n    (call_indirect (type $over-i64) (i64.const 64) (i32.const 5))\n  )\n  (func (export \"type-first-f32\") (result f32)\n    (call_indirect (type $over-f32) (f32.const 1.32) (i32.const 6))\n  )\n  (func (export \"type-first-f64\") (result f64)\n    (call_indirect (type $over-f64) (f64.const 1.64) (i32.const 7))\n  )\n\n  (func (export \"type-second-i32\") (result i32)\n    (call_indirect (type $f32-i32) (f32.const 32.1) (i32.const 32) (i32.const 8))\n  )\n  (func (export \"type-second-i64\") (result i64)\n    (call_indirect (type $i32-i64) (i32.const 32) (i64.const 64) (i32.const 9))\n  )\n  (func (export \"type-second-f32\") (result f32)\n    (call_indirect (type $f64-f32) (f64.const 64) (f32.const 32) (i32.const 10))\n  )\n  (func (export \"type-second-f64\") (result f64)\n    (call_indirect (type $i64-f64) (i64.const 64) (f64.const 64.1) (i32.const 11))\n  )\n\n  (func (export \"type-all-f64-i32\") (result f64 i32)\n    (call_indirect (type $out-f64-i32) (i32.const 29))\n  )\n  (func (export \"type-all-i32-f64\") (result i32 f64)\n    (call_indirect (type $over-i32-f64)\n      (i32.const 1) (f64.const 2) (i32.const 30)\n    )\n  )\n  (func (export \"type-all-i32-i64\") (result i64 i32)\n    (call_indirect (type $swap-i32-i64)\n      (i32.const 1) (i64.const 2) (i32.const 31)\n    )\n  )\n\n  ;; Dispatch\n\n  (func (export \"dispatch\") (param i32 i64) (result i64)\n    (call_indirect (type $over-i64) (local.get 1) (local.get 0))\n  )\n\n  (func (export \"dispatch-structural-i64\") (param i32) (result i64)\n    (call_indirect (type $over-i64-duplicate) (i64.const 9) (local.get 0))\n  )\n  (func (export \"dispatch-structural-i32\") (param i32) (result i32)\n    (call_indirect (type $over-i32-duplicate) (i32.const 9) (local.get 0))\n  )\n  (func (export \"dispatch-structural-f32\") (param i32) (result f32)\n    (call_indirect (type $over-f32-duplicate) (f32.const 9.0) (local.get 0))\n  )\n  (func (export \"dispatch-structural-f64\") (param i32) (result f64)\n    (call_indirect (type $over-f64-duplicate) (f64.const 9.0) (local.get 0))\n  )\n\n  ;; Recursion\n\n  (func $fac-i64 (export \"fac-i64\") (type $over-i64)\n    (if (result i64) (i64.eqz (local.get 0))\n      (then (i64.const 1))\n      (else\n        (i64.mul\n          (local.get 0)\n          (call_indirect (type $over-i64)\n            (i64.sub (local.get 0) (i64.const 1))\n            (i32.const 12)\n          )\n        )\n      )\n    )\n  )\n\n  (func $fib-i64 (export \"fib-i64\") (type $over-i64)\n    (if (result i64) (i64.le_u (local.get 0) (i64.const 1))\n      (then (i64.const 1))\n      (else\n        (i64.add\n          (call_indirect (type $over-i64)\n            (i64.sub (local.get 0) (i64.const 2))\n            (i32.const 13)\n          )\n          (call_indirect (type $over-i64)\n            (i64.sub (local.get 0) (i64.const 1))\n            (i32.const 13)\n          )\n        )\n      )\n    )\n  )\n\n  (func $fac-i32 (export \"fac-i32\") (type $over-i32)\n    (if (result i32) (i32.eqz (local.get 0))\n      (then (i32.const 1))\n      (else\n        (i32.mul\n          (local.get 0)\n          (call_indirect (type $over-i32)\n            (i32.sub (local.get 0) (i32.const 1))\n            (i32.const 23)\n          )\n        )\n      )\n    )\n  )\n\n  (func $fac-f32 (export \"fac-f32\") (type $over-f32)\n    (if (result f32) (f32.eq (local.get 0) (f32.const 0.0))\n      (then (f32.const 1.0))\n      (else\n        (f32.mul\n          (local.get 0)\n          (call_indirect (type $over-f32)\n            (f32.sub (local.get 0) (f32.const 1.0))\n            (i32.const 24)\n          )\n        )\n      )\n    )\n  )\n\n  (func $fac-f64 (export \"fac-f64\") (type $over-f64)\n    (if (result f64) (f64.eq (local.get 0) (f64.const 0.0))\n      (then (f64.const 1.0))\n      (else\n        (f64.mul\n          (local.get 0)\n          (call_indirect (type $over-f64)\n            (f64.sub (local.get 0) (f64.const 1.0))\n            (i32.const 25)\n          )\n        )\n      )\n    )\n  )\n\n  (func $fib-i32 (export \"fib-i32\") (type $over-i32)\n    (if (result i32) (i32.le_u (local.get 0) (i32.const 1))\n      (then (i32.const 1))\n      (else\n        (i32.add\n          (call_indirect (type $over-i32)\n            (i32.sub (local.get 0) (i32.const 2))\n            (i32.const 26)\n          )\n          (call_indirect (type $over-i32)\n            (i32.sub (local.get 0) (i32.const 1))\n            (i32.const 26)\n          )\n        )\n      )\n    )\n  )\n\n  (func $fib-f32 (export \"fib-f32\") (type $over-f32)\n    (if (result f32) (f32.le (local.get 0) (f32.const 1.0))\n      (then (f32.const 1.0))\n      (else\n        (f32.add\n          (call_indirect (type $over-f32)\n            (f32.sub (local.get 0) (f32.const 2.0))\n            (i32.const 27)\n          )\n          (call_indirect (type $over-f32)\n            (f32.sub (local.get 0) (f32.const 1.0))\n            (i32.const 27)\n          )\n        )\n      )\n    )\n  )\n\n  (func $fib-f64 (export \"fib-f64\") (type $over-f64)\n    (if (result f64) (f64.le (local.get 0) (f64.const 1.0))\n      (then (f64.const 1.0))\n      (else\n        (f64.add\n          (call_indirect (type $over-f64)\n            (f64.sub (local.get 0) (f64.const 2.0))\n            (i32.const 28)\n          )\n          (call_indirect (type $over-f64)\n            (f64.sub (local.get 0) (f64.const 1.0))\n            (i32.const 28)\n          )\n        )\n      )\n    )\n  )\n\n  (func $even (export \"even\") (param i32) (result i32)\n    (if (result i32) (i32.eqz (local.get 0))\n      (then (i32.const 44))\n      (else\n        (call_indirect (type $over-i32)\n          (i32.sub (local.get 0) (i32.const 1))\n          (i32.const 15)\n        )\n      )\n    )\n  )\n  (func $odd (export \"odd\") (param i32) (result i32)\n    (if (result i32) (i32.eqz (local.get 0))\n      (then (i32.const 99))\n      (else\n        (call_indirect (type $over-i32)\n          (i32.sub (local.get 0) (i32.const 1))\n          (i32.const 14)\n        )\n      )\n    )\n  )\n\n  ;; Stack exhaustion\n\n  ;; Implementations are required to have every call consume some abstract\n  ;; resource towards exhausting some abstract finite limit, such that\n  ;; infinitely recursive test cases reliably trap in finite time. This is\n  ;; because otherwise applications could come to depend on it on those\n  ;; implementations and be incompatible with implementations that don't do\n  ;; it (or don't do it under the same circumstances).\n\n  (func $runaway (export \"runaway\") (call_indirect (type $proc) (i32.const 16)))\n\n  (func $mutual-runaway1 (export \"mutual-runaway\") (call_indirect (type $proc) (i32.const 18)))\n  (func $mutual-runaway2 (call_indirect (type $proc) (i32.const 17)))\n\n  ;; As parameter of control constructs and instructions\n\n  (memory 1)\n\n  (func (export \"as-select-first\") (result i32)\n    (select (call_indirect (type $out-i32) (i32.const 0)) (i32.const 2) (i32.const 3))\n  )\n  (func (export \"as-select-mid\") (result i32)\n    (select (i32.const 2) (call_indirect (type $out-i32) (i32.const 0)) (i32.const 3))\n  )\n  (func (export \"as-select-last\") (result i32)\n    (select (i32.const 2) (i32.const 3) (call_indirect (type $out-i32) (i32.const 0)))\n  )\n\n  (func (export \"as-if-condition\") (result i32)\n    (if (result i32) (call_indirect (type $out-i32) (i32.const 0)) (then (i32.const 1)) (else (i32.const 2)))\n  )\n\n  (func (export \"as-br_if-first\") (result i64)\n    (block (result i64) (br_if 0 (call_indirect (type $out-i64) (i32.const 1)) (i32.const 2)))\n  )\n  (func (export \"as-br_if-last\") (result i32)\n    (block (result i32) (br_if 0 (i32.const 2) (call_indirect (type $out-i32) (i32.const 0))))\n  )\n\n  (func (export \"as-br_table-first\") (result f32)\n    (block (result f32) (call_indirect (type $out-f32) (i32.const 2)) (i32.const 2) (br_table 0 0))\n  )\n  (func (export \"as-br_table-last\") (result i32)\n    (block (result i32) (i32.const 2) (call_indirect (type $out-i32) (i32.const 0)) (br_table 0 0))\n  )\n\n  (func (export \"as-store-first\")\n    (call_indirect (type $out-i32) (i32.const 0)) (i32.const 1) (i32.store)\n  )\n  (func (export \"as-store-last\")\n    (i32.const 10) (call_indirect (type $out-f64) (i32.const 3)) (f64.store)\n  )\n\n  (func (export \"as-memory.grow-value\") (result i32)\n    (memory.grow (call_indirect (type $out-i32) (i32.const 0)))\n  )\n  (func (export \"as-return-value\") (result i32)\n    (call_indirect (type $over-i32) (i32.const 1) (i32.const 4)) (return)\n  )\n  (func (export \"as-drop-operand\")\n    (call_indirect (type $over-i64) (i64.const 1) (i32.const 5)) (drop)\n  )\n  (func (export \"as-br-value\") (result f32)\n    (block (result f32) (br 0 (call_indirect (type $over-f32) (f32.const 1) (i32.const 6))))\n  )\n  (func (export \"as-local.set-value\") (result f64)\n    (local f64) (local.set 0 (call_indirect (type $over-f64) (f64.const 1) (i32.const 7))) (local.get 0)\n  )\n  (func (export \"as-local.tee-value\") (result f64)\n    (local f64) (local.tee 0 (call_indirect (type $over-f64) (f64.const 1) (i32.const 7)))\n  )\n  (global $a (mut f64) (f64.const 10.0))\n  (func (export \"as-global.set-value\") (result f64)\n    (global.set $a (call_indirect (type $over-f64) (f64.const 1.0) (i32.const 7)))\n    (global.get $a)\n  )\n\n  (func (export \"as-load-operand\") (result i32)\n    (i32.load (call_indirect (type $out-i32) (i32.const 0)))\n  )\n\n  (func (export \"as-unary-operand\") (result f32)\n    (block (result f32)\n      (f32.sqrt\n        (call_indirect (type $over-f32) (f32.const 0x0p+0) (i32.const 6))\n      )\n    )\n  )\n\n  (func (export \"as-binary-left\") (result i32)\n    (block (result i32)\n      (i32.add\n        (call_indirect (type $over-i32) (i32.const 1) (i32.const 4))\n        (i32.const 10)\n      )\n    )\n  )\n  (func (export \"as-binary-right\") (result i32)\n    (block (result i32)\n      (i32.sub\n        (i32.const 10)\n        (call_indirect (type $over-i32) (i32.const 1) (i32.const 4))\n      )\n    )\n  )\n\n  (func (export \"as-test-operand\") (result i32)\n    (block (result i32)\n      (i32.eqz\n        (call_indirect (type $over-i32) (i32.const 1) (i32.const 4))\n      )\n    )\n  )\n\n  (func (export \"as-compare-left\") (result i32)\n    (block (result i32)\n      (i32.le_u\n        (call_indirect (type $over-i32) (i32.const 1) (i32.const 4))\n        (i32.const 10)\n      )\n    )\n  )\n  (func (export \"as-compare-right\") (result i32)\n    (block (result i32)\n      (i32.ne\n        (i32.const 10)\n        (call_indirect (type $over-i32) (i32.const 1) (i32.const 4))\n      )\n    )\n  )\n\n  (func (export \"as-convert-operand\") (result i64)\n    (block (result i64)\n      (i64.extend_i32_s\n        (call_indirect (type $over-i32) (i32.const 1) (i32.const 4))\n      )\n    )\n  )\n\n)\n\n(assert_return (invoke \"type-i32\") (i32.const 0x132))\n(assert_return (invoke \"type-i64\") (i64.const 0x164))\n(assert_return (invoke \"type-f32\") (f32.const 0xf32))\n(assert_return (invoke \"type-f64\") (f64.const 0xf64))\n(assert_return (invoke \"type-f64-i32\") (f64.const 0xf64) (i32.const 32))\n\n(assert_return (invoke \"type-index\") (i64.const 100))\n\n(assert_return (invoke \"type-first-i32\") (i32.const 32))\n(assert_return (invoke \"type-first-i64\") (i64.const 64))\n(assert_return (invoke \"type-first-f32\") (f32.const 1.32))\n(assert_return (invoke \"type-first-f64\") (f64.const 1.64))\n\n(assert_return (invoke \"type-second-i32\") (i32.const 32))\n(assert_return (invoke \"type-second-i64\") (i64.const 64))\n(assert_return (invoke \"type-second-f32\") (f32.const 32))\n(assert_return (invoke \"type-second-f64\") (f64.const 64.1))\n\n(assert_return (invoke \"type-all-f64-i32\") (f64.const 0xf64) (i32.const 32))\n(assert_return (invoke \"type-all-i32-f64\") (i32.const 1) (f64.const 2))\n(assert_return (invoke \"type-all-i32-i64\") (i64.const 2) (i32.const 1))\n\n(assert_return (invoke \"dispatch\" (i32.const 5) (i64.const 2)) (i64.const 2))\n(assert_return (invoke \"dispatch\" (i32.const 5) (i64.const 5)) (i64.const 5))\n(assert_return (invoke \"dispatch\" (i32.const 12) (i64.const 5)) (i64.const 120))\n(assert_return (invoke \"dispatch\" (i32.const 13) (i64.const 5)) (i64.const 8))\n(assert_return (invoke \"dispatch\" (i32.const 20) (i64.const 2)) (i64.const 2))\n(assert_trap (invoke \"dispatch\" (i32.const 0) (i64.const 2)) \"indirect call type mismatch\")\n(assert_trap (invoke \"dispatch\" (i32.const 15) (i64.const 2)) \"indirect call type mismatch\")\n(assert_trap (invoke \"dispatch\" (i32.const 32) (i64.const 2)) \"undefined element\")\n(assert_trap (invoke \"dispatch\" (i32.const -1) (i64.const 2)) \"undefined element\")\n(assert_trap (invoke \"dispatch\" (i32.const 1213432423) (i64.const 2)) \"undefined element\")\n\n(assert_return (invoke \"dispatch-structural-i64\" (i32.const 5)) (i64.const 9))\n(assert_return (invoke \"dispatch-structural-i64\" (i32.const 12)) (i64.const 362880))\n(assert_return (invoke \"dispatch-structural-i64\" (i32.const 13)) (i64.const 55))\n(assert_return (invoke \"dispatch-structural-i64\" (i32.const 20)) (i64.const 9))\n(assert_trap (invoke \"dispatch-structural-i64\" (i32.const 11)) \"indirect call type mismatch\")\n(assert_trap (invoke \"dispatch-structural-i64\" (i32.const 22)) \"indirect call type mismatch\")\n\n(assert_return (invoke \"dispatch-structural-i32\" (i32.const 4)) (i32.const 9))\n(assert_return (invoke \"dispatch-structural-i32\" (i32.const 23)) (i32.const 362880))\n(assert_return (invoke \"dispatch-structural-i32\" (i32.const 26)) (i32.const 55))\n(assert_return (invoke \"dispatch-structural-i32\" (i32.const 19)) (i32.const 9))\n(assert_trap (invoke \"dispatch-structural-i32\" (i32.const 9)) \"indirect call type mismatch\")\n(assert_trap (invoke \"dispatch-structural-i32\" (i32.const 21)) \"indirect call type mismatch\")\n\n(assert_return (invoke \"dispatch-structural-f32\" (i32.const 6)) (f32.const 9.0))\n(assert_return (invoke \"dispatch-structural-f32\" (i32.const 24)) (f32.const 362880.0))\n(assert_return (invoke \"dispatch-structural-f32\" (i32.const 27)) (f32.const 55.0))\n(assert_return (invoke \"dispatch-structural-f32\" (i32.const 21)) (f32.const 9.0))\n(assert_trap (invoke \"dispatch-structural-f32\" (i32.const 8)) \"indirect call type mismatch\")\n(assert_trap (invoke \"dispatch-structural-f32\" (i32.const 19)) \"indirect call type mismatch\")\n\n(assert_return (invoke \"dispatch-structural-f64\" (i32.const 7)) (f64.const 9.0))\n(assert_return (invoke \"dispatch-structural-f64\" (i32.const 25)) (f64.const 362880.0))\n(assert_return (invoke \"dispatch-structural-f64\" (i32.const 28)) (f64.const 55.0))\n(assert_return (invoke \"dispatch-structural-f64\" (i32.const 22)) (f64.const 9.0))\n(assert_trap (invoke \"dispatch-structural-f64\" (i32.const 10)) \"indirect call type mismatch\")\n(assert_trap (invoke \"dispatch-structural-f64\" (i32.const 18)) \"indirect call type mismatch\")\n\n(assert_return (invoke \"fac-i64\" (i64.const 0)) (i64.const 1))\n(assert_return (invoke \"fac-i64\" (i64.const 1)) (i64.const 1))\n(assert_return (invoke \"fac-i64\" (i64.const 5)) (i64.const 120))\n(assert_return (invoke \"fac-i64\" (i64.const 25)) (i64.const 7034535277573963776))\n\n(assert_return (invoke \"fac-i32\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"fac-i32\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"fac-i32\" (i32.const 5)) (i32.const 120))\n(assert_return (invoke \"fac-i32\" (i32.const 10)) (i32.const 3628800))\n\n(assert_return (invoke \"fac-f32\" (f32.const 0.0)) (f32.const 1.0))\n(assert_return (invoke \"fac-f32\" (f32.const 1.0)) (f32.const 1.0))\n(assert_return (invoke \"fac-f32\" (f32.const 5.0)) (f32.const 120.0))\n(assert_return (invoke \"fac-f32\" (f32.const 10.0)) (f32.const 3628800.0))\n\n(assert_return (invoke \"fac-f64\" (f64.const 0.0)) (f64.const 1.0))\n(assert_return (invoke \"fac-f64\" (f64.const 1.0)) (f64.const 1.0))\n(assert_return (invoke \"fac-f64\" (f64.const 5.0)) (f64.const 120.0))\n(assert_return (invoke \"fac-f64\" (f64.const 10.0)) (f64.const 3628800.0))\n\n(assert_return (invoke \"fib-i64\" (i64.const 0)) (i64.const 1))\n(assert_return (invoke \"fib-i64\" (i64.const 1)) (i64.const 1))\n(assert_return (invoke \"fib-i64\" (i64.const 2)) (i64.const 2))\n(assert_return (invoke \"fib-i64\" (i64.const 5)) (i64.const 8))\n(assert_return (invoke \"fib-i64\" (i64.const 20)) (i64.const 10946))\n\n(assert_return (invoke \"fib-i32\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"fib-i32\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"fib-i32\" (i32.const 2)) (i32.const 2))\n(assert_return (invoke \"fib-i32\" (i32.const 5)) (i32.const 8))\n(assert_return (invoke \"fib-i32\" (i32.const 20)) (i32.const 10946))\n\n(assert_return (invoke \"fib-f32\" (f32.const 0.0)) (f32.const 1.0))\n(assert_return (invoke \"fib-f32\" (f32.const 1.0)) (f32.const 1.0))\n(assert_return (invoke \"fib-f32\" (f32.const 2.0)) (f32.const 2.0))\n(assert_return (invoke \"fib-f32\" (f32.const 5.0)) (f32.const 8.0))\n(assert_return (invoke \"fib-f32\" (f32.const 20.0)) (f32.const 10946.0))\n\n(assert_return (invoke \"fib-f64\" (f64.const 0.0)) (f64.const 1.0))\n(assert_return (invoke \"fib-f64\" (f64.const 1.0)) (f64.const 1.0))\n(assert_return (invoke \"fib-f64\" (f64.const 2.0)) (f64.const 2.0))\n(assert_return (invoke \"fib-f64\" (f64.const 5.0)) (f64.const 8.0))\n(assert_return (invoke \"fib-f64\" (f64.const 20.0)) (f64.const 10946.0))\n\n(assert_return (invoke \"even\" (i32.const 0)) (i32.const 44))\n(assert_return (invoke \"even\" (i32.const 1)) (i32.const 99))\n(assert_return (invoke \"even\" (i32.const 100)) (i32.const 44))\n(assert_return (invoke \"even\" (i32.const 77)) (i32.const 99))\n(assert_return (invoke \"odd\" (i32.const 0)) (i32.const 99))\n(assert_return (invoke \"odd\" (i32.const 1)) (i32.const 44))\n(assert_return (invoke \"odd\" (i32.const 200)) (i32.const 99))\n(assert_return (invoke \"odd\" (i32.const 77)) (i32.const 44))\n\n(assert_exhaustion (invoke \"runaway\") \"call stack exhausted\")\n(assert_exhaustion (invoke \"mutual-runaway\") \"call stack exhausted\")\n\n(assert_return (invoke \"as-select-first\") (i32.const 0x132))\n(assert_return (invoke \"as-select-mid\") (i32.const 2))\n(assert_return (invoke \"as-select-last\") (i32.const 2))\n\n(assert_return (invoke \"as-if-condition\") (i32.const 1))\n\n(assert_return (invoke \"as-br_if-first\") (i64.const 0x164))\n(assert_return (invoke \"as-br_if-last\") (i32.const 2))\n\n(assert_return (invoke \"as-br_table-first\") (f32.const 0xf32))\n(assert_return (invoke \"as-br_table-last\") (i32.const 2))\n\n(assert_return (invoke \"as-store-first\"))\n(assert_return (invoke \"as-store-last\"))\n\n(assert_return (invoke \"as-memory.grow-value\") (i32.const 1))\n(assert_return (invoke \"as-return-value\") (i32.const 1))\n(assert_return (invoke \"as-drop-operand\"))\n(assert_return (invoke \"as-br-value\") (f32.const 1))\n(assert_return (invoke \"as-local.set-value\") (f64.const 1))\n(assert_return (invoke \"as-local.tee-value\") (f64.const 1))\n(assert_return (invoke \"as-global.set-value\") (f64.const 1.0))\n(assert_return (invoke \"as-load-operand\") (i32.const 1))\n\n(assert_return (invoke \"as-unary-operand\") (f32.const 0x0p+0))\n(assert_return (invoke \"as-binary-left\") (i32.const 11))\n(assert_return (invoke \"as-binary-right\") (i32.const 9))\n(assert_return (invoke \"as-test-operand\") (i32.const 0))\n(assert_return (invoke \"as-compare-left\") (i32.const 1))\n(assert_return (invoke \"as-compare-right\") (i32.const 1))\n(assert_return (invoke \"as-convert-operand\") (i64.const 1))\n\n\n;; Multiple tables\n\n(module\n  (type $ii-i (func (param i32 i32) (result i32)))\n\n  (table $t1 funcref (elem $f $g))\n  (table $t2 funcref (elem $h $i $j))\n  (table $t3 4 funcref)\n  (elem (table $t3) (i32.const 0) func $g $h)\n  (elem (table $t3) (i32.const 3) func $z)\n\n  (func $f (type $ii-i) (i32.add (local.get 0) (local.get 1)))\n  (func $g (type $ii-i) (i32.sub (local.get 0) (local.get 1)))\n  (func $h (type $ii-i) (i32.mul (local.get 0) (local.get 1)))\n  (func $i (type $ii-i) (i32.div_u (local.get 0) (local.get 1)))\n  (func $j (type $ii-i) (i32.rem_u (local.get 0) (local.get 1)))\n  (func $z)\n\n  (func (export \"call-1\") (param i32 i32 i32) (result i32)\n    (call_indirect $t1 (type $ii-i) (local.get 0) (local.get 1) (local.get 2))\n  )\n  (func (export \"call-2\") (param i32 i32 i32) (result i32)\n    (call_indirect $t2 (type $ii-i) (local.get 0) (local.get 1) (local.get 2))\n  )\n  (func (export \"call-3\") (param i32 i32 i32) (result i32)\n    (call_indirect $t3 (type $ii-i) (local.get 0) (local.get 1) (local.get 2))\n  )\n)\n\n(assert_return (invoke \"call-1\" (i32.const 2) (i32.const 3) (i32.const 0)) (i32.const 5))\n(assert_return (invoke \"call-1\" (i32.const 2) (i32.const 3) (i32.const 1)) (i32.const -1))\n(assert_trap (invoke \"call-1\" (i32.const 2) (i32.const 3) (i32.const 2)) \"undefined element\")\n\n(assert_return (invoke \"call-2\" (i32.const 2) (i32.const 3) (i32.const 0)) (i32.const 6))\n(assert_return (invoke \"call-2\" (i32.const 2) (i32.const 3) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"call-2\" (i32.const 2) (i32.const 3) (i32.const 2)) (i32.const 2))\n(assert_trap (invoke \"call-2\" (i32.const 2) (i32.const 3) (i32.const 3)) \"undefined element\")\n\n(assert_return (invoke \"call-3\" (i32.const 2) (i32.const 3) (i32.const 0)) (i32.const -1))\n(assert_return (invoke \"call-3\" (i32.const 2) (i32.const 3) (i32.const 1)) (i32.const 6))\n(assert_trap (invoke \"call-3\" (i32.const 2) (i32.const 3) (i32.const 2)) \"uninitialized element\")\n(assert_trap (invoke \"call-3\" (i32.const 2) (i32.const 3) (i32.const 3)) \"indirect call type mismatch\")\n(assert_trap (invoke \"call-3\" (i32.const 2) (i32.const 3) (i32.const 4)) \"undefined element\")\n\n\n;; Invalid syntax\n\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(table 0 funcref)\"\n    \"(func (result i32)\"\n    \"  (call_indirect (type $sig) (result i32) (param i32)\"\n    \"    (i32.const 0) (i32.const 0)\"\n    \"  )\"\n    \")\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(table 0 funcref)\"\n    \"(func (result i32)\"\n    \"  (call_indirect (param i32) (type $sig) (result i32)\"\n    \"    (i32.const 0) (i32.const 0)\"\n    \"  )\"\n    \")\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(table 0 funcref)\"\n    \"(func (result i32)\"\n    \"  (call_indirect (param i32) (result i32) (type $sig)\"\n    \"    (i32.const 0) (i32.const 0)\"\n    \"  )\"\n    \")\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(table 0 funcref)\"\n    \"(func (result i32)\"\n    \"  (call_indirect (result i32) (type $sig) (param i32)\"\n    \"    (i32.const 0) (i32.const 0)\"\n    \"  )\"\n    \")\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(table 0 funcref)\"\n    \"(func (result i32)\"\n    \"  (call_indirect (result i32) (param i32) (type $sig)\"\n    \"    (i32.const 0) (i32.const 0)\"\n    \"  )\"\n    \")\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(table 0 funcref)\"\n    \"(func (result i32)\"\n    \"  (call_indirect (result i32) (param i32) (i32.const 0) (i32.const 0))\"\n    \")\"\n  )\n  \"unexpected token\"\n)\n\n(assert_malformed\n  (module quote\n    \"(table 0 funcref)\"\n    \"(func (call_indirect (param $x i32) (i32.const 0) (i32.const 0)))\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func))\"\n    \"(table 0 funcref)\"\n    \"(func (result i32)\"\n    \"  (call_indirect (type $sig) (result i32) (i32.const 0))\"\n    \")\"\n  )\n  \"inline function type\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(table 0 funcref)\"\n    \"(func (result i32)\"\n    \"  (call_indirect (type $sig) (result i32) (i32.const 0))\"\n    \")\"\n  )\n  \"inline function type\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(table 0 funcref)\"\n    \"(func\"\n    \"  (call_indirect (type $sig) (param i32) (i32.const 0) (i32.const 0))\"\n    \")\"\n  )\n  \"inline function type\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32 i32) (result i32)))\"\n    \"(table 0 funcref)\"\n    \"(func (result i32)\"\n    \"  (call_indirect (type $sig) (param i32) (result i32)\"\n    \"    (i32.const 0) (i32.const 0)\"\n    \"  )\"\n    \")\"\n  )\n  \"inline function type\"\n)\n\n;; Invalid typing\n\n(assert_invalid\n  (module\n    (type (func))\n    (func $no-table (call_indirect (type 0) (i32.const 0)))\n  )\n  \"unknown table\"\n)\n\n(assert_invalid\n  (module\n    (type (func))\n    (table 0 funcref)\n    (func $type-void-vs-num (i32.eqz (call_indirect (type 0) (i32.const 0))))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (type (func (result i64)))\n    (table 0 funcref)\n    (func $type-num-vs-num (i32.eqz (call_indirect (type 0) (i32.const 0))))\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (type (func (param i32)))\n    (table 0 funcref)\n    (func $arity-0-vs-1 (call_indirect (type 0) (i32.const 0)))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (type (func (param f64 i32)))\n    (table 0 funcref)\n    (func $arity-0-vs-2 (call_indirect (type 0) (i32.const 0)))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (type (func))\n    (table 0 funcref)\n    (func $arity-1-vs-0 (call_indirect (type 0) (i32.const 1) (i32.const 0)))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (type (func))\n    (table 0 funcref)\n    (func $arity-2-vs-0\n      (call_indirect (type 0) (f64.const 2) (i32.const 1) (i32.const 0))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (type (func (param i32)))\n    (table 0 funcref)\n    (func $type-func-void-vs-i32 (call_indirect (type 0) (i32.const 1) (nop)))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (type (func (param i32)))\n    (table 0 funcref)\n    (func $type-func-num-vs-i32 (call_indirect (type 0) (i32.const 0) (i64.const 1)))\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (type (func (param i32 i32)))\n    (table 0 funcref)\n    (func $type-first-void-vs-num\n      (call_indirect (type 0) (nop) (i32.const 1) (i32.const 0))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (type (func (param i32 i32)))\n    (table 0 funcref)\n    (func $type-second-void-vs-num\n      (call_indirect (type 0) (i32.const 1) (nop) (i32.const 0))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (type (func (param i32 f64)))\n    (table 0 funcref)\n    (func $type-first-num-vs-num\n      (call_indirect (type 0) (f64.const 1) (i32.const 1) (i32.const 0))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (type (func (param f64 i32)))\n    (table 0 funcref)\n    (func $type-second-num-vs-num\n      (call_indirect (type 0) (i32.const 1) (f64.const 1) (i32.const 0))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (func $f (param i32))\n    (type $sig (func (param i32)))\n    (table funcref (elem $f))\n    (func $type-first-empty-in-block\n      (block\n        (call_indirect (type $sig) (i32.const 0))\n      )\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $f (param i32 i32))\n    (type $sig (func (param i32 i32)))\n    (table funcref (elem $f))\n    (func $type-second-empty-in-block\n      (block\n        (call_indirect (type $sig) (i32.const 0) (i32.const 0))\n      )\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $f (param i32))\n    (type $sig (func (param i32)))\n    (table funcref (elem $f))\n    (func $type-first-empty-in-loop\n      (loop\n        (call_indirect (type $sig) (i32.const 0))\n      )\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $f (param i32 i32))\n    (type $sig (func (param i32 i32)))\n    (table funcref (elem $f))\n    (func $type-second-empty-in-loop\n      (loop\n        (call_indirect (type $sig) (i32.const 0) (i32.const 0))\n      )\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $f (param i32))\n    (type $sig (func (param i32)))\n    (table funcref (elem $f))\n    (func $type-first-empty-in-then\n      (i32.const 0) (i32.const 0)\n      (if\n        (then\n          (call_indirect (type $sig) (i32.const 0))\n        )\n      )\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $f (param i32 i32))\n    (type $sig (func (param i32 i32)))\n    (table funcref (elem $f))\n    (func $type-second-empty-in-then\n      (i32.const 0) (i32.const 0)\n      (if\n        (then\n          (call_indirect (type $sig) (i32.const 0) (i32.const 0))\n        )\n      )\n    )\n  )\n  \"type mismatch\"\n)\n\n\n;; Unbound type\n\n(assert_invalid\n  (module\n    (table 0 funcref)\n    (func $unbound-type (call_indirect (type 1) (i32.const 0)))\n  )\n  \"unknown type\"\n)\n(assert_invalid\n  (module\n    (table 0 funcref)\n    (func $large-type (call_indirect (type 1012321300) (i32.const 0)))\n  )\n  \"unknown type\"\n)\n\n\n;; Unbound function in table\n\n(assert_invalid\n  (module (table funcref (elem 0 0)))\n  \"unknown function\"\n)\n"
  },
  {
    "path": "test/core/const.wast",
    "content": ";; Test t.const instructions\n\n;; Syntax error\n\n(module (func (i32.const 0_123_456_789) drop))\n(module (func (i32.const 0x0_9acf_fBDF) drop))\n(assert_malformed\n  (module quote \"(func (i32.const) drop)\")\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote \"(func (i32.const 0x) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (i32.const 1x) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (i32.const 0xg) drop)\")\n  \"unknown operator\"\n)\n\n(module (func (i64.const 0_123_456_789) drop))\n(module (func (i64.const 0x0125_6789_ADEF_bcef) drop))\n(assert_malformed\n  (module quote \"(func (i64.const) drop)\")\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote \"(func (i64.const 0x) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (i64.const 1x) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (i64.const 0xg) drop)\")\n  \"unknown operator\"\n)\n\n(module (func (f32.const 0123456789) drop))\n(module (func (f32.const 0123456789e019) drop))\n(module (func (f32.const 0123456789e+019) drop))\n(module (func (f32.const 0123456789e-019) drop))\n(module (func (f32.const 0123456789.) drop))\n(module (func (f32.const 0123456789.e019) drop))\n(module (func (f32.const 0123456789.e+019) drop))\n(module (func (f32.const 0123456789.e-019) drop))\n(module (func (f32.const 0123456789.0123456789) drop))\n(module (func (f32.const 0123456789.0123456789e019) drop))\n(module (func (f32.const 0123456789.0123456789e+019) drop))\n(module (func (f32.const 0123456789.0123456789e-019) drop))\n(module (func (f32.const 0x0123456789ABCDEF) drop))\n(module (func (f32.const 0x0123456789ABCDEFp019) drop))\n(module (func (f32.const 0x0123456789ABCDEFp+019) drop))\n(module (func (f32.const 0x0123456789ABCDEFp-019) drop))\n(module (func (f32.const 0x0123456789ABCDEF.) drop))\n(module (func (f32.const 0x0123456789ABCDEF.p019) drop))\n(module (func (f32.const 0x0123456789ABCDEF.p+019) drop))\n(module (func (f32.const 0x0123456789ABCDEF.p-019) drop))\n(module (func (f32.const 0x0123456789ABCDEF.019aF) drop))\n(module (func (f32.const 0x0123456789ABCDEF.019aFp019) drop))\n(module (func (f32.const 0x0123456789ABCDEF.019aFp+019) drop))\n(module (func (f32.const 0x0123456789ABCDEF.019aFp-019) drop))\n(assert_malformed\n  (module quote \"(func (f32.const) drop)\")\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const .0) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const .0e0) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 0e) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 0e+) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 0.0e) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 0.0e-) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 0x) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 1x) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 0xg) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 0x.) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 0x0.g) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 0x0p) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 0x0p+) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 0x0p-) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 0x0.0p) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 0x0.0p+) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 0x0.0p-) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 0x0pA) drop)\")\n  \"unknown operator\"\n)\n\n\n(module (func (f64.const 0123456789) drop))\n(module (func (f64.const 0123456789e019) drop))\n(module (func (f64.const 0123456789e+019) drop))\n(module (func (f64.const 0123456789e-019) drop))\n(module (func (f64.const 0123456789.) drop))\n(module (func (f64.const 0123456789.e019) drop))\n(module (func (f64.const 0123456789.e+019) drop))\n(module (func (f64.const 0123456789.e-019) drop))\n(module (func (f64.const 0123456789.0123456789) drop))\n(module (func (f64.const 0123456789.0123456789e019) drop))\n(module (func (f64.const 0123456789.0123456789e+019) drop))\n(module (func (f64.const 0123456789.0123456789e-019) drop))\n(module (func (f64.const 0_1_2_3_4_5_6_7_8_9) drop))\n(module (func (f64.const 0_1_2_3_4_5_6_7_8_9.) drop))\n(module (func (f64.const 0_1_2_3_4_5_6_7_8_9.0_1_2_3_4_5_6_7_8_9) drop))\n(module (func (f64.const 0_1_2_3_4_5_6_7_8_9e+0_1_9) drop))\n(module (func (f64.const 0_1_2_3_4_5_6_7_8_9.e+0_1_9) drop))\n(module (func (f64.const 0_1_2_3_4_5_6_7_8_9.0_1_2_3_4_5_6_7_8_9e0_1_9) drop))\n\n(module (func (f64.const 0x0123456789ABCDEFabcdef) drop))\n(module (func (f64.const 0x0123456789ABCDEFabcdefp019) drop))\n(module (func (f64.const 0x0123456789ABCDEFabcdefp+019) drop))\n(module (func (f64.const 0x0123456789ABCDEFabcdefp-019) drop))\n(module (func (f64.const 0x0123456789ABCDEFabcdef.) drop))\n(module (func (f64.const 0x0123456789ABCDEFabcdef.p019) drop))\n(module (func (f64.const 0x0123456789ABCDEFabcdef.p+019) drop))\n(module (func (f64.const 0x0123456789ABCDEFabcdef.p-019) drop))\n(module (func (f64.const 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdef) drop))\n(module (func (f64.const 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp019) drop))\n(module (func (f64.const 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp+019) drop))\n(module (func (f64.const 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp-019) drop))\n(module (func (f64.const 0x0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F_a_b_c_d_e_f) drop))\n(module (func (f64.const 0x0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F_a_b_c_d_e_f.) drop))\n(module (func (f64.const 0x0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F_a_b_c_d_e_f.0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F_a_b_c_d_e_f) drop))\n(module (func (f64.const 0x0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F_a_b_c_d_e_fp0_1_9) drop))\n(module (func (f64.const 0x0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F_a_b_c_d_e_f.p0_1_9) drop))\n(module (func (f64.const 0x0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F_a_b_c_d_e_f.0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F_a_b_c_d_e_fp0_1_9) drop))\n\n\n(assert_malformed\n  (module quote \"(func (f64.const) drop)\")\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const .0) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const .0e0) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 0e) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 0e+) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 0.0e) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 0.0e-) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 0x) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 1x) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 0xg) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 0x.) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 0x0.g) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 0x0p) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 0x0p+) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 0x0p-) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 0x0.0p) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 0x0.0p+) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 0x0.0p-) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 0x0pA) drop)\")\n  \"unknown operator\"\n)\n\n\n;; Range error\n\n(module (func (i32.const 0xffffffff) drop))\n(module (func (i32.const -0x80000000) drop))\n(assert_malformed\n  (module quote \"(func (i32.const 0x100000000) drop)\")\n  \"constant out of range\"\n)\n(assert_malformed\n  (module quote \"(func (i32.const -0x80000001) drop)\")\n  \"constant out of range\"\n)\n\n(module (func (i32.const 4294967295) drop))\n(module (func (i32.const -2147483648) drop))\n(assert_malformed\n  (module quote \"(func (i32.const 4294967296) drop)\")\n  \"constant out of range\"\n)\n(assert_malformed\n  (module quote \"(func (i32.const -2147483649) drop)\")\n  \"constant out of range\"\n)\n\n(module (func (i64.const 0xffffffffffffffff) drop))\n(module (func (i64.const -0x8000000000000000) drop))\n(assert_malformed\n  (module quote \"(func (i64.const 0x10000000000000000) drop)\")\n  \"constant out of range\"\n)\n(assert_malformed\n  (module quote \"(func (i64.const -0x8000000000000001) drop)\")\n  \"constant out of range\"\n)\n\n(module (func (i64.const 18446744073709551615) drop))\n(module (func (i64.const -9223372036854775808) drop))\n(assert_malformed\n  (module quote \"(func (i64.const 18446744073709551616) drop)\")\n  \"constant out of range\"\n)\n(assert_malformed\n  (module quote \"(func (i64.const -9223372036854775809) drop)\")\n  \"constant out of range\"\n)\n\n(module (func (f32.const 0x1p127) drop))\n(module (func (f32.const -0x1p127) drop))\n(module (func (f32.const 0x1.fffffep127) drop))\n(module (func (f32.const -0x1.fffffep127) drop))\n(module (func (f32.const 0x1.fffffe7p127) drop))\n(module (func (f32.const -0x1.fffffe7p127) drop))\n(module (func (f32.const 0x1.fffffefffffff8000000p127) drop))\n(module (func (f32.const -0x1.fffffefffffff8000000p127) drop))\n(module (func (f32.const 0x1.fffffefffffffffffffp127) drop))\n(module (func (f32.const -0x1.fffffefffffffffffffp127) drop))\n(assert_malformed\n  (module quote \"(func (f32.const 0x1p128) drop)\")\n  \"constant out of range\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const -0x1p128) drop)\")\n  \"constant out of range\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const 0x1.ffffffp127) drop)\")\n  \"constant out of range\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const -0x1.ffffffp127) drop)\")\n  \"constant out of range\"\n)\n\n(module (func (f32.const 1e38) drop))\n(module (func (f32.const -1e38) drop))\n(assert_malformed\n  (module quote \"(func (f32.const 1e39) drop)\")\n  \"constant out of range\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const -1e39) drop)\")\n  \"constant out of range\"\n)\n\n(module (func (f32.const 340282356779733623858607532500980858880) drop))\n(module (func (f32.const -340282356779733623858607532500980858880) drop))\n(assert_malformed\n  (module quote \"(func (f32.const 340282356779733661637539395458142568448) drop)\")\n  \"constant out of range\"\n)\n(assert_malformed\n  (module quote \"(func (f32.const -340282356779733661637539395458142568448) drop)\")\n  \"constant out of range\"\n)\n\n(module (func (f64.const 0x1p1023) drop))\n(module (func (f64.const -0x1p1023) drop))\n(module (func (f64.const 0x1.fffffffffffffp1023) drop))\n(module (func (f64.const -0x1.fffffffffffffp1023) drop))\n(module (func (f64.const 0x1.fffffffffffff7p1023) drop))\n(module (func (f64.const -0x1.fffffffffffff7p1023) drop))\n(module (func (f64.const 0x1.fffffffffffff7ffffffp1023) drop))\n(module (func (f64.const -0x1.fffffffffffff7ffffffp1023) drop))\n(assert_malformed\n  (module quote \"(func (f64.const 0x1p1024) drop)\")\n  \"constant out of range\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const -0x1p1024) drop)\")\n  \"constant out of range\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const 0x1.fffffffffffff8p1023) drop)\")\n  \"constant out of range\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const -0x1.fffffffffffff8p1023) drop)\")\n  \"constant out of range\"\n)\n\n(module (func (f64.const 1e308) drop))\n(module (func (f64.const -1e308) drop))\n(assert_malformed\n  (module quote \"(func (f64.const 1e309) drop)\")\n  \"constant out of range\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const -1e309) drop)\")\n  \"constant out of range\"\n)\n\n(module (func (f64.const 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368) drop))\n(module (func (f64.const -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368) drop))\n(assert_malformed\n  (module quote \"(func (f64.const 269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552) drop)\")\n  \"constant out of range\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const -269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552) drop)\")\n  \"constant out of range\"\n)\n\n(module (func (f32.const nan:0x1) drop))\n(module (func (f64.const nan:0x1) drop))\n(module (func (f32.const nan:0x7f_ffff) drop))\n(module (func (f64.const nan:0xf_ffff_ffff_ffff) drop))\n\n(assert_malformed\n  (module quote \"(func (f32.const nan:1) drop)\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const nan:1) drop)\")\n  \"unknown operator\"\n)\n\n(assert_malformed\n  (module quote \"(func (f32.const nan:0x0) drop)\")\n  \"constant out of range\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const nan:0x0) drop)\")\n  \"constant out of range\"\n)\n\n(assert_malformed\n  (module quote \"(func (f32.const nan:0x80_0000) drop)\")\n  \"constant out of range\"\n)\n(assert_malformed\n  (module quote \"(func (f64.const nan:0x10_0000_0000_0000) drop)\")\n  \"constant out of range\"\n)\n\n\n;; Rounding behaviour\n\n;; f32, small exponent\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000100000000000p-50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000000p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000100000000000p-50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000000p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000100000000001p-50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000100000000001p-50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.000001fffffffffffp-50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.000001fffffffffffp-50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000200000000000p-50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000200000000000p-50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000200000000001p-50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000200000000001p-50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.000002fffffffffffp-50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.000002fffffffffffp-50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000300000000000p-50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000300000000000p-50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000300000000001p-50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000300000000001p-50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.000003fffffffffffp-50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.000003fffffffffffp-50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000400000000000p-50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000400000000000p-50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000400000000001p-50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000400000000001p-50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.000004fffffffffffp-50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.000004fffffffffffp-50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000500000000000p-50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000500000000000p-50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000500000000001p-50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000006p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000500000000001p-50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000006p-50))\n\n(module (func (export \"f\") (result f32) (f32.const +0x4000.004000000p-64)))\n(assert_return (invoke \"f\") (f32.const +0x1.000000p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000.004000000p-64)))\n(assert_return (invoke \"f\") (f32.const -0x1.000000p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x4000.004000001p-64)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000.004000001p-64)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x4000.007ffffffp-64)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000.007ffffffp-64)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x4000.008000000p-64)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000.008000000p-64)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x4000.008000001p-64)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000.008000001p-64)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x4000.00bffffffp-64)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000.00bffffffp-64)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x4000.00c000000p-64)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000.00c000000p-64)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x4000.00c000001p-64)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000.00c000001p-64)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x4000.00fffffffp-64)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000.00fffffffp-64)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x4000.010000001p-64)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000.010000001p-64)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x4000.013ffffffp-64)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000.013ffffffp-64)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const +0x4000.014000001p-64)))\n(assert_return (invoke \"f\") (f32.const +0x1.000006p-50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000.014000001p-64)))\n(assert_return (invoke \"f\") (f32.const -0x1.000006p-50))\n\n(module (func (export \"f\") (result f32) (f32.const +8.8817847263968443573e-16)))\n(assert_return (invoke \"f\") (f32.const +0x1.000000p-50))\n(module (func (export \"f\") (result f32) (f32.const -8.8817847263968443573e-16)))\n(assert_return (invoke \"f\") (f32.const -0x1.000000p-50))\n(module (func (export \"f\") (result f32) (f32.const +8.8817847263968443574e-16)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const -8.8817847263968443574e-16)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const +8.8817857851880284252e-16)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const -8.8817857851880284252e-16)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p-50))\n(module (func (export \"f\") (result f32) (f32.const +8.8817857851880284253e-16)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p-50))\n(module (func (export \"f\") (result f32) (f32.const -8.8817857851880284253e-16)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p-50))\n\n;; f32, large exponent\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000100000000000p+50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000000p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000100000000000p+50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000000p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000100000000001p+50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000100000000001p+50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.000001fffffffffffp+50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.000001fffffffffffp+50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000200000000000p+50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000200000000000p+50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000200000000001p+50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000200000000001p+50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.000002fffffffffffp+50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.000002fffffffffffp+50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000300000000000p+50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000300000000000p+50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000300000000001p+50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000300000000001p+50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.000003fffffffffffp+50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.000003fffffffffffp+50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000400000000000p+50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000400000000000p+50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000400000000001p+50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000400000000001p+50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.000004fffffffffffp+50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.000004fffffffffffp+50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000500000000000p+50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000500000000000p+50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x1.00000500000000001p+50)))\n(assert_return (invoke \"f\") (f32.const +0x1.000006p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x1.00000500000000001p+50)))\n(assert_return (invoke \"f\") (f32.const -0x1.000006p+50))\n\n(module (func (export \"f\") (result f32) (f32.const +0x4000004000000)))\n(assert_return (invoke \"f\") (f32.const +0x1.000000p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000004000000)))\n(assert_return (invoke \"f\") (f32.const -0x1.000000p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x4000004000001)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000004000001)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x4000007ffffff)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000007ffffff)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x4000008000000)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000008000000)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x4000008000001)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x4000008000001)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x400000bffffff)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x400000bffffff)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const +0x400000c000000)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p+50))\n(module (func (export \"f\") (result f32) (f32.const -0x400000c000000)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p+50))\n\n(module (func (export \"f\") (result f32) (f32.const +1125899973951488)))\n(assert_return (invoke \"f\") (f32.const +0x1.000000p+50))\n(module (func (export \"f\") (result f32) (f32.const -1125899973951488)))\n(assert_return (invoke \"f\") (f32.const -0x1.000000p+50))\n(module (func (export \"f\") (result f32) (f32.const +1125899973951489)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const -1125899973951489)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const +1125900108169215)))\n(assert_return (invoke \"f\") (f32.const +0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const -1125900108169215)))\n(assert_return (invoke \"f\") (f32.const -0x1.000002p+50))\n(module (func (export \"f\") (result f32) (f32.const +1125900108169216)))\n(assert_return (invoke \"f\") (f32.const +0x1.000004p+50))\n(module (func (export \"f\") (result f32) (f32.const -1125900108169216)))\n(assert_return (invoke \"f\") (f32.const -0x1.000004p+50))\n\n;; f32, subnormal\n(module (func (export \"f\") (result f32) (f32.const +0x0.00000100000000000p-126)))\n(assert_return (invoke \"f\") (f32.const +0x0.000000p-126))\n(module (func (export \"f\") (result f32) (f32.const -0x0.00000100000000000p-126)))\n(assert_return (invoke \"f\") (f32.const -0x0.000000p-126))\n(module (func (export \"f\") (result f32) (f32.const +0x0.00000100000000001p-126)))\n(assert_return (invoke \"f\") (f32.const +0x0.000002p-126))\n(module (func (export \"f\") (result f32) (f32.const -0x0.00000100000000001p-126)))\n(assert_return (invoke \"f\") (f32.const -0x0.000002p-126))\n(module (func (export \"f\") (result f32) (f32.const +0x0.000001fffffffffffp-126)))\n(assert_return (invoke \"f\") (f32.const +0x0.000002p-126))\n(module (func (export \"f\") (result f32) (f32.const -0x0.000001fffffffffffp-126)))\n(assert_return (invoke \"f\") (f32.const -0x0.000002p-126))\n(module (func (export \"f\") (result f32) (f32.const +0x0.00000200000000000p-126)))\n(assert_return (invoke \"f\") (f32.const +0x0.000002p-126))\n(module (func (export \"f\") (result f32) (f32.const -0x0.00000200000000000p-126)))\n(assert_return (invoke \"f\") (f32.const -0x0.000002p-126))\n(module (func (export \"f\") (result f32) (f32.const +0x0.00000200000000001p-126)))\n(assert_return (invoke \"f\") (f32.const +0x0.000002p-126))\n(module (func (export \"f\") (result f32) (f32.const -0x0.00000200000000001p-126)))\n(assert_return (invoke \"f\") (f32.const -0x0.000002p-126))\n(module (func (export \"f\") (result f32) (f32.const +0x0.000002fffffffffffp-126)))\n(assert_return (invoke \"f\") (f32.const +0x0.000002p-126))\n(module (func (export \"f\") (result f32) (f32.const -0x0.000002fffffffffffp-126)))\n(assert_return (invoke \"f\") (f32.const -0x0.000002p-126))\n(module (func (export \"f\") (result f32) (f32.const +0x0.00000300000000000p-126)))\n(assert_return (invoke \"f\") (f32.const +0x0.000004p-126))\n(module (func (export \"f\") (result f32) (f32.const -0x0.00000300000000000p-126)))\n(assert_return (invoke \"f\") (f32.const -0x0.000004p-126))\n(module (func (export \"f\") (result f32) (f32.const +0x0.00000300000000001p-126)))\n(assert_return (invoke \"f\") (f32.const +0x0.000004p-126))\n(module (func (export \"f\") (result f32) (f32.const -0x0.00000300000000001p-126)))\n(assert_return (invoke \"f\") (f32.const -0x0.000004p-126))\n(module (func (export \"f\") (result f32) (f32.const +0x0.000003fffffffffffp-126)))\n(assert_return (invoke \"f\") (f32.const +0x0.000004p-126))\n(module (func (export \"f\") (result f32) (f32.const -0x0.000003fffffffffffp-126)))\n(assert_return (invoke \"f\") (f32.const -0x0.000004p-126))\n(module (func (export \"f\") (result f32) (f32.const +0x0.00000400000000000p-126)))\n(assert_return (invoke \"f\") (f32.const +0x0.000004p-126))\n(module (func (export \"f\") (result f32) (f32.const -0x0.00000400000000000p-126)))\n(assert_return (invoke \"f\") (f32.const -0x0.000004p-126))\n(module (func (export \"f\") (result f32) (f32.const +0x0.00000400000000001p-126)))\n(assert_return (invoke \"f\") (f32.const +0x0.000004p-126))\n(module (func (export \"f\") (result f32) (f32.const -0x0.00000400000000001p-126)))\n(assert_return (invoke \"f\") (f32.const -0x0.000004p-126))\n(module (func (export \"f\") (result f32) (f32.const +0x0.000004fffffffffffp-126)))\n(assert_return (invoke \"f\") (f32.const +0x0.000004p-126))\n(module (func (export \"f\") (result f32) (f32.const -0x0.000004fffffffffffp-126)))\n(assert_return (invoke \"f\") (f32.const -0x0.000004p-126))\n(module (func (export \"f\") (result f32) (f32.const +0x0.00000500000000000p-126)))\n(assert_return (invoke \"f\") (f32.const +0x0.000004p-126))\n(module (func (export \"f\") (result f32) (f32.const -0x0.00000500000000000p-126)))\n(assert_return (invoke \"f\") (f32.const -0x0.000004p-126))\n(module (func (export \"f\") (result f32) (f32.const +0x0.00000500000000001p-126)))\n(assert_return (invoke \"f\") (f32.const +0x0.000006p-126))\n(module (func (export \"f\") (result f32) (f32.const -0x0.00000500000000001p-126)))\n(assert_return (invoke \"f\") (f32.const -0x0.000006p-126))\n\n;; f32, round down at limit to infinity\n(module (func (export \"f\") (result f32) (f32.const +0x1.fffffe8p127)))\n(assert_return (invoke \"f\") (f32.const +0x1.fffffep127))\n(module (func (export \"f\") (result f32) (f32.const -0x1.fffffe8p127)))\n(assert_return (invoke \"f\") (f32.const -0x1.fffffep127))\n(module (func (export \"f\") (result f32) (f32.const +0x1.fffffefffffff8p127)))\n(assert_return (invoke \"f\") (f32.const +0x1.fffffep127))\n(module (func (export \"f\") (result f32) (f32.const -0x1.fffffefffffff8p127)))\n(assert_return (invoke \"f\") (f32.const -0x1.fffffep127))\n(module (func (export \"f\") (result f32) (f32.const +0x1.fffffefffffffffffp127)))\n(assert_return (invoke \"f\") (f32.const +0x1.fffffep127))\n(module (func (export \"f\") (result f32) (f32.const -0x1.fffffefffffffffffp127)))\n(assert_return (invoke \"f\") (f32.const -0x1.fffffep127))\n\n;; f64, small exponent\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000080000000000p-600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000000p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000080000000000p-600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000000p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000080000000001p-600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000080000000001p-600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.0000000000000fffffffffffp-600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.0000000000000fffffffffffp-600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000100000000000p-600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000100000000000p-600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000100000000001p-600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000100000000001p-600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.00000000000017ffffffffffp-600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.00000000000017ffffffffffp-600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000180000000000p-600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000180000000000p-600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000180000000001p-600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000180000000001p-600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.0000000000001fffffffffffp-600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.0000000000001fffffffffffp-600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000200000000000p-600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000200000000000p-600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000200000000001p-600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000200000000001p-600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.00000000000027ffffffffffp-600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.00000000000027ffffffffffp-600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000280000000001p-600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000003p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000280000000001p-600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000003p-600))\n\n(module (func (export \"f\") (result f64) (f64.const +0x8000000.000000400000000000p-627)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000000p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x8000000.000000400000000000p-627)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000000p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x8000000.000000400000000001p-627)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x8000000.000000400000000001p-627)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x8000000.0000007fffffffffffp-627)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x8000000.0000007fffffffffffp-627)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x8000000.000000800000000000p-627)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x8000000.000000800000000000p-627)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x8000000.000000800000000001p-627)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x8000000.000000800000000001p-627)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x8000000.000000bfffffffffffp-627)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x8000000.000000bfffffffffffp-627)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x8000000.000000c00000000000p-627)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x8000000.000000c00000000000p-627)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x8000000.000000c00000000001p-627)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x8000000.000000c00000000001p-627)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x8000000.000000ffffffffffffp-627)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x8000000.000000ffffffffffffp-627)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x8000000.000001000000000000p-627)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x8000000.000001000000000000p-627)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x8000000.000001000000000001p-627)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x8000000.000001000000000001p-627)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x8000000.0000013fffffffffffp-627)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x8000000.0000013fffffffffffp-627)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p-600))\n(module (func (export \"f\") (result f64) (f64.const +0x8000000.000001400000000001p-627)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000003p-600))\n(module (func (export \"f\") (result f64) (f64.const -0x8000000.000001400000000001p-627)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000003p-600))\n\n(module (func (export \"f\") (result f64) (f64.const +5.3575430359313371995e+300)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000000p+999))\n(module (func (export \"f\") (result f64) (f64.const -5.3575430359313371995e+300)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000000p+999))\n(module (func (export \"f\") (result f64) (f64.const +5.3575430359313371996e+300)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p+999))\n(module (func (export \"f\") (result f64) (f64.const -5.3575430359313371996e+300)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p+999))\n(module (func (export \"f\") (result f64) (f64.const +5.3575430359313383891e+300)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p+999))\n(module (func (export \"f\") (result f64) (f64.const -5.3575430359313383891e+300)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p+999))\n(module (func (export \"f\") (result f64) (f64.const +5.3575430359313383892e+300)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p+999))\n(module (func (export \"f\") (result f64) (f64.const -5.3575430359313383892e+300)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p+999))\n\n;; f64, large exponent\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000080000000000p+600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000000p+600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000080000000000p+600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000000p+600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000080000000001p+600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p+600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000080000000001p+600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p+600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.0000000000000fffffffffffp+600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p+600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.0000000000000fffffffffffp+600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p+600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000100000000000p+600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p+600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000100000000000p+600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p+600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000100000000001p+600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p+600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000100000000001p+600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p+600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.00000000000017ffffffffffp+600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p+600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.00000000000017ffffffffffp+600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p+600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000180000000000p+600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p+600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000180000000000p+600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p+600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000180000000001p+600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p+600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000180000000001p+600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p+600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.0000000000001fffffffffffp+600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p+600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.0000000000001fffffffffffp+600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p+600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000200000000000p+600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p+600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000200000000000p+600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p+600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000200000000001p+600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p+600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000200000000001p+600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p+600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.00000000000027ffffffffffp+600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p+600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.00000000000027ffffffffffp+600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p+600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000280000000000p+600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p+600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000280000000000p+600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p+600))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000280000000001p+600)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000003p+600))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000280000000001p+600)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000003p+600))\n\n(module (func (export \"f\") (result f64) (f64.const +0x2000000000000100000000000)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000000p+97))\n(module (func (export \"f\") (result f64) (f64.const -0x2000000000000100000000000)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000000p+97))\n(module (func (export \"f\") (result f64) (f64.const +0x2000000000000100000000001)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p+97))\n(module (func (export \"f\") (result f64) (f64.const -0x2000000000000100000000001)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p+97))\n(module (func (export \"f\") (result f64) (f64.const +0x20000000000001fffffffffff)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p+97))\n(module (func (export \"f\") (result f64) (f64.const -0x20000000000001fffffffffff)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p+97))\n(module (func (export \"f\") (result f64) (f64.const +0x2000000000000200000000000)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p+97))\n(module (func (export \"f\") (result f64) (f64.const -0x2000000000000200000000000)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p+97))\n(module (func (export \"f\") (result f64) (f64.const +0x2000000000000200000000001)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p+97))\n(module (func (export \"f\") (result f64) (f64.const -0x2000000000000200000000001)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p+97))\n(module (func (export \"f\") (result f64) (f64.const +0x20000000000002fffffffffff)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p+97))\n(module (func (export \"f\") (result f64) (f64.const -0x20000000000002fffffffffff)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p+97))\n(module (func (export \"f\") (result f64) (f64.const +0x2000000000000300000000000)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p+97))\n(module (func (export \"f\") (result f64) (f64.const -0x2000000000000300000000000)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p+97))\n(module (func (export \"f\") (result f64) (f64.const +0x2000000000000300000000001)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p+97))\n(module (func (export \"f\") (result f64) (f64.const -0x2000000000000300000000001)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p+97))\n(module (func (export \"f\") (result f64) (f64.const +0x20000000000003fffffffffff)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p+97))\n(module (func (export \"f\") (result f64) (f64.const -0x20000000000003fffffffffff)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p+97))\n(module (func (export \"f\") (result f64) (f64.const +0x2000000000000400000000000)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p+97))\n(module (func (export \"f\") (result f64) (f64.const -0x2000000000000400000000000)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p+97))\n(module (func (export \"f\") (result f64) (f64.const +0x2000000000000400000000001)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p+97))\n(module (func (export \"f\") (result f64) (f64.const -0x2000000000000400000000001)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p+97))\n(module (func (export \"f\") (result f64) (f64.const +0x20000000000004fffffffffff)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p+97))\n(module (func (export \"f\") (result f64) (f64.const -0x20000000000004fffffffffff)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p+97))\n(module (func (export \"f\") (result f64) (f64.const +0x2000000000000500000000000)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p+97))\n(module (func (export \"f\") (result f64) (f64.const -0x2000000000000500000000000)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p+97))\n(module (func (export \"f\") (result f64) (f64.const +0x2000000000000500000000001)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000003p+97))\n(module (func (export \"f\") (result f64) (f64.const -0x2000000000000500000000001)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000003p+97))\n\n(module (func (export \"f\") (result f64) (f64.const +1152921504606847104)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000000p+60))\n(module (func (export \"f\") (result f64) (f64.const -1152921504606847104)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000000p+60))\n(module (func (export \"f\") (result f64) (f64.const +1152921504606847105)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p+60))\n(module (func (export \"f\") (result f64) (f64.const -1152921504606847105)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p+60))\n(module (func (export \"f\") (result f64) (f64.const +1152921504606847359)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000001p+60))\n(module (func (export \"f\") (result f64) (f64.const -1152921504606847359)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000001p+60))\n(module (func (export \"f\") (result f64) (f64.const +1152921504606847360)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000002p+60))\n(module (func (export \"f\") (result f64) (f64.const -1152921504606847360)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000002p+60))\n\n;; f64, subnormal\n(module (func (export \"f\") (result f64) (f64.const +0x0.000000000000080000000000p-1022)))\n(assert_return (invoke \"f\") (f64.const +0x0.0000000000000p-1022))\n(module (func (export \"f\") (result f64) (f64.const -0x0.000000000000080000000000p-1022)))\n(assert_return (invoke \"f\") (f64.const -0x0.0000000000000p-1022))\n(module (func (export \"f\") (result f64) (f64.const +0x0.000000000000080000000001p-1022)))\n(assert_return (invoke \"f\") (f64.const +0x0.0000000000001p-1022))\n(module (func (export \"f\") (result f64) (f64.const -0x0.000000000000080000000001p-1022)))\n(assert_return (invoke \"f\") (f64.const -0x0.0000000000001p-1022))\n(module (func (export \"f\") (result f64) (f64.const +0x0.0000000000000fffffffffffp-1022)))\n(assert_return (invoke \"f\") (f64.const +0x0.0000000000001p-1022))\n(module (func (export \"f\") (result f64) (f64.const -0x0.0000000000000fffffffffffp-1022)))\n(assert_return (invoke \"f\") (f64.const -0x0.0000000000001p-1022))\n(module (func (export \"f\") (result f64) (f64.const +0x0.000000000000100000000000p-1022)))\n(assert_return (invoke \"f\") (f64.const +0x0.0000000000001p-1022))\n(module (func (export \"f\") (result f64) (f64.const -0x0.000000000000100000000000p-1022)))\n(assert_return (invoke \"f\") (f64.const -0x0.0000000000001p-1022))\n(module (func (export \"f\") (result f64) (f64.const +0x0.000000000000100000000001p-1022)))\n(assert_return (invoke \"f\") (f64.const +0x0.0000000000001p-1022))\n(module (func (export \"f\") (result f64) (f64.const -0x0.000000000000100000000001p-1022)))\n(assert_return (invoke \"f\") (f64.const -0x0.0000000000001p-1022))\n(module (func (export \"f\") (result f64) (f64.const +0x0.00000000000017ffffffffffp-1022)))\n(assert_return (invoke \"f\") (f64.const +0x0.0000000000001p-1022))\n(module (func (export \"f\") (result f64) (f64.const -0x0.00000000000017ffffffffffp-1022)))\n(assert_return (invoke \"f\") (f64.const -0x0.0000000000001p-1022))\n(module (func (export \"f\") (result f64) (f64.const +0x0.000000000000180000000000p-1022)))\n(assert_return (invoke \"f\") (f64.const +0x0.0000000000002p-1022))\n(module (func (export \"f\") (result f64) (f64.const -0x0.000000000000180000000000p-1022)))\n(assert_return (invoke \"f\") (f64.const -0x0.0000000000002p-1022))\n(module (func (export \"f\") (result f64) (f64.const +0x0.000000000000180000000001p-1022)))\n(assert_return (invoke \"f\") (f64.const +0x0.0000000000002p-1022))\n(module (func (export \"f\") (result f64) (f64.const -0x0.000000000000180000000001p-1022)))\n(assert_return (invoke \"f\") (f64.const -0x0.0000000000002p-1022))\n(module (func (export \"f\") (result f64) (f64.const +0x0.0000000000001fffffffffffp-1022)))\n(assert_return (invoke \"f\") (f64.const +0x0.0000000000002p-1022))\n(module (func (export \"f\") (result f64) (f64.const -0x0.0000000000001fffffffffffp-1022)))\n(assert_return (invoke \"f\") (f64.const -0x0.0000000000002p-1022))\n(module (func (export \"f\") (result f64) (f64.const +0x0.000000000000200000000000p-1022)))\n(assert_return (invoke \"f\") (f64.const +0x0.0000000000002p-1022))\n(module (func (export \"f\") (result f64) (f64.const -0x0.000000000000200000000000p-1022)))\n(assert_return (invoke \"f\") (f64.const -0x0.0000000000002p-1022))\n(module (func (export \"f\") (result f64) (f64.const +0x0.000000000000200000000001p-1022)))\n(assert_return (invoke \"f\") (f64.const +0x0.0000000000002p-1022))\n(module (func (export \"f\") (result f64) (f64.const -0x0.000000000000200000000001p-1022)))\n(assert_return (invoke \"f\") (f64.const -0x0.0000000000002p-1022))\n(module (func (export \"f\") (result f64) (f64.const +0x0.00000000000027ffffffffffp-1022)))\n(assert_return (invoke \"f\") (f64.const +0x0.0000000000002p-1022))\n(module (func (export \"f\") (result f64) (f64.const -0x0.00000000000027ffffffffffp-1022)))\n(assert_return (invoke \"f\") (f64.const -0x0.0000000000002p-1022))\n(module (func (export \"f\") (result f64) (f64.const +0x0.000000000000280000000000p-1022)))\n(assert_return (invoke \"f\") (f64.const +0x0.0000000000002p-1022))\n(module (func (export \"f\") (result f64) (f64.const -0x0.000000000000280000000000p-1022)))\n(assert_return (invoke \"f\") (f64.const -0x0.0000000000002p-1022))\n(module (func (export \"f\") (result f64) (f64.const +0x1.000000000000280000000001p-1022)))\n(assert_return (invoke \"f\") (f64.const +0x1.0000000000003p-1022))\n(module (func (export \"f\") (result f64) (f64.const -0x1.000000000000280000000001p-1022)))\n(assert_return (invoke \"f\") (f64.const -0x1.0000000000003p-1022))\n\n;; f64, round down at limit to infinity\n(module (func (export \"f\") (result f64) (f64.const +0x1.fffffffffffff4p1023)))\n(assert_return (invoke \"f\") (f64.const +0x1.fffffffffffffp1023))\n(module (func (export \"f\") (result f64) (f64.const -0x1.fffffffffffff4p1023)))\n(assert_return (invoke \"f\") (f64.const -0x1.fffffffffffffp1023))\n(module (func (export \"f\") (result f64) (f64.const +0x1.fffffffffffff7ffffffp1023)))\n(assert_return (invoke \"f\") (f64.const +0x1.fffffffffffffp1023))\n(module (func (export \"f\") (result f64) (f64.const -0x1.fffffffffffff7ffffffp1023)))\n(assert_return (invoke \"f\") (f64.const -0x1.fffffffffffffp1023))\n"
  },
  {
    "path": "test/core/conversions.wast",
    "content": "(module\n  (func (export \"i64.extend_i32_s\") (param $x i32) (result i64) (i64.extend_i32_s (local.get $x)))\n  (func (export \"i64.extend_i32_u\") (param $x i32) (result i64) (i64.extend_i32_u (local.get $x)))\n  (func (export \"i32.wrap_i64\") (param $x i64) (result i32) (i32.wrap_i64 (local.get $x)))\n  (func (export \"i32.trunc_f32_s\") (param $x f32) (result i32) (i32.trunc_f32_s (local.get $x)))\n  (func (export \"i32.trunc_f32_u\") (param $x f32) (result i32) (i32.trunc_f32_u (local.get $x)))\n  (func (export \"i32.trunc_f64_s\") (param $x f64) (result i32) (i32.trunc_f64_s (local.get $x)))\n  (func (export \"i32.trunc_f64_u\") (param $x f64) (result i32) (i32.trunc_f64_u (local.get $x)))\n  (func (export \"i64.trunc_f32_s\") (param $x f32) (result i64) (i64.trunc_f32_s (local.get $x)))\n  (func (export \"i64.trunc_f32_u\") (param $x f32) (result i64) (i64.trunc_f32_u (local.get $x)))\n  (func (export \"i64.trunc_f64_s\") (param $x f64) (result i64) (i64.trunc_f64_s (local.get $x)))\n  (func (export \"i64.trunc_f64_u\") (param $x f64) (result i64) (i64.trunc_f64_u (local.get $x)))\n  (func (export \"i32.trunc_sat_f32_s\") (param $x f32) (result i32) (i32.trunc_sat_f32_s (local.get $x)))\n  (func (export \"i32.trunc_sat_f32_u\") (param $x f32) (result i32) (i32.trunc_sat_f32_u (local.get $x)))\n  (func (export \"i32.trunc_sat_f64_s\") (param $x f64) (result i32) (i32.trunc_sat_f64_s (local.get $x)))\n  (func (export \"i32.trunc_sat_f64_u\") (param $x f64) (result i32) (i32.trunc_sat_f64_u (local.get $x)))\n  (func (export \"i64.trunc_sat_f32_s\") (param $x f32) (result i64) (i64.trunc_sat_f32_s (local.get $x)))\n  (func (export \"i64.trunc_sat_f32_u\") (param $x f32) (result i64) (i64.trunc_sat_f32_u (local.get $x)))\n  (func (export \"i64.trunc_sat_f64_s\") (param $x f64) (result i64) (i64.trunc_sat_f64_s (local.get $x)))\n  (func (export \"i64.trunc_sat_f64_u\") (param $x f64) (result i64) (i64.trunc_sat_f64_u (local.get $x)))\n  (func (export \"f32.convert_i32_s\") (param $x i32) (result f32) (f32.convert_i32_s (local.get $x)))\n  (func (export \"f32.convert_i64_s\") (param $x i64) (result f32) (f32.convert_i64_s (local.get $x)))\n  (func (export \"f64.convert_i32_s\") (param $x i32) (result f64) (f64.convert_i32_s (local.get $x)))\n  (func (export \"f64.convert_i64_s\") (param $x i64) (result f64) (f64.convert_i64_s (local.get $x)))\n  (func (export \"f32.convert_i32_u\") (param $x i32) (result f32) (f32.convert_i32_u (local.get $x)))\n  (func (export \"f32.convert_i64_u\") (param $x i64) (result f32) (f32.convert_i64_u (local.get $x)))\n  (func (export \"f64.convert_i32_u\") (param $x i32) (result f64) (f64.convert_i32_u (local.get $x)))\n  (func (export \"f64.convert_i64_u\") (param $x i64) (result f64) (f64.convert_i64_u (local.get $x)))\n  (func (export \"f64.promote_f32\") (param $x f32) (result f64) (f64.promote_f32 (local.get $x)))\n  (func (export \"f32.demote_f64\") (param $x f64) (result f32) (f32.demote_f64 (local.get $x)))\n  (func (export \"f32.reinterpret_i32\") (param $x i32) (result f32) (f32.reinterpret_i32 (local.get $x)))\n  (func (export \"f64.reinterpret_i64\") (param $x i64) (result f64) (f64.reinterpret_i64 (local.get $x)))\n  (func (export \"i32.reinterpret_f32\") (param $x f32) (result i32) (i32.reinterpret_f32 (local.get $x)))\n  (func (export \"i64.reinterpret_f64\") (param $x f64) (result i64) (i64.reinterpret_f64 (local.get $x)))\n)\n\n(assert_return (invoke \"i64.extend_i32_s\" (i32.const 0)) (i64.const 0))\n(assert_return (invoke \"i64.extend_i32_s\" (i32.const 10000)) (i64.const 10000))\n(assert_return (invoke \"i64.extend_i32_s\" (i32.const -10000)) (i64.const -10000))\n(assert_return (invoke \"i64.extend_i32_s\" (i32.const -1)) (i64.const -1))\n(assert_return (invoke \"i64.extend_i32_s\" (i32.const 0x7fffffff)) (i64.const 0x000000007fffffff))\n(assert_return (invoke \"i64.extend_i32_s\" (i32.const 0x80000000)) (i64.const 0xffffffff80000000))\n\n(assert_return (invoke \"i64.extend_i32_u\" (i32.const 0)) (i64.const 0))\n(assert_return (invoke \"i64.extend_i32_u\" (i32.const 10000)) (i64.const 10000))\n(assert_return (invoke \"i64.extend_i32_u\" (i32.const -10000)) (i64.const 0x00000000ffffd8f0))\n(assert_return (invoke \"i64.extend_i32_u\" (i32.const -1)) (i64.const 0xffffffff))\n(assert_return (invoke \"i64.extend_i32_u\" (i32.const 0x7fffffff)) (i64.const 0x000000007fffffff))\n(assert_return (invoke \"i64.extend_i32_u\" (i32.const 0x80000000)) (i64.const 0x0000000080000000))\n\n(assert_return (invoke \"i32.wrap_i64\" (i64.const -1)) (i32.const -1))\n(assert_return (invoke \"i32.wrap_i64\" (i64.const -100000)) (i32.const -100000))\n(assert_return (invoke \"i32.wrap_i64\" (i64.const 0x80000000)) (i32.const 0x80000000))\n(assert_return (invoke \"i32.wrap_i64\" (i64.const 0xffffffff7fffffff)) (i32.const 0x7fffffff))\n(assert_return (invoke \"i32.wrap_i64\" (i64.const 0xffffffff00000000)) (i32.const 0x00000000))\n(assert_return (invoke \"i32.wrap_i64\" (i64.const 0xfffffffeffffffff)) (i32.const 0xffffffff))\n(assert_return (invoke \"i32.wrap_i64\" (i64.const 0xffffffff00000001)) (i32.const 0x00000001))\n(assert_return (invoke \"i32.wrap_i64\" (i64.const 0)) (i32.const 0))\n(assert_return (invoke \"i32.wrap_i64\" (i64.const 1311768467463790320)) (i32.const 0x9abcdef0))\n(assert_return (invoke \"i32.wrap_i64\" (i64.const 0x00000000ffffffff)) (i32.const 0xffffffff))\n(assert_return (invoke \"i32.wrap_i64\" (i64.const 0x0000000100000000)) (i32.const 0x00000000))\n(assert_return (invoke \"i32.wrap_i64\" (i64.const 0x0000000100000001)) (i32.const 0x00000001))\n\n(assert_return (invoke \"i32.trunc_f32_s\" (f32.const 0.0)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f32_s\" (f32.const -0.0)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f32_s\" (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f32_s\" (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f32_s\" (f32.const 1.0)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_f32_s\" (f32.const 0x1.19999ap+0)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_f32_s\" (f32.const 1.5)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_f32_s\" (f32.const -1.0)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_f32_s\" (f32.const -0x1.19999ap+0)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_f32_s\" (f32.const -1.5)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_f32_s\" (f32.const -1.9)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_f32_s\" (f32.const -2.0)) (i32.const -2))\n(assert_return (invoke \"i32.trunc_f32_s\" (f32.const 2147483520.0)) (i32.const 2147483520))\n(assert_return (invoke \"i32.trunc_f32_s\" (f32.const -2147483648.0)) (i32.const -2147483648))\n(assert_trap (invoke \"i32.trunc_f32_s\" (f32.const 2147483648.0)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f32_s\" (f32.const -2147483904.0)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f32_s\" (f32.const inf)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f32_s\" (f32.const -inf)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f32_s\" (f32.const nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i32.trunc_f32_s\" (f32.const nan:0x200000)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i32.trunc_f32_s\" (f32.const -nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i32.trunc_f32_s\" (f32.const -nan:0x200000)) \"invalid conversion to integer\")\n\n(assert_return (invoke \"i32.trunc_f32_u\" (f32.const 0.0)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f32_u\" (f32.const -0.0)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f32_u\" (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f32_u\" (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f32_u\" (f32.const 1.0)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_f32_u\" (f32.const 0x1.19999ap+0)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_f32_u\" (f32.const 1.5)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_f32_u\" (f32.const 1.9)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_f32_u\" (f32.const 2.0)) (i32.const 2))\n(assert_return (invoke \"i32.trunc_f32_u\" (f32.const 2147483648)) (i32.const -2147483648)) ;; 0x1.00000p+31 -> 8000 0000\n(assert_return (invoke \"i32.trunc_f32_u\" (f32.const 4294967040.0)) (i32.const -256))\n(assert_return (invoke \"i32.trunc_f32_u\" (f32.const -0x1.ccccccp-1)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f32_u\" (f32.const -0x1.fffffep-1)) (i32.const 0))\n(assert_trap (invoke \"i32.trunc_f32_u\" (f32.const 4294967296.0)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f32_u\" (f32.const -1.0)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f32_u\" (f32.const inf)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f32_u\" (f32.const -inf)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f32_u\" (f32.const nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i32.trunc_f32_u\" (f32.const nan:0x200000)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i32.trunc_f32_u\" (f32.const -nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i32.trunc_f32_u\" (f32.const -nan:0x200000)) \"invalid conversion to integer\")\n\n(assert_return (invoke \"i32.trunc_f64_s\" (f64.const 0.0)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f64_s\" (f64.const -0.0)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f64_s\" (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f64_s\" (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f64_s\" (f64.const 1.0)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_f64_s\" (f64.const 0x1.199999999999ap+0)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_f64_s\" (f64.const 1.5)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_f64_s\" (f64.const -1.0)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_f64_s\" (f64.const -0x1.199999999999ap+0)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_f64_s\" (f64.const -1.5)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_f64_s\" (f64.const -1.9)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_f64_s\" (f64.const -2.0)) (i32.const -2))\n(assert_return (invoke \"i32.trunc_f64_s\" (f64.const 2147483647.0)) (i32.const 2147483647))\n(assert_return (invoke \"i32.trunc_f64_s\" (f64.const -2147483648.0)) (i32.const -2147483648))\n(assert_return (invoke \"i32.trunc_f64_s\" (f64.const -2147483648.9)) (i32.const -2147483648))\n(assert_return (invoke \"i32.trunc_f64_s\" (f64.const  2147483647.9)) (i32.const  2147483647))\n(assert_trap (invoke \"i32.trunc_f64_s\" (f64.const 2147483648.0)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f64_s\" (f64.const -2147483649.0)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f64_s\" (f64.const inf)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f64_s\" (f64.const -inf)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f64_s\" (f64.const nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i32.trunc_f64_s\" (f64.const nan:0x4000000000000)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i32.trunc_f64_s\" (f64.const -nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i32.trunc_f64_s\" (f64.const -nan:0x4000000000000)) \"invalid conversion to integer\")\n\n(assert_return (invoke \"i32.trunc_f64_u\" (f64.const 0.0)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f64_u\" (f64.const -0.0)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f64_u\" (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f64_u\" (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f64_u\" (f64.const 1.0)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_f64_u\" (f64.const 0x1.199999999999ap+0)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_f64_u\" (f64.const 1.5)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_f64_u\" (f64.const 1.9)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_f64_u\" (f64.const 2.0)) (i32.const 2))\n(assert_return (invoke \"i32.trunc_f64_u\" (f64.const 2147483648)) (i32.const -2147483648)) ;; 0x1.00000p+31 -> 8000 0000\n(assert_return (invoke \"i32.trunc_f64_u\" (f64.const 4294967295.0)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_f64_u\" (f64.const -0x1.ccccccccccccdp-1)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f64_u\" (f64.const -0x1.fffffffffffffp-1)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f64_u\" (f64.const 1e8)) (i32.const 100000000))\n(assert_return (invoke \"i32.trunc_f64_u\" (f64.const -0.9)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_f64_u\" (f64.const 4294967295.9)) (i32.const 4294967295))\n(assert_trap (invoke \"i32.trunc_f64_u\" (f64.const 4294967296.0)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f64_u\" (f64.const -1.0)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f64_u\" (f64.const 1e16)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f64_u\" (f64.const 1e30)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f64_u\" (f64.const 9223372036854775808)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f64_u\" (f64.const inf)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f64_u\" (f64.const -inf)) \"integer overflow\")\n(assert_trap (invoke \"i32.trunc_f64_u\" (f64.const nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i32.trunc_f64_u\" (f64.const nan:0x4000000000000)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i32.trunc_f64_u\" (f64.const -nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i32.trunc_f64_u\" (f64.const -nan:0x4000000000000)) \"invalid conversion to integer\")\n\n(assert_return (invoke \"i64.trunc_f32_s\" (f32.const 0.0)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f32_s\" (f32.const -0.0)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f32_s\" (f32.const 0x1p-149)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f32_s\" (f32.const -0x1p-149)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f32_s\" (f32.const 1.0)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_f32_s\" (f32.const 0x1.19999ap+0)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_f32_s\" (f32.const 1.5)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_f32_s\" (f32.const -1.0)) (i64.const -1))\n(assert_return (invoke \"i64.trunc_f32_s\" (f32.const -0x1.19999ap+0)) (i64.const -1))\n(assert_return (invoke \"i64.trunc_f32_s\" (f32.const -1.5)) (i64.const -1))\n(assert_return (invoke \"i64.trunc_f32_s\" (f32.const -1.9)) (i64.const -1))\n(assert_return (invoke \"i64.trunc_f32_s\" (f32.const -2.0)) (i64.const -2))\n(assert_return (invoke \"i64.trunc_f32_s\" (f32.const 4294967296)) (i64.const 4294967296)) ;; 0x1.00000p+32 -> 1 0000 0000\n(assert_return (invoke \"i64.trunc_f32_s\" (f32.const -4294967296)) (i64.const -4294967296)) ;; -0x1.00000p+32 -> ffff ffff 0000 0000\n(assert_return (invoke \"i64.trunc_f32_s\" (f32.const 9223371487098961920.0)) (i64.const 9223371487098961920))\n(assert_return (invoke \"i64.trunc_f32_s\" (f32.const -9223372036854775808.0)) (i64.const -9223372036854775808))\n(assert_trap (invoke \"i64.trunc_f32_s\" (f32.const 9223372036854775808.0)) \"integer overflow\")\n(assert_trap (invoke \"i64.trunc_f32_s\" (f32.const -9223373136366403584.0)) \"integer overflow\")\n(assert_trap (invoke \"i64.trunc_f32_s\" (f32.const inf)) \"integer overflow\")\n(assert_trap (invoke \"i64.trunc_f32_s\" (f32.const -inf)) \"integer overflow\")\n(assert_trap (invoke \"i64.trunc_f32_s\" (f32.const nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i64.trunc_f32_s\" (f32.const nan:0x200000)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i64.trunc_f32_s\" (f32.const -nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i64.trunc_f32_s\" (f32.const -nan:0x200000)) \"invalid conversion to integer\")\n\n(assert_return (invoke \"i64.trunc_f32_u\" (f32.const 0.0)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f32_u\" (f32.const -0.0)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f32_u\" (f32.const 0x1p-149)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f32_u\" (f32.const -0x1p-149)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f32_u\" (f32.const 1.0)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_f32_u\" (f32.const 0x1.19999ap+0)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_f32_u\" (f32.const 1.5)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_f32_u\" (f32.const 4294967296)) (i64.const 4294967296))\n(assert_return (invoke \"i64.trunc_f32_u\" (f32.const 18446742974197923840.0)) (i64.const -1099511627776))\n(assert_return (invoke \"i64.trunc_f32_u\" (f32.const -0x1.ccccccp-1)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f32_u\" (f32.const -0x1.fffffep-1)) (i64.const 0))\n(assert_trap (invoke \"i64.trunc_f32_u\" (f32.const 18446744073709551616.0)) \"integer overflow\")\n(assert_trap (invoke \"i64.trunc_f32_u\" (f32.const -1.0)) \"integer overflow\")\n(assert_trap (invoke \"i64.trunc_f32_u\" (f32.const inf)) \"integer overflow\")\n(assert_trap (invoke \"i64.trunc_f32_u\" (f32.const -inf)) \"integer overflow\")\n(assert_trap (invoke \"i64.trunc_f32_u\" (f32.const nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i64.trunc_f32_u\" (f32.const nan:0x200000)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i64.trunc_f32_u\" (f32.const -nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i64.trunc_f32_u\" (f32.const -nan:0x200000)) \"invalid conversion to integer\")\n\n(assert_return (invoke \"i64.trunc_f64_s\" (f64.const 0.0)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f64_s\" (f64.const -0.0)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f64_s\" (f64.const 0x0.0000000000001p-1022)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f64_s\" (f64.const -0x0.0000000000001p-1022)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f64_s\" (f64.const 1.0)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_f64_s\" (f64.const 0x1.199999999999ap+0)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_f64_s\" (f64.const 1.5)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_f64_s\" (f64.const -1.0)) (i64.const -1))\n(assert_return (invoke \"i64.trunc_f64_s\" (f64.const -0x1.199999999999ap+0)) (i64.const -1))\n(assert_return (invoke \"i64.trunc_f64_s\" (f64.const -1.5)) (i64.const -1))\n(assert_return (invoke \"i64.trunc_f64_s\" (f64.const -1.9)) (i64.const -1))\n(assert_return (invoke \"i64.trunc_f64_s\" (f64.const -2.0)) (i64.const -2))\n(assert_return (invoke \"i64.trunc_f64_s\" (f64.const 4294967296)) (i64.const 4294967296)) ;; 0x1.00000p+32 -> 1 0000 0000\n(assert_return (invoke \"i64.trunc_f64_s\" (f64.const -4294967296)) (i64.const -4294967296)) ;; -0x1.00000p+32 -> ffff ffff 0000 0000\n(assert_return (invoke \"i64.trunc_f64_s\" (f64.const 9223372036854774784.0)) (i64.const 9223372036854774784))\n(assert_return (invoke \"i64.trunc_f64_s\" (f64.const -9223372036854775808.0)) (i64.const -9223372036854775808))\n(assert_trap (invoke \"i64.trunc_f64_s\" (f64.const 9223372036854775808.0)) \"integer overflow\")\n(assert_trap (invoke \"i64.trunc_f64_s\" (f64.const -9223372036854777856.0)) \"integer overflow\")\n(assert_trap (invoke \"i64.trunc_f64_s\" (f64.const inf)) \"integer overflow\")\n(assert_trap (invoke \"i64.trunc_f64_s\" (f64.const -inf)) \"integer overflow\")\n(assert_trap (invoke \"i64.trunc_f64_s\" (f64.const nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i64.trunc_f64_s\" (f64.const nan:0x4000000000000)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i64.trunc_f64_s\" (f64.const -nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i64.trunc_f64_s\" (f64.const -nan:0x4000000000000)) \"invalid conversion to integer\")\n\n(assert_return (invoke \"i64.trunc_f64_u\" (f64.const 0.0)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f64_u\" (f64.const -0.0)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f64_u\" (f64.const 0x0.0000000000001p-1022)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f64_u\" (f64.const -0x0.0000000000001p-1022)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f64_u\" (f64.const 1.0)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_f64_u\" (f64.const 0x1.199999999999ap+0)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_f64_u\" (f64.const 1.5)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_f64_u\" (f64.const 4294967295)) (i64.const 0xffffffff))\n(assert_return (invoke \"i64.trunc_f64_u\" (f64.const 4294967296)) (i64.const 0x100000000))\n(assert_return (invoke \"i64.trunc_f64_u\" (f64.const 18446744073709549568.0)) (i64.const -2048))\n(assert_return (invoke \"i64.trunc_f64_u\" (f64.const -0x1.ccccccccccccdp-1)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f64_u\" (f64.const -0x1.fffffffffffffp-1)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_f64_u\" (f64.const 1e8)) (i64.const 100000000))\n(assert_return (invoke \"i64.trunc_f64_u\" (f64.const 1e16)) (i64.const 10000000000000000))\n(assert_return (invoke \"i64.trunc_f64_u\" (f64.const 9223372036854775808)) (i64.const -9223372036854775808))\n(assert_trap (invoke \"i64.trunc_f64_u\" (f64.const 18446744073709551616.0)) \"integer overflow\")\n(assert_trap (invoke \"i64.trunc_f64_u\" (f64.const -1.0)) \"integer overflow\")\n(assert_trap (invoke \"i64.trunc_f64_u\" (f64.const inf)) \"integer overflow\")\n(assert_trap (invoke \"i64.trunc_f64_u\" (f64.const -inf)) \"integer overflow\")\n(assert_trap (invoke \"i64.trunc_f64_u\" (f64.const nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i64.trunc_f64_u\" (f64.const nan:0x4000000000000)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i64.trunc_f64_u\" (f64.const -nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"i64.trunc_f64_u\" (f64.const -nan:0x4000000000000)) \"invalid conversion to integer\")\n\n(assert_return (invoke \"f32.convert_i32_s\" (i32.const 1)) (f32.const 1.0))\n(assert_return (invoke \"f32.convert_i32_s\" (i32.const -1)) (f32.const -1.0))\n(assert_return (invoke \"f32.convert_i32_s\" (i32.const 0)) (f32.const 0.0))\n(assert_return (invoke \"f32.convert_i32_s\" (i32.const 2147483647)) (f32.const 2147483648))\n(assert_return (invoke \"f32.convert_i32_s\" (i32.const -2147483648)) (f32.const -2147483648))\n(assert_return (invoke \"f32.convert_i32_s\" (i32.const 1234567890)) (f32.const 0x1.26580cp+30))\n\n;; Saturating conversions: test all the same values as the non-saturating conversions.\n\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const 0.0)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const -0.0)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const 1.0)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const 0x1.19999ap+0)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const 1.5)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const -1.0)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const -0x1.19999ap+0)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const -1.5)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const -1.9)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const -2.0)) (i32.const -2))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const 2147483520.0)) (i32.const 2147483520))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const -2147483648.0)) (i32.const -2147483648))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const 2147483648.0)) (i32.const 0x7fffffff))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const -2147483904.0)) (i32.const 0x80000000))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const inf)) (i32.const 0x7fffffff))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const -inf)) (i32.const 0x80000000))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f32_s\" (f32.const -nan:0x200000)) (i32.const 0))\n\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const 0.0)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const -0.0)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const 1.0)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const 0x1.19999ap+0)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const 1.5)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const 1.9)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const 2.0)) (i32.const 2))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const 2147483648)) (i32.const -2147483648)) ;; 0x1.00000p+31 -> 8000 0000\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const 4294967040.0)) (i32.const -256))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const -0x1.ccccccp-1)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const -0x1.fffffep-1)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const 4294967296.0)) (i32.const 0xffffffff))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const -1.0)) (i32.const 0x00000000))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const inf)) (i32.const 0xffffffff))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const -inf)) (i32.const 0x00000000))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f32_u\" (f32.const -nan:0x200000)) (i32.const 0))\n\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const 0.0)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const -0.0)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const 1.0)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const 0x1.199999999999ap+0)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const 1.5)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const -1.0)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const -0x1.199999999999ap+0)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const -1.5)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const -1.9)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const -2.0)) (i32.const -2))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const 2147483647.0)) (i32.const 2147483647))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const -2147483648.0)) (i32.const -2147483648))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const 2147483648.0)) (i32.const 0x7fffffff))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const -2147483649.0)) (i32.const 0x80000000))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const inf)) (i32.const 0x7fffffff))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const -inf)) (i32.const 0x80000000))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f64_s\" (f64.const -nan:0x4000000000000)) (i32.const 0))\n\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const 0.0)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const -0.0)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const 1.0)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const 0x1.199999999999ap+0)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const 1.5)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const 1.9)) (i32.const 1))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const 2.0)) (i32.const 2))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const 2147483648)) (i32.const -2147483648)) ;; 0x1.00000p+31 -> 8000 0000\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const 4294967295.0)) (i32.const -1))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const -0x1.ccccccccccccdp-1)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const -0x1.fffffffffffffp-1)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const 1e8)) (i32.const 100000000))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const 4294967296.0)) (i32.const 0xffffffff))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const -1.0)) (i32.const 0x00000000))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const 1e16)) (i32.const 0xffffffff))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const 1e30)) (i32.const 0xffffffff))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const 9223372036854775808)) (i32.const 0xffffffff))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const inf)) (i32.const 0xffffffff))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const -inf)) (i32.const 0x00000000))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"i32.trunc_sat_f64_u\" (f64.const -nan:0x4000000000000)) (i32.const 0))\n\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const 0.0)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const -0.0)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const 0x1p-149)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const -0x1p-149)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const 1.0)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const 0x1.19999ap+0)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const 1.5)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const -1.0)) (i64.const -1))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const -0x1.19999ap+0)) (i64.const -1))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const -1.5)) (i64.const -1))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const -1.9)) (i64.const -1))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const -2.0)) (i64.const -2))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const 4294967296)) (i64.const 4294967296)) ;; 0x1.00000p+32 -> 1 0000 0000\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const -4294967296)) (i64.const -4294967296)) ;; -0x1.00000p+32 -> ffff ffff 0000 0000\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const 9223371487098961920.0)) (i64.const 9223371487098961920))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const -9223372036854775808.0)) (i64.const -9223372036854775808))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const 9223372036854775808.0)) (i64.const 0x7fffffffffffffff))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const -9223373136366403584.0)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const inf)) (i64.const 0x7fffffffffffffff))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const -inf)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const nan)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const nan:0x200000)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const -nan)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f32_s\" (f32.const -nan:0x200000)) (i64.const 0))\n\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const 0.0)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const -0.0)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const 0x1p-149)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const -0x1p-149)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const 1.0)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const 0x1.19999ap+0)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const 1.5)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const 4294967296)) (i64.const 4294967296))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const 18446742974197923840.0)) (i64.const -1099511627776))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const -0x1.ccccccp-1)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const -0x1.fffffep-1)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const 18446744073709551616.0)) (i64.const 0xffffffffffffffff))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const -1.0)) (i64.const 0x0000000000000000))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const inf)) (i64.const 0xffffffffffffffff))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const -inf)) (i64.const 0x0000000000000000))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const nan)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const nan:0x200000)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const -nan)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f32_u\" (f32.const -nan:0x200000)) (i64.const 0))\n\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const 0.0)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const -0.0)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const 0x0.0000000000001p-1022)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const -0x0.0000000000001p-1022)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const 1.0)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const 0x1.199999999999ap+0)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const 1.5)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const -1.0)) (i64.const -1))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const -0x1.199999999999ap+0)) (i64.const -1))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const -1.5)) (i64.const -1))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const -1.9)) (i64.const -1))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const -2.0)) (i64.const -2))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const 4294967296)) (i64.const 4294967296)) ;; 0x1.00000p+32 -> 1 0000 0000\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const -4294967296)) (i64.const -4294967296)) ;; -0x1.00000p+32 -> ffff ffff 0000 0000\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const 9223372036854774784.0)) (i64.const 9223372036854774784))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const -9223372036854775808.0)) (i64.const -9223372036854775808))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const 9223372036854775808.0)) (i64.const 0x7fffffffffffffff))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const -9223372036854777856.0)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const inf)) (i64.const 0x7fffffffffffffff))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const -inf)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const nan)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const nan:0x4000000000000)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const -nan)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f64_s\" (f64.const -nan:0x4000000000000)) (i64.const 0))\n\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const 0.0)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const -0.0)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const 0x0.0000000000001p-1022)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const -0x0.0000000000001p-1022)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const 1.0)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const 0x1.199999999999ap+0)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const 1.5)) (i64.const 1))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const 4294967295)) (i64.const 0xffffffff))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const 4294967296)) (i64.const 0x100000000))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const 18446744073709549568.0)) (i64.const -2048))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const -0x1.ccccccccccccdp-1)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const -0x1.fffffffffffffp-1)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const 1e8)) (i64.const 100000000))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const 1e16)) (i64.const 10000000000000000))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const 9223372036854775808)) (i64.const -9223372036854775808))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const 18446744073709551616.0)) (i64.const 0xffffffffffffffff))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const -1.0)) (i64.const 0x0000000000000000))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const inf)) (i64.const 0xffffffffffffffff))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const -inf)) (i64.const 0x0000000000000000))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const nan)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const nan:0x4000000000000)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const -nan)) (i64.const 0))\n(assert_return (invoke \"i64.trunc_sat_f64_u\" (f64.const -nan:0x4000000000000)) (i64.const 0))\n\n;; Test rounding directions.\n(assert_return (invoke \"f32.convert_i32_s\" (i32.const 16777217)) (f32.const 16777216.0))\n(assert_return (invoke \"f32.convert_i32_s\" (i32.const -16777217)) (f32.const -16777216.0))\n(assert_return (invoke \"f32.convert_i32_s\" (i32.const 16777219)) (f32.const 16777220.0))\n(assert_return (invoke \"f32.convert_i32_s\" (i32.const -16777219)) (f32.const -16777220.0))\n\n(assert_return (invoke \"f32.convert_i64_s\" (i64.const 1)) (f32.const 1.0))\n(assert_return (invoke \"f32.convert_i64_s\" (i64.const -1)) (f32.const -1.0))\n(assert_return (invoke \"f32.convert_i64_s\" (i64.const 0)) (f32.const 0.0))\n(assert_return (invoke \"f32.convert_i64_s\" (i64.const 9223372036854775807)) (f32.const 9223372036854775807))\n(assert_return (invoke \"f32.convert_i64_s\" (i64.const -9223372036854775808)) (f32.const -9223372036854775808))\n(assert_return (invoke \"f32.convert_i64_s\" (i64.const 314159265358979)) (f32.const 0x1.1db9e8p+48)) ;; PI\n;; Test rounding directions.\n(assert_return (invoke \"f32.convert_i64_s\" (i64.const 16777217)) (f32.const 16777216.0))\n(assert_return (invoke \"f32.convert_i64_s\" (i64.const -16777217)) (f32.const -16777216.0))\n(assert_return (invoke \"f32.convert_i64_s\" (i64.const 16777219)) (f32.const 16777220.0))\n(assert_return (invoke \"f32.convert_i64_s\" (i64.const -16777219)) (f32.const -16777220.0))\n\n(assert_return (invoke \"f32.convert_i64_s\" (i64.const 0x7fffff4000000001)) (f32.const 0x1.fffffep+62))\n(assert_return (invoke \"f32.convert_i64_s\" (i64.const 0x8000004000000001)) (f32.const -0x1.fffffep+62))\n(assert_return (invoke \"f32.convert_i64_s\" (i64.const 0x0020000020000001)) (f32.const 0x1.000002p+53))\n(assert_return (invoke \"f32.convert_i64_s\" (i64.const 0xffdfffffdfffffff)) (f32.const -0x1.000002p+53))\n\n(assert_return (invoke \"f64.convert_i32_s\" (i32.const 1)) (f64.const 1.0))\n(assert_return (invoke \"f64.convert_i32_s\" (i32.const -1)) (f64.const -1.0))\n(assert_return (invoke \"f64.convert_i32_s\" (i32.const 0)) (f64.const 0.0))\n(assert_return (invoke \"f64.convert_i32_s\" (i32.const 2147483647)) (f64.const 2147483647))\n(assert_return (invoke \"f64.convert_i32_s\" (i32.const -2147483648)) (f64.const -2147483648))\n(assert_return (invoke \"f64.convert_i32_s\" (i32.const 987654321)) (f64.const 987654321))\n\n(assert_return (invoke \"f64.convert_i64_s\" (i64.const 1)) (f64.const 1.0))\n(assert_return (invoke \"f64.convert_i64_s\" (i64.const -1)) (f64.const -1.0))\n(assert_return (invoke \"f64.convert_i64_s\" (i64.const 0)) (f64.const 0.0))\n(assert_return (invoke \"f64.convert_i64_s\" (i64.const 9223372036854775807)) (f64.const 9223372036854775807))\n(assert_return (invoke \"f64.convert_i64_s\" (i64.const -9223372036854775808)) (f64.const -9223372036854775808))\n(assert_return (invoke \"f64.convert_i64_s\" (i64.const 4669201609102990)) (f64.const 4669201609102990)) ;; Feigenbaum\n;; Test rounding directions.\n(assert_return (invoke \"f64.convert_i64_s\" (i64.const 9007199254740993)) (f64.const 9007199254740992))\n(assert_return (invoke \"f64.convert_i64_s\" (i64.const -9007199254740993)) (f64.const -9007199254740992))\n(assert_return (invoke \"f64.convert_i64_s\" (i64.const 9007199254740995)) (f64.const 9007199254740996))\n(assert_return (invoke \"f64.convert_i64_s\" (i64.const -9007199254740995)) (f64.const -9007199254740996))\n\n(assert_return (invoke \"f32.convert_i32_u\" (i32.const 1)) (f32.const 1.0))\n(assert_return (invoke \"f32.convert_i32_u\" (i32.const 0)) (f32.const 0.0))\n(assert_return (invoke \"f32.convert_i32_u\" (i32.const 2147483647)) (f32.const 2147483648))\n(assert_return (invoke \"f32.convert_i32_u\" (i32.const -2147483648)) (f32.const 2147483648))\n(assert_return (invoke \"f32.convert_i32_u\" (i32.const 0x12345678)) (f32.const 0x1.234568p+28))\n(assert_return (invoke \"f32.convert_i32_u\" (i32.const 0xffffffff)) (f32.const 4294967296.0))\n(assert_return (invoke \"f32.convert_i32_u\" (i32.const 0x80000080)) (f32.const 0x1.000000p+31))\n(assert_return (invoke \"f32.convert_i32_u\" (i32.const 0x80000081)) (f32.const 0x1.000002p+31))\n(assert_return (invoke \"f32.convert_i32_u\" (i32.const 0x80000082)) (f32.const 0x1.000002p+31))\n(assert_return (invoke \"f32.convert_i32_u\" (i32.const 0xfffffe80)) (f32.const 0x1.fffffcp+31))\n(assert_return (invoke \"f32.convert_i32_u\" (i32.const 0xfffffe81)) (f32.const 0x1.fffffep+31))\n(assert_return (invoke \"f32.convert_i32_u\" (i32.const 0xfffffe82)) (f32.const 0x1.fffffep+31))\n;; Test rounding directions.\n(assert_return (invoke \"f32.convert_i32_u\" (i32.const 16777217)) (f32.const 16777216.0))\n(assert_return (invoke \"f32.convert_i32_u\" (i32.const 16777219)) (f32.const 16777220.0))\n\n(assert_return (invoke \"f32.convert_i64_u\" (i64.const 1)) (f32.const 1.0))\n(assert_return (invoke \"f32.convert_i64_u\" (i64.const 0)) (f32.const 0.0))\n(assert_return (invoke \"f32.convert_i64_u\" (i64.const 9223372036854775807)) (f32.const 9223372036854775807))\n(assert_return (invoke \"f32.convert_i64_u\" (i64.const -9223372036854775808)) (f32.const 9223372036854775808))\n(assert_return (invoke \"f32.convert_i64_u\" (i64.const 0xffffffffffffffff)) (f32.const 18446744073709551616.0))\n;; Test rounding directions.\n(assert_return (invoke \"f32.convert_i64_u\" (i64.const 16777217)) (f32.const 16777216.0))\n(assert_return (invoke \"f32.convert_i64_u\" (i64.const 16777219)) (f32.const 16777220.0))\n\n(assert_return (invoke \"f32.convert_i64_u\" (i64.const 0x0020000020000001)) (f32.const 0x1.000002p+53))\n(assert_return (invoke \"f32.convert_i64_u\" (i64.const 0x7fffffbfffffffff)) (f32.const 0x1.fffffep+62))\n(assert_return (invoke \"f32.convert_i64_u\" (i64.const 0x8000008000000001)) (f32.const 0x1.000002p+63))\n(assert_return (invoke \"f32.convert_i64_u\" (i64.const 0xfffffe8000000001)) (f32.const 0x1.fffffep+63))\n\n(assert_return (invoke \"f64.convert_i32_u\" (i32.const 1)) (f64.const 1.0))\n(assert_return (invoke \"f64.convert_i32_u\" (i32.const 0)) (f64.const 0.0))\n(assert_return (invoke \"f64.convert_i32_u\" (i32.const 2147483647)) (f64.const 2147483647))\n(assert_return (invoke \"f64.convert_i32_u\" (i32.const -2147483648)) (f64.const 2147483648))\n(assert_return (invoke \"f64.convert_i32_u\" (i32.const 0xffffffff)) (f64.const 4294967295.0))\n\n(assert_return (invoke \"f64.convert_i64_u\" (i64.const 1)) (f64.const 1.0))\n(assert_return (invoke \"f64.convert_i64_u\" (i64.const 0)) (f64.const 0.0))\n(assert_return (invoke \"f64.convert_i64_u\" (i64.const 9223372036854775807)) (f64.const 9223372036854775807))\n(assert_return (invoke \"f64.convert_i64_u\" (i64.const -9223372036854775808)) (f64.const 9223372036854775808))\n(assert_return (invoke \"f64.convert_i64_u\" (i64.const 0xffffffffffffffff)) (f64.const 18446744073709551616.0))\n(assert_return (invoke \"f64.convert_i64_u\" (i64.const 0x8000000000000400)) (f64.const 0x1.0000000000000p+63))\n(assert_return (invoke \"f64.convert_i64_u\" (i64.const 0x8000000000000401)) (f64.const 0x1.0000000000001p+63))\n(assert_return (invoke \"f64.convert_i64_u\" (i64.const 0x8000000000000402)) (f64.const 0x1.0000000000001p+63))\n(assert_return (invoke \"f64.convert_i64_u\" (i64.const 0xfffffffffffff400)) (f64.const 0x1.ffffffffffffep+63))\n(assert_return (invoke \"f64.convert_i64_u\" (i64.const 0xfffffffffffff401)) (f64.const 0x1.fffffffffffffp+63))\n(assert_return (invoke \"f64.convert_i64_u\" (i64.const 0xfffffffffffff402)) (f64.const 0x1.fffffffffffffp+63))\n;; Test rounding directions.\n(assert_return (invoke \"f64.convert_i64_u\" (i64.const 9007199254740993)) (f64.const 9007199254740992))\n(assert_return (invoke \"f64.convert_i64_u\" (i64.const 9007199254740995)) (f64.const 9007199254740996))\n\n(assert_return (invoke \"f64.promote_f32\" (f32.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.promote_f32\" (f32.const -0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.promote_f32\" (f32.const 0x1p-149)) (f64.const 0x1p-149))\n(assert_return (invoke \"f64.promote_f32\" (f32.const -0x1p-149)) (f64.const -0x1p-149))\n(assert_return (invoke \"f64.promote_f32\" (f32.const 1.0)) (f64.const 1.0))\n(assert_return (invoke \"f64.promote_f32\" (f32.const -1.0)) (f64.const -1.0))\n(assert_return (invoke \"f64.promote_f32\" (f32.const -0x1.fffffep+127)) (f64.const -0x1.fffffep+127))\n(assert_return (invoke \"f64.promote_f32\" (f32.const 0x1.fffffep+127)) (f64.const 0x1.fffffep+127))\n;; Generated randomly by picking a random int and reinterpret it to float.\n(assert_return (invoke \"f64.promote_f32\" (f32.const 0x1p-119)) (f64.const 0x1p-119))\n;; Generated randomly by picking a random float.\n(assert_return (invoke \"f64.promote_f32\" (f32.const 0x1.8f867ep+125)) (f64.const 6.6382536710104395e+37))\n(assert_return (invoke \"f64.promote_f32\" (f32.const inf)) (f64.const inf))\n(assert_return (invoke \"f64.promote_f32\" (f32.const -inf)) (f64.const -inf))\n(assert_return (invoke \"f64.promote_f32\" (f32.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.promote_f32\" (f32.const nan:0x200000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"f64.promote_f32\" (f32.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.promote_f32\" (f32.const -nan:0x200000)) (f64.const nan:arithmetic))\n\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x0.0000000000001p-1022)) (f32.const 0.0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -0x0.0000000000001p-1022)) (f32.const -0.0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 1.0)) (f32.const 1.0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -1.0)) (f32.const -1.0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.fffffe0000000p-127)) (f32.const 0x1p-126))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -0x1.fffffe0000000p-127)) (f32.const -0x1p-126))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.fffffdfffffffp-127)) (f32.const 0x1.fffffcp-127))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -0x1.fffffdfffffffp-127)) (f32.const -0x1.fffffcp-127))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.fffffd0000000p+127)) (f32.const 0x1.fffffcp+127))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -0x1.fffffd0000000p+127)) (f32.const -0x1.fffffcp+127))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.fffffd0000001p+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -0x1.fffffd0000001p+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.fffffefffffffp+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -0x1.fffffefffffffp+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.ffffffp+127)) (f32.const inf))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -0x1.ffffffp+127)) (f32.const -inf))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1p-119)) (f32.const 0x1p-119))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.8f867ep+125)) (f32.const 0x1.8f867ep+125))\n(assert_return (invoke \"f32.demote_f64\" (f64.const inf)) (f32.const inf))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -inf)) (f32.const -inf))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.0000000000001p+0)) (f32.const 1.0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.fffffffffffffp-1)) (f32.const 1.0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.0000010000000p+0)) (f32.const 0x1.000000p+0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.0000010000001p+0)) (f32.const 0x1.000002p+0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.000002fffffffp+0)) (f32.const 0x1.000002p+0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.0000030000000p+0)) (f32.const 0x1.000004p+0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.0000050000000p+0)) (f32.const 0x1.000004p+0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.0000010000000p+24)) (f32.const 0x1.0p+24))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.0000010000001p+24)) (f32.const 0x1.000002p+24))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.000002fffffffp+24)) (f32.const 0x1.000002p+24))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.0000030000000p+24)) (f32.const 0x1.000004p+24))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.4eae4f7024c7p+108)) (f32.const 0x1.4eae5p+108))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.a12e71e358685p-113)) (f32.const 0x1.a12e72p-113))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.cb98354d521ffp-127)) (f32.const 0x1.cb9834p-127))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -0x1.6972b30cfb562p+1)) (f32.const -0x1.6972b4p+1))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -0x1.bedbe4819d4c4p+112)) (f32.const -0x1.bedbe4p+112))\n(assert_return (invoke \"f32.demote_f64\" (f64.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"f32.demote_f64\" (f64.const nan:0x4000000000000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -nan:0x4000000000000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1p-1022)) (f32.const 0.0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -0x1p-1022)) (f32.const -0.0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.0p-150)) (f32.const 0.0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -0x1.0p-150)) (f32.const -0.0))\n(assert_return (invoke \"f32.demote_f64\" (f64.const 0x1.0000000000001p-150)) (f32.const 0x1p-149))\n(assert_return (invoke \"f32.demote_f64\" (f64.const -0x1.0000000000001p-150)) (f32.const -0x1p-149))\n\n(assert_return (invoke \"f32.reinterpret_i32\" (i32.const 0)) (f32.const 0.0))\n(assert_return (invoke \"f32.reinterpret_i32\" (i32.const 0x80000000)) (f32.const -0.0))\n(assert_return (invoke \"f32.reinterpret_i32\" (i32.const 1)) (f32.const 0x1p-149))\n(assert_return (invoke \"f32.reinterpret_i32\" (i32.const -1)) (f32.const -nan:0x7fffff))\n(assert_return (invoke \"f32.reinterpret_i32\" (i32.const 123456789)) (f32.const 0x1.b79a2ap-113))\n(assert_return (invoke \"f32.reinterpret_i32\" (i32.const -2147483647)) (f32.const -0x1p-149))\n(assert_return (invoke \"f32.reinterpret_i32\" (i32.const 0x7f800000)) (f32.const inf))\n(assert_return (invoke \"f32.reinterpret_i32\" (i32.const 0xff800000)) (f32.const -inf))\n(assert_return (invoke \"f32.reinterpret_i32\" (i32.const 0x7fc00000)) (f32.const nan))\n(assert_return (invoke \"f32.reinterpret_i32\" (i32.const 0xffc00000)) (f32.const -nan))\n(assert_return (invoke \"f32.reinterpret_i32\" (i32.const 0x7fa00000)) (f32.const nan:0x200000))\n(assert_return (invoke \"f32.reinterpret_i32\" (i32.const 0xffa00000)) (f32.const -nan:0x200000))\n\n(assert_return (invoke \"f64.reinterpret_i64\" (i64.const 0)) (f64.const 0.0))\n(assert_return (invoke \"f64.reinterpret_i64\" (i64.const 1)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"f64.reinterpret_i64\" (i64.const -1)) (f64.const -nan:0xfffffffffffff))\n(assert_return (invoke \"f64.reinterpret_i64\" (i64.const 0x8000000000000000)) (f64.const -0.0))\n(assert_return (invoke \"f64.reinterpret_i64\" (i64.const 1234567890)) (f64.const 0x0.00000499602d2p-1022))\n(assert_return (invoke \"f64.reinterpret_i64\" (i64.const -9223372036854775807)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"f64.reinterpret_i64\" (i64.const 0x7ff0000000000000)) (f64.const inf))\n(assert_return (invoke \"f64.reinterpret_i64\" (i64.const 0xfff0000000000000)) (f64.const -inf))\n(assert_return (invoke \"f64.reinterpret_i64\" (i64.const 0x7ff8000000000000)) (f64.const nan))\n(assert_return (invoke \"f64.reinterpret_i64\" (i64.const 0xfff8000000000000)) (f64.const -nan))\n(assert_return (invoke \"f64.reinterpret_i64\" (i64.const 0x7ff4000000000000)) (f64.const nan:0x4000000000000))\n(assert_return (invoke \"f64.reinterpret_i64\" (i64.const 0xfff4000000000000)) (f64.const -nan:0x4000000000000))\n\n(assert_return (invoke \"i32.reinterpret_f32\" (f32.const 0.0)) (i32.const 0))\n(assert_return (invoke \"i32.reinterpret_f32\" (f32.const -0.0)) (i32.const 0x80000000))\n(assert_return (invoke \"i32.reinterpret_f32\" (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"i32.reinterpret_f32\" (f32.const -nan:0x7fffff)) (i32.const -1))\n(assert_return (invoke \"i32.reinterpret_f32\" (f32.const -0x1p-149)) (i32.const 0x80000001))\n(assert_return (invoke \"i32.reinterpret_f32\" (f32.const 1.0)) (i32.const 1065353216))\n(assert_return (invoke \"i32.reinterpret_f32\" (f32.const 3.1415926)) (i32.const 1078530010))\n(assert_return (invoke \"i32.reinterpret_f32\" (f32.const 0x1.fffffep+127)) (i32.const 2139095039))\n(assert_return (invoke \"i32.reinterpret_f32\" (f32.const -0x1.fffffep+127)) (i32.const -8388609))\n(assert_return (invoke \"i32.reinterpret_f32\" (f32.const inf)) (i32.const 0x7f800000))\n(assert_return (invoke \"i32.reinterpret_f32\" (f32.const -inf)) (i32.const 0xff800000))\n(assert_return (invoke \"i32.reinterpret_f32\" (f32.const nan)) (i32.const 0x7fc00000))\n(assert_return (invoke \"i32.reinterpret_f32\" (f32.const -nan)) (i32.const 0xffc00000))\n(assert_return (invoke \"i32.reinterpret_f32\" (f32.const nan:0x200000)) (i32.const 0x7fa00000))\n(assert_return (invoke \"i32.reinterpret_f32\" (f32.const -nan:0x200000)) (i32.const 0xffa00000))\n\n(assert_return (invoke \"i64.reinterpret_f64\" (f64.const 0.0)) (i64.const 0))\n(assert_return (invoke \"i64.reinterpret_f64\" (f64.const -0.0)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"i64.reinterpret_f64\" (f64.const 0x0.0000000000001p-1022)) (i64.const 1))\n(assert_return (invoke \"i64.reinterpret_f64\" (f64.const -nan:0xfffffffffffff)) (i64.const -1))\n(assert_return (invoke \"i64.reinterpret_f64\" (f64.const -0x0.0000000000001p-1022)) (i64.const 0x8000000000000001))\n(assert_return (invoke \"i64.reinterpret_f64\" (f64.const 1.0)) (i64.const 4607182418800017408))\n(assert_return (invoke \"i64.reinterpret_f64\" (f64.const 3.14159265358979)) (i64.const 4614256656552045841))\n(assert_return (invoke \"i64.reinterpret_f64\" (f64.const 0x1.fffffffffffffp+1023)) (i64.const 9218868437227405311))\n(assert_return (invoke \"i64.reinterpret_f64\" (f64.const -0x1.fffffffffffffp+1023)) (i64.const -4503599627370497))\n(assert_return (invoke \"i64.reinterpret_f64\" (f64.const inf)) (i64.const 0x7ff0000000000000))\n(assert_return (invoke \"i64.reinterpret_f64\" (f64.const -inf)) (i64.const 0xfff0000000000000))\n(assert_return (invoke \"i64.reinterpret_f64\" (f64.const nan)) (i64.const 0x7ff8000000000000))\n(assert_return (invoke \"i64.reinterpret_f64\" (f64.const -nan)) (i64.const 0xfff8000000000000))\n(assert_return (invoke \"i64.reinterpret_f64\" (f64.const nan:0x4000000000000)) (i64.const 0x7ff4000000000000))\n(assert_return (invoke \"i64.reinterpret_f64\" (f64.const -nan:0x4000000000000)) (i64.const 0xfff4000000000000))\n\n;; Type check\n\n(assert_invalid (module (func (result i32) (i32.wrap_i64 (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.trunc_f32_s (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.trunc_f32_u (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.trunc_f64_s (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.trunc_f64_u (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.reinterpret_f32 (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.extend_i32_s (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.extend_i32_u (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.trunc_f32_s (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.trunc_f32_u (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.trunc_f64_s (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.trunc_f64_u (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.reinterpret_f64 (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.convert_i32_s (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.convert_i32_u (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.convert_i64_s (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.convert_i64_u (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.demote_f64 (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.reinterpret_i32 (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.convert_i32_s (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.convert_i32_u (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.convert_i64_s (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.convert_i64_u (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.promote_f32 (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.reinterpret_i64 (i32.const 0)))) \"type mismatch\")\n"
  },
  {
    "path": "test/core/custom.wast",
    "content": "(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\00\\24\\10\" \"a custom section\" \"this is the payload\"\n  \"\\00\\20\\10\" \"a custom section\" \"this is payload\"\n  \"\\00\\11\\10\" \"a custom section\" \"\"\n  \"\\00\\10\\00\" \"\" \"this is payload\"\n  \"\\00\\01\\00\" \"\" \"\"\n  \"\\00\\24\\10\" \"\\00\\00custom sectio\\00\" \"this is the payload\"\n  \"\\00\\24\\10\" \"\\ef\\bb\\bfa custom sect\" \"this is the payload\"\n  \"\\00\\24\\10\" \"a custom sect\\e2\\8c\\a3\" \"this is the payload\"\n  \"\\00\\1f\\16\" \"module within a module\" \"\\00asm\" \"\\01\\00\\00\\00\"\n)\n\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\01\\01\\00\"  ;; type section\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\02\\01\\00\"  ;; import section\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\03\\01\\00\"  ;; function section\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\04\\01\\00\"  ;; table section\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\05\\01\\00\"  ;; memory section\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\06\\01\\00\"  ;; global section\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\07\\01\\00\"  ;; export section\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\09\\01\\00\"  ;; element section\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\0a\\01\\00\"  ;; code section\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\0b\\01\\00\"  ;; data section\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n  \"\\00\\0e\\06\" \"custom\" \"payload\"\n)\n\n(module binary\n  \"\\00asm\" \"\\01\\00\\00\\00\"\n  \"\\01\\07\\01\\60\\02\\7f\\7f\\01\\7f\"                ;; type section\n  \"\\00\\1a\\06\" \"custom\" \"this is the payload\"   ;; custom section\n  \"\\03\\02\\01\\00\"                               ;; function section\n  \"\\07\\0a\\01\\06\\61\\64\\64\\54\\77\\6f\\00\\00\"       ;; export section\n  \"\\0a\\09\\01\\07\\00\\20\\00\\20\\01\\6a\\0b\"          ;; code section\n  \"\\00\\1b\\07\" \"custom2\" \"this is the payload\"  ;; custom section\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\"\n  )\n  \"unexpected end\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\00\"\n  )\n  \"unexpected end\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\00\\00\\05\\01\\00\\07\\00\\00\"\n  )\n  \"unexpected end\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\26\\10\" \"a custom section\" \"this is the payload\"\n  )\n  \"unexpected end\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\25\\10\" \"a custom section\" \"this is the payload\"\n    \"\\00\\24\\10\" \"a custom section\" \"this is the payload\"\n  )\n  \"malformed section id\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\01\\07\\01\\60\\02\\7f\\7f\\01\\7f\"                         ;; type section\n    \"\\00\\25\\10\" \"a custom section\" \"this is the payload\"  ;; wrong length!\n    \"\\03\\02\\01\\00\"                                        ;; function section\n    \"\\0a\\09\\01\\07\\00\\20\\00\\20\\01\\6a\\0b\"                   ;; code section\n    \"\\00\\1b\\07\" \"custom2\" \"this is the payload\"           ;; custom section\n  )\n  \"function and code section have inconsistent lengths\"\n)\n\n;; Test concatenated modules.\n(assert_malformed\n  (module binary\n    \"\\00asm\\01\\00\\00\\00\"\n    \"\\00asm\\01\\00\\00\\00\"\n  )\n  \"length out of bounds\"\n)\n\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\03\\01\\00\\01\"                         ;; memory section\n    \"\\0c\\01\\02\"                               ;; data count section (2 segments)\n    \"\\0b\\06\\01\\00\\41\\00\\0b\\00\"                ;; data section (1 segment)\n  )\n  \"data count and data section have inconsistent lengths\"\n)\n"
  },
  {
    "path": "test/core/data.wast",
    "content": ";; Test the data section\n\n;; Syntax\n\n(module\n  (memory $m 1)\n  (data (i32.const 0))\n  (data (i32.const 1) \"a\" \"\" \"bcd\")\n  (data (offset (i32.const 0)))\n  (data (offset (i32.const 0)) \"\" \"a\" \"bc\" \"\")\n  (data (memory 0) (i32.const 0))\n  (data (memory 0x0) (i32.const 1) \"a\" \"\" \"bcd\")\n  (data (memory 0x000) (offset (i32.const 0)))\n  (data (memory 0) (offset (i32.const 0)) \"\" \"a\" \"bc\" \"\")\n  (data (memory $m) (i32.const 0))\n  (data (memory $m) (i32.const 1) \"a\" \"\" \"bcd\")\n  (data (memory $m) (offset (i32.const 0)))\n  (data (memory $m) (offset (i32.const 0)) \"\" \"a\" \"bc\" \"\")\n  (data $d1 (i32.const 0))\n  (data $d2 (i32.const 1) \"a\" \"\" \"bcd\")\n  (data $d3 (offset (i32.const 0)))\n  (data $d4 (offset (i32.const 0)) \"\" \"a\" \"bc\" \"\")\n  (data $d5 (memory 0) (i32.const 0))\n  (data $d6 (memory 0x0) (i32.const 1) \"a\" \"\" \"bcd\")\n  (data $d7 (memory 0x000) (offset (i32.const 0)))\n  (data $d8 (memory 0) (offset (i32.const 0)) \"\" \"a\" \"bc\" \"\")\n  (data $d9 (memory $m) (i32.const 0))\n  (data $d10 (memory $m) (i32.const 1) \"a\" \"\" \"bcd\")\n  (data $d11 (memory $m) (offset (i32.const 0)))\n  (data $d12 (memory $m) (offset (i32.const 0)) \"\" \"a\" \"bc\" \"\")\n)\n\n;; Basic use\n\n(module\n  (memory 1)\n  (data (i32.const 0) \"a\")\n)\n(module\n  (import \"spectest\" \"memory\" (memory 1))\n  (data (i32.const 0) \"a\")\n)\n\n(module\n  (memory 1)\n  (data (i32.const 0) \"a\")\n  (data (i32.const 3) \"b\")\n  (data (i32.const 100) \"cde\")\n  (data (i32.const 5) \"x\")\n  (data (i32.const 3) \"c\")\n)\n(module\n  (import \"spectest\" \"memory\" (memory 1))\n  (data (i32.const 0) \"a\")\n  (data (i32.const 1) \"b\")\n  (data (i32.const 2) \"cde\")\n  (data (i32.const 3) \"f\")\n  (data (i32.const 2) \"g\")\n  (data (i32.const 1) \"h\")\n)\n\n(module\n  (global (import \"spectest\" \"global_i32\") i32)\n  (memory 1)\n  (data (global.get 0) \"a\")\n)\n(module\n  (global (import \"spectest\" \"global_i32\") i32)\n  (import \"spectest\" \"memory\" (memory 1))\n  (data (global.get 0) \"a\")\n)\n\n(module\n  (global $g (import \"spectest\" \"global_i32\") i32)\n  (memory 1)\n  (data (global.get $g) \"a\")\n)\n(module\n  (global $g (import \"spectest\" \"global_i32\") i32)\n  (import \"spectest\" \"memory\" (memory 1))\n  (data (global.get $g) \"a\")\n)\n\n;; Use of internal globals in constant expressions is not allowed in MVP.\n;; (module (memory 1) (data (global.get 0) \"a\") (global i32 (i32.const 0)))\n;; (module (memory 1) (data (global.get $g) \"a\") (global $g i32 (i32.const 0)))\n\n;; Corner cases\n\n(module\n  (memory 1)\n  (data (i32.const 0) \"a\")\n  (data (i32.const 0xffff) \"b\")\n)\n(module\n  (import \"spectest\" \"memory\" (memory 1))\n  (data (i32.const 0) \"a\")\n  (data (i32.const 0xffff) \"b\")\n)\n\n(module\n  (memory 2)\n  (data (i32.const 0x1_ffff) \"a\")\n)\n\n(module\n  (memory 0)\n  (data (i32.const 0))\n)\n(module\n  (import \"spectest\" \"memory\" (memory 0))\n  (data (i32.const 0))\n)\n\n(module\n  (memory 0 0)\n  (data (i32.const 0))\n)\n\n(module\n  (memory 1)\n  (data (i32.const 0x1_0000) \"\")\n)\n\n(module\n  (memory 0)\n  (data (i32.const 0) \"\" \"\")\n)\n(module\n  (import \"spectest\" \"memory\" (memory 0))\n  (data (i32.const 0) \"\" \"\")\n)\n\n(module\n  (memory 0 0)\n  (data (i32.const 0) \"\" \"\")\n)\n\n(module\n  (import \"spectest\" \"memory\" (memory 0))\n  (data (i32.const 0) \"a\")\n)\n\n(module\n  (import \"spectest\" \"memory\" (memory 0 3))\n  (data (i32.const 0) \"a\")\n)\n\n(module\n  (global (import \"spectest\" \"global_i32\") i32)\n  (import \"spectest\" \"memory\" (memory 0))\n  (data (global.get 0) \"a\")\n)\n\n(module\n  (global (import \"spectest\" \"global_i32\") i32)\n  (import \"spectest\" \"memory\" (memory 0 3))\n  (data (global.get 0) \"a\")\n)\n\n(module\n  (import \"spectest\" \"memory\" (memory 0))\n  (data (i32.const 1) \"a\")\n)\n\n(module\n  (import \"spectest\" \"memory\" (memory 0 3))\n  (data (i32.const 1) \"a\")\n)\n\n;; Invalid bounds for data\n\n(assert_trap\n  (module\n    (memory 0)\n    (data (i32.const 0) \"a\")\n  )\n  \"out of bounds memory access\"\n)\n\n(assert_trap\n  (module\n    (memory 0 0)\n    (data (i32.const 0) \"a\")\n  )\n  \"out of bounds memory access\"\n)\n\n(assert_trap\n  (module\n    (memory 0 1)\n    (data (i32.const 0) \"a\")\n  )\n  \"out of bounds memory access\"\n)\n(assert_trap\n  (module\n    (memory 0)\n    (data (i32.const 1))\n  )\n  \"out of bounds memory access\"\n)\n(assert_trap\n  (module\n    (memory 0 1)\n    (data (i32.const 1))\n  )\n  \"out of bounds memory access\"\n)\n\n;; This seems to cause a time-out on Travis.\n(;assert_unlinkable\n  (module\n    (memory 0x10000)\n    (data (i32.const 0xffffffff) \"ab\")\n  )\n  \"\"  ;; either out of memory or out of bounds\n;)\n\n(assert_trap\n  (module\n    (global (import \"spectest\" \"global_i32\") i32)\n    (memory 0)\n    (data (global.get 0) \"a\")\n  )\n  \"out of bounds memory access\"\n)\n\n(assert_trap\n  (module\n    (memory 1 2)\n    (data (i32.const 0x1_0000) \"a\")\n  )\n  \"out of bounds memory access\"\n)\n(assert_trap\n  (module\n    (import \"spectest\" \"memory\" (memory 1))\n    (data (i32.const 0x1_0000) \"a\")\n  )\n  \"out of bounds memory access\"\n)\n\n(assert_trap\n  (module\n    (memory 2)\n    (data (i32.const 0x2_0000) \"a\")\n  )\n  \"out of bounds memory access\"\n)\n\n(assert_trap\n  (module\n    (memory 2 3)\n    (data (i32.const 0x2_0000) \"a\")\n  )\n  \"out of bounds memory access\"\n)\n\n(assert_trap\n  (module\n    (memory 1)\n    (data (i32.const -1) \"a\")\n  )\n  \"out of bounds memory access\"\n)\n(assert_trap\n  (module\n    (import \"spectest\" \"memory\" (memory 1))\n    (data (i32.const -1) \"a\")\n  )\n  \"out of bounds memory access\"\n)\n\n(assert_trap\n  (module\n    (memory 2)\n    (data (i32.const -100) \"a\")\n  )\n  \"out of bounds memory access\"\n)\n(assert_trap\n  (module\n    (import \"spectest\" \"memory\" (memory 1))\n    (data (i32.const -100) \"a\")\n  )\n  \"out of bounds memory access\"\n)\n\n;; Data without memory\n\n(assert_invalid\n  (module\n    (data (i32.const 0) \"\")\n  )\n  \"unknown memory\"\n)\n\n;; Data segment with memory index 1 (only memory 0 available)\n(assert_invalid\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\03\\01\"                             ;; memory section\n    \"\\00\\00\"                                ;; memory 0\n    \"\\0b\\07\\01\"                             ;; data section\n    \"\\02\\01\\41\\00\\0b\"                       ;; active data segment 0 for memory 1\n    \"\\00\"                                   ;; empty vec(byte)\n  )\n  \"unknown memory 1\"\n)\n\n;; Data segment with memory index 0 (no memory section)\n(assert_invalid\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\0b\\06\\01\"                             ;; data section\n    \"\\00\\41\\00\\0b\"                          ;; active data segment 0 for memory 0\n    \"\\00\"                                   ;; empty vec(byte)\n  )\n  \"unknown memory 0\"\n)\n\n;; Data segment with memory index 1 (no memory section)\n(assert_invalid\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\0b\\07\\01\"                             ;; data section\n    \"\\02\\01\\41\\00\\0b\"                       ;; active data segment 0 for memory 1\n    \"\\00\"                                   ;; empty vec(byte)\n  )\n  \"unknown memory 1\"\n)\n\n;; Data segment with memory index 1 and vec(byte) as above,\n;; only memory 0 available.\n(assert_invalid\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\05\\03\\01\"                             ;; memory section\n    \"\\00\\00\"                                ;; memory 0\n    \"\\0b\\45\\01\"                             ;; data section\n    \"\\02\"                                   ;; active segment\n    \"\\01\"                                   ;; memory index\n    \"\\41\\00\\0b\"                             ;; offset constant expression\n    \"\\3e\"                                   ;; vec(byte) length\n    \"\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\"\n    \"\\10\\11\\12\\13\\14\\15\\16\\17\\18\\19\\1a\\1b\\1c\\1d\\1e\\1f\"\n    \"\\20\\21\\22\\23\\24\\25\\26\\27\\28\\29\\2a\\2b\\2c\\2d\\2e\\2f\"\n    \"\\30\\31\\32\\33\\34\\35\\36\\37\\38\\39\\3a\\3b\\3c\\3d\"\n  )\n  \"unknown memory 1\"\n)\n\n;; Data segment with memory index 1 and specially crafted vec(byte) after.\n;; This is to detect incorrect validation where memory index is interpreted\n;; as a flag followed by \"\\41\" interpreted as the size of vec(byte)\n;; with the expected number of bytes following.\n(assert_invalid\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\0b\\45\\01\"                             ;; data section\n    \"\\02\"                                   ;; active segment\n    \"\\01\"                                   ;; memory index\n    \"\\41\\00\\0b\"                             ;; offset constant expression\n    \"\\3e\"                                   ;; vec(byte) length\n    \"\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\"\n    \"\\10\\11\\12\\13\\14\\15\\16\\17\\18\\19\\1a\\1b\\1c\\1d\\1e\\1f\"\n    \"\\20\\21\\22\\23\\24\\25\\26\\27\\28\\29\\2a\\2b\\2c\\2d\\2e\\2f\"\n    \"\\30\\31\\32\\33\\34\\35\\36\\37\\38\\39\\3a\\3b\\3c\\3d\"\n  )\n  \"unknown memory 1\"\n)\n\n\n;; Invalid offsets\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data (i64.const 0))\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module \n    (memory 1)\n    (data (offset (;empty instruction sequence;)))\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data (offset (i32.const 0) (i32.const 0)))\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (global (import \"test\" \"global-i32\") i32)\n    (memory 1)\n    (data (offset (global.get 0) (global.get 0)))\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (global (import \"test\" \"global-i32\") i32)\n    (memory 1)\n    (data (offset (global.get 0) (i32.const 0)))\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data (i32.ctz (i32.const 0)))\n  )\n  \"constant expression required\"\n)\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data (nop))\n  )\n  \"constant expression required\"\n)\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data (offset (nop) (i32.const 0)))\n  )\n  \"constant expression required\"\n)\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data (offset (i32.const 0) (nop)))\n  )\n  \"constant expression required\"\n)\n\n;; Use of internal globals in constant expressions is not allowed in MVP.\n;; (assert_invalid\n;;   (module (memory 1) (data (global.get $g)) (global $g (mut i32) (i32.const 0)))\n;;   \"constant expression required\"\n;; )\n\n(assert_invalid\n   (module \n     (memory 1)\n     (data (global.get 0))\n   )\n   \"unknown global 0\"\n)\n\n(assert_invalid\n   (module\n     (global (import \"test\" \"global-i32\") i32)\n     (memory 1)\n     (data (global.get 1))\n   )\n   \"unknown global 1\"\n)\n\n(assert_invalid\n   (module \n     (global (import \"test\" \"global-mut-i32\") (mut i32))\n     (memory 1)\n     (data (global.get 0))\n   )\n   \"constant expression required\"\n)\n"
  },
  {
    "path": "test/core/elem.wast",
    "content": ";; Test the element section\n\n;; Syntax\n(module\n  (table $t 10 funcref)\n  (func $f)\n  (func $g)\n\n  ;; Passive\n  (elem funcref)\n  (elem funcref (ref.func $f) (item ref.func $f) (item (ref.null func)) (ref.func $g))\n  (elem func)\n  (elem func $f $f $g $g)\n\n  (elem $p1 funcref)\n  (elem $p2 funcref (ref.func $f) (ref.func $f) (ref.null func) (ref.func $g))\n  (elem $p3 func)\n  (elem $p4 func $f $f $g $g)\n\n  ;; Active\n  (elem (table $t) (i32.const 0) funcref)\n  (elem (table $t) (i32.const 0) funcref (ref.func $f) (ref.null func))\n  (elem (table $t) (i32.const 0) func)\n  (elem (table $t) (i32.const 0) func $f $g)\n  (elem (table $t) (offset (i32.const 0)) funcref)\n  (elem (table $t) (offset (i32.const 0)) func $f $g)\n  (elem (table 0) (i32.const 0) func)\n  (elem (table 0x0) (i32.const 0) func $f $f)\n  (elem (table 0x000) (offset (i32.const 0)) func)\n  (elem (table 0) (offset (i32.const 0)) func $f $f)\n  (elem (table $t) (i32.const 0) func)\n  (elem (table $t) (i32.const 0) func $f $f)\n  (elem (table $t) (offset (i32.const 0)) func)\n  (elem (table $t) (offset (i32.const 0)) func $f $f)\n  (elem (offset (i32.const 0)))\n  (elem (offset (i32.const 0)) funcref (ref.func $f) (ref.null func))\n  (elem (offset (i32.const 0)) func $f $f)\n  (elem (offset (i32.const 0)) $f $f)\n  (elem (i32.const 0))\n  (elem (i32.const 0) funcref (ref.func $f) (ref.null func))\n  (elem (i32.const 0) func $f $f)\n  (elem (i32.const 0) $f $f)\n\n  (elem $a1 (table $t) (i32.const 0) funcref)\n  (elem $a2 (table $t) (i32.const 0) funcref (ref.func $f) (ref.null func))\n  (elem $a3 (table $t) (i32.const 0) func)\n  (elem $a4 (table $t) (i32.const 0) func $f $g)\n  (elem $a9 (table $t) (offset (i32.const 0)) funcref)\n  (elem $a10 (table $t) (offset (i32.const 0)) func $f $g)\n  (elem $a11 (table 0) (i32.const 0) func)\n  (elem $a12 (table 0x0) (i32.const 0) func $f $f)\n  (elem $a13 (table 0x000) (offset (i32.const 0)) func)\n  (elem $a14 (table 0) (offset (i32.const 0)) func $f $f)\n  (elem $a15 (table $t) (i32.const 0) func)\n  (elem $a16 (table $t) (i32.const 0) func $f $f)\n  (elem $a17 (table $t) (offset (i32.const 0)) func)\n  (elem $a18 (table $t) (offset (i32.const 0)) func $f $f)\n  (elem $a19 (offset (i32.const 0)))\n  (elem $a20 (offset (i32.const 0)) funcref (ref.func $f) (ref.null func))\n  (elem $a21 (offset (i32.const 0)) func $f $f)\n  (elem $a22 (offset (i32.const 0)) $f $f)\n  (elem $a23 (i32.const 0))\n  (elem $a24 (i32.const 0) funcref (ref.func $f) (ref.null func))\n  (elem $a25 (i32.const 0) func $f $f)\n  (elem $a26 (i32.const 0) $f $f)\n\n  ;; Declarative\n  (elem declare funcref)\n  (elem declare funcref (ref.func $f) (ref.func $f) (ref.null func) (ref.func $g))\n  (elem declare func)\n  (elem declare func $f $f $g $g)\n\n  (elem $d1 declare funcref)\n  (elem $d2 declare funcref (ref.func $f) (ref.func $f) (ref.null func) (ref.func $g))\n  (elem $d3 declare func)\n  (elem $d4 declare func $f $f $g $g)\n)\n\n(module\n  (func $f)\n  (func $g)\n\n  (table $t funcref (elem (ref.func $f) (ref.null func) (ref.func $g)))\n)\n\n\n;; Basic use\n\n(module\n  (table 10 funcref)\n  (func $f)\n  (elem (i32.const 0) $f)\n)\n(module\n  (import \"spectest\" \"table\" (table 10 funcref))\n  (func $f)\n  (elem (i32.const 0) $f)\n)\n\n(module\n  (table 10 funcref)\n  (func $f)\n  (elem (i32.const 0) $f)\n  (elem (i32.const 3) $f)\n  (elem (i32.const 7) $f)\n  (elem (i32.const 5) $f)\n  (elem (i32.const 3) $f)\n)\n(module\n  (import \"spectest\" \"table\" (table 10 funcref))\n  (func $f)\n  (elem (i32.const 9) $f)\n  (elem (i32.const 3) $f)\n  (elem (i32.const 7) $f)\n  (elem (i32.const 3) $f)\n  (elem (i32.const 5) $f)\n)\n\n(module\n  (global (import \"spectest\" \"global_i32\") i32)\n  (table 1000 funcref)\n  (func $f)\n  (elem (global.get 0) $f)\n)\n\n(module\n  (global $g (import \"spectest\" \"global_i32\") i32)\n  (table 1000 funcref)\n  (func $f)\n  (elem (global.get $g) $f)\n)\n\n(module\n  (type $out-i32 (func (result i32)))\n  (table 10 funcref)\n  (elem (i32.const 7) $const-i32-a)\n  (elem (i32.const 9) $const-i32-b)\n  (func $const-i32-a (type $out-i32) (i32.const 65))\n  (func $const-i32-b (type $out-i32) (i32.const 66))\n  (func (export \"call-7\") (type $out-i32)\n    (call_indirect (type $out-i32) (i32.const 7))\n  )\n  (func (export \"call-9\") (type $out-i32)\n    (call_indirect (type $out-i32) (i32.const 9))\n  )\n)\n(assert_return (invoke \"call-7\") (i32.const 65))\n(assert_return (invoke \"call-9\") (i32.const 66))\n\n;; Corner cases\n\n(module\n  (table 10 funcref)\n  (func $f)\n  (elem (i32.const 9) $f)\n)\n(module\n  (import \"spectest\" \"table\" (table 10 funcref))\n  (func $f)\n  (elem (i32.const 9) $f)\n)\n\n(module\n  (table 0 funcref)\n  (elem (i32.const 0))\n)\n(module\n  (import \"spectest\" \"table\" (table 0 funcref))\n  (elem (i32.const 0))\n)\n\n(module\n  (table 0 0 funcref)\n  (elem (i32.const 0))\n)\n\n(module\n  (table 20 funcref)\n  (elem (i32.const 20))\n)\n\n(module\n  (import \"spectest\" \"table\" (table 0 funcref))\n  (func $f)\n  (elem (i32.const 0) $f)\n)\n\n(module\n  (import \"spectest\" \"table\" (table 0 100 funcref))\n  (func $f)\n  (elem (i32.const 0) $f)\n)\n\n(module\n  (import \"spectest\" \"table\" (table 0 funcref))\n  (func $f)\n  (elem (i32.const 1) $f)\n)\n\n(module\n  (import \"spectest\" \"table\" (table 0 30 funcref))\n  (func $f)\n  (elem (i32.const 1) $f)\n)\n\n;; Invalid bounds for elements\n\n(assert_trap\n  (module\n    (table 0 funcref)\n    (func $f)\n    (elem (i32.const 0) $f)\n  )\n  \"out of bounds table access\"\n)\n\n(assert_trap\n  (module\n    (table 0 0 funcref)\n    (func $f)\n    (elem (i32.const 0) $f)\n  )\n  \"out of bounds table access\"\n)\n\n(assert_trap\n  (module\n    (table 0 1 funcref)\n    (func $f)\n    (elem (i32.const 0) $f)\n  )\n  \"out of bounds table access\"\n)\n\n(assert_trap\n  (module\n    (table 0 funcref)\n    (elem (i32.const 1))\n  )\n  \"out of bounds table access\"\n)\n(assert_trap\n  (module\n    (table 10 funcref)\n    (func $f)\n    (elem (i32.const 10) $f)\n  )\n  \"out of bounds table access\"\n)\n(assert_trap\n  (module\n    (import \"spectest\" \"table\" (table 10 funcref))\n    (func $f)\n    (elem (i32.const 10) $f)\n  )\n  \"out of bounds table access\"\n)\n\n(assert_trap\n  (module\n    (table 10 20 funcref)\n    (func $f)\n    (elem (i32.const 10) $f)\n  )\n  \"out of bounds table access\"\n)\n(assert_trap\n  (module\n    (import \"spectest\" \"table\" (table 10 funcref))\n    (func $f)\n    (elem (i32.const 10) $f)\n  )\n  \"out of bounds table access\"\n)\n\n(assert_trap\n  (module\n    (table 10 funcref)\n    (func $f)\n    (elem (i32.const -1) $f)\n  )\n  \"out of bounds table access\"\n)\n(assert_trap\n  (module\n    (import \"spectest\" \"table\" (table 10 funcref))\n    (func $f)\n    (elem (i32.const -1) $f)\n  )\n  \"out of bounds table access\"\n)\n\n(assert_trap\n  (module\n    (table 10 funcref)\n    (func $f)\n    (elem (i32.const -10) $f)\n  )\n  \"out of bounds table access\"\n)\n(assert_trap\n  (module\n    (import \"spectest\" \"table\" (table 10 funcref))\n    (func $f)\n    (elem (i32.const -10) $f)\n  )\n  \"out of bounds table access\"\n)\n\n;; Implicitly dropped elements\n\n(module\n  (table 10 funcref)\n  (elem $e (i32.const 0) func $f)\n  (func $f)\n  (func (export \"init\")\n    (table.init $e (i32.const 0) (i32.const 0) (i32.const 1))\n  )\n)\n(assert_trap (invoke \"init\") \"out of bounds table access\")\n\n(module\n  (table 10 funcref)\n  (elem $e declare func $f)\n  (func $f)\n  (func (export \"init\")\n    (table.init $e (i32.const 0) (i32.const 0) (i32.const 1))\n  )\n)\n(assert_trap (invoke \"init\") \"out of bounds table access\")\n\n;; Element without table\n\n(assert_invalid\n  (module\n    (func $f)\n    (elem (i32.const 0) $f)\n  )\n  \"unknown table\"\n)\n\n;; Invalid offsets\n\n(assert_invalid\n  (module\n    (table 1 funcref)\n    (elem (i64.const 0))\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module \n    (table 1 funcref)\n    (elem (offset (;empty instruction sequence;)))\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (table 1 funcref)\n    (elem (offset (i32.const 0) (i32.const 0)))\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (global (import \"test\" \"global-i32\") i32)\n    (table 1 funcref)\n    (elem (offset (global.get 0) (global.get 0)))\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (global (import \"test\" \"global-i32\") i32)\n    (table 1 funcref)\n    (elem (offset (global.get 0) (i32.const 0)))\n  )\n  \"type mismatch\"\n)\n\n\n(assert_invalid\n  (module\n    (table 1 funcref)\n    (elem (i32.ctz (i32.const 0)))\n  )\n  \"constant expression required\"\n)\n\n(assert_invalid\n  (module\n    (table 1 funcref)\n    (elem (nop))\n  )\n  \"constant expression required\"\n)\n\n(assert_invalid\n  (module\n    (table 1 funcref)\n    (elem (offset (nop) (i32.const 0)))\n  )\n  \"constant expression required\"\n)\n\n(assert_invalid\n  (module\n    (table 1 funcref)\n    (elem (offset (i32.const 0) (nop)))\n  )\n  \"constant expression required\"\n)\n\n;; Use of internal globals in constant expressions is not allowed in MVP.\n;; (assert_invalid\n;;   (module (memory 1) (data (global.get $g)) (global $g (mut i32) (i32.const 0)))\n;;   \"constant expression required\"\n;; )\n\n(assert_invalid\n   (module \n     (table 1 funcref)\n     (elem (global.get 0))\n   )\n   \"unknown global 0\"\n)\n\n(assert_invalid\n   (module\n     (global (import \"test\" \"global-i32\") i32)\n     (table 1 funcref)\n     (elem (global.get 1))\n   )\n   \"unknown global 1\"\n)\n\n(assert_invalid\n   (module \n     (global (import \"test\" \"global-mut-i32\") (mut i32))\n     (table 1 funcref)\n     (elem (global.get 0))\n   )\n   \"constant expression required\"\n)\n\n;; Two elements target the same slot\n\n(module\n  (type $out-i32 (func (result i32)))\n  (table 10 funcref)\n  (elem (i32.const 9) $const-i32-a)\n  (elem (i32.const 9) $const-i32-b)\n  (func $const-i32-a (type $out-i32) (i32.const 65))\n  (func $const-i32-b (type $out-i32) (i32.const 66))\n  (func (export \"call-overwritten\") (type $out-i32)\n    (call_indirect (type $out-i32) (i32.const 9))\n  )\n)\n(assert_return (invoke \"call-overwritten\") (i32.const 66))\n\n(module\n  (type $out-i32 (func (result i32)))\n  (import \"spectest\" \"table\" (table 10 funcref))\n  (elem (i32.const 9) $const-i32-a)\n  (elem (i32.const 9) $const-i32-b)\n  (func $const-i32-a (type $out-i32) (i32.const 65))\n  (func $const-i32-b (type $out-i32) (i32.const 66))\n  (func (export \"call-overwritten-element\") (type $out-i32)\n    (call_indirect (type $out-i32) (i32.const 9))\n  )\n)\n(assert_return (invoke \"call-overwritten-element\") (i32.const 66))\n\n;; Element sections across multiple modules change the same table\n\n(module $module1\n  (type $out-i32 (func (result i32)))\n  (table (export \"shared-table\") 10 funcref)\n  (elem (i32.const 8) $const-i32-a)\n  (elem (i32.const 9) $const-i32-b)\n  (func $const-i32-a (type $out-i32) (i32.const 65))\n  (func $const-i32-b (type $out-i32) (i32.const 66))\n  (func (export \"call-7\") (type $out-i32)\n    (call_indirect (type $out-i32) (i32.const 7))\n  )\n  (func (export \"call-8\") (type $out-i32)\n    (call_indirect (type $out-i32) (i32.const 8))\n  )\n  (func (export \"call-9\") (type $out-i32)\n    (call_indirect (type $out-i32) (i32.const 9))\n  )\n)\n\n(register \"module1\" $module1)\n\n(assert_trap (invoke $module1 \"call-7\") \"uninitialized element\")\n(assert_return (invoke $module1 \"call-8\") (i32.const 65))\n(assert_return (invoke $module1 \"call-9\") (i32.const 66))\n\n(module $module2\n  (type $out-i32 (func (result i32)))\n  (import \"module1\" \"shared-table\" (table 10 funcref))\n  (elem (i32.const 7) $const-i32-c)\n  (elem (i32.const 8) $const-i32-d)\n  (func $const-i32-c (type $out-i32) (i32.const 67))\n  (func $const-i32-d (type $out-i32) (i32.const 68))\n)\n\n(assert_return (invoke $module1 \"call-7\") (i32.const 67))\n(assert_return (invoke $module1 \"call-8\") (i32.const 68))\n(assert_return (invoke $module1 \"call-9\") (i32.const 66))\n\n(module $module3\n  (type $out-i32 (func (result i32)))\n  (import \"module1\" \"shared-table\" (table 10 funcref))\n  (elem (i32.const 8) $const-i32-e)\n  (elem (i32.const 9) $const-i32-f)\n  (func $const-i32-e (type $out-i32) (i32.const 69))\n  (func $const-i32-f (type $out-i32) (i32.const 70))\n)\n\n(assert_return (invoke $module1 \"call-7\") (i32.const 67))\n(assert_return (invoke $module1 \"call-8\") (i32.const 69))\n(assert_return (invoke $module1 \"call-9\") (i32.const 70))\n"
  },
  {
    "path": "test/core/endianness.wast",
    "content": "(module\n  (memory 1)\n\n  ;; Stores an i16 value in little-endian-format\n  (func $i16_store_little (param $address i32) (param $value i32)\n    (i32.store8 (local.get $address) (local.get $value))\n    (i32.store8 (i32.add (local.get $address) (i32.const 1)) (i32.shr_u (local.get $value) (i32.const 8)))\n  )\n\n  ;; Stores an i32 value in little-endian format\n  (func $i32_store_little (param $address i32) (param $value i32)\n    (call $i16_store_little (local.get $address) (local.get $value))\n    (call $i16_store_little (i32.add (local.get $address) (i32.const 2)) (i32.shr_u (local.get $value) (i32.const 16)))\n  )\n\n  ;; Stores an i64 value in little-endian format\n  (func $i64_store_little (param $address i32) (param $value i64)\n    (call $i32_store_little (local.get $address) (i32.wrap_i64 (local.get $value)))\n    (call $i32_store_little (i32.add (local.get $address) (i32.const 4)) (i32.wrap_i64 (i64.shr_u (local.get $value) (i64.const 32))))\n  )\n\n  ;; Loads an i16 value in little-endian format\n  (func $i16_load_little (param $address i32) (result i32)\n    (i32.or\n      (i32.load8_u (local.get $address))\n      (i32.shl (i32.load8_u (i32.add (local.get $address) (i32.const 1))) (i32.const 8))\n    )\n  )\n\n  ;; Loads an i32 value in little-endian format\n  (func $i32_load_little (param $address i32) (result i32)\n    (i32.or\n      (call $i16_load_little (local.get $address))\n      (i32.shl (call $i16_load_little (i32.add (local.get $address) (i32.const 2))) (i32.const 16))\n    )\n  )\n\n  ;; Loads an i64 value in little-endian format\n  (func $i64_load_little (param $address i32) (result i64)\n    (i64.or\n      (i64.extend_i32_u (call $i32_load_little (local.get $address)))\n      (i64.shl (i64.extend_i32_u (call $i32_load_little (i32.add (local.get $address) (i32.const 4)))) (i64.const 32))\n    )\n  )\n\n  (func (export \"i32_load16_s\") (param $value i32) (result i32)\n    (call $i16_store_little (i32.const 0) (local.get $value))\n    (i32.load16_s (i32.const 0))\n  )\n\n  (func (export \"i32_load16_u\") (param $value i32) (result i32)\n    (call $i16_store_little (i32.const 0) (local.get $value))\n    (i32.load16_u (i32.const 0))\n  )\n\n  (func (export \"i32_load\") (param $value i32) (result i32)\n    (call $i32_store_little (i32.const 0) (local.get $value))\n    (i32.load (i32.const 0))\n  )\n\n  (func (export \"i64_load16_s\") (param $value i64) (result i64)\n    (call $i16_store_little (i32.const 0) (i32.wrap_i64 (local.get $value)))\n    (i64.load16_s (i32.const 0))\n  )\n\n  (func (export \"i64_load16_u\") (param $value i64) (result i64)\n    (call $i16_store_little (i32.const 0) (i32.wrap_i64 (local.get $value)))\n    (i64.load16_u (i32.const 0))\n  )\n\n  (func (export \"i64_load32_s\") (param $value i64) (result i64)\n    (call $i32_store_little (i32.const 0) (i32.wrap_i64 (local.get $value)))\n    (i64.load32_s (i32.const 0))\n  )\n\n  (func (export \"i64_load32_u\") (param $value i64) (result i64)\n    (call $i32_store_little (i32.const 0) (i32.wrap_i64 (local.get $value)))\n    (i64.load32_u (i32.const 0))\n  )\n\n  (func (export \"i64_load\") (param $value i64) (result i64)\n    (call $i64_store_little (i32.const 0) (local.get $value))\n    (i64.load (i32.const 0))\n  )\n\n  (func (export \"f32_load\") (param $value f32) (result f32)\n    (call $i32_store_little (i32.const 0) (i32.reinterpret_f32 (local.get $value)))\n    (f32.load (i32.const 0))\n  )\n\n  (func (export \"f64_load\") (param $value f64) (result f64)\n    (call $i64_store_little (i32.const 0) (i64.reinterpret_f64 (local.get $value)))\n    (f64.load (i32.const 0))\n  )\n\n\n  (func (export \"i32_store16\") (param $value i32) (result i32)\n    (i32.store16 (i32.const 0) (local.get $value))\n    (call $i16_load_little (i32.const 0))\n  )\n\n  (func (export \"i32_store\") (param $value i32) (result i32)\n    (i32.store (i32.const 0) (local.get $value))\n    (call $i32_load_little (i32.const 0))\n  )\n\n  (func (export \"i64_store16\") (param $value i64) (result i64)\n    (i64.store16 (i32.const 0) (local.get $value))\n    (i64.extend_i32_u (call $i16_load_little (i32.const 0)))\n  )\n\n  (func (export \"i64_store32\") (param $value i64) (result i64)\n    (i64.store32 (i32.const 0) (local.get $value))\n    (i64.extend_i32_u (call $i32_load_little (i32.const 0)))\n  )\n\n  (func (export \"i64_store\") (param $value i64) (result i64)\n    (i64.store (i32.const 0) (local.get $value))\n    (call $i64_load_little (i32.const 0))\n  )\n\n  (func (export \"f32_store\") (param $value f32) (result f32)\n    (f32.store (i32.const 0) (local.get $value))\n    (f32.reinterpret_i32 (call $i32_load_little (i32.const 0)))\n  )\n\n  (func (export \"f64_store\") (param $value f64) (result f64)\n    (f64.store (i32.const 0) (local.get $value))\n    (f64.reinterpret_i64 (call $i64_load_little (i32.const 0)))\n  )\n)\n\n(assert_return (invoke \"i32_load16_s\" (i32.const -1)) (i32.const -1))\n(assert_return (invoke \"i32_load16_s\" (i32.const -4242)) (i32.const -4242))\n(assert_return (invoke \"i32_load16_s\" (i32.const 42)) (i32.const 42))\n(assert_return (invoke \"i32_load16_s\" (i32.const 0x3210)) (i32.const 0x3210))\n\n(assert_return (invoke \"i32_load16_u\" (i32.const -1)) (i32.const 0xFFFF))\n(assert_return (invoke \"i32_load16_u\" (i32.const -4242)) (i32.const 61294))\n(assert_return (invoke \"i32_load16_u\" (i32.const 42)) (i32.const 42))\n(assert_return (invoke \"i32_load16_u\" (i32.const 0xCAFE)) (i32.const 0xCAFE))\n\n(assert_return (invoke \"i32_load\" (i32.const -1)) (i32.const -1))\n(assert_return (invoke \"i32_load\" (i32.const -42424242)) (i32.const -42424242))\n(assert_return (invoke \"i32_load\" (i32.const 42424242)) (i32.const 42424242))\n(assert_return (invoke \"i32_load\" (i32.const 0xABAD1DEA)) (i32.const 0xABAD1DEA))\n\n(assert_return (invoke \"i64_load16_s\" (i64.const -1)) (i64.const -1))\n(assert_return (invoke \"i64_load16_s\" (i64.const -4242)) (i64.const -4242))\n(assert_return (invoke \"i64_load16_s\" (i64.const 42)) (i64.const 42))\n(assert_return (invoke \"i64_load16_s\" (i64.const 0x3210)) (i64.const 0x3210))\n\n(assert_return (invoke \"i64_load16_u\" (i64.const -1)) (i64.const 0xFFFF))\n(assert_return (invoke \"i64_load16_u\" (i64.const -4242)) (i64.const 61294))\n(assert_return (invoke \"i64_load16_u\" (i64.const 42)) (i64.const 42))\n(assert_return (invoke \"i64_load16_u\" (i64.const 0xCAFE)) (i64.const 0xCAFE))\n\n(assert_return (invoke \"i64_load32_s\" (i64.const -1)) (i64.const -1))\n(assert_return (invoke \"i64_load32_s\" (i64.const -42424242)) (i64.const -42424242))\n(assert_return (invoke \"i64_load32_s\" (i64.const 42424242)) (i64.const 42424242))\n(assert_return (invoke \"i64_load32_s\" (i64.const 0x12345678)) (i64.const 0x12345678))\n\n(assert_return (invoke \"i64_load32_u\" (i64.const -1)) (i64.const 0xFFFFFFFF))\n(assert_return (invoke \"i64_load32_u\" (i64.const -42424242)) (i64.const 4252543054))\n(assert_return (invoke \"i64_load32_u\" (i64.const 42424242)) (i64.const 42424242))\n(assert_return (invoke \"i64_load32_u\" (i64.const 0xABAD1DEA)) (i64.const 0xABAD1DEA))\n\n(assert_return (invoke \"i64_load\" (i64.const -1)) (i64.const -1))\n(assert_return (invoke \"i64_load\" (i64.const -42424242)) (i64.const -42424242))\n(assert_return (invoke \"i64_load\" (i64.const 0xABAD1DEA)) (i64.const 0xABAD1DEA))\n(assert_return (invoke \"i64_load\" (i64.const 0xABADCAFEDEAD1DEA)) (i64.const 0xABADCAFEDEAD1DEA))\n\n(assert_return (invoke \"f32_load\" (f32.const -1)) (f32.const -1))\n(assert_return (invoke \"f32_load\" (f32.const 1234e-5)) (f32.const 1234e-5))\n(assert_return (invoke \"f32_load\" (f32.const 4242.4242)) (f32.const 4242.4242))\n(assert_return (invoke \"f32_load\" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n\n(assert_return (invoke \"f64_load\" (f64.const -1)) (f64.const -1))\n(assert_return (invoke \"f64_load\" (f64.const 123456789e-5)) (f64.const 123456789e-5))\n(assert_return (invoke \"f64_load\" (f64.const 424242.424242)) (f64.const 424242.424242))\n(assert_return (invoke \"f64_load\" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n\n\n(assert_return (invoke \"i32_store16\" (i32.const -1)) (i32.const 0xFFFF))\n(assert_return (invoke \"i32_store16\" (i32.const -4242)) (i32.const 61294))\n(assert_return (invoke \"i32_store16\" (i32.const 42)) (i32.const 42))\n(assert_return (invoke \"i32_store16\" (i32.const 0xCAFE)) (i32.const 0xCAFE))\n\n(assert_return (invoke \"i32_store\" (i32.const -1)) (i32.const -1))\n(assert_return (invoke \"i32_store\" (i32.const -4242)) (i32.const -4242))\n(assert_return (invoke \"i32_store\" (i32.const 42424242)) (i32.const 42424242))\n(assert_return (invoke \"i32_store\" (i32.const 0xDEADCAFE)) (i32.const 0xDEADCAFE))\n\n(assert_return (invoke \"i64_store16\" (i64.const -1)) (i64.const 0xFFFF))\n(assert_return (invoke \"i64_store16\" (i64.const -4242)) (i64.const 61294))\n(assert_return (invoke \"i64_store16\" (i64.const 42)) (i64.const 42))\n(assert_return (invoke \"i64_store16\" (i64.const 0xCAFE)) (i64.const 0xCAFE))\n\n(assert_return (invoke \"i64_store32\" (i64.const -1)) (i64.const 0xFFFFFFFF))\n(assert_return (invoke \"i64_store32\" (i64.const -4242)) (i64.const 4294963054))\n(assert_return (invoke \"i64_store32\" (i64.const 42424242)) (i64.const 42424242))\n(assert_return (invoke \"i64_store32\" (i64.const 0xDEADCAFE)) (i64.const 0xDEADCAFE))\n\n(assert_return (invoke \"i64_store\" (i64.const -1)) (i64.const -1))\n(assert_return (invoke \"i64_store\" (i64.const -42424242)) (i64.const -42424242))\n(assert_return (invoke \"i64_store\" (i64.const 0xABAD1DEA)) (i64.const 0xABAD1DEA))\n(assert_return (invoke \"i64_store\" (i64.const 0xABADCAFEDEAD1DEA)) (i64.const 0xABADCAFEDEAD1DEA))\n\n(assert_return (invoke \"f32_store\" (f32.const -1)) (f32.const -1))\n(assert_return (invoke \"f32_store\" (f32.const 1234e-5)) (f32.const 1234e-5))\n(assert_return (invoke \"f32_store\" (f32.const 4242.4242)) (f32.const 4242.4242))\n(assert_return (invoke \"f32_store\" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n\n(assert_return (invoke \"f64_store\" (f64.const -1)) (f64.const -1))\n(assert_return (invoke \"f64_store\" (f64.const 123456789e-5)) (f64.const 123456789e-5))\n(assert_return (invoke \"f64_store\" (f64.const 424242.424242)) (f64.const 424242.424242))\n(assert_return (invoke \"f64_store\" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n"
  },
  {
    "path": "test/core/exports.wast",
    "content": ";; Functions\n\n(module (func) (export \"a\" (func 0)))\n(module (func) (export \"a\" (func 0)) (export \"b\" (func 0)))\n(module (func) (func) (export \"a\" (func 0)) (export \"b\" (func 1)))\n\n(module (func (export \"a\")))\n(module (func (export \"a\") (export \"b\") (export \"c\")))\n(module (func (export \"a\") (export \"b\") (param i32)))\n(module (func) (export \"a\" (func 0)))\n(module (func $a (export \"a\")))\n(module (func $a) (export \"a\" (func $a)))\n(module (export \"a\" (func 0)) (func))\n(module (export \"a\" (func $a)) (func $a))\n\n(module $Func\n  (export \"e\" (func $f))\n  (func $f (param $n i32) (result i32)\n    (return (i32.add (local.get $n) (i32.const 1)))\n  )\n)\n(assert_return (invoke \"e\" (i32.const 42)) (i32.const 43))\n(assert_return (invoke $Func \"e\" (i32.const 42)) (i32.const 43))\n(module)\n(module $Other1)\n(assert_return (invoke $Func \"e\" (i32.const 42)) (i32.const 43))\n\n(module\n  (type (;0;) (func (result i32)))\n  (func (;0;) (type 0) (result i32) i32.const 42)\n  (export \"a\" (func 0))\n  (export \"b\" (func 0))\n  (export \"c\" (func 0)))\n(assert_return (invoke \"a\") (i32.const 42))\n(assert_return (invoke \"b\") (i32.const 42))\n(assert_return (invoke \"c\") (i32.const 42))\n\n(assert_invalid\n  (module (export \"a\" (func 0)))\n  \"unknown function\"\n)\n(assert_invalid\n  (module (func) (export \"a\" (func 1)))\n  \"unknown function\"\n)\n(assert_invalid\n  (module (import \"spectest\" \"print_i32\" (func (param i32))) (export \"a\" (func 1)))\n  \"unknown function\"\n)\n(assert_invalid\n  (module (func) (export \"a\" (func 0)) (export \"a\" (func 0)))\n  \"duplicate export name\"\n)\n(assert_invalid\n  (module (func) (func) (export \"a\" (func 0)) (export \"a\" (func 1)))\n  \"duplicate export name\"\n)\n(assert_invalid\n  (module (func) (global i32 (i32.const 0)) (export \"a\" (func 0)) (export \"a\" (global 0)))\n  \"duplicate export name\"\n)\n(assert_invalid\n  (module (func) (table 0 funcref) (export \"a\" (func 0)) (export \"a\" (table 0)))\n  \"duplicate export name\"\n)\n(assert_invalid\n  (module (func) (memory 0) (export \"a\" (func 0)) (export \"a\" (memory 0)))\n  \"duplicate export name\"\n)\n\n\n;; Globals\n\n(module (global i32 (i32.const 0)) (export \"a\" (global 0)))\n(module (global i32 (i32.const 0)) (export \"a\" (global 0)) (export \"b\" (global 0)))\n(module (global i32 (i32.const 0)) (global i32 (i32.const 0)) (export \"a\" (global 0)) (export \"b\" (global 1)))\n\n(module (global (export \"a\") i32 (i32.const 0)))\n(module (global i32 (i32.const 0)) (export \"a\" (global 0)))\n(module (global $a (export \"a\") i32 (i32.const 0)))\n(module (global $a i32 (i32.const 0)) (export \"a\" (global $a)))\n(module (export \"a\" (global 0)) (global i32 (i32.const 0)))\n(module (export \"a\" (global $a)) (global $a i32 (i32.const 0)))\n\n(module $Global\n  (export \"e\" (global $g))\n  (global $g i32 (i32.const 42))\n)\n(assert_return (get \"e\") (i32.const 42))\n(assert_return (get $Global \"e\") (i32.const 42))\n(module)\n(module $Other2)\n(assert_return (get $Global \"e\") (i32.const 42))\n\n(assert_invalid\n  (module (export \"a\" (global 0)))\n  \"unknown global\"\n)\n(assert_invalid\n  (module (global i32 (i32.const 0)) (export \"a\" (global 1)))\n  \"unknown global\"\n)\n(assert_invalid\n  (module (import \"spectest\" \"global_i32\" (global i32)) (export \"a\" (global 1)))\n  \"unknown global\"\n)\n(assert_invalid\n  (module (global i32 (i32.const 0)) (export \"a\" (global 0)) (export \"a\" (global 0)))\n  \"duplicate export name\"\n)\n(assert_invalid\n  (module (global i32 (i32.const 0)) (global i32 (i32.const 0)) (export \"a\" (global 0)) (export \"a\" (global 1)))\n  \"duplicate export name\"\n)\n(assert_invalid\n  (module (global i32 (i32.const 0)) (func) (export \"a\" (global 0)) (export \"a\" (func 0)))\n  \"duplicate export name\"\n)\n(assert_invalid\n  (module (global i32 (i32.const 0)) (table 0 funcref) (export \"a\" (global 0)) (export \"a\" (table 0)))\n  \"duplicate export name\"\n)\n(assert_invalid\n  (module (global i32 (i32.const 0)) (memory 0) (export \"a\" (global 0)) (export \"a\" (memory 0)))\n  \"duplicate export name\"\n)\n\n\n;; Tables\n\n(module (table 0 funcref) (export \"a\" (table 0)))\n(module (table 0 funcref) (export \"a\" (table 0)) (export \"b\" (table 0)))\n(module (table 0 funcref) (table 0 funcref) (export \"a\" (table 0)) (export \"b\" (table 1)))\n\n(module (table (export \"a\") 0 funcref))\n(module (table (export \"a\") 0 1 funcref))\n(module (table 0 funcref) (export \"a\" (table 0)))\n(module (table 0 1 funcref) (export \"a\" (table 0)))\n(module (table $a (export \"a\") 0 funcref))\n(module (table $a (export \"a\") 0 1 funcref))\n(module (table $a 0 funcref) (export \"a\" (table $a)))\n(module (table $a 0 1 funcref) (export \"a\" (table $a)))\n(module (export \"a\" (table 0)) (table 0 funcref))\n(module (export \"a\" (table 0)) (table 0 1 funcref))\n(module (export \"a\" (table $a)) (table $a 0 funcref))\n(module (export \"a\" (table $a)) (table $a 0 1 funcref))\n\n(; TODO: access table ;)\n\n(assert_invalid\n  (module (export \"a\" (table 0)))\n  \"unknown table\"\n)\n(assert_invalid\n  (module (table 0 funcref) (export \"a\" (table 1)))\n  \"unknown table\"\n)\n(assert_invalid\n  (module  (import \"spectest\" \"table\" (table 10 20 funcref)) (export \"a\" (table 1)))\n  \"unknown table\"\n)\n(assert_invalid\n  (module (table 0 funcref) (export \"a\" (table 0)) (export \"a\" (table 0)))\n  \"duplicate export name\"\n)\n(assert_invalid\n  (module (table 0 funcref) (table 0 funcref) (export \"a\" (table 0)) (export \"a\" (table 1)))\n  \"duplicate export name\"\n)\n(assert_invalid\n  (module (table 0 funcref) (func) (export \"a\" (table 0)) (export \"a\" (func 0)))\n  \"duplicate export name\"\n)\n(assert_invalid\n  (module (table 0 funcref) (global i32 (i32.const 0)) (export \"a\" (table 0)) (export \"a\" (global 0)))\n  \"duplicate export name\"\n)\n(assert_invalid\n  (module (table 0 funcref) (memory 0) (export \"a\" (table 0)) (export \"a\" (memory 0)))\n  \"duplicate export name\"\n)\n\n\n;; Memories\n\n(module (memory 0) (export \"a\" (memory 0)))\n(module (memory 0) (export \"a\" (memory 0)) (export \"b\" (memory 0)))\n;; No multiple memories yet.\n;; (module (memory 0) (memory 0) (export \"a\" (memory 0)) (export \"b\" (memory 1)))\n\n(module (memory (export \"a\") 0))\n(module (memory (export \"a\") 0 1))\n(module (memory 0) (export \"a\" (memory 0)))\n(module (memory 0 1) (export \"a\" (memory 0)))\n(module (memory $a (export \"a\") 0))\n(module (memory $a (export \"a\") 0 1))\n(module (memory $a 0) (export \"a\" (memory $a)))\n(module (memory $a 0 1) (export \"a\" (memory $a)))\n(module (export \"a\" (memory 0)) (memory 0))\n(module (export \"a\" (memory 0)) (memory 0 1))\n(module (export \"a\" (memory $a)) (memory $a 0))\n(module (export \"a\" (memory $a)) (memory $a 0 1))\n\n(; TODO: access memory ;)\n\n(assert_invalid\n  (module (export \"a\" (memory 0)))\n  \"unknown memory\"\n)\n(assert_invalid\n  (module (memory 0) (export \"a\" (memory 1)))\n  \"unknown memory\"\n)\n(assert_invalid\n  (module  (import \"spectest\" \"memory\" (memory 1 2)) (export \"a\" (memory 1)))\n  \"unknown memory\"\n)\n(assert_invalid\n  (module (memory 0) (export \"a\" (memory 0)) (export \"a\" (memory 0)))\n  \"duplicate export name\"\n)\n;; No multiple memories yet.\n;; (assert_invalid\n;;   (module (memory 0) (memory 0) (export \"a\" (memory 0)) (export \"a\" (memory 1)))\n;;   \"duplicate export name\"\n;; )\n(assert_invalid\n  (module (memory 0) (func) (export \"a\" (memory 0)) (export \"a\" (func 0)))\n  \"duplicate export name\"\n)\n(assert_invalid\n  (module (memory 0) (global i32 (i32.const 0)) (export \"a\" (memory 0)) (export \"a\" (global 0)))\n  \"duplicate export name\"\n)\n(assert_invalid\n  (module (memory 0) (table 0 funcref) (export \"a\" (memory 0)) (export \"a\" (table 0)))\n  \"duplicate export name\"\n)\n"
  },
  {
    "path": "test/core/f32.wast",
    "content": ";; Test all the f32 operators on major boundary values and all special\n;; values (except comparison and bitwise operators, which are tested in\n;; f32_bitwise.wast and f32_cmp.wast).\n\n(module\n  (func (export \"add\") (param $x f32) (param $y f32) (result f32) (f32.add (local.get $x) (local.get $y)))\n  (func (export \"sub\") (param $x f32) (param $y f32) (result f32) (f32.sub (local.get $x) (local.get $y)))\n  (func (export \"mul\") (param $x f32) (param $y f32) (result f32) (f32.mul (local.get $x) (local.get $y)))\n  (func (export \"div\") (param $x f32) (param $y f32) (result f32) (f32.div (local.get $x) (local.get $y)))\n  (func (export \"sqrt\") (param $x f32) (result f32) (f32.sqrt (local.get $x)))\n  (func (export \"min\") (param $x f32) (param $y f32) (result f32) (f32.min (local.get $x) (local.get $y)))\n  (func (export \"max\") (param $x f32) (param $y f32) (result f32) (f32.max (local.get $x) (local.get $y)))\n  (func (export \"ceil\") (param $x f32) (result f32) (f32.ceil (local.get $x)))\n  (func (export \"floor\") (param $x f32) (result f32) (f32.floor (local.get $x)))\n  (func (export \"trunc\") (param $x f32) (result f32) (f32.trunc (local.get $x)))\n  (func (export \"nearest\") (param $x f32) (result f32) (f32.nearest (local.get $x)))\n)\n\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -0x0p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const 0x0p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const -0x1p-149))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const 0x1p-149))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const 0x1p-149))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p-148))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p-148))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1.000002p-126))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1.fffffcp-127))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1.fffffcp-127))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1.000002p-126))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -0x1p-149) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const 0x1p-149) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const -0x1p-126))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const 0x1p-126))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const 0x1p-126))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1.000002p-126))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const -0x1.fffffcp-127))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const 0x1.fffffcp-127))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1.000002p-126))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p-125))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const 0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const -0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p-125))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -0x1p-126) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const 0x1p-126) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-1))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const -0x1p-1))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const 0x1p-1))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-1))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-1))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const -0x1p-1))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const 0x1p-1))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-1))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p+0))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const 0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const -0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p+0))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1.8p+0))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1.8p+0))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.b21fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.721fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.721fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.b21fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -0x1p-1) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const 0x1p-1) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p+0))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const -0x1p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const 0x1p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p+0))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+0))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const -0x1p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const 0x1p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p+0))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1.8p+0))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const 0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const -0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1.8p+0))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+1))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const -0x1p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+1))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.d21fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.521fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.521fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.d21fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -0x1p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const 0x1p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.b21fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const -0x1.721fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const 0x1.721fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.b21fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.d21fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const -0x1.521fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const 0x1.521fb6p+2))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.d21fb6p+2))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+3))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const 0x0p+0))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+3))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const -0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const 0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const -0x0p+0)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const 0x0p+0)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const -0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const 0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const -0x1p-149)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const 0x1p-149)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const -0x1p-126)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const 0x1p-126)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const -0x1p-126)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const 0x1p-126)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const -0x1p-1)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const 0x1p-1)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const -0x1p-1)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const 0x1p-1)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const -0x1p+0)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const 0x1p+0)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const -0x1p+0)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const 0x1p+0)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const -0x1.921fb6p+2)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const 0x1.921fb6p+2)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const -0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const 0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const -0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const 0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -inf) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const inf) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const -0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const 0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const -0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const -0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const 0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const 0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const -0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const 0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const -0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const -0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const 0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const 0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const -0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const 0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const -0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const -0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const 0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const 0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const -0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const 0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const -0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const -0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const 0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const 0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const -0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const 0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const -0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const -0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const 0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const 0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const -0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const 0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const -0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const 0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const -0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const 0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const -inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const -inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const -nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const -nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"add\" (f32.const nan:0x200000) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const -0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const 0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const -0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const 0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const -0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const 0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const -0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const 0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const -0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const 0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const -0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const 0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const -0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const 0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const -0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const 0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -0x0p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const 0x0p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const -0x1p-149))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const 0x1p-149))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const 0x1p-149))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const -0x1p-148))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const 0x1p-148))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const 0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const -0x1p-126)) (f32.const 0x1.fffffcp-127))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const 0x1p-126)) (f32.const -0x1.000002p-126))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const -0x1p-126)) (f32.const 0x1.000002p-126))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const 0x1p-126)) (f32.const -0x1.fffffcp-127))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const -0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const 0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const -0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const 0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const -0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const 0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const -0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const 0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -0x1p-149) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const 0x1p-149) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const -0x1p-126))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const 0x1p-126))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const 0x1p-126))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1.fffffcp-127))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const -0x1.000002p-126))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const 0x1.000002p-126))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1.fffffcp-127))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const -0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const 0x1p-126)) (f32.const -0x1p-125))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const -0x1p-126)) (f32.const 0x1p-125))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const 0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const -0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const 0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const -0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const 0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const -0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const 0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const -0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const 0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -0x1p-126) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const 0x1p-126) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-1))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const -0x1p-1))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const 0x1p-1))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-1))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-1))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const -0x1p-1))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const 0x1p-1))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-1))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const -0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const 0x1p-1)) (f32.const -0x1p+0))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const -0x1p-1)) (f32.const 0x1p+0))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const 0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const -0x1p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const 0x1p+0)) (f32.const -0x1.8p+0))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const -0x1p+0)) (f32.const 0x1.8p+0))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const 0x1p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.721fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.b21fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.b21fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.721fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -0x1p-1) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const 0x1p-1) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const -0x1p+0))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const 0x1p+0))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const -0x1p+0))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const 0x1p+0))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const 0x1p-1)) (f32.const -0x1.8p+0))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const -0x1p-1)) (f32.const 0x1.8p+0))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const -0x1p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const 0x1p+0)) (f32.const -0x1p+1))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const -0x1p+0)) (f32.const 0x1p+1))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.521fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.d21fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.d21fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.521fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -0x1p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const 0x1p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.721fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const -0x1.b21fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const 0x1.b21fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.721fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.521fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const -0x1.d21fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const 0x1.d21fb6p+2))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.521fb6p+2))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const 0x0p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+3))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+3))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const -0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const 0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const -0x0p+0)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const 0x0p+0)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const -0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const 0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const -0x1p-149)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const 0x1p-149)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const -0x1p-126)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const 0x1p-126)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const -0x1p-126)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const 0x1p-126)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const -0x1p-1)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const 0x1p-1)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const -0x1p-1)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const 0x1p-1)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const -0x1p+0)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const 0x1p+0)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const -0x1p+0)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const 0x1p+0)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const -0x1.921fb6p+2)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const 0x1.921fb6p+2)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const -0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const 0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const -0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const 0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -inf) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const inf) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const -0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const 0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const -0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const -0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const 0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const 0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const -0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const 0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const -0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const -0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const 0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const 0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const -0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const 0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const -0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const -0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const 0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const 0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const -0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const 0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const -0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const -0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const 0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const 0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const -0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const 0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const -0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const -0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const 0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const 0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const -0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const 0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const -0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const 0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const -0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const 0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const -inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const -inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const -nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const -nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f32.const nan:0x200000) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const -0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const 0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const -0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const 0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const -0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const 0x1p-126)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const -0x1p-126)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const 0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const -0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const 0x1p-1)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const -0x1p-1)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const 0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const -0x1p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const 0x1p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const -0x1p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -0x0p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const 0x0p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const 0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const -0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const 0x1p-126)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const -0x1p-126)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const 0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const -0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const 0x1p-1)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const -0x1p-1)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const 0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const -0x1p+0)) (f32.const 0x1p-149))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const 0x1p+0)) (f32.const -0x1p-149))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p-149))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p-149))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.8p-147))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.8p-147))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.8p-147))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.8p-147))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep-22))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep-22))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep-22))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep-22))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -0x1p-149) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const 0x1p-149) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const -0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const 0x1p-126)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const -0x1p-126)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const 0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const -0x1p-1)) (f32.const 0x1p-127))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const 0x1p-1)) (f32.const -0x1p-127))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-127))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-127))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const -0x1p+0)) (f32.const 0x1p-126))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const 0x1p+0)) (f32.const -0x1p-126))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p-126))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p-126))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p-124))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p-124))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p-124))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p-124))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+1))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+1))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+1))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+1))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -0x1p-126) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const 0x1p-126) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const 0x1p-127))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const -0x1p-127))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-127))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-127))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const -0x1p-1)) (f32.const 0x1p-2))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const 0x1p-1)) (f32.const -0x1p-2))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p-2))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p-2))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const -0x1p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const 0x1p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+1))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+1))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+1))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+1))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+126))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+126))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+126))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+126))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -0x1p-1) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const 0x1p-1) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const -0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const 0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const -0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const 0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -0x1p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const 0x1p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const 0x1.8p-147))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const -0x1.8p-147))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1.8p-147))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1.8p-147))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const 0x1.921fb6p-124))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const -0x1.921fb6p-124))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1.921fb6p-124))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1.921fb6p-124))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const 0x1.921fb6p+1))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const -0x1.921fb6p+1))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.921fb6p+1))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.921fb6p+1))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.3bd3cep+5))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.3bd3cep+5))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.3bd3cep+5))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.3bd3cep+5))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const 0x1.fffffep-22))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const -0x1.fffffep-22))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1.fffffep-22))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1.fffffep-22))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const 0x1.fffffep+1))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const -0x1.fffffep+1))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1.fffffep+1))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1.fffffep+1))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const 0x1.fffffep+126))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const -0x1.fffffep+126))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1.fffffep+126))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1.fffffep+126))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const -0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const 0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const -0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const 0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const -0x1p-149)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const 0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const -0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const 0x1p-149)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const -0x1p-126)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const 0x1p-126)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const -0x1p-126)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const 0x1p-126)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const -0x1p-1)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const 0x1p-1)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const -0x1p-1)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const 0x1p-1)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const -0x1p+0)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const 0x1p+0)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const -0x1p+0)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const 0x1p+0)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const -0x1.921fb6p+2)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const 0x1.921fb6p+2)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const -0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const 0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const -0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const 0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -inf) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const inf) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const -0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const 0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const -0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const -0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const 0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const 0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const -0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const 0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const -0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const -0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const 0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const 0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const -0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const 0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const -0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const -0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const 0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const 0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const -0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const 0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const -0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const -0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const 0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const 0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const -0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const 0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const -0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const -0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const 0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const 0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const -0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const 0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const -0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const 0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const -0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const 0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const -inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const -inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const -nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const -nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f32.const nan:0x200000) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const 0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const -0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const 0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const -0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const 0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const -0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const 0x1p-126)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const -0x1p-126)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const 0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const -0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const 0x1p-1)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const -0x1p-1)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const 0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const -0x1p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const 0x1p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const -0x1p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const -inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const -inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -0x0p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const 0x0p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const 0x1p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const -0x1p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const -0x1p-126)) (f32.const 0x1p-23))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const 0x1p-126)) (f32.const -0x1p-23))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1p-23))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1p-23))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const -0x1p-1)) (f32.const 0x1p-148))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const 0x1p-1)) (f32.const -0x1p-148))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-148))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-148))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const -0x1p+0)) (f32.const 0x1p-149))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const 0x1p+0)) (f32.const -0x1p-149))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p-149))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p-149))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const -inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const -inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -0x1p-149) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const 0x1p-149) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const 0x1p+23))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const -0x1p+23))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p+23))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p+23))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const -0x1p-126)) (f32.const 0x1p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const 0x1p-126)) (f32.const -0x1p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const -0x1p-1)) (f32.const 0x1p-125))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const 0x1p-1)) (f32.const -0x1p-125))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-125))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-125))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const -0x1p+0)) (f32.const 0x1p-126))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const 0x1p+0)) (f32.const -0x1p-126))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p-126))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p-126))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.45f3p-129))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.45f3p-129))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.45f3p-129))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.45f3p-129))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const -inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const -inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -0x1p-126) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const 0x1p-126) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const 0x1p+125))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const -0x1p+125))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p+125))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p+125))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const -0x1p-1)) (f32.const 0x1p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const 0x1p-1)) (f32.const -0x1p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const -0x1p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const 0x1p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.45f306p-4))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.45f306p-4))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.45f306p-4))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.45f306p-4))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const 0x1p-129))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const -0x1p-129))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-129))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-129))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const -inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const -inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -0x1p-1) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const 0x1p-1) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const 0x1p+126))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const -0x1p+126))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+126))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p+126))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const -0x1p-1)) (f32.const 0x1p+1))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const 0x1p-1)) (f32.const -0x1p+1))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p+1))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p+1))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const -0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const 0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.45f306p-3))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.45f306p-3))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.45f306p-3))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.45f306p-3))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1p-128))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1p-128))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-128))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-128))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const -inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const -inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -0x1p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const 0x1p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const 0x1.921fb6p+3))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const -0x1.921fb6p+3))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.921fb6p+3))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.921fb6p+3))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const 0x1p+0))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const -0x1p+0))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p+0))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p+0))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const 0x1.921fb8p-126))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const -0x1.921fb8p-126))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.921fb8p-126))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.921fb8p-126))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.45f304p+125))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.45f304p+125))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.45f304p+125))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.45f304p+125))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const 0x1p+0))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const -0x1p+0))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1p+0))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1p+0))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const -inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const -inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const -0x0p+0)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const 0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const -0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const 0x0p+0)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const -0x1p-149)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const 0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const -0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const 0x1p-149)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const -0x1p-126)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const 0x1p-126)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const -0x1p-126)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const 0x1p-126)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const -0x1p-1)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const 0x1p-1)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const -0x1p-1)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const 0x1p-1)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const -0x1p+0)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const 0x1p+0)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const -0x1p+0)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const 0x1p+0)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const -0x1.921fb6p+2)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const 0x1.921fb6p+2)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const -0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const 0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const -0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const 0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -inf) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const inf) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const -0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const 0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const -0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const -0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const 0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const 0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const -0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const 0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const -0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const -0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const 0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const 0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const -0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const 0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const -0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const -0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const 0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const 0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const -0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const 0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const -0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const -0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const 0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const 0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const -0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const 0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const -0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const -0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const 0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const 0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const -0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const 0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const -0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const 0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const -0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const 0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const -inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const -inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const -nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const -nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"div\" (f32.const nan:0x200000) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const 0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const 0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const 0x1p-126)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const 0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const 0x1p-1)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const 0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const 0x1p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -0x0p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const 0x0p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const 0x1p-126)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1p-149))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const 0x1p-1)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-149))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const 0x1p+0)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p-149))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-149))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-149))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const inf)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const inf)) (f32.const 0x1p-149))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -0x1p-149) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const 0x1p-149) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const 0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const 0x1p-1)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-126))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const 0x1p+0)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p-126))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-126))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-126))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const inf)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const inf)) (f32.const 0x1p-126))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -0x1p-126) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const 0x1p-126) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const 0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const 0x1p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-1))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-1))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const inf)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const inf)) (f32.const 0x1p-1))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -0x1p-1) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const 0x1p-1) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const 0x1p-1)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const 0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p+0))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1p+0))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const inf)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const inf)) (f32.const 0x1p+0))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -0x1p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const 0x1p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const inf)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const inf)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const inf)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const inf)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const -0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const 0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const -0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const 0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const -0x1p-126)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const 0x1p-126)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const -0x1p-1)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const 0x1p-1)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const -0x1p+0)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const 0x1p+0)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const -0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const 0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -inf) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const inf) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const -0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const 0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const -0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const -0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const 0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const 0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const -0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const 0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const -0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const -0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const 0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const 0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const -0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const 0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const -0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const -0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const 0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const 0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const -0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const 0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const -0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const -0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const 0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const 0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const -0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const 0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const -0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const -0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const 0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const 0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const -0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const 0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const -0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const 0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const -0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const 0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const -inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const -inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const -nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const -nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"min\" (f32.const nan:0x200000) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const -0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const -0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const -0x1p-126)) (f32.const -0x0p+0))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const -0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const -0x1p-1)) (f32.const -0x0p+0))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const -0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const -0x1p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const -0x1p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x0p+0))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const -inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const -inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -0x0p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const 0x0p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1p-149))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const -0x1p-126)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-149))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const -0x1p-1)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p-149))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const -0x1p+0)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-149))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-149))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const -inf)) (f32.const -0x1p-149))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const -inf)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -0x1p-149) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const 0x1p-149) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const -0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-126))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const -0x1p-1)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p-126))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const -0x1p+0)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-126))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-126))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const -inf)) (f32.const -0x1p-126))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const -inf)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -0x1p-126) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const 0x1p-126) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const -0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const -0x1p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-1))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-1))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const -inf)) (f32.const -0x1p-1))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const -inf)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -0x1p-1) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const 0x1p-1) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const -0x1p-1)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const -0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p+0))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1p+0))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const -inf)) (f32.const -0x1p+0))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const -inf)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -0x1p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const 0x1p+0) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const -inf)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const -inf)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const -0x0p+0)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const 0x0p+0)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const -0x1p-149)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const 0x1p-149)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const -0x1p-126)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const 0x1p-126)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const -0x1p-1)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const 0x1p-1)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const -0x1p+0)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const 0x1p+0)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const -0x1.921fb6p+2)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const 0x1.921fb6p+2)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const -0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const 0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -inf) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const inf) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const -0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const 0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const -0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const -0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const 0x0p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const 0x0p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const -0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const 0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const -0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const -0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const 0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const 0x1p-149)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const -0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const 0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const -0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const -0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const 0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const 0x1p-126)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const -0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const 0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const -0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const -0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const 0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const 0x1p-1)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const -0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const 0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const -0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const -0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const 0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const 0x1p+0)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const -0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const 0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const -0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const 0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const -0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const 0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const -inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const -inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const inf)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const -nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const -nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const nan)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"max\" (f32.const nan:0x200000) (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sqrt\" (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"sqrt\" (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"sqrt\" (f32.const -0x1p-149)) (f32.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f32.const 0x1p-149)) (f32.const 0x1.6a09e6p-75))\n(assert_return (invoke \"sqrt\" (f32.const -0x1p-126)) (f32.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f32.const 0x1p-126)) (f32.const 0x1p-63))\n(assert_return (invoke \"sqrt\" (f32.const -0x1p-1)) (f32.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f32.const 0x1p-1)) (f32.const 0x1.6a09e6p-1))\n(assert_return (invoke \"sqrt\" (f32.const -0x1p+0)) (f32.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"sqrt\" (f32.const -0x1.921fb6p+2)) (f32.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.40d932p+1))\n(assert_return (invoke \"sqrt\" (f32.const -0x1.fffffep+127)) (f32.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+63))\n(assert_return (invoke \"sqrt\" (f32.const -inf)) (f32.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"sqrt\" (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"sqrt\" (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"floor\" (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"floor\" (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"floor\" (f32.const -0x1p-149)) (f32.const -0x1p+0))\n(assert_return (invoke \"floor\" (f32.const 0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"floor\" (f32.const -0x1p-126)) (f32.const -0x1p+0))\n(assert_return (invoke \"floor\" (f32.const 0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"floor\" (f32.const -0x1p-1)) (f32.const -0x1p+0))\n(assert_return (invoke \"floor\" (f32.const 0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"floor\" (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"floor\" (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"floor\" (f32.const -0x1.921fb6p+2)) (f32.const -0x1.cp+2))\n(assert_return (invoke \"floor\" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.8p+2))\n(assert_return (invoke \"floor\" (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"floor\" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"floor\" (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"floor\" (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"floor\" (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"floor\" (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"floor\" (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"floor\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"ceil\" (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"ceil\" (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"ceil\" (f32.const -0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"ceil\" (f32.const 0x1p-149)) (f32.const 0x1p+0))\n(assert_return (invoke \"ceil\" (f32.const -0x1p-126)) (f32.const -0x0p+0))\n(assert_return (invoke \"ceil\" (f32.const 0x1p-126)) (f32.const 0x1p+0))\n(assert_return (invoke \"ceil\" (f32.const -0x1p-1)) (f32.const -0x0p+0))\n(assert_return (invoke \"ceil\" (f32.const 0x1p-1)) (f32.const 0x1p+0))\n(assert_return (invoke \"ceil\" (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"ceil\" (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"ceil\" (f32.const -0x1.921fb6p+2)) (f32.const -0x1.8p+2))\n(assert_return (invoke \"ceil\" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.cp+2))\n(assert_return (invoke \"ceil\" (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"ceil\" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"ceil\" (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"ceil\" (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"ceil\" (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"ceil\" (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"ceil\" (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"ceil\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"trunc\" (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"trunc\" (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"trunc\" (f32.const -0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"trunc\" (f32.const 0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"trunc\" (f32.const -0x1p-126)) (f32.const -0x0p+0))\n(assert_return (invoke \"trunc\" (f32.const 0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"trunc\" (f32.const -0x1p-1)) (f32.const -0x0p+0))\n(assert_return (invoke \"trunc\" (f32.const 0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"trunc\" (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"trunc\" (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"trunc\" (f32.const -0x1.921fb6p+2)) (f32.const -0x1.8p+2))\n(assert_return (invoke \"trunc\" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.8p+2))\n(assert_return (invoke \"trunc\" (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"trunc\" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"trunc\" (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"trunc\" (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"trunc\" (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"trunc\" (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"trunc\" (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"trunc\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"nearest\" (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"nearest\" (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"nearest\" (f32.const -0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"nearest\" (f32.const 0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"nearest\" (f32.const -0x1p-126)) (f32.const -0x0p+0))\n(assert_return (invoke \"nearest\" (f32.const 0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"nearest\" (f32.const -0x1p-1)) (f32.const -0x0p+0))\n(assert_return (invoke \"nearest\" (f32.const 0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"nearest\" (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"nearest\" (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"nearest\" (f32.const -0x1.921fb6p+2)) (f32.const -0x1.8p+2))\n(assert_return (invoke \"nearest\" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.8p+2))\n(assert_return (invoke \"nearest\" (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"nearest\" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"nearest\" (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"nearest\" (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"nearest\" (f32.const -nan)) (f32.const nan:canonical))\n(assert_return (invoke \"nearest\" (f32.const -nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"nearest\" (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"nearest\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n\n\n;; Type check\n\n(assert_invalid (module (func (result f32) (f32.add (i64.const 0) (f64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.div (i64.const 0) (f64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.max (i64.const 0) (f64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.min (i64.const 0) (f64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.mul (i64.const 0) (f64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.sub (i64.const 0) (f64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.ceil (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.floor (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.nearest (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.sqrt (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.trunc (i64.const 0)))) \"type mismatch\")\n"
  },
  {
    "path": "test/core/f32_bitwise.wast",
    "content": ";; Test all the f32 bitwise operators on major boundary values and all special\n;; values.\n\n(module\n  (func (export \"abs\") (param $x f32) (result f32) (f32.abs (local.get $x)))\n  (func (export \"neg\") (param $x f32) (result f32) (f32.neg (local.get $x)))\n  (func (export \"copysign\") (param $x f32) (param $y f32) (result f32) (f32.copysign (local.get $x) (local.get $y)))\n)\n\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const -0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const 0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const -0x1p-149)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const 0x1p-149)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const -0x1p-126)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const 0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const -0x1p-126)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const 0x1p-126)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const -0x1p-1)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const 0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const -0x1p-1)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const 0x1p-1)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const -0x1p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const -0x1p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const -inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const -inf)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const inf)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const -nan)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x0p+0) (f32.const nan)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const -nan)) (f32.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x0p+0) (f32.const nan)) (f32.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const -inf)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const inf)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const -inf)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const inf)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const -nan)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-149) (f32.const nan)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const -nan)) (f32.const -0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-149) (f32.const nan)) (f32.const 0x1p-149))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const -inf)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const inf)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const -inf)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const inf)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const -nan)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-126) (f32.const nan)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const -nan)) (f32.const -0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-126) (f32.const nan)) (f32.const 0x1p-126))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const -inf)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const inf)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const -inf)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const inf)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const -nan)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p-1) (f32.const nan)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const -nan)) (f32.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const 0x1p-1) (f32.const nan)) (f32.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const -inf)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const inf)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const -inf)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const inf)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const -nan)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1p+0) (f32.const nan)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const -nan)) (f32.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const 0x1p+0) (f32.const nan)) (f32.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const inf)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const inf)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.921fb6p+2) (f32.const nan)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const 0x1.921fb6p+2) (f32.const nan)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const -inf)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const inf)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const -inf)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const inf)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const -nan)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -0x1.fffffep+127) (f32.const nan)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const -nan)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const 0x1.fffffep+127) (f32.const nan)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const -0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const 0x0p+0)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const -0x0p+0)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const 0x0p+0)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const -0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const 0x1p-149)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const -0x1p-149)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const 0x1p-149)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const -0x1p-126)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const 0x1p-126)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const -0x1p-126)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const 0x1p-126)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const -0x1p-1)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const 0x1p-1)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const -0x1p-1)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const 0x1p-1)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const -0x1p+0)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const 0x1p+0)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const -0x1p+0)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const 0x1p+0)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const -0x1.921fb6p+2)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const 0x1.921fb6p+2)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const -0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const 0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const -0x1.fffffep+127)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const 0x1.fffffep+127)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const -nan)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const -inf) (f32.const nan)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const -nan)) (f32.const -inf))\n(assert_return (invoke \"copysign\" (f32.const inf) (f32.const nan)) (f32.const inf))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const -0x0p+0)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const 0x0p+0)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const -0x0p+0)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const 0x0p+0)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const -0x1p-149)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const 0x1p-149)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const -0x1p-149)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const 0x1p-149)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const -0x1p-126)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const 0x1p-126)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const -0x1p-126)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const 0x1p-126)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const -0x1p-1)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const 0x1p-1)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const -0x1p-1)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const 0x1p-1)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const -0x1p+0)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const 0x1p+0)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const -0x1p+0)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const 0x1p+0)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const -0x1.921fb6p+2)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const 0x1.921fb6p+2)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const -0x1.fffffep+127)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const 0x1.fffffep+127)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const -0x1.fffffep+127)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const 0x1.fffffep+127)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const -inf)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const inf)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const -inf)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const inf)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const -nan)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const -nan) (f32.const nan)) (f32.const nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const -nan)) (f32.const -nan))\n(assert_return (invoke \"copysign\" (f32.const nan) (f32.const nan)) (f32.const nan))\n(assert_return (invoke \"abs\" (f32.const -0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"abs\" (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"abs\" (f32.const -0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"abs\" (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"abs\" (f32.const -0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"abs\" (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"abs\" (f32.const -0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"abs\" (f32.const 0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"abs\" (f32.const -0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"abs\" (f32.const 0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"abs\" (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"abs\" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"abs\" (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"abs\" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"abs\" (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"abs\" (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"abs\" (f32.const -nan)) (f32.const nan))\n(assert_return (invoke \"abs\" (f32.const nan)) (f32.const nan))\n(assert_return (invoke \"neg\" (f32.const -0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"neg\" (f32.const 0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"neg\" (f32.const -0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"neg\" (f32.const 0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"neg\" (f32.const -0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"neg\" (f32.const 0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"neg\" (f32.const -0x1p-1)) (f32.const 0x1p-1))\n(assert_return (invoke \"neg\" (f32.const 0x1p-1)) (f32.const -0x1p-1))\n(assert_return (invoke \"neg\" (f32.const -0x1p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"neg\" (f32.const 0x1p+0)) (f32.const -0x1p+0))\n(assert_return (invoke \"neg\" (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))\n(assert_return (invoke \"neg\" (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))\n(assert_return (invoke \"neg\" (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"neg\" (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"neg\" (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"neg\" (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"neg\" (f32.const -nan)) (f32.const nan))\n(assert_return (invoke \"neg\" (f32.const nan)) (f32.const -nan))\n\n\n;; Type check\n\n(assert_invalid (module (func (result f32) (f32.copysign (i64.const 0) (f64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.abs (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.neg (i64.const 0)))) \"type mismatch\")\n"
  },
  {
    "path": "test/core/f32_cmp.wast",
    "content": ";; Test all the f32 comparison operators on major boundary values and all\n;; special values.\n\n(module\n  (func (export \"eq\") (param $x f32) (param $y f32) (result i32) (f32.eq (local.get $x) (local.get $y)))\n  (func (export \"ne\") (param $x f32) (param $y f32) (result i32) (f32.ne (local.get $x) (local.get $y)))\n  (func (export \"lt\") (param $x f32) (param $y f32) (result i32) (f32.lt (local.get $x) (local.get $y)))\n  (func (export \"le\") (param $x f32) (param $y f32) (result i32) (f32.le (local.get $x) (local.get $y)))\n  (func (export \"gt\") (param $x f32) (param $y f32) (result i32) (f32.gt (local.get $x) (local.get $y)))\n  (func (export \"ge\") (param $x f32) (param $y f32) (result i32) (f32.ge (local.get $x) (local.get $y)))\n)\n\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x0p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x0p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-149) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-149) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-126) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-126) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p-1) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p-1) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -inf) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const inf) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f32.const nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x0p+0) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x0p+0) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-149) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-149) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-126) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-126) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p-1) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p-1) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1p+0) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1p+0) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -inf) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const inf) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f32.const nan:0x200000) (f32.const nan:0x200000)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x0p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x0p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-149) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-149) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-126) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-126) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p-1) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p-1) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -inf) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const inf) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f32.const nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x0p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x0p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-149) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-149) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-126) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-126) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p-1) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p-1) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -inf) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const inf) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"le\" (f32.const nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x0p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x0p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-149) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-149) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-126) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-126) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p-1) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p-1) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -inf) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const inf) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f32.const nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x0p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x0p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-149) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-149) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-126) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-126) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p-1) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p-1) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1p+0) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const -0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const 0x1p-149)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const -0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const 0x1p-126)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const -0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const 0x1.921fb6p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const -0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const 0x1.fffffep+127)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -inf) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const inf) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const -inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan) (f32.const nan:0x200000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f32.const nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))\n\n\n;; Type check\n\n(assert_invalid (module (func (result f32) (f32.eq (i64.const 0) (f64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.ge (i64.const 0) (f64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.gt (i64.const 0) (f64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.le (i64.const 0) (f64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.lt (i64.const 0) (f64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f32) (f32.ne (i64.const 0) (f64.const 0)))) \"type mismatch\")\n"
  },
  {
    "path": "test/core/f64.wast",
    "content": ";; Test all the f64 operators on major boundary values and all special\n;; values (except comparison and bitwise operators, which are tested in\n;; f64_bitwise.wast and f64_cmp.wast).\n\n(module\n  (func (export \"add\") (param $x f64) (param $y f64) (result f64) (f64.add (local.get $x) (local.get $y)))\n  (func (export \"sub\") (param $x f64) (param $y f64) (result f64) (f64.sub (local.get $x) (local.get $y)))\n  (func (export \"mul\") (param $x f64) (param $y f64) (result f64) (f64.mul (local.get $x) (local.get $y)))\n  (func (export \"div\") (param $x f64) (param $y f64) (result f64) (f64.div (local.get $x) (local.get $y)))\n  (func (export \"sqrt\") (param $x f64) (result f64) (f64.sqrt (local.get $x)))\n  (func (export \"min\") (param $x f64) (param $y f64) (result f64) (f64.min (local.get $x) (local.get $y)))\n  (func (export \"max\") (param $x f64) (param $y f64) (result f64) (f64.max (local.get $x) (local.get $y)))\n  (func (export \"ceil\") (param $x f64) (result f64) (f64.ceil (local.get $x)))\n  (func (export \"floor\") (param $x f64) (result f64) (f64.floor (local.get $x)))\n  (func (export \"trunc\") (param $x f64) (result f64) (f64.trunc (local.get $x)))\n  (func (export \"nearest\") (param $x f64) (result f64) (f64.nearest (local.get $x)))\n)\n\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000002p-1022))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000002p-1022))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x1.0000000000001p-1022))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x0.fffffffffffffp-1022))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x0.fffffffffffffp-1022))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x1.0000000000001p-1022))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const -0x1p-1022))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const 0x1p-1022))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x1p-1022))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.0000000000001p-1022))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.fffffffffffffp-1022))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.fffffffffffffp-1022))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.0000000000001p-1022))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1021))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1021))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p-1))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p-1))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const -0x1p-1))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const 0x1p-1))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p+0))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const 0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const -0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p+0))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1.8p+0))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1.8p+0))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.b21fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.721fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.721fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.b21fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1.8p+0))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const 0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const -0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1.8p+0))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+1))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const -0x1p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+1))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.d21fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.521fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.521fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.d21fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.b21fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const -0x1.721fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const 0x1.721fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.b21fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.d21fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const -0x1.521fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const 0x1.521fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.d21fb54442d18p+2))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+3))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0p+0))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+3))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const -0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const 0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const -0x0p+0)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const 0x0p+0)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const -0x1p-1022)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const 0x1p-1022)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const -0x1p-1022)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const 0x1p-1022)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const -0x1p-1)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const 0x1p-1)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const -0x1p-1)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const 0x1p-1)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const -0x1p+0)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const 0x1p+0)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const -0x1p+0)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const 0x1p+0)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -inf) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const inf) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const -0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const 0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const -0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const 0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const -0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const 0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const -0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const 0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const -0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const 0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const -0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const 0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const -0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const 0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const -0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const 0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const -inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const -inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const -nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const -nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"add\" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const -0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const 0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const -0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const 0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const -0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const 0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const -0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const 0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.0000000000002p-1022))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000002p-1022))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const 0x0.fffffffffffffp-1022))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const -0x1.0000000000001p-1022))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const 0x1.0000000000001p-1022))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const -0x0.fffffffffffffp-1022))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const -0x1p-1022))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const 0x1p-1022))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x1p-1022))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.fffffffffffffp-1022))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1.0000000000001p-1022))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1.0000000000001p-1022))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.fffffffffffffp-1022))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (f64.const -0x1p-1021))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (f64.const 0x1p-1021))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p-1))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p-1))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const -0x1p-1))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const 0x1p-1))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const -0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const 0x1p-1)) (f64.const -0x1p+0))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const -0x1p-1)) (f64.const 0x1p+0))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const 0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const -0x1p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const 0x1p+0)) (f64.const -0x1.8p+0))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const -0x1p+0)) (f64.const 0x1.8p+0))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const 0x1p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.721fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.b21fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.b21fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.721fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const 0x1p-1)) (f64.const -0x1.8p+0))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const -0x1p-1)) (f64.const 0x1.8p+0))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const -0x1p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const 0x1p+0)) (f64.const -0x1p+1))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const -0x1p+0)) (f64.const 0x1p+1))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.521fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.d21fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.d21fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.521fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.721fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const -0x1.b21fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const 0x1.b21fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.721fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.521fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const -0x1.d21fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const 0x1.d21fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.521fb54442d18p+2))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+3))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+3))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const -0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const 0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const -0x0p+0)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const 0x0p+0)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const -0x1p-1022)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const 0x1p-1022)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const -0x1p-1022)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const 0x1p-1022)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const -0x1p-1)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const 0x1p-1)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const -0x1p-1)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const 0x1p-1)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const -0x1p+0)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const 0x1p+0)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const -0x1p+0)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const 0x1p+0)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -inf) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const inf) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const -0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const 0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const -0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const 0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const -0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const 0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const -0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const 0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const -0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const 0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const -0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const 0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const -0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const 0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const -0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const 0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const -inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const -inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const -nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const -nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sub\" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const -0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const 0x1p-1)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const -0x1p-1)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const 0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const -0x1p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const 0x1p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const -0x1p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0.0000000000006p-1022))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x0.0000000000006p-1022))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0.0000000000006p-1022))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0.0000000000006p-1022))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp-51))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp-51))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp-51))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp-51))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (f64.const 0x0.8p-1022))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (f64.const -0x0.8p-1022))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x0.8p-1022))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x0.8p-1022))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (f64.const 0x1p-1022))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (f64.const -0x1p-1022))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p-1022))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p-1022))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p-1020))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p-1020))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p-1020))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p-1020))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const 0x0.8p-1022))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const -0x0.8p-1022))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x0.8p-1022))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x0.8p-1022))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const -0x1p-1)) (f64.const 0x1p-2))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const 0x1p-1)) (f64.const -0x1p-2))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p-2))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p-2))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const -0x1p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const 0x1p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+1))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+1))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+1))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+1))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1022))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1022))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1022))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1022))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const -0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const 0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const -0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const 0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000006p-1022))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.0000000000006p-1022))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000006p-1022))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000006p-1022))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const 0x1.921fb54442d18p-1020))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const -0x1.921fb54442d18p-1020))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1.921fb54442d18p-1020))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1.921fb54442d18p-1020))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const 0x1.921fb54442d18p+1))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const -0x1.921fb54442d18p+1))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.921fb54442d18p+1))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.921fb54442d18p+1))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.3bd3cc9be45dep+5))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.3bd3cc9be45dep+5))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.3bd3cc9be45dep+5))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.3bd3cc9be45dep+5))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp-51))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp-51))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp-51))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp-51))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const 0x1.fffffffffffffp+1))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const -0x1.fffffffffffffp+1))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1.fffffffffffffp+1))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1.fffffffffffffp+1))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const 0x1.fffffffffffffp+1022))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const -0x1.fffffffffffffp+1022))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1.fffffffffffffp+1022))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp+1022))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const -0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const 0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const -0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const 0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const -0x1p-1022)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const 0x1p-1022)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const -0x1p-1022)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const 0x1p-1022)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const -0x1p-1)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const 0x1p-1)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const -0x1p-1)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const 0x1p-1)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const -0x1p+0)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const 0x1p+0)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const -0x1p+0)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const 0x1p+0)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -inf) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const inf) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const -0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const 0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const -0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const 0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const -0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const 0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const -0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const 0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const -0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const 0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const -0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const 0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const -0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const 0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const -0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const 0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const -inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const -inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const -nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const -nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"mul\" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const 0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const -0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const 0x1p-1)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const -0x1p-1)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const 0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const -0x1p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const 0x1p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const -0x1p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const -inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const -inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const 0x1p-52))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const -0x1p-52))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-52))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-52))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const 0x0.0000000000002p-1022))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const -0x0.0000000000002p-1022))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x0.0000000000002p-1022))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x0.0000000000002p-1022))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p+52))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p+52))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+52))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+52))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (f64.const 0x1p-1021))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (f64.const -0x1p-1021))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1021))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1021))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (f64.const 0x1p-1022))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (f64.const -0x1p-1022))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p-1022))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p-1022))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0.28be60db9391p-1022))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x0.28be60db9391p-1022))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0.28be60db9391p-1022))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0.28be60db9391p-1022))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const -inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const -inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const 0x1p+1021))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const -0x1p+1021))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p+1021))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p+1021))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const -0x1p-1)) (f64.const 0x1p+0))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const 0x1p-1)) (f64.const -0x1p+0))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p+0))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p+0))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const -0x1p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const 0x1p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.45f306dc9c883p-4))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.45f306dc9c883p-4))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.45f306dc9c883p-4))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.45f306dc9c883p-4))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0.2p-1022))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0.2p-1022))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0.2p-1022))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.2p-1022))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const -inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const -inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const 0x1p+1022))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const -0x1p+1022))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+1022))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p+1022))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const -0x1p-1)) (f64.const 0x1p+1))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const 0x1p-1)) (f64.const -0x1p+1))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p+1))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p+1))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const -0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const 0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.45f306dc9c883p-3))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.45f306dc9c883p-3))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.45f306dc9c883p-3))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.45f306dc9c883p-3))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0.4p-1022))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0.4p-1022))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0.4p-1022))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.4p-1022))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const -inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const -inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const 0x1.921fb54442d18p+3))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const -0x1.921fb54442d18p+3))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.921fb54442d18p+3))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.921fb54442d18p+3))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1p+0))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1p+0))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p+0))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p+0))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d19p-1022))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d19p-1022))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d19p-1022))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d19p-1022))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.45f306dc9c882p+1021))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.45f306dc9c882p+1021))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.45f306dc9c882p+1021))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.45f306dc9c882p+1021))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1p+0))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1p+0))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p+0))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p+0))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const -0x0p+0)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const 0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const -0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const 0x0p+0)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const -0x1p-1022)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const 0x1p-1022)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const -0x1p-1022)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const 0x1p-1022)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const -0x1p-1)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const 0x1p-1)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const -0x1p-1)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const 0x1p-1)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const -0x1p+0)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const 0x1p+0)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const -0x1p+0)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const 0x1p+0)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -inf) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const inf) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const -0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const 0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const -0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const 0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const -0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const 0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const -0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const 0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const -0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const 0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const -0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const 0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const -0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const 0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const -0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const 0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const -inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const -inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const -nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const -nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"div\" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const 0x1p-1)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const 0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const 0x1p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const inf)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const inf)) (f64.const 0x1p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const 0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const 0x1p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const inf)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const inf)) (f64.const 0x1p-1))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const 0x1p-1)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const 0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p+0))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p+0))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const inf)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const inf)) (f64.const 0x1p+0))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const -0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const 0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const -0x1p-1022)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const 0x1p-1022)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const -0x1p-1)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const 0x1p-1)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const -0x1p+0)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const 0x1p+0)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -inf) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const inf) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const -0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const 0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const -0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const 0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const -0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const 0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const -0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const 0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const -0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const 0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const -0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const 0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const -0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const 0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const -0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const 0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const -inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const -inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const -nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const -nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"min\" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const -0x1p-1)) (f64.const -0x0p+0))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const -0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const -0x1p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const -0x1p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0p+0))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const -inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const -inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const -inf)) (f64.const -0x1p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const -inf)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const -0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const -0x1p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const -inf)) (f64.const -0x1p-1))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const -inf)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const -0x1p-1)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const -0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p+0))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p+0))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const -inf)) (f64.const -0x1p+0))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const -inf)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const -0x0p+0)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const 0x0p+0)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const -0x1p-1022)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const 0x1p-1022)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const -0x1p-1)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const 0x1p-1)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const -0x1p+0)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const 0x1p+0)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -inf) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const inf) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const -0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const 0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const -0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const 0x0p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const -0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const 0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const -0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const 0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const -0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const 0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const -0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const 0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const -0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const 0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const -0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const 0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const -inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const -inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const inf)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const -nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const -nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const nan)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"max\" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sqrt\" (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"sqrt\" (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"sqrt\" (f64.const -0x0.0000000000001p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-537))\n(assert_return (invoke \"sqrt\" (f64.const -0x1p-1022)) (f64.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f64.const 0x1p-1022)) (f64.const 0x1p-511))\n(assert_return (invoke \"sqrt\" (f64.const -0x1p-1)) (f64.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f64.const 0x1p-1)) (f64.const 0x1.6a09e667f3bcdp-1))\n(assert_return (invoke \"sqrt\" (f64.const -0x1p+0)) (f64.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"sqrt\" (f64.const -0x1.921fb54442d18p+2)) (f64.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.40d931ff62705p+1))\n(assert_return (invoke \"sqrt\" (f64.const -0x1.fffffffffffffp+1023)) (f64.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+511))\n(assert_return (invoke \"sqrt\" (f64.const -inf)) (f64.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"sqrt\" (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"sqrt\" (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"sqrt\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"floor\" (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"floor\" (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"floor\" (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"floor\" (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"floor\" (f64.const -0x1p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"floor\" (f64.const 0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"floor\" (f64.const -0x1p-1)) (f64.const -0x1p+0))\n(assert_return (invoke \"floor\" (f64.const 0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"floor\" (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"floor\" (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"floor\" (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.cp+2))\n(assert_return (invoke \"floor\" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.8p+2))\n(assert_return (invoke \"floor\" (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"floor\" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"floor\" (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"floor\" (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"floor\" (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"floor\" (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"floor\" (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"floor\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"ceil\" (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"ceil\" (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"ceil\" (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"ceil\" (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"ceil\" (f64.const -0x1p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"ceil\" (f64.const 0x1p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"ceil\" (f64.const -0x1p-1)) (f64.const -0x0p+0))\n(assert_return (invoke \"ceil\" (f64.const 0x1p-1)) (f64.const 0x1p+0))\n(assert_return (invoke \"ceil\" (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"ceil\" (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"ceil\" (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.8p+2))\n(assert_return (invoke \"ceil\" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.cp+2))\n(assert_return (invoke \"ceil\" (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"ceil\" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"ceil\" (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"ceil\" (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"ceil\" (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"ceil\" (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"ceil\" (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"ceil\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"trunc\" (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"trunc\" (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"trunc\" (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"trunc\" (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"trunc\" (f64.const -0x1p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"trunc\" (f64.const 0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"trunc\" (f64.const -0x1p-1)) (f64.const -0x0p+0))\n(assert_return (invoke \"trunc\" (f64.const 0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"trunc\" (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"trunc\" (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"trunc\" (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.8p+2))\n(assert_return (invoke \"trunc\" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.8p+2))\n(assert_return (invoke \"trunc\" (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"trunc\" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"trunc\" (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"trunc\" (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"trunc\" (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"trunc\" (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"trunc\" (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"trunc\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"nearest\" (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"nearest\" (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"nearest\" (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"nearest\" (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"nearest\" (f64.const -0x1p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"nearest\" (f64.const 0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"nearest\" (f64.const -0x1p-1)) (f64.const -0x0p+0))\n(assert_return (invoke \"nearest\" (f64.const 0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"nearest\" (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"nearest\" (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"nearest\" (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.8p+2))\n(assert_return (invoke \"nearest\" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.8p+2))\n(assert_return (invoke \"nearest\" (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"nearest\" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"nearest\" (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"nearest\" (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"nearest\" (f64.const -nan)) (f64.const nan:canonical))\n(assert_return (invoke \"nearest\" (f64.const -nan:0x4000000000000)) (f64.const nan:arithmetic))\n(assert_return (invoke \"nearest\" (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"nearest\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n\n\n;; Type check\n\n(assert_invalid (module (func (result f64) (f64.add (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.div (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.max (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.min (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.mul (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.sub (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.ceil (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.floor (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.nearest (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.sqrt (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.trunc (i64.const 0)))) \"type mismatch\")\n"
  },
  {
    "path": "test/core/f64_bitwise.wast",
    "content": ";; Test all the f64 bitwise operators on major boundary values and all special\n;; values.\n\n(module\n  (func (export \"abs\") (param $x f64) (result f64) (f64.abs (local.get $x)))\n  (func (export \"neg\") (param $x f64) (result f64) (f64.neg (local.get $x)))\n  (func (export \"copysign\") (param $x f64) (param $y f64) (result f64) (f64.copysign (local.get $x) (local.get $y)))\n)\n\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const -0x1p-1)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const 0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const -0x1p-1)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const 0x1p-1)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const -0x1p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const -0x1p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const -inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const -inf)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const inf)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const -nan)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0p+0) (f64.const nan)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const -nan)) (f64.const -0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x0p+0) (f64.const nan)) (f64.const 0x0p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const -inf)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const inf)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const -inf)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const inf)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const -nan)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1022) (f64.const nan)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const -nan)) (f64.const -0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1022) (f64.const nan)) (f64.const 0x1p-1022))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const -inf)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const inf)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const -inf)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const inf)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const -nan)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p-1) (f64.const nan)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const -nan)) (f64.const -0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const 0x1p-1) (f64.const nan)) (f64.const 0x1p-1))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const -inf)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const inf)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const -inf)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const inf)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const -nan)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1p+0) (f64.const nan)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const -nan)) (f64.const -0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const 0x1p+0) (f64.const nan)) (f64.const 0x1p+0))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const -0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const 0x0p+0)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const -0x0p+0)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const 0x0p+0)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const -0x1p-1022)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const 0x1p-1022)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const -0x1p-1022)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const 0x1p-1022)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const -0x1p-1)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const 0x1p-1)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const -0x1p-1)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const 0x1p-1)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const -0x1p+0)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const 0x1p+0)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const -0x1p+0)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const 0x1p+0)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const -nan)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const -inf) (f64.const nan)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const -nan)) (f64.const -inf))\n(assert_return (invoke \"copysign\" (f64.const inf) (f64.const nan)) (f64.const inf))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const -0x0p+0)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const 0x0p+0)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const -0x0p+0)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const 0x0p+0)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const -0x1p-1022)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const 0x1p-1022)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const -0x1p-1022)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const 0x1p-1022)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const -0x1p-1)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const 0x1p-1)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const -0x1p-1)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const 0x1p-1)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const -0x1p+0)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const 0x1p+0)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const -0x1p+0)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const 0x1p+0)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const -inf)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const inf)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const -inf)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const inf)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const -nan)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const -nan) (f64.const nan)) (f64.const nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const -nan)) (f64.const -nan))\n(assert_return (invoke \"copysign\" (f64.const nan) (f64.const nan)) (f64.const nan))\n(assert_return (invoke \"abs\" (f64.const -0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"abs\" (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"abs\" (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"abs\" (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"abs\" (f64.const -0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"abs\" (f64.const 0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"abs\" (f64.const -0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"abs\" (f64.const 0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"abs\" (f64.const -0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"abs\" (f64.const 0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"abs\" (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"abs\" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"abs\" (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"abs\" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"abs\" (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"abs\" (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"abs\" (f64.const -nan)) (f64.const nan))\n(assert_return (invoke \"abs\" (f64.const nan)) (f64.const nan))\n(assert_return (invoke \"neg\" (f64.const -0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"neg\" (f64.const 0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"neg\" (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"neg\" (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))\n(assert_return (invoke \"neg\" (f64.const -0x1p-1022)) (f64.const 0x1p-1022))\n(assert_return (invoke \"neg\" (f64.const 0x1p-1022)) (f64.const -0x1p-1022))\n(assert_return (invoke \"neg\" (f64.const -0x1p-1)) (f64.const 0x1p-1))\n(assert_return (invoke \"neg\" (f64.const 0x1p-1)) (f64.const -0x1p-1))\n(assert_return (invoke \"neg\" (f64.const -0x1p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"neg\" (f64.const 0x1p+0)) (f64.const -0x1p+0))\n(assert_return (invoke \"neg\" (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))\n(assert_return (invoke \"neg\" (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))\n(assert_return (invoke \"neg\" (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"neg\" (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))\n(assert_return (invoke \"neg\" (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"neg\" (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"neg\" (f64.const -nan)) (f64.const nan))\n(assert_return (invoke \"neg\" (f64.const nan)) (f64.const -nan))\n\n\n;; Type check\n\n(assert_invalid (module (func (result f64) (f64.copysign (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.abs (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.neg (i64.const 0)))) \"type mismatch\")\n"
  },
  {
    "path": "test/core/f64_cmp.wast",
    "content": ";; Test all the f64 comparison operators on major boundary values and all\n;; special values.\n\n(module\n  (func (export \"eq\") (param $x f64) (param $y f64) (result i32) (f64.eq (local.get $x) (local.get $y)))\n  (func (export \"ne\") (param $x f64) (param $y f64) (result i32) (f64.ne (local.get $x) (local.get $y)))\n  (func (export \"lt\") (param $x f64) (param $y f64) (result i32) (f64.lt (local.get $x) (local.get $y)))\n  (func (export \"le\") (param $x f64) (param $y f64) (result i32) (f64.le (local.get $x) (local.get $y)))\n  (func (export \"gt\") (param $x f64) (param $y f64) (result i32) (f64.gt (local.get $x) (local.get $y)))\n  (func (export \"ge\") (param $x f64) (param $y f64) (result i32) (f64.ge (local.get $x) (local.get $y)))\n)\n\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -inf) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const inf) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -inf) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const inf) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const -nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -inf) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const inf) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"lt\" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -inf) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const inf) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"le\" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -inf) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const inf) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"gt\" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const -0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const 0x0p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const -0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const 0x1p-1022)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const -0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const 0x1p-1)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const -0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const -inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const inf)) (i32.const 1))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -inf) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const inf) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const -inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const inf)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const -nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan) (f64.const nan:0x4000000000000)) (i32.const 0))\n(assert_return (invoke \"ge\" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))\n\n\n;; Type check\n\n(assert_invalid (module (func (result f64) (f64.eq (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.ge (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.gt (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.le (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.lt (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result f64) (f64.ne (i64.const 0) (f32.const 0)))) \"type mismatch\")\n"
  },
  {
    "path": "test/core/fac.wast",
    "content": "(module\n  ;; Recursive factorial\n  (func (export \"fac-rec\") (param i64) (result i64)\n    (if (result i64) (i64.eq (local.get 0) (i64.const 0))\n      (then (i64.const 1))\n      (else\n        (i64.mul (local.get 0) (call 0 (i64.sub (local.get 0) (i64.const 1))))\n      )\n    )\n  )\n\n  ;; Recursive factorial named\n  (func $fac-rec-named (export \"fac-rec-named\") (param $n i64) (result i64)\n    (if (result i64) (i64.eq (local.get $n) (i64.const 0))\n      (then (i64.const 1))\n      (else\n        (i64.mul\n          (local.get $n)\n          (call $fac-rec-named (i64.sub (local.get $n) (i64.const 1)))\n        )\n      )\n    )\n  )\n\n  ;; Iterative factorial\n  (func (export \"fac-iter\") (param i64) (result i64)\n    (local i64 i64)\n    (local.set 1 (local.get 0))\n    (local.set 2 (i64.const 1))\n    (block\n      (loop\n        (if\n          (i64.eq (local.get 1) (i64.const 0))\n          (then (br 2))\n          (else\n            (local.set 2 (i64.mul (local.get 1) (local.get 2)))\n            (local.set 1 (i64.sub (local.get 1) (i64.const 1)))\n          )\n        )\n        (br 0)\n      )\n    )\n    (local.get 2)\n  )\n\n  ;; Iterative factorial named\n  (func (export \"fac-iter-named\") (param $n i64) (result i64)\n    (local $i i64)\n    (local $res i64)\n    (local.set $i (local.get $n))\n    (local.set $res (i64.const 1))\n    (block $done\n      (loop $loop\n        (if\n          (i64.eq (local.get $i) (i64.const 0))\n          (then (br $done))\n          (else\n            (local.set $res (i64.mul (local.get $i) (local.get $res)))\n            (local.set $i (i64.sub (local.get $i) (i64.const 1)))\n          )\n        )\n        (br $loop)\n      )\n    )\n    (local.get $res)\n  )\n\n  ;; Optimized factorial.\n  (func (export \"fac-opt\") (param i64) (result i64)\n    (local i64)\n    (local.set 1 (i64.const 1))\n    (block\n      (br_if 0 (i64.lt_s (local.get 0) (i64.const 2)))\n      (loop\n        (local.set 1 (i64.mul (local.get 1) (local.get 0)))\n        (local.set 0 (i64.add (local.get 0) (i64.const -1)))\n        (br_if 0 (i64.gt_s (local.get 0) (i64.const 1)))\n      )\n    )\n    (local.get 1)\n  )\n\n  ;; Iterative factorial without locals.\n  (func $pick0 (param i64) (result i64 i64)\n    (local.get 0) (local.get 0)\n  )\n  (func $pick1 (param i64 i64) (result i64 i64 i64)\n    (local.get 0) (local.get 1) (local.get 0)\n  )\n  (func (export \"fac-ssa\") (param i64) (result i64)\n    (i64.const 1) (local.get 0)\n    (loop $l (param i64 i64) (result i64)\n      (call $pick1) (call $pick1) (i64.mul)\n      (call $pick1) (i64.const 1) (i64.sub)\n      (call $pick0) (i64.const 0) (i64.gt_u)\n      (br_if $l)\n      (drop) (return)\n    )\n  )\n)\n\n(assert_return (invoke \"fac-rec\" (i64.const 25)) (i64.const 7034535277573963776))\n(assert_return (invoke \"fac-iter\" (i64.const 25)) (i64.const 7034535277573963776))\n(assert_return (invoke \"fac-rec-named\" (i64.const 25)) (i64.const 7034535277573963776))\n(assert_return (invoke \"fac-iter-named\" (i64.const 25)) (i64.const 7034535277573963776))\n(assert_return (invoke \"fac-opt\" (i64.const 25)) (i64.const 7034535277573963776))\n(assert_return (invoke \"fac-ssa\" (i64.const 25)) (i64.const 7034535277573963776))\n\n(assert_exhaustion (invoke \"fac-rec\" (i64.const 1073741824)) \"call stack exhausted\")\n"
  },
  {
    "path": "test/core/float_exprs.wast",
    "content": ";; Test interesting floating-point \"expressions\". These tests contain code\n;; patterns which tempt common value-changing optimizations.\n\n;; Test that x*y+z is not done with x87-style intermediate precision.\n\n(module\n  (func (export \"f64.no_contraction\") (param $x f64) (param $y f64) (param $z f64) (result f64)\n    (f64.add (f64.mul (local.get $x) (local.get $y)) (local.get $z)))\n)\n\n(assert_return (invoke \"f64.no_contraction\" (f64.const -0x1.9e87ce14273afp-103) (f64.const 0x1.2515ad31db63ep+664) (f64.const 0x1.868c6685e6185p+533)) (f64.const -0x1.da94885b11493p+561))\n(assert_return (invoke \"f64.no_contraction\" (f64.const 0x1.da21c460a6f44p+52) (f64.const 0x1.60859d2e7714ap-321) (f64.const 0x1.e63f1b7b660e1p-302)) (f64.const 0x1.4672f256d1794p-268))\n(assert_return (invoke \"f64.no_contraction\" (f64.const -0x1.f3eaf43f327cp-594) (f64.const 0x1.dfcc009906b57p+533) (f64.const 0x1.5984e03c520a1p-104)) (f64.const -0x1.d4797fb3db166p-60))\n(assert_return (invoke \"f64.no_contraction\" (f64.const 0x1.dab6c772cb2e2p-69) (f64.const -0x1.d761663679a84p-101) (f64.const 0x1.f22f92c843226p-218)) (f64.const -0x1.b50d72dfcef68p-169))\n(assert_return (invoke \"f64.no_contraction\" (f64.const -0x1.87c5def1e4d3dp-950) (f64.const -0x1.50cd5dab2207fp+935) (f64.const 0x1.e629bd0da8c5dp-54)) (f64.const 0x1.01b6feb4e78a7p-14))\n\n;; Test that x*y+z is not folded to fma.\n\n(module\n  (func (export \"f32.no_fma\") (param $x f32) (param $y f32) (param $z f32) (result f32)\n    (f32.add (f32.mul (local.get $x) (local.get $y)) (local.get $z)))\n  (func (export \"f64.no_fma\") (param $x f64) (param $y f64) (param $z f64) (result f64)\n    (f64.add (f64.mul (local.get $x) (local.get $y)) (local.get $z)))\n)\n\n(assert_return (invoke \"f32.no_fma\" (f32.const 0x1.a78402p+124) (f32.const 0x1.cf8548p-23) (f32.const 0x1.992adap+107)) (f32.const 0x1.a5262cp+107))\n(assert_return (invoke \"f32.no_fma\" (f32.const 0x1.ed15a4p-28) (f32.const -0x1.613c72p-50) (f32.const 0x1.4757bp-88)) (f32.const -0x1.5406b8p-77))\n(assert_return (invoke \"f32.no_fma\" (f32.const 0x1.ae63a2p+37) (f32.const 0x1.b3a59ap-13) (f32.const 0x1.c16918p+10)) (f32.const 0x1.6e385cp+25))\n(assert_return (invoke \"f32.no_fma\" (f32.const 0x1.2a77fap-8) (f32.const -0x1.bb7356p+22) (f32.const -0x1.32be2ap+1)) (f32.const -0x1.0286d4p+15))\n(assert_return (invoke \"f32.no_fma\" (f32.const 0x1.298fb6p+126) (f32.const -0x1.03080cp-70) (f32.const -0x1.418de6p+34)) (f32.const -0x1.2d15c6p+56))\n(assert_return (invoke \"f64.no_fma\" (f64.const 0x1.ac357ff46eed4p+557) (f64.const 0x1.852c01a5e7297p+430) (f64.const -0x1.05995704eda8ap+987)) (f64.const 0x1.855d905d338ep+987))\n(assert_return (invoke \"f64.no_fma\" (f64.const 0x1.e2fd6bf32010cp+749) (f64.const 0x1.01c2238d405e4p-130) (f64.const 0x1.2ecc0db4b9f94p+573)) (f64.const 0x1.e64eb07e063bcp+619))\n(assert_return (invoke \"f64.no_fma\" (f64.const 0x1.92b7c7439ede3p-721) (f64.const -0x1.6aa97586d3de6p+1011) (f64.const 0x1.8de4823f6358ap+237)) (f64.const -0x1.1d4139fd20ecdp+291))\n(assert_return (invoke \"f64.no_fma\" (f64.const -0x1.466d30bddb453p-386) (f64.const -0x1.185a4d739c7aap+443) (f64.const 0x1.5f9c436fbfc7bp+55)) (f64.const 0x1.bd61a350fcc1ap+57))\n(assert_return (invoke \"f64.no_fma\" (f64.const 0x1.7e2c44058a799p+52) (f64.const 0x1.c73b71765b8b2p+685) (f64.const -0x1.16c641df0b108p+690)) (f64.const 0x1.53ccb53de0bd1p+738))\n\n;; Test that x+0.0 is not folded to x.\n;; See IEEE 754-2008 10.4 \"Literal meaning and value-changing optimizations\".\n\n(module\n  (func (export \"f32.no_fold_add_zero\") (param $x f32) (result f32)\n    (f32.add (local.get $x) (f32.const 0.0)))\n  (func (export \"f64.no_fold_add_zero\") (param $x f64) (result f64)\n    (f64.add (local.get $x) (f64.const 0.0)))\n)\n\n(assert_return (invoke \"f32.no_fold_add_zero\" (f32.const -0.0)) (f32.const 0.0))\n(assert_return (invoke \"f64.no_fold_add_zero\" (f64.const -0.0)) (f64.const 0.0))\n(assert_return (invoke \"f32.no_fold_add_zero\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"f64.no_fold_add_zero\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n\n;; Test that 0.0 - x is not folded to -x.\n\n(module\n  (func (export \"f32.no_fold_zero_sub\") (param $x f32) (result f32)\n    (f32.sub (f32.const 0.0) (local.get $x)))\n  (func (export \"f64.no_fold_zero_sub\") (param $x f64) (result f64)\n    (f64.sub (f64.const 0.0) (local.get $x)))\n)\n\n(assert_return (invoke \"f32.no_fold_zero_sub\" (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f64.no_fold_zero_sub\" (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f32.no_fold_zero_sub\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"f64.no_fold_zero_sub\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n\n;; Test that x - 0.0 is not folded to x.\n\n(module\n  (func (export \"f32.no_fold_sub_zero\") (param $x f32) (result f32)\n    (f32.sub (local.get $x) (f32.const 0.0)))\n  (func (export \"f64.no_fold_sub_zero\") (param $x f64) (result f64)\n    (f64.sub (local.get $x) (f64.const 0.0)))\n)\n\n(assert_return (invoke \"f32.no_fold_sub_zero\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"f64.no_fold_sub_zero\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n\n;; Test that x*0.0 is not folded to 0.0.\n\n(module\n  (func (export \"f32.no_fold_mul_zero\") (param $x f32) (result f32)\n    (f32.mul (local.get $x) (f32.const 0.0)))\n  (func (export \"f64.no_fold_mul_zero\") (param $x f64) (result f64)\n    (f64.mul (local.get $x) (f64.const 0.0)))\n)\n\n(assert_return (invoke \"f32.no_fold_mul_zero\" (f32.const -0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_mul_zero\" (f32.const -1.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_mul_zero\" (f32.const -2.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_mul_zero\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"f64.no_fold_mul_zero\" (f64.const -0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_mul_zero\" (f64.const -1.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_mul_zero\" (f64.const -2.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_mul_zero\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n\n;; Test that x*1.0 is not folded to x.\n;; See IEEE 754-2008 10.4 \"Literal meaning and value-changing optimizations\".\n\n(module\n  (func (export \"f32.no_fold_mul_one\") (param $x f32) (result f32)\n    (f32.mul (local.get $x) (f32.const 1.0)))\n  (func (export \"f64.no_fold_mul_one\") (param $x f64) (result f64)\n    (f64.mul (local.get $x) (f64.const 1.0)))\n)\n\n(assert_return (invoke \"f32.no_fold_mul_one\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"f64.no_fold_mul_one\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n\n;; Test that 0.0/x is not folded to 0.0.\n\n(module\n  (func (export \"f32.no_fold_zero_div\") (param $x f32) (result f32)\n    (f32.div (f32.const 0.0) (local.get $x)))\n  (func (export \"f64.no_fold_zero_div\") (param $x f64) (result f64)\n    (f64.div (f64.const 0.0) (local.get $x)))\n)\n\n(assert_return (invoke \"f32.no_fold_zero_div\" (f32.const 0.0)) (f32.const nan:canonical))\n(assert_return (invoke \"f32.no_fold_zero_div\" (f32.const -0.0)) (f32.const nan:canonical))\n(assert_return (invoke \"f32.no_fold_zero_div\" (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"f32.no_fold_zero_div\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"f64.no_fold_zero_div\" (f64.const 0.0)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_zero_div\" (f64.const -0.0)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_zero_div\" (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_zero_div\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n\n;; Test that x/1.0 is not folded to x.\n\n(module\n  (func (export \"f32.no_fold_div_one\") (param $x f32) (result f32)\n    (f32.div (local.get $x) (f32.const 1.0)))\n  (func (export \"f64.no_fold_div_one\") (param $x f64) (result f64)\n    (f64.div (local.get $x) (f64.const 1.0)))\n)\n\n(assert_return (invoke \"f32.no_fold_div_one\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"f64.no_fold_div_one\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n\n;; Test that x/-1.0 is not folded to -x.\n\n(module\n  (func (export \"f32.no_fold_div_neg1\") (param $x f32) (result f32)\n    (f32.div (local.get $x) (f32.const -1.0)))\n  (func (export \"f64.no_fold_div_neg1\") (param $x f64) (result f64)\n    (f64.div (local.get $x) (f64.const -1.0)))\n)\n\n(assert_return (invoke \"f32.no_fold_div_neg1\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"f64.no_fold_div_neg1\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n\n;; Test that -0.0 - x is not folded to -x.\n\n(module\n  (func (export \"f32.no_fold_neg0_sub\") (param $x f32) (result f32)\n    (f32.sub (f32.const -0.0) (local.get $x)))\n  (func (export \"f64.no_fold_neg0_sub\") (param $x f64) (result f64)\n    (f64.sub (f64.const -0.0) (local.get $x)))\n)\n\n(assert_return (invoke \"f32.no_fold_neg0_sub\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"f64.no_fold_neg0_sub\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n\n;; Test that -1.0 * x is not folded to -x.\n\n(module\n  (func (export \"f32.no_fold_neg1_mul\") (param $x f32) (result f32)\n    (f32.mul (f32.const -1.0) (local.get $x)))\n  (func (export \"f64.no_fold_neg1_mul\") (param $x f64) (result f64)\n    (f64.mul (f64.const -1.0) (local.get $x)))\n)\n\n(assert_return (invoke \"f32.no_fold_neg1_mul\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"f64.no_fold_neg1_mul\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n\n;; Test that x == x is not folded to true.\n\n(module\n  (func (export \"f32.no_fold_eq_self\") (param $x f32) (result i32)\n    (f32.eq (local.get $x) (local.get $x)))\n  (func (export \"f64.no_fold_eq_self\") (param $x f64) (result i32)\n    (f64.eq (local.get $x) (local.get $x)))\n)\n\n(assert_return (invoke \"f32.no_fold_eq_self\" (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"f64.no_fold_eq_self\" (f64.const nan)) (i32.const 0))\n\n;; Test that x != x is not folded to false.\n\n(module\n  (func (export \"f32.no_fold_ne_self\") (param $x f32) (result i32)\n    (f32.ne (local.get $x) (local.get $x)))\n  (func (export \"f64.no_fold_ne_self\") (param $x f64) (result i32)\n    (f64.ne (local.get $x) (local.get $x)))\n)\n\n(assert_return (invoke \"f32.no_fold_ne_self\" (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"f64.no_fold_ne_self\" (f64.const nan)) (i32.const 1))\n\n;; Test that x - x is not folded to 0.0.\n\n(module\n  (func (export \"f32.no_fold_sub_self\") (param $x f32) (result f32)\n    (f32.sub (local.get $x) (local.get $x)))\n  (func (export \"f64.no_fold_sub_self\") (param $x f64) (result f64)\n    (f64.sub (local.get $x) (local.get $x)))\n)\n\n(assert_return (invoke \"f32.no_fold_sub_self\" (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"f32.no_fold_sub_self\" (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_sub_self\" (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_sub_self\" (f64.const nan)) (f64.const nan:canonical))\n\n;; Test that x / x is not folded to 1.0.\n\n(module\n  (func (export \"f32.no_fold_div_self\") (param $x f32) (result f32)\n    (f32.div (local.get $x) (local.get $x)))\n  (func (export \"f64.no_fold_div_self\") (param $x f64) (result f64)\n    (f64.div (local.get $x) (local.get $x)))\n)\n\n(assert_return (invoke \"f32.no_fold_div_self\" (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"f32.no_fold_div_self\" (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"f32.no_fold_div_self\" (f32.const 0.0)) (f32.const nan:canonical))\n(assert_return (invoke \"f32.no_fold_div_self\" (f32.const -0.0)) (f32.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_div_self\" (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_div_self\" (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_div_self\" (f64.const 0.0)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_div_self\" (f64.const -0.0)) (f64.const nan:canonical))\n\n;; Test that x/3 is not folded to x*(1/3).\n\n(module\n  (func (export \"f32.no_fold_div_3\") (param $x f32) (result f32)\n    (f32.div (local.get $x) (f32.const 3.0)))\n  (func (export \"f64.no_fold_div_3\") (param $x f64) (result f64)\n    (f64.div (local.get $x) (f64.const 3.0)))\n)\n\n(assert_return (invoke \"f32.no_fold_div_3\" (f32.const -0x1.359c26p+50)) (f32.const -0x1.9cd032p+48))\n(assert_return (invoke \"f32.no_fold_div_3\" (f32.const -0x1.e45646p+93)) (f32.const -0x1.42e42ep+92))\n(assert_return (invoke \"f32.no_fold_div_3\" (f32.const -0x1.2a3916p-83)) (f32.const -0x1.8da172p-85))\n(assert_return (invoke \"f32.no_fold_div_3\" (f32.const -0x1.1f8b38p-124)) (f32.const -0x1.7f644ap-126))\n(assert_return (invoke \"f32.no_fold_div_3\" (f32.const -0x1.d64f64p-56)) (f32.const -0x1.398a42p-57))\n(assert_return (invoke \"f64.no_fold_div_3\" (f64.const -0x1.a8a88d29e2cc3p+632)) (f64.const -0x1.1b1b08c69732dp+631))\n(assert_return (invoke \"f64.no_fold_div_3\" (f64.const -0x1.bcf52dc950972p-167)) (f64.const -0x1.28a373db8b0f7p-168))\n(assert_return (invoke \"f64.no_fold_div_3\" (f64.const 0x1.bd3c0d989f7a4p-874)) (f64.const 0x1.28d2b3bb14fc3p-875))\n(assert_return (invoke \"f64.no_fold_div_3\" (f64.const -0x1.0138bf530a53cp+1007)) (f64.const -0x1.56f6546eb86fbp+1005))\n(assert_return (invoke \"f64.no_fold_div_3\" (f64.const 0x1.052b87f9d794dp+415)) (f64.const 0x1.5c3a0aa274c67p+413))\n\n;; Test that (x*z)+(y*z) is not folded to (x+y)*z.\n\n(module\n  (func (export \"f32.no_factor\") (param $x f32) (param $y f32) (param $z f32) (result f32)\n    (f32.add (f32.mul (local.get $x) (local.get $z)) (f32.mul (local.get $y) (local.get $z))))\n  (func (export \"f64.no_factor\") (param $x f64) (param $y f64) (param $z f64) (result f64)\n    (f64.add (f64.mul (local.get $x) (local.get $z)) (f64.mul (local.get $y) (local.get $z))))\n)\n\n(assert_return (invoke \"f32.no_factor\" (f32.const -0x1.4e2352p+40) (f32.const -0x1.842e2cp+49) (f32.const 0x1.eea602p+59)) (f32.const -0x1.77a7dp+109))\n(assert_return (invoke \"f32.no_factor\" (f32.const -0x1.b4e7f6p-6) (f32.const 0x1.8c990cp-5) (f32.const -0x1.70cc02p-9)) (f32.const -0x1.00a342p-14))\n(assert_return (invoke \"f32.no_factor\" (f32.const -0x1.06722ep-41) (f32.const 0x1.eed3cep-64) (f32.const 0x1.5c5558p+123)) (f32.const -0x1.651aaep+82))\n(assert_return (invoke \"f32.no_factor\" (f32.const -0x1.f8c6a4p-64) (f32.const 0x1.08c806p-83) (f32.const 0x1.b5ceccp+118)) (f32.const -0x1.afa15p+55))\n(assert_return (invoke \"f32.no_factor\" (f32.const -0x1.3aaa1ep-84) (f32.const 0x1.c6d5eep-71) (f32.const 0x1.8d2924p+20)) (f32.const 0x1.60c9cep-50))\n(assert_return (invoke \"f64.no_factor\" (f64.const 0x1.3adeda9144977p-424) (f64.const 0x1.c15af887049e1p-462) (f64.const -0x1.905179c4c4778p-225)) (f64.const -0x1.ec606bcb87b1ap-649))\n(assert_return (invoke \"f64.no_factor\" (f64.const 0x1.3c84821c1d348p-662) (f64.const -0x1.4ffd4c77ad037p-1009) (f64.const -0x1.dd275335c6f4p-957)) (f64.const 0x0p+0))\n(assert_return (invoke \"f64.no_factor\" (f64.const -0x1.074f372347051p-334) (f64.const -0x1.aaeef661f4c96p-282) (f64.const -0x1.9bd34abe8696dp+479)) (f64.const 0x1.5767029593e2p+198))\n(assert_return (invoke \"f64.no_factor\" (f64.const -0x1.c4ded58a6f389p-289) (f64.const 0x1.ba6fdef5d59c9p-260) (f64.const -0x1.c1201c0470205p-253)) (f64.const -0x1.841ada2e0f184p-512))\n(assert_return (invoke \"f64.no_factor\" (f64.const 0x1.9d3688f8e375ap-608) (f64.const 0x1.bf91311588256p-579) (f64.const -0x1.1605a6b5d5ff8p+489)) (f64.const -0x1.e6118ca76af53p-90))\n\n;; Test that (x+y)*z is not folded to (x*z)+(y*z).\n\n(module\n  (func (export \"f32.no_distribute\") (param $x f32) (param $y f32) (param $z f32) (result f32)\n    (f32.mul (f32.add (local.get $x) (local.get $y)) (local.get $z)))\n  (func (export \"f64.no_distribute\") (param $x f64) (param $y f64) (param $z f64) (result f64)\n    (f64.mul (f64.add (local.get $x) (local.get $y)) (local.get $z)))\n)\n\n(assert_return (invoke \"f32.no_distribute\" (f32.const -0x1.4e2352p+40) (f32.const -0x1.842e2cp+49) (f32.const 0x1.eea602p+59)) (f32.const -0x1.77a7d2p+109))\n(assert_return (invoke \"f32.no_distribute\" (f32.const -0x1.b4e7f6p-6) (f32.const 0x1.8c990cp-5) (f32.const -0x1.70cc02p-9)) (f32.const -0x1.00a34p-14))\n(assert_return (invoke \"f32.no_distribute\" (f32.const -0x1.06722ep-41) (f32.const 0x1.eed3cep-64) (f32.const 0x1.5c5558p+123)) (f32.const -0x1.651abp+82))\n(assert_return (invoke \"f32.no_distribute\" (f32.const -0x1.f8c6a4p-64) (f32.const 0x1.08c806p-83) (f32.const 0x1.b5ceccp+118)) (f32.const -0x1.afa14ep+55))\n(assert_return (invoke \"f32.no_distribute\" (f32.const -0x1.3aaa1ep-84) (f32.const 0x1.c6d5eep-71) (f32.const 0x1.8d2924p+20)) (f32.const 0x1.60c9ccp-50))\n(assert_return (invoke \"f64.no_distribute\" (f64.const 0x1.3adeda9144977p-424) (f64.const 0x1.c15af887049e1p-462) (f64.const -0x1.905179c4c4778p-225)) (f64.const -0x1.ec606bcb87b1bp-649))\n(assert_return (invoke \"f64.no_distribute\" (f64.const 0x1.3c84821c1d348p-662) (f64.const -0x1.4ffd4c77ad037p-1009) (f64.const -0x1.dd275335c6f4p-957)) (f64.const -0x0p+0))\n(assert_return (invoke \"f64.no_distribute\" (f64.const -0x1.074f372347051p-334) (f64.const -0x1.aaeef661f4c96p-282) (f64.const -0x1.9bd34abe8696dp+479)) (f64.const 0x1.5767029593e1fp+198))\n(assert_return (invoke \"f64.no_distribute\" (f64.const -0x1.c4ded58a6f389p-289) (f64.const 0x1.ba6fdef5d59c9p-260) (f64.const -0x1.c1201c0470205p-253)) (f64.const -0x1.841ada2e0f183p-512))\n(assert_return (invoke \"f64.no_distribute\" (f64.const 0x1.9d3688f8e375ap-608) (f64.const 0x1.bf91311588256p-579) (f64.const -0x1.1605a6b5d5ff8p+489)) (f64.const -0x1.e6118ca76af52p-90))\n\n;; Test that x*(y/z) is not folded to (x*y)/z.\n\n(module\n  (func (export \"f32.no_regroup_div_mul\") (param $x f32) (param $y f32) (param $z f32) (result f32)\n    (f32.mul (local.get $x) (f32.div (local.get $y) (local.get $z))))\n  (func (export \"f64.no_regroup_div_mul\") (param $x f64) (param $y f64) (param $z f64) (result f64)\n    (f64.mul (local.get $x) (f64.div (local.get $y) (local.get $z))))\n)\n\n(assert_return (invoke \"f32.no_regroup_div_mul\" (f32.const -0x1.2d14a6p-115) (f32.const -0x1.575a6cp-64) (f32.const 0x1.5cee0ep-116)) (f32.const 0x1.2844cap-63))\n(assert_return (invoke \"f32.no_regroup_div_mul\" (f32.const -0x1.454738p+91) (f32.const -0x1.b28a66p-115) (f32.const -0x1.f53908p+72)) (f32.const -0x0p+0))\n(assert_return (invoke \"f32.no_regroup_div_mul\" (f32.const -0x1.6be56ep+16) (f32.const -0x1.b46fc6p-21) (f32.const -0x1.a51df6p-123)) (f32.const -0x1.792258p+118))\n(assert_return (invoke \"f32.no_regroup_div_mul\" (f32.const -0x1.c343f8p-94) (f32.const 0x1.e4d906p+73) (f32.const 0x1.be69f8p+68)) (f32.const -0x1.ea1df2p-89))\n(assert_return (invoke \"f32.no_regroup_div_mul\" (f32.const 0x1.c6ae76p+112) (f32.const 0x1.fc953cp+24) (f32.const -0x1.60b3e8p+71)) (f32.const -0x1.47d0eap+66))\n(assert_return (invoke \"f64.no_regroup_div_mul\" (f64.const 0x1.3c04b815e30bp-423) (f64.const -0x1.379646fd98127p-119) (f64.const 0x1.bddb158506031p-642)) (f64.const -0x1.b9b3301f2dd2dp+99))\n(assert_return (invoke \"f64.no_regroup_div_mul\" (f64.const 0x1.46b3a402f86d5p+337) (f64.const 0x1.6fbf1b9e1798dp-447) (f64.const -0x1.bd9704a5a6a06p+797)) (f64.const -0x0p+0))\n(assert_return (invoke \"f64.no_regroup_div_mul\" (f64.const 0x1.6c9765bb4347fp-479) (f64.const 0x1.a4af42e34a141p+902) (f64.const 0x1.d2dde70eb68f9p-448)) (f64.const inf))\n(assert_return (invoke \"f64.no_regroup_div_mul\" (f64.const -0x1.706023645be72p+480) (f64.const -0x1.6c229f7d9101dp+611) (f64.const -0x1.4d50fa68d3d9ep+836)) (f64.const -0x1.926fa3cacc651p+255))\n(assert_return (invoke \"f64.no_regroup_div_mul\" (f64.const 0x1.8cc63d8caf4c7p-599) (f64.const 0x1.8671ac4c35753p-878) (f64.const -0x1.ef35b1695e659p-838)) (f64.const -0x1.38d55f56406dp-639))\n\n;; Test that (x*y)/z is not folded to x*(y/z).\n\n(module\n  (func (export \"f32.no_regroup_mul_div\") (param $x f32) (param $y f32) (param $z f32) (result f32)\n    (f32.div (f32.mul (local.get $x) (local.get $y)) (local.get $z)))\n  (func (export \"f64.no_regroup_mul_div\") (param $x f64) (param $y f64) (param $z f64) (result f64)\n    (f64.div (f64.mul (local.get $x) (local.get $y)) (local.get $z)))\n)\n\n(assert_return (invoke \"f32.no_regroup_mul_div\" (f32.const -0x1.2d14a6p-115) (f32.const -0x1.575a6cp-64) (f32.const 0x1.5cee0ep-116)) (f32.const 0x0p+0))\n(assert_return (invoke \"f32.no_regroup_mul_div\" (f32.const -0x1.454738p+91) (f32.const -0x1.b28a66p-115) (f32.const -0x1.f53908p+72)) (f32.const -0x1.1a00e8p-96))\n(assert_return (invoke \"f32.no_regroup_mul_div\" (f32.const -0x1.6be56ep+16) (f32.const -0x1.b46fc6p-21) (f32.const -0x1.a51df6p-123)) (f32.const -0x1.79225ap+118))\n(assert_return (invoke \"f32.no_regroup_mul_div\" (f32.const -0x1.c343f8p-94) (f32.const 0x1.e4d906p+73) (f32.const 0x1.be69f8p+68)) (f32.const -0x1.ea1df4p-89))\n(assert_return (invoke \"f32.no_regroup_mul_div\" (f32.const 0x1.c6ae76p+112) (f32.const 0x1.fc953cp+24) (f32.const -0x1.60b3e8p+71)) (f32.const -inf))\n(assert_return (invoke \"f64.no_regroup_mul_div\" (f64.const 0x1.3c04b815e30bp-423) (f64.const -0x1.379646fd98127p-119) (f64.const 0x1.bddb158506031p-642)) (f64.const -0x1.b9b3301f2dd2ep+99))\n(assert_return (invoke \"f64.no_regroup_mul_div\" (f64.const 0x1.46b3a402f86d5p+337) (f64.const 0x1.6fbf1b9e1798dp-447) (f64.const -0x1.bd9704a5a6a06p+797)) (f64.const -0x1.0da0b6328e09p-907))\n(assert_return (invoke \"f64.no_regroup_mul_div\" (f64.const 0x1.6c9765bb4347fp-479) (f64.const 0x1.a4af42e34a141p+902) (f64.const 0x1.d2dde70eb68f9p-448)) (f64.const 0x1.4886b6d9a9a79p+871))\n(assert_return (invoke \"f64.no_regroup_mul_div\" (f64.const -0x1.706023645be72p+480) (f64.const -0x1.6c229f7d9101dp+611) (f64.const -0x1.4d50fa68d3d9ep+836)) (f64.const -inf))\n(assert_return (invoke \"f64.no_regroup_mul_div\" (f64.const 0x1.8cc63d8caf4c7p-599) (f64.const 0x1.8671ac4c35753p-878) (f64.const -0x1.ef35b1695e659p-838)) (f64.const -0x0p+0))\n\n;; Test that x+y+z+w is not reassociated.\n\n(module\n  (func (export \"f32.no_reassociate_add\") (param $x f32) (param $y f32) (param $z f32) (param $w f32) (result f32)\n    (f32.add (f32.add (f32.add (local.get $x) (local.get $y)) (local.get $z)) (local.get $w)))\n  (func (export \"f64.no_reassociate_add\") (param $x f64) (param $y f64) (param $z f64) (param $w f64) (result f64)\n    (f64.add (f64.add (f64.add (local.get $x) (local.get $y)) (local.get $z)) (local.get $w)))\n)\n\n(assert_return (invoke \"f32.no_reassociate_add\" (f32.const -0x1.5f7ddcp+44) (f32.const 0x1.854e1p+34) (f32.const -0x1.b2068cp+47) (f32.const -0x1.209692p+41)) (f32.const -0x1.e26c76p+47))\n(assert_return (invoke \"f32.no_reassociate_add\" (f32.const 0x1.da3b78p-9) (f32.const -0x1.4312fap-7) (f32.const 0x1.0395e6p-4) (f32.const -0x1.6d5ea6p-7)) (f32.const 0x1.78b31ap-5))\n(assert_return (invoke \"f32.no_reassociate_add\" (f32.const -0x1.fdb93ap+34) (f32.const -0x1.b6fce6p+41) (f32.const 0x1.c131d8p+44) (f32.const 0x1.8835b6p+38)) (f32.const 0x1.8ff3a2p+44))\n(assert_return (invoke \"f32.no_reassociate_add\" (f32.const 0x1.1739fcp+47) (f32.const 0x1.a4b186p+49) (f32.const -0x1.0c623cp+35) (f32.const 0x1.16a102p+51)) (f32.const 0x1.913ff6p+51))\n(assert_return (invoke \"f32.no_reassociate_add\" (f32.const 0x1.733cfap+108) (f32.const -0x1.38d30cp+108) (f32.const 0x1.2f5854p+105) (f32.const -0x1.ccb058p+94)) (f32.const 0x1.813716p+106))\n(assert_return (invoke \"f64.no_reassociate_add\" (f64.const -0x1.697a4d9ff19a6p+841) (f64.const 0x1.b305466238397p+847) (f64.const 0x1.e0b2d9bfb4e72p+855) (f64.const -0x1.6e1f3ae2b06bbp+857)) (f64.const -0x1.eb0e5936f087ap+856))\n(assert_return (invoke \"f64.no_reassociate_add\" (f64.const 0x1.00ef6746b30e1p-543) (f64.const 0x1.cc1cfafdf3fe1p-544) (f64.const -0x1.f7726df3ecba6p-543) (f64.const -0x1.b26695f99d307p-594)) (f64.const -0x1.074892e3fad76p-547))\n(assert_return (invoke \"f64.no_reassociate_add\" (f64.const -0x1.e807b3bd6d854p+440) (f64.const 0x1.cedae26c2c5fp+407) (f64.const -0x1.00ab6e1442541p+437) (f64.const 0x1.28538a55997bdp+397)) (f64.const -0x1.040e90bf871ebp+441))\n(assert_return (invoke \"f64.no_reassociate_add\" (f64.const -0x1.ba2b6f35a2402p-317) (f64.const 0x1.ad1c3fea7cd9ep-307) (f64.const -0x1.93aace2bf1261p-262) (f64.const 0x1.9fddbe472847ep-260)) (f64.const 0x1.3af30abc2c01bp-260))\n(assert_return (invoke \"f64.no_reassociate_add\" (f64.const -0x1.ccb9c6092fb1dp+641) (f64.const -0x1.4b7c28c108244p+614) (f64.const 0x1.8a7cefef4bde1p+646) (f64.const -0x1.901b28b08b482p+644)) (f64.const 0x1.1810579194126p+646))\n\n;; Test that x*y*z*w is not reassociated.\n\n(module\n  (func (export \"f32.no_reassociate_mul\") (param $x f32) (param $y f32) (param $z f32) (param $w f32) (result f32)\n    (f32.mul (f32.mul (f32.mul (local.get $x) (local.get $y)) (local.get $z)) (local.get $w)))\n  (func (export \"f64.no_reassociate_mul\") (param $x f64) (param $y f64) (param $z f64) (param $w f64) (result f64)\n    (f64.mul (f64.mul (f64.mul (local.get $x) (local.get $y)) (local.get $z)) (local.get $w)))\n)\n\n(assert_return (invoke \"f32.no_reassociate_mul\" (f32.const 0x1.950ba8p-116) (f32.const 0x1.efdacep-33) (f32.const -0x1.5f9bcp+102) (f32.const 0x1.f04508p-56)) (f32.const -0x1.ff356ep-101))\n(assert_return (invoke \"f32.no_reassociate_mul\" (f32.const 0x1.5990aep-56) (f32.const -0x1.7dfb04p+102) (f32.const -0x1.4f774ap-125) (f32.const -0x1.595fe6p+70)) (f32.const -0x1.c7c8fcp-8))\n(assert_return (invoke \"f32.no_reassociate_mul\" (f32.const 0x1.6ad9a4p-48) (f32.const -0x1.9138aap+55) (f32.const -0x1.4a774ep-40) (f32.const 0x1.1ff08p+76)) (f32.const 0x1.9cd8ecp+44))\n(assert_return (invoke \"f32.no_reassociate_mul\" (f32.const 0x1.e1caecp-105) (f32.const 0x1.af0dd2p+77) (f32.const -0x1.016eep+56) (f32.const -0x1.ab70d6p+59)) (f32.const 0x1.54870ep+89))\n(assert_return (invoke \"f32.no_reassociate_mul\" (f32.const -0x1.3b1dcp-99) (f32.const 0x1.4e5a34p-49) (f32.const -0x1.38ba5ap+3) (f32.const 0x1.7fb8eep+59)) (f32.const 0x1.5bbf98p-85))\n(assert_return (invoke \"f64.no_reassociate_mul\" (f64.const -0x1.e7842ab7181p-667) (f64.const -0x1.fabf40ceeceafp+990) (f64.const -0x1.1a38a825ab01ap-376) (f64.const -0x1.27e8ea469b14fp+664)) (f64.const 0x1.336eb428af4f3p+613))\n(assert_return (invoke \"f64.no_reassociate_mul\" (f64.const 0x1.4ca2292a6acbcp+454) (f64.const 0x1.6ffbab850089ap-516) (f64.const -0x1.547c32e1f5b93p-899) (f64.const -0x1.c7571d9388375p+540)) (f64.const 0x1.1ac796954fc1p-419))\n(assert_return (invoke \"f64.no_reassociate_mul\" (f64.const 0x1.73881a52e0401p-501) (f64.const -0x1.1b68dd9efb1a7p+788) (f64.const 0x1.d1c5e6a3eb27cp-762) (f64.const -0x1.56cb2fcc7546fp+88)) (f64.const 0x1.f508db92c34efp-386))\n(assert_return (invoke \"f64.no_reassociate_mul\" (f64.const 0x1.2efa87859987cp+692) (f64.const 0x1.68e4373e241p-423) (f64.const 0x1.4e2d0fb383a57p+223) (f64.const -0x1.301d3265c737bp-23)) (f64.const -0x1.4b2b6c393f30cp+470))\n(assert_return (invoke \"f64.no_reassociate_mul\" (f64.const 0x1.1013f7498b95fp-234) (f64.const 0x1.d2d1c36fff138p-792) (f64.const -0x1.cbf1824ea7bfdp+728) (f64.const -0x1.440da9c8b836dp-599)) (f64.const 0x1.1a16512881c91p-895))\n\n;; Test that x/0 is not folded away.\n\n(module\n  (func (export \"f32.no_fold_div_0\") (param $x f32) (result f32)\n    (f32.div (local.get $x) (f32.const 0.0)))\n  (func (export \"f64.no_fold_div_0\") (param $x f64) (result f64)\n    (f64.div (local.get $x) (f64.const 0.0)))\n)\n\n(assert_return (invoke \"f32.no_fold_div_0\" (f32.const 1.0)) (f32.const inf))\n(assert_return (invoke \"f32.no_fold_div_0\" (f32.const -1.0)) (f32.const -inf))\n(assert_return (invoke \"f32.no_fold_div_0\" (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"f32.no_fold_div_0\" (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"f32.no_fold_div_0\" (f32.const 0)) (f32.const nan:canonical))\n(assert_return (invoke \"f32.no_fold_div_0\" (f32.const -0)) (f32.const nan:canonical))\n(assert_return (invoke \"f32.no_fold_div_0\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"f32.no_fold_div_0\" (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_div_0\" (f64.const 1.0)) (f64.const inf))\n(assert_return (invoke \"f64.no_fold_div_0\" (f64.const -1.0)) (f64.const -inf))\n(assert_return (invoke \"f64.no_fold_div_0\" (f64.const inf)) (f64.const inf))\n(assert_return (invoke \"f64.no_fold_div_0\" (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"f64.no_fold_div_0\" (f64.const 0)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_div_0\" (f64.const -0)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_div_0\" (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_div_0\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n\n;; Test that x/-0 is not folded away.\n\n(module\n  (func (export \"f32.no_fold_div_neg0\") (param $x f32) (result f32)\n    (f32.div (local.get $x) (f32.const -0.0)))\n  (func (export \"f64.no_fold_div_neg0\") (param $x f64) (result f64)\n    (f64.div (local.get $x) (f64.const -0.0)))\n)\n\n(assert_return (invoke \"f32.no_fold_div_neg0\" (f32.const 1.0)) (f32.const -inf))\n(assert_return (invoke \"f32.no_fold_div_neg0\" (f32.const -1.0)) (f32.const inf))\n(assert_return (invoke \"f32.no_fold_div_neg0\" (f32.const inf)) (f32.const -inf))\n(assert_return (invoke \"f32.no_fold_div_neg0\" (f32.const -inf)) (f32.const inf))\n(assert_return (invoke \"f32.no_fold_div_neg0\" (f32.const 0)) (f32.const nan:canonical))\n(assert_return (invoke \"f32.no_fold_div_neg0\" (f32.const -0)) (f32.const nan:canonical))\n(assert_return (invoke \"f32.no_fold_div_neg0\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"f32.no_fold_div_neg0\" (f32.const nan)) (f32.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_div_neg0\" (f64.const 1.0)) (f64.const -inf))\n(assert_return (invoke \"f64.no_fold_div_neg0\" (f64.const -1.0)) (f64.const inf))\n(assert_return (invoke \"f64.no_fold_div_neg0\" (f64.const inf)) (f64.const -inf))\n(assert_return (invoke \"f64.no_fold_div_neg0\" (f64.const -inf)) (f64.const inf))\n(assert_return (invoke \"f64.no_fold_div_neg0\" (f64.const 0)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_div_neg0\" (f64.const -0)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_div_neg0\" (f64.const nan)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_div_neg0\" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))\n\n;; Test that sqrt(x*x+y*y) is not folded to hypot.\n\n(module\n  (func (export \"f32.no_fold_to_hypot\") (param $x f32) (param $y f32) (result f32)\n    (f32.sqrt (f32.add (f32.mul (local.get $x) (local.get $x))\n                       (f32.mul (local.get $y) (local.get $y)))))\n  (func (export \"f64.no_fold_to_hypot\") (param $x f64) (param $y f64) (result f64)\n    (f64.sqrt (f64.add (f64.mul (local.get $x) (local.get $x))\n                       (f64.mul (local.get $y) (local.get $y)))))\n)\n\n(assert_return (invoke \"f32.no_fold_to_hypot\" (f32.const 0x1.c2f338p-81) (f32.const 0x1.401b5ep-68)) (f32.const 0x1.401cccp-68))\n(assert_return (invoke \"f32.no_fold_to_hypot\" (f32.const -0x1.c38d1p-71) (f32.const -0x1.359ddp-107)) (f32.const 0x1.c36a62p-71))\n(assert_return (invoke \"f32.no_fold_to_hypot\" (f32.const -0x1.99e0cap-114) (f32.const -0x1.ed0c6cp-69)) (f32.const 0x1.ed0e48p-69))\n(assert_return (invoke \"f32.no_fold_to_hypot\" (f32.const -0x1.1b6ceap+5) (f32.const 0x1.5440bep+17)) (f32.const 0x1.5440cp+17))\n(assert_return (invoke \"f32.no_fold_to_hypot\" (f32.const 0x1.8f019ep-76) (f32.const -0x1.182308p-71)) (f32.const 0x1.17e2bcp-71))\n(assert_return (invoke \"f64.no_fold_to_hypot\" (f64.const 0x1.1a0ac4f7c8711p-636) (f64.const 0x1.1372ebafff551p-534)) (f64.const 0x1.13463fa37014ep-534))\n(assert_return (invoke \"f64.no_fold_to_hypot\" (f64.const 0x1.b793512167499p+395) (f64.const -0x1.11cbc52af4c36p+410)) (f64.const 0x1.11cbc530783a2p+410))\n(assert_return (invoke \"f64.no_fold_to_hypot\" (f64.const 0x1.76777f44ff40bp-536) (f64.const -0x1.c3896e4dc1fbp-766)) (f64.const 0x1.8p-536))\n(assert_return (invoke \"f64.no_fold_to_hypot\" (f64.const -0x1.889ac72cc6b5dp-521) (f64.const 0x1.8d7084e659f3bp-733)) (f64.const 0x1.889ac72ca843ap-521))\n(assert_return (invoke \"f64.no_fold_to_hypot\" (f64.const 0x1.5ee588c02cb08p-670) (f64.const -0x1.05ce25788d9ecp-514)) (f64.const 0x1.05ce25788d9dfp-514))\n\n;; Test that 1.0/x isn't approximated.\n\n(module\n  (func (export \"f32.no_approximate_reciprocal\") (param $x f32) (result f32)\n    (f32.div (f32.const 1.0) (local.get $x)))\n)\n\n(assert_return (invoke \"f32.no_approximate_reciprocal\" (f32.const -0x1.2900b6p-10)) (f32.const -0x1.b950d4p+9))\n(assert_return (invoke \"f32.no_approximate_reciprocal\" (f32.const 0x1.e7212p+127)) (f32.const 0x1.0d11f8p-128))\n(assert_return (invoke \"f32.no_approximate_reciprocal\" (f32.const -0x1.42a466p-93)) (f32.const -0x1.963ee6p+92))\n(assert_return (invoke \"f32.no_approximate_reciprocal\" (f32.const 0x1.5d0c32p+76)) (f32.const 0x1.778362p-77))\n(assert_return (invoke \"f32.no_approximate_reciprocal\" (f32.const -0x1.601de2p-82)) (f32.const -0x1.743d7ep+81))\n\n;; Test that 1.0/sqrt(x) isn't approximated or fused.\n\n(module\n  (func (export \"f32.no_approximate_reciprocal_sqrt\") (param $x f32) (result f32)\n    (f32.div (f32.const 1.0) (f32.sqrt (local.get $x))))\n  (func (export \"f64.no_fuse_reciprocal_sqrt\") (param $x f64) (result f64)\n    (f64.div (f64.const 1.0) (f64.sqrt (local.get $x))))\n)\n\n(assert_return (invoke \"f32.no_approximate_reciprocal_sqrt\" (f32.const 0x1.6af12ap-43)) (f32.const 0x1.300ed4p+21))\n(assert_return (invoke \"f32.no_approximate_reciprocal_sqrt\" (f32.const 0x1.e82fc6p-8)) (f32.const 0x1.72c376p+3))\n(assert_return (invoke \"f32.no_approximate_reciprocal_sqrt\" (f32.const 0x1.b9fa9cp-66)) (f32.const 0x1.85a9bap+32))\n(assert_return (invoke \"f32.no_approximate_reciprocal_sqrt\" (f32.const 0x1.f4f546p-44)) (f32.const 0x1.6e01c2p+21))\n(assert_return (invoke \"f32.no_approximate_reciprocal_sqrt\" (f32.const 0x1.5da7aap-86)) (f32.const 0x1.b618cap+42))\n\n(assert_return (invoke \"f64.no_fuse_reciprocal_sqrt\" (f64.const 0x1.1568a63b55fa3p+889)) (f64.const 0x1.5bc9c74c9952p-445))\n(assert_return (invoke \"f64.no_fuse_reciprocal_sqrt\" (f64.const 0x1.239fcd0939cafp+311)) (f64.const 0x1.5334a922b4818p-156))\n(assert_return (invoke \"f64.no_fuse_reciprocal_sqrt\" (f64.const 0x1.6e36a24e11054p+104)) (f64.const 0x1.ac13f20977f29p-53))\n(assert_return (invoke \"f64.no_fuse_reciprocal_sqrt\" (f64.const 0x1.23ee173219f83p+668)) (f64.const 0x1.df753e055862dp-335))\n(assert_return (invoke \"f64.no_fuse_reciprocal_sqrt\" (f64.const 0x1.b30f74caf9babp+146)) (f64.const 0x1.88bfc3d1764a9p-74))\n\n;; Test that sqrt(1.0/x) isn't approximated.\n\n(module\n  (func (export \"f32.no_approximate_sqrt_reciprocal\") (param $x f32) (result f32)\n    (f32.sqrt (f32.div (f32.const 1.0) (local.get $x))))\n)\n\n(assert_return (invoke \"f32.no_approximate_sqrt_reciprocal\" (f32.const 0x1.a4c986p+60)) (f32.const 0x1.8f5ac6p-31))\n(assert_return (invoke \"f32.no_approximate_sqrt_reciprocal\" (f32.const 0x1.50511ep-9)) (f32.const 0x1.3bdd46p+4))\n(assert_return (invoke \"f32.no_approximate_sqrt_reciprocal\" (f32.const 0x1.125ec2p+69)) (f32.const 0x1.5db572p-35))\n(assert_return (invoke \"f32.no_approximate_sqrt_reciprocal\" (f32.const 0x1.ba4c5p+13)) (f32.const 0x1.136f16p-7))\n(assert_return (invoke \"f32.no_approximate_sqrt_reciprocal\" (f32.const 0x1.4a5be2p+104)) (f32.const 0x1.c2b5bp-53))\n\n;; Test that converting i32/i64 to f32/f64 and back isn't folded away.\n\n(module\n  (func (export \"i32.no_fold_f32_s\") (param i32) (result i32)\n    (i32.trunc_f32_s (f32.convert_i32_s (local.get 0))))\n  (func (export \"i32.no_fold_f32_u\") (param i32) (result i32)\n    (i32.trunc_f32_u (f32.convert_i32_u (local.get 0))))\n  (func (export \"i64.no_fold_f64_s\") (param i64) (result i64)\n    (i64.trunc_f64_s (f64.convert_i64_s (local.get 0))))\n  (func (export \"i64.no_fold_f64_u\") (param i64) (result i64)\n    (i64.trunc_f64_u (f64.convert_i64_u (local.get 0))))\n)\n\n(assert_return (invoke \"i32.no_fold_f32_s\" (i32.const 0x1000000)) (i32.const 0x1000000))\n(assert_return (invoke \"i32.no_fold_f32_s\" (i32.const 0x1000001)) (i32.const 0x1000000))\n(assert_return (invoke \"i32.no_fold_f32_s\" (i32.const 0xf0000010)) (i32.const 0xf0000010))\n\n(assert_return (invoke \"i32.no_fold_f32_u\" (i32.const 0x1000000)) (i32.const 0x1000000))\n(assert_return (invoke \"i32.no_fold_f32_u\" (i32.const 0x1000001)) (i32.const 0x1000000))\n(assert_return (invoke \"i32.no_fold_f32_u\" (i32.const 0xf0000010)) (i32.const 0xf0000000))\n\n(assert_return (invoke \"i64.no_fold_f64_s\" (i64.const 0x20000000000000)) (i64.const 0x20000000000000))\n(assert_return (invoke \"i64.no_fold_f64_s\" (i64.const 0x20000000000001)) (i64.const 0x20000000000000))\n(assert_return (invoke \"i64.no_fold_f64_s\" (i64.const 0xf000000000000400)) (i64.const 0xf000000000000400))\n\n(assert_return (invoke \"i64.no_fold_f64_u\" (i64.const 0x20000000000000)) (i64.const 0x20000000000000))\n(assert_return (invoke \"i64.no_fold_f64_u\" (i64.const 0x20000000000001)) (i64.const 0x20000000000000))\n(assert_return (invoke \"i64.no_fold_f64_u\" (i64.const 0xf000000000000400)) (i64.const 0xf000000000000000))\n\n;; Test that x+y-y is not folded to x.\n\n(module\n  (func (export \"f32.no_fold_add_sub\") (param $x f32) (param $y f32) (result f32)\n    (f32.sub (f32.add (local.get $x) (local.get $y)) (local.get $y)))\n  (func (export \"f64.no_fold_add_sub\") (param $x f64) (param $y f64) (result f64)\n    (f64.sub (f64.add (local.get $x) (local.get $y)) (local.get $y)))\n)\n\n(assert_return (invoke \"f32.no_fold_add_sub\" (f32.const 0x1.b553e4p-47) (f32.const -0x1.67db2cp-26)) (f32.const 0x1.cp-47))\n(assert_return (invoke \"f32.no_fold_add_sub\" (f32.const -0x1.a884dp-23) (f32.const 0x1.f2ae1ep-19)) (f32.const -0x1.a884ep-23))\n(assert_return (invoke \"f32.no_fold_add_sub\" (f32.const -0x1.fc04fp+82) (f32.const -0x1.65403ap+101)) (f32.const -0x1p+83))\n(assert_return (invoke \"f32.no_fold_add_sub\" (f32.const 0x1.870fa2p-78) (f32.const 0x1.c54916p-56)) (f32.const 0x1.8p-78))\n(assert_return (invoke \"f32.no_fold_add_sub\" (f32.const -0x1.17e966p-108) (f32.const -0x1.5fa61ap-84)) (f32.const -0x1p-107))\n\n(assert_return (invoke \"f64.no_fold_add_sub\" (f64.const -0x1.1053ea172dba8p-874) (f64.const 0x1.113c413408ac8p-857)) (f64.const -0x1.1053ea172p-874))\n(assert_return (invoke \"f64.no_fold_add_sub\" (f64.const 0x1.e377d54807972p-546) (f64.const 0x1.040a0a4d1ff7p-526)) (f64.const 0x1.e377d548p-546))\n(assert_return (invoke \"f64.no_fold_add_sub\" (f64.const -0x1.75f53cd926b62p-30) (f64.const -0x1.66b176e602bb5p-3)) (f64.const -0x1.75f53dp-30))\n(assert_return (invoke \"f64.no_fold_add_sub\" (f64.const -0x1.c450ff28332ap-341) (f64.const 0x1.15a5855023baep-305)) (f64.const -0x1.c451p-341))\n(assert_return (invoke \"f64.no_fold_add_sub\" (f64.const -0x1.1ad4a596d3ea8p-619) (f64.const -0x1.17d81a41c0ea8p-588)) (f64.const -0x1.1ad4a8p-619))\n\n;; Test that x-y+y is not folded to x.\n\n(module\n  (func (export \"f32.no_fold_sub_add\") (param $x f32) (param $y f32) (result f32)\n    (f32.add (f32.sub (local.get $x) (local.get $y)) (local.get $y)))\n  (func (export \"f64.no_fold_sub_add\") (param $x f64) (param $y f64) (result f64)\n    (f64.add (f64.sub (local.get $x) (local.get $y)) (local.get $y)))\n)\n\n(assert_return (invoke \"f32.no_fold_sub_add\" (f32.const -0x1.523cb8p+9) (f32.const 0x1.93096cp+8)) (f32.const -0x1.523cbap+9))\n(assert_return (invoke \"f32.no_fold_sub_add\" (f32.const -0x1.a31a1p-111) (f32.const 0x1.745efp-95)) (f32.const -0x1.a4p-111))\n(assert_return (invoke \"f32.no_fold_sub_add\" (f32.const 0x1.3d5328p+26) (f32.const 0x1.58567p+35)) (f32.const 0x1.3d54p+26))\n(assert_return (invoke \"f32.no_fold_sub_add\" (f32.const 0x1.374e26p-39) (f32.const -0x1.66a5p-27)) (f32.const 0x1.374p-39))\n(assert_return (invoke \"f32.no_fold_sub_add\" (f32.const 0x1.320facp-3) (f32.const -0x1.ac069ap+14)) (f32.const 0x1.34p-3))\n\n(assert_return (invoke \"f64.no_fold_sub_add\" (f64.const 0x1.8f92aad2c9b8dp+255) (f64.const -0x1.08cd4992266cbp+259)) (f64.const 0x1.8f92aad2c9b9p+255))\n(assert_return (invoke \"f64.no_fold_sub_add\" (f64.const 0x1.5aaff55742c8bp-666) (f64.const 0x1.8f5f47181f46dp-647)) (f64.const 0x1.5aaff5578p-666))\n(assert_return (invoke \"f64.no_fold_sub_add\" (f64.const 0x1.21bc52967a98dp+251) (f64.const -0x1.fcffaa32d0884p+300)) (f64.const 0x1.2p+251))\n(assert_return (invoke \"f64.no_fold_sub_add\" (f64.const 0x1.9c78361f47374p-26) (f64.const -0x1.69d69f4edc61cp-13)) (f64.const 0x1.9c78361f48p-26))\n(assert_return (invoke \"f64.no_fold_sub_add\" (f64.const 0x1.4dbe68e4afab2p-367) (f64.const -0x1.dc24e5b39cd02p-361)) (f64.const 0x1.4dbe68e4afacp-367))\n\n;; Test that x*y/y is not folded to x.\n\n(module\n  (func (export \"f32.no_fold_mul_div\") (param $x f32) (param $y f32) (result f32)\n    (f32.div (f32.mul (local.get $x) (local.get $y)) (local.get $y)))\n  (func (export \"f64.no_fold_mul_div\") (param $x f64) (param $y f64) (result f64)\n    (f64.div (f64.mul (local.get $x) (local.get $y)) (local.get $y)))\n)\n\n(assert_return (invoke \"f32.no_fold_mul_div\" (f32.const -0x1.cd859ap+54) (f32.const 0x1.6ca936p-47)) (f32.const -0x1.cd8598p+54))\n(assert_return (invoke \"f32.no_fold_mul_div\" (f32.const -0x1.0b56b8p-26) (f32.const 0x1.48264cp-106)) (f32.const -0x1.0b56a4p-26))\n(assert_return (invoke \"f32.no_fold_mul_div\" (f32.const -0x1.e7555cp-48) (f32.const -0x1.9161cp+48)) (f32.const -0x1.e7555ap-48))\n(assert_return (invoke \"f32.no_fold_mul_div\" (f32.const 0x1.aaa50ep+52) (f32.const -0x1.dfb39ep+60)) (f32.const 0x1.aaa50cp+52))\n(assert_return (invoke \"f32.no_fold_mul_div\" (f32.const -0x1.2b7dfap-92) (f32.const -0x1.7c4ca6p-37)) (f32.const -0x1.2b7dfep-92))\n\n(assert_return (invoke \"f64.no_fold_mul_div\" (f64.const -0x1.3d79ff4118a1ap-837) (f64.const -0x1.b8b5dda31808cp-205)) (f64.const -0x1.3d79ff412263ep-837))\n(assert_return (invoke \"f64.no_fold_mul_div\" (f64.const 0x1.f894d1ee6b3a4p+384) (f64.const 0x1.8c2606d03d58ap+585)) (f64.const 0x1.f894d1ee6b3a5p+384))\n(assert_return (invoke \"f64.no_fold_mul_div\" (f64.const -0x1.a022260acc993p+238) (f64.const -0x1.5fbc128fc8e3cp-552)) (f64.const -0x1.a022260acc992p+238))\n(assert_return (invoke \"f64.no_fold_mul_div\" (f64.const 0x1.9d4b8ed174f54p-166) (f64.const 0x1.ee3d467aeeac6p-906)) (f64.const 0x1.8dcc95a053b2bp-166))\n(assert_return (invoke \"f64.no_fold_mul_div\" (f64.const -0x1.e95ea897cdcd4p+660) (f64.const -0x1.854d5df085f2ep-327)) (f64.const -0x1.e95ea897cdcd5p+660))\n\n;; Test that x/y*y is not folded to x.\n\n(module\n  (func (export \"f32.no_fold_div_mul\") (param $x f32) (param $y f32) (result f32)\n    (f32.mul (f32.div (local.get $x) (local.get $y)) (local.get $y)))\n  (func (export \"f64.no_fold_div_mul\") (param $x f64) (param $y f64) (result f64)\n    (f64.mul (f64.div (local.get $x) (local.get $y)) (local.get $y)))\n)\n\n(assert_return (invoke \"f32.no_fold_div_mul\" (f32.const -0x1.dc6364p+38) (f32.const 0x1.d630ecp+29)) (f32.const -0x1.dc6362p+38))\n(assert_return (invoke \"f32.no_fold_div_mul\" (f32.const -0x1.1f9836p-52) (f32.const -0x1.16c4e4p-18)) (f32.const -0x1.1f9838p-52))\n(assert_return (invoke \"f32.no_fold_div_mul\" (f32.const 0x1.c5972cp-126) (f32.const -0x1.d6659ep+7)) (f32.const 0x1.c5980ep-126))\n(assert_return (invoke \"f32.no_fold_div_mul\" (f32.const -0x1.2e3a9ep-74) (f32.const -0x1.353994p+59)) (f32.const -0x1.2e3a4p-74))\n(assert_return (invoke \"f32.no_fold_div_mul\" (f32.const 0x1.d96b82p-98) (f32.const 0x1.95d908p+27)) (f32.const 0x1.d96b84p-98))\n\n(assert_return (invoke \"f64.no_fold_div_mul\" (f64.const 0x1.d01f913a52481p-876) (f64.const -0x1.2cd0668b28344p+184)) (f64.const 0x1.d020daf71cdcp-876))\n(assert_return (invoke \"f64.no_fold_div_mul\" (f64.const -0x1.81cb7d400918dp-714) (f64.const 0x1.7caa643586d6ep-53)) (f64.const -0x1.81cb7d400918ep-714))\n(assert_return (invoke \"f64.no_fold_div_mul\" (f64.const -0x1.66904c97b5c8ep-145) (f64.const 0x1.5c3481592ad4cp+428)) (f64.const -0x1.66904c97b5c8dp-145))\n(assert_return (invoke \"f64.no_fold_div_mul\" (f64.const -0x1.e75859d2f0765p-278) (f64.const -0x1.5f19b6ab497f9p+283)) (f64.const -0x1.e75859d2f0764p-278))\n(assert_return (invoke \"f64.no_fold_div_mul\" (f64.const -0x1.515fe9c3b5f5p+620) (f64.const 0x1.36be869c99f7ap+989)) (f64.const -0x1.515fe9c3b5f4fp+620))\n\n;; Test that x/2*2 is not folded to x.\n\n(module\n  (func (export \"f32.no_fold_div2_mul2\") (param $x f32) (result f32)\n    (f32.mul (f32.div (local.get $x) (f32.const 2.0)) (f32.const 2.0)))\n  (func (export \"f64.no_fold_div2_mul2\") (param $x f64) (result f64)\n    (f64.mul (f64.div (local.get $x) (f64.const 2.0)) (f64.const 2.0)))\n)\n\n(assert_return (invoke \"f32.no_fold_div2_mul2\" (f32.const 0x1.fffffep-126)) (f32.const 0x1p-125))\n(assert_return (invoke \"f64.no_fold_div2_mul2\" (f64.const 0x1.fffffffffffffp-1022)) (f64.const 0x1p-1021))\n\n;; Test that promote(demote(x)) is not folded to x.\n\n(module\n  (func (export \"no_fold_demote_promote\") (param $x f64) (result f64)\n    (f64.promote_f32 (f32.demote_f64 (local.get $x))))\n)\n\n(assert_return (invoke \"no_fold_demote_promote\" (f64.const -0x1.dece272390f5dp-133)) (f64.const -0x1.decep-133))\n(assert_return (invoke \"no_fold_demote_promote\" (f64.const -0x1.19e6c79938a6fp-85)) (f64.const -0x1.19e6c8p-85))\n(assert_return (invoke \"no_fold_demote_promote\" (f64.const 0x1.49b297ec44dc1p+107)) (f64.const 0x1.49b298p+107))\n(assert_return (invoke \"no_fold_demote_promote\" (f64.const -0x1.74f5bd865163p-88)) (f64.const -0x1.74f5bep-88))\n(assert_return (invoke \"no_fold_demote_promote\" (f64.const 0x1.26d675662367ep+104)) (f64.const 0x1.26d676p+104))\n\n;; Test that demote(promote(x)) is not folded to x, and aside from NaN is\n;; bit-preserving.\n\n(module\n  (func (export \"no_fold_promote_demote\") (param $x f32) (result f32)\n    (f32.demote_f64 (f64.promote_f32 (local.get $x))))\n)\n\n(assert_return (invoke \"no_fold_promote_demote\" (f32.const nan:0x200000)) (f32.const nan:arithmetic))\n(assert_return (invoke \"no_fold_promote_demote\" (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"no_fold_promote_demote\" (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"no_fold_promote_demote\" (f32.const 0x1p-149)) (f32.const 0x1p-149))\n(assert_return (invoke \"no_fold_promote_demote\" (f32.const -0x1p-149)) (f32.const -0x1p-149))\n(assert_return (invoke \"no_fold_promote_demote\" (f32.const 0x1.fffffcp-127)) (f32.const 0x1.fffffcp-127))\n(assert_return (invoke \"no_fold_promote_demote\" (f32.const -0x1.fffffcp-127)) (f32.const -0x1.fffffcp-127))\n(assert_return (invoke \"no_fold_promote_demote\" (f32.const 0x1p-126)) (f32.const 0x1p-126))\n(assert_return (invoke \"no_fold_promote_demote\" (f32.const -0x1p-126)) (f32.const -0x1p-126))\n(assert_return (invoke \"no_fold_promote_demote\" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"no_fold_promote_demote\" (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))\n(assert_return (invoke \"no_fold_promote_demote\" (f32.const inf)) (f32.const inf))\n(assert_return (invoke \"no_fold_promote_demote\" (f32.const -inf)) (f32.const -inf))\n\n;; Test that demote(x+promote(y)) is not folded to demote(x)+y.\n\n(module\n  (func (export \"no_demote_mixed_add\") (param $x f64) (param $y f32) (result f32)\n    (f32.demote_f64 (f64.add (local.get $x) (f64.promote_f32 (local.get $y)))))\n  (func (export \"no_demote_mixed_add_commuted\") (param $y f32) (param $x f64) (result f32)\n    (f32.demote_f64 (f64.add (f64.promote_f32 (local.get $y)) (local.get $x))))\n)\n\n(assert_return (invoke \"no_demote_mixed_add\" (f64.const 0x1.f51a9d04854f9p-95) (f32.const 0x1.3f4e9cp-119)) (f32.const 0x1.f51a9ep-95))\n(assert_return (invoke \"no_demote_mixed_add\" (f64.const 0x1.065b3d81ad8dp+37) (f32.const 0x1.758cd8p+38)) (f32.const 0x1.f8ba76p+38))\n(assert_return (invoke \"no_demote_mixed_add\" (f64.const 0x1.626c80963bd17p-119) (f32.const -0x1.9bbf86p-121)) (f32.const 0x1.f6f93ep-120))\n(assert_return (invoke \"no_demote_mixed_add\" (f64.const -0x1.0d5110e3385bbp-20) (f32.const 0x1.096f4ap-29)) (f32.const -0x1.0ccc5ap-20))\n(assert_return (invoke \"no_demote_mixed_add\" (f64.const -0x1.73852db4e5075p-20) (f32.const -0x1.24e474p-41)) (f32.const -0x1.738536p-20))\n\n(assert_return (invoke \"no_demote_mixed_add_commuted\" (f32.const 0x1.3f4e9cp-119) (f64.const 0x1.f51a9d04854f9p-95)) (f32.const 0x1.f51a9ep-95))\n(assert_return (invoke \"no_demote_mixed_add_commuted\" (f32.const 0x1.758cd8p+38) (f64.const 0x1.065b3d81ad8dp+37)) (f32.const 0x1.f8ba76p+38))\n(assert_return (invoke \"no_demote_mixed_add_commuted\" (f32.const -0x1.9bbf86p-121) (f64.const 0x1.626c80963bd17p-119)) (f32.const 0x1.f6f93ep-120))\n(assert_return (invoke \"no_demote_mixed_add_commuted\" (f32.const 0x1.096f4ap-29) (f64.const -0x1.0d5110e3385bbp-20)) (f32.const -0x1.0ccc5ap-20))\n(assert_return (invoke \"no_demote_mixed_add_commuted\" (f32.const -0x1.24e474p-41) (f64.const -0x1.73852db4e5075p-20)) (f32.const -0x1.738536p-20))\n\n;; Test that demote(x-promote(y)) is not folded to demote(x)-y.\n\n(module\n  (func (export \"no_demote_mixed_sub\") (param $x f64) (param $y f32) (result f32)\n    (f32.demote_f64 (f64.sub (local.get $x) (f64.promote_f32 (local.get $y)))))\n)\n\n(assert_return (invoke \"no_demote_mixed_sub\" (f64.const 0x1.a0a183220e9b1p+82) (f32.const 0x1.c5acf8p+61)) (f32.const 0x1.a0a174p+82))\n(assert_return (invoke \"no_demote_mixed_sub\" (f64.const -0x1.6e2c5ac39f63ep+30) (f32.const 0x1.d48ca4p+17)) (f32.const -0x1.6e3bp+30))\n(assert_return (invoke \"no_demote_mixed_sub\" (f64.const -0x1.98c74350dde6ap+6) (f32.const 0x1.9d69bcp-12)) (f32.const -0x1.98c7aap+6))\n(assert_return (invoke \"no_demote_mixed_sub\" (f64.const 0x1.0459f34091dbfp-54) (f32.const 0x1.61ad08p-71)) (f32.const 0x1.045942p-54))\n(assert_return (invoke \"no_demote_mixed_sub\" (f64.const 0x1.a7498dca3fdb7p+14) (f32.const 0x1.ed21c8p+15)) (f32.const -0x1.197d02p+15))\n\n;; Test that converting between integer and float and back isn't folded away.\n\n(module\n  (func (export \"f32.i32.no_fold_trunc_s_convert_s\") (param $x f32) (result f32)\n    (f32.convert_i32_s (i32.trunc_f32_s (local.get $x))))\n  (func (export \"f32.i32.no_fold_trunc_u_convert_s\") (param $x f32) (result f32)\n    (f32.convert_i32_s (i32.trunc_f32_u (local.get $x))))\n  (func (export \"f32.i32.no_fold_trunc_s_convert_u\") (param $x f32) (result f32)\n    (f32.convert_i32_u (i32.trunc_f32_s (local.get $x))))\n  (func (export \"f32.i32.no_fold_trunc_u_convert_u\") (param $x f32) (result f32)\n    (f32.convert_i32_u (i32.trunc_f32_u (local.get $x))))\n  (func (export \"f64.i32.no_fold_trunc_s_convert_s\") (param $x f64) (result f64)\n    (f64.convert_i32_s (i32.trunc_f64_s (local.get $x))))\n  (func (export \"f64.i32.no_fold_trunc_u_convert_s\") (param $x f64) (result f64)\n    (f64.convert_i32_s (i32.trunc_f64_u (local.get $x))))\n  (func (export \"f64.i32.no_fold_trunc_s_convert_u\") (param $x f64) (result f64)\n    (f64.convert_i32_u (i32.trunc_f64_s (local.get $x))))\n  (func (export \"f64.i32.no_fold_trunc_u_convert_u\") (param $x f64) (result f64)\n    (f64.convert_i32_u (i32.trunc_f64_u (local.get $x))))\n  (func (export \"f32.i64.no_fold_trunc_s_convert_s\") (param $x f32) (result f32)\n    (f32.convert_i64_s (i64.trunc_f32_s (local.get $x))))\n  (func (export \"f32.i64.no_fold_trunc_u_convert_s\") (param $x f32) (result f32)\n    (f32.convert_i64_s (i64.trunc_f32_u (local.get $x))))\n  (func (export \"f32.i64.no_fold_trunc_s_convert_u\") (param $x f32) (result f32)\n    (f32.convert_i64_u (i64.trunc_f32_s (local.get $x))))\n  (func (export \"f32.i64.no_fold_trunc_u_convert_u\") (param $x f32) (result f32)\n    (f32.convert_i64_u (i64.trunc_f32_u (local.get $x))))\n  (func (export \"f64.i64.no_fold_trunc_s_convert_s\") (param $x f64) (result f64)\n    (f64.convert_i64_s (i64.trunc_f64_s (local.get $x))))\n  (func (export \"f64.i64.no_fold_trunc_u_convert_s\") (param $x f64) (result f64)\n    (f64.convert_i64_s (i64.trunc_f64_u (local.get $x))))\n  (func (export \"f64.i64.no_fold_trunc_s_convert_u\") (param $x f64) (result f64)\n    (f64.convert_i64_u (i64.trunc_f64_s (local.get $x))))\n  (func (export \"f64.i64.no_fold_trunc_u_convert_u\") (param $x f64) (result f64)\n    (f64.convert_i64_u (i64.trunc_f64_u (local.get $x))))\n)\n\n(assert_return (invoke \"f32.i32.no_fold_trunc_s_convert_s\" (f32.const 1.5)) (f32.const 1.0))\n(assert_return (invoke \"f32.i32.no_fold_trunc_s_convert_s\" (f32.const -1.5)) (f32.const -1.0))\n(assert_return (invoke \"f32.i32.no_fold_trunc_u_convert_s\" (f32.const 1.5)) (f32.const 1.0))\n(assert_return (invoke \"f32.i32.no_fold_trunc_u_convert_s\" (f32.const -0.5)) (f32.const 0.0))\n(assert_return (invoke \"f32.i32.no_fold_trunc_s_convert_u\" (f32.const 1.5)) (f32.const 1.0))\n(assert_return (invoke \"f32.i32.no_fold_trunc_s_convert_u\" (f32.const -1.5)) (f32.const 0x1p+32))\n(assert_return (invoke \"f32.i32.no_fold_trunc_u_convert_u\" (f32.const 1.5)) (f32.const 1.0))\n(assert_return (invoke \"f32.i32.no_fold_trunc_u_convert_u\" (f32.const -0.5)) (f32.const 0.0))\n\n(assert_return (invoke \"f64.i32.no_fold_trunc_s_convert_s\" (f64.const 1.5)) (f64.const 1.0))\n(assert_return (invoke \"f64.i32.no_fold_trunc_s_convert_s\" (f64.const -1.5)) (f64.const -1.0))\n(assert_return (invoke \"f64.i32.no_fold_trunc_u_convert_s\" (f64.const 1.5)) (f64.const 1.0))\n(assert_return (invoke \"f64.i32.no_fold_trunc_u_convert_s\" (f64.const -0.5)) (f64.const 0.0))\n(assert_return (invoke \"f64.i32.no_fold_trunc_s_convert_u\" (f64.const 1.5)) (f64.const 1.0))\n(assert_return (invoke \"f64.i32.no_fold_trunc_s_convert_u\" (f64.const -1.5)) (f64.const 0x1.fffffffep+31))\n(assert_return (invoke \"f64.i32.no_fold_trunc_u_convert_u\" (f64.const 1.5)) (f64.const 1.0))\n(assert_return (invoke \"f64.i32.no_fold_trunc_u_convert_u\" (f64.const -0.5)) (f64.const 0.0))\n\n(assert_return (invoke \"f32.i64.no_fold_trunc_s_convert_s\" (f32.const 1.5)) (f32.const 1.0))\n(assert_return (invoke \"f32.i64.no_fold_trunc_s_convert_s\" (f32.const -1.5)) (f32.const -1.0))\n(assert_return (invoke \"f32.i64.no_fold_trunc_u_convert_s\" (f32.const 1.5)) (f32.const 1.0))\n(assert_return (invoke \"f32.i64.no_fold_trunc_u_convert_s\" (f32.const -0.5)) (f32.const 0.0))\n(assert_return (invoke \"f32.i64.no_fold_trunc_s_convert_u\" (f32.const 1.5)) (f32.const 1.0))\n(assert_return (invoke \"f32.i64.no_fold_trunc_s_convert_u\" (f32.const -1.5)) (f32.const 0x1p+64))\n(assert_return (invoke \"f32.i64.no_fold_trunc_u_convert_u\" (f32.const 1.5)) (f32.const 1.0))\n(assert_return (invoke \"f32.i64.no_fold_trunc_u_convert_u\" (f32.const -0.5)) (f32.const 0.0))\n\n(assert_return (invoke \"f64.i64.no_fold_trunc_s_convert_s\" (f64.const 1.5)) (f64.const 1.0))\n(assert_return (invoke \"f64.i64.no_fold_trunc_s_convert_s\" (f64.const -1.5)) (f64.const -1.0))\n(assert_return (invoke \"f64.i64.no_fold_trunc_u_convert_s\" (f64.const 1.5)) (f64.const 1.0))\n(assert_return (invoke \"f64.i64.no_fold_trunc_u_convert_s\" (f64.const -0.5)) (f64.const 0.0))\n(assert_return (invoke \"f64.i64.no_fold_trunc_s_convert_u\" (f64.const 1.5)) (f64.const 1.0))\n(assert_return (invoke \"f64.i64.no_fold_trunc_s_convert_u\" (f64.const -1.5)) (f64.const 0x1p+64))\n(assert_return (invoke \"f64.i64.no_fold_trunc_u_convert_u\" (f64.const 1.5)) (f64.const 1.0))\n(assert_return (invoke \"f64.i64.no_fold_trunc_u_convert_u\" (f64.const -0.5)) (f64.const 0.0))\n\n;; Test that dividing by a loop-invariant constant isn't optimized to be a\n;; multiplication by a reciprocal, which would be particularly tempting since\n;; the reciprocal computation could be hoisted.\n\n(module\n  (memory 1 1)\n  (func (export \"init\") (param $i i32) (param $x f32) (f32.store (local.get $i) (local.get $x)))\n\n  (func (export \"run\") (param $n i32) (param $z f32)\n    (local $i i32)\n    (block $exit\n      (loop $cont\n        (f32.store\n          (local.get $i)\n          (f32.div (f32.load (local.get $i)) (local.get $z))\n        )\n        (local.set $i (i32.add (local.get $i) (i32.const 4)))\n        (br_if $cont (i32.lt_u (local.get $i) (local.get $n)))\n      )\n    )\n  )\n\n  (func (export \"check\") (param $i i32) (result f32) (f32.load (local.get $i)))\n)\n\n(invoke \"init\" (i32.const  0) (f32.const 15.1))\n(invoke \"init\" (i32.const  4) (f32.const 15.2))\n(invoke \"init\" (i32.const  8) (f32.const 15.3))\n(invoke \"init\" (i32.const 12) (f32.const 15.4))\n(assert_return (invoke \"check\" (i32.const  0)) (f32.const 15.1))\n(assert_return (invoke \"check\" (i32.const  4)) (f32.const 15.2))\n(assert_return (invoke \"check\" (i32.const  8)) (f32.const 15.3))\n(assert_return (invoke \"check\" (i32.const 12)) (f32.const 15.4))\n(invoke \"run\" (i32.const 16) (f32.const 3.0))\n(assert_return (invoke \"check\" (i32.const  0)) (f32.const 0x1.422222p+2))\n(assert_return (invoke \"check\" (i32.const  4)) (f32.const 0x1.444444p+2))\n(assert_return (invoke \"check\" (i32.const  8)) (f32.const 0x1.466666p+2))\n(assert_return (invoke \"check\" (i32.const 12)) (f32.const 0x1.488888p+2))\n\n(module\n  (memory 1 1)\n  (func (export \"init\") (param $i i32) (param $x f64) (f64.store (local.get $i) (local.get $x)))\n\n  (func (export \"run\") (param $n i32) (param $z f64)\n    (local $i i32)\n    (block $exit\n      (loop $cont\n        (f64.store\n          (local.get $i)\n          (f64.div (f64.load (local.get $i)) (local.get $z))\n        )\n        (local.set $i (i32.add (local.get $i) (i32.const 8)))\n        (br_if $cont (i32.lt_u (local.get $i) (local.get $n)))\n      )\n    )\n  )\n\n  (func (export \"check\") (param $i i32) (result f64) (f64.load (local.get $i)))\n)\n\n(invoke \"init\" (i32.const  0) (f64.const 15.1))\n(invoke \"init\" (i32.const  8) (f64.const 15.2))\n(invoke \"init\" (i32.const 16) (f64.const 15.3))\n(invoke \"init\" (i32.const 24) (f64.const 15.4))\n(assert_return (invoke \"check\" (i32.const  0)) (f64.const 15.1))\n(assert_return (invoke \"check\" (i32.const  8)) (f64.const 15.2))\n(assert_return (invoke \"check\" (i32.const 16)) (f64.const 15.3))\n(assert_return (invoke \"check\" (i32.const 24)) (f64.const 15.4))\n(invoke \"run\" (i32.const 32) (f64.const 3.0))\n(assert_return (invoke \"check\" (i32.const 0)) (f64.const 0x1.4222222222222p+2))\n(assert_return (invoke \"check\" (i32.const 8)) (f64.const 0x1.4444444444444p+2))\n(assert_return (invoke \"check\" (i32.const 16)) (f64.const 0x1.4666666666667p+2))\n(assert_return (invoke \"check\" (i32.const 24)) (f64.const 0x1.4888888888889p+2))\n\n;; Test that ult/ugt/etc. aren't folded to olt/ogt/etc.\n\n(module\n  (func (export \"f32.ult\") (param $x f32) (param $y f32) (result i32) (i32.eqz (f32.ge (local.get $x) (local.get $y))))\n  (func (export \"f32.ule\") (param $x f32) (param $y f32) (result i32) (i32.eqz (f32.gt (local.get $x) (local.get $y))))\n  (func (export \"f32.ugt\") (param $x f32) (param $y f32) (result i32) (i32.eqz (f32.le (local.get $x) (local.get $y))))\n  (func (export \"f32.uge\") (param $x f32) (param $y f32) (result i32) (i32.eqz (f32.lt (local.get $x) (local.get $y))))\n\n  (func (export \"f64.ult\") (param $x f64) (param $y f64) (result i32) (i32.eqz (f64.ge (local.get $x) (local.get $y))))\n  (func (export \"f64.ule\") (param $x f64) (param $y f64) (result i32) (i32.eqz (f64.gt (local.get $x) (local.get $y))))\n  (func (export \"f64.ugt\") (param $x f64) (param $y f64) (result i32) (i32.eqz (f64.le (local.get $x) (local.get $y))))\n  (func (export \"f64.uge\") (param $x f64) (param $y f64) (result i32) (i32.eqz (f64.lt (local.get $x) (local.get $y))))\n)\n\n(assert_return (invoke \"f32.ult\" (f32.const 3.0) (f32.const 2.0)) (i32.const 0))\n(assert_return (invoke \"f32.ult\" (f32.const 2.0) (f32.const 2.0)) (i32.const 0))\n(assert_return (invoke \"f32.ult\" (f32.const 2.0) (f32.const 3.0)) (i32.const 1))\n(assert_return (invoke \"f32.ult\" (f32.const 2.0) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"f32.ule\" (f32.const 3.0) (f32.const 2.0)) (i32.const 0))\n(assert_return (invoke \"f32.ule\" (f32.const 2.0) (f32.const 2.0)) (i32.const 1))\n(assert_return (invoke \"f32.ule\" (f32.const 2.0) (f32.const 3.0)) (i32.const 1))\n(assert_return (invoke \"f32.ule\" (f32.const 2.0) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"f32.ugt\" (f32.const 3.0) (f32.const 2.0)) (i32.const 1))\n(assert_return (invoke \"f32.ugt\" (f32.const 2.0) (f32.const 2.0)) (i32.const 0))\n(assert_return (invoke \"f32.ugt\" (f32.const 2.0) (f32.const 3.0)) (i32.const 0))\n(assert_return (invoke \"f32.ugt\" (f32.const 2.0) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"f32.uge\" (f32.const 3.0) (f32.const 2.0)) (i32.const 1))\n(assert_return (invoke \"f32.uge\" (f32.const 2.0) (f32.const 2.0)) (i32.const 1))\n(assert_return (invoke \"f32.uge\" (f32.const 2.0) (f32.const 3.0)) (i32.const 0))\n(assert_return (invoke \"f32.uge\" (f32.const 2.0) (f32.const nan)) (i32.const 1))\n(assert_return (invoke \"f64.ult\" (f64.const 3.0) (f64.const 2.0)) (i32.const 0))\n(assert_return (invoke \"f64.ult\" (f64.const 2.0) (f64.const 2.0)) (i32.const 0))\n(assert_return (invoke \"f64.ult\" (f64.const 2.0) (f64.const 3.0)) (i32.const 1))\n(assert_return (invoke \"f64.ult\" (f64.const 2.0) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"f64.ule\" (f64.const 3.0) (f64.const 2.0)) (i32.const 0))\n(assert_return (invoke \"f64.ule\" (f64.const 2.0) (f64.const 2.0)) (i32.const 1))\n(assert_return (invoke \"f64.ule\" (f64.const 2.0) (f64.const 3.0)) (i32.const 1))\n(assert_return (invoke \"f64.ule\" (f64.const 2.0) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"f64.ugt\" (f64.const 3.0) (f64.const 2.0)) (i32.const 1))\n(assert_return (invoke \"f64.ugt\" (f64.const 2.0) (f64.const 2.0)) (i32.const 0))\n(assert_return (invoke \"f64.ugt\" (f64.const 2.0) (f64.const 3.0)) (i32.const 0))\n(assert_return (invoke \"f64.ugt\" (f64.const 2.0) (f64.const nan)) (i32.const 1))\n(assert_return (invoke \"f64.uge\" (f64.const 3.0) (f64.const 2.0)) (i32.const 1))\n(assert_return (invoke \"f64.uge\" (f64.const 2.0) (f64.const 2.0)) (i32.const 1))\n(assert_return (invoke \"f64.uge\" (f64.const 2.0) (f64.const 3.0)) (i32.const 0))\n(assert_return (invoke \"f64.uge\" (f64.const 2.0) (f64.const nan)) (i32.const 1))\n\n;; Test that x<y?x:y, etc. using select aren't folded to min, etc.\n\n(module\n  (func (export \"f32.no_fold_lt_select\") (param $x f32) (param $y f32) (result f32) (select (local.get $x) (local.get $y) (f32.lt (local.get $x) (local.get $y))))\n  (func (export \"f32.no_fold_le_select\") (param $x f32) (param $y f32) (result f32) (select (local.get $x) (local.get $y) (f32.le (local.get $x) (local.get $y))))\n  (func (export \"f32.no_fold_gt_select\") (param $x f32) (param $y f32) (result f32) (select (local.get $x) (local.get $y) (f32.gt (local.get $x) (local.get $y))))\n  (func (export \"f32.no_fold_ge_select\") (param $x f32) (param $y f32) (result f32) (select (local.get $x) (local.get $y) (f32.ge (local.get $x) (local.get $y))))\n\n  (func (export \"f64.no_fold_lt_select\") (param $x f64) (param $y f64) (result f64) (select (local.get $x) (local.get $y) (f64.lt (local.get $x) (local.get $y))))\n  (func (export \"f64.no_fold_le_select\") (param $x f64) (param $y f64) (result f64) (select (local.get $x) (local.get $y) (f64.le (local.get $x) (local.get $y))))\n  (func (export \"f64.no_fold_gt_select\") (param $x f64) (param $y f64) (result f64) (select (local.get $x) (local.get $y) (f64.gt (local.get $x) (local.get $y))))\n  (func (export \"f64.no_fold_ge_select\") (param $x f64) (param $y f64) (result f64) (select (local.get $x) (local.get $y) (f64.ge (local.get $x) (local.get $y))))\n)\n\n(assert_return (invoke \"f32.no_fold_lt_select\" (f32.const 0.0) (f32.const nan)) (f32.const nan))\n(assert_return (invoke \"f32.no_fold_lt_select\" (f32.const nan) (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_lt_select\" (f32.const 0.0) (f32.const -0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_lt_select\" (f32.const -0.0) (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_le_select\" (f32.const 0.0) (f32.const nan)) (f32.const nan))\n(assert_return (invoke \"f32.no_fold_le_select\" (f32.const nan) (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_le_select\" (f32.const 0.0) (f32.const -0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_le_select\" (f32.const -0.0) (f32.const 0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_gt_select\" (f32.const 0.0) (f32.const nan)) (f32.const nan))\n(assert_return (invoke \"f32.no_fold_gt_select\" (f32.const nan) (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_gt_select\" (f32.const 0.0) (f32.const -0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_gt_select\" (f32.const -0.0) (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_ge_select\" (f32.const 0.0) (f32.const nan)) (f32.const nan))\n(assert_return (invoke \"f32.no_fold_ge_select\" (f32.const nan) (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_ge_select\" (f32.const 0.0) (f32.const -0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_ge_select\" (f32.const -0.0) (f32.const 0.0)) (f32.const -0.0))\n(assert_return (invoke \"f64.no_fold_lt_select\" (f64.const 0.0) (f64.const nan)) (f64.const nan))\n(assert_return (invoke \"f64.no_fold_lt_select\" (f64.const nan) (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_lt_select\" (f64.const 0.0) (f64.const -0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_lt_select\" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_le_select\" (f64.const 0.0) (f64.const nan)) (f64.const nan))\n(assert_return (invoke \"f64.no_fold_le_select\" (f64.const nan) (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_le_select\" (f64.const 0.0) (f64.const -0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_le_select\" (f64.const -0.0) (f64.const 0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_gt_select\" (f64.const 0.0) (f64.const nan)) (f64.const nan))\n(assert_return (invoke \"f64.no_fold_gt_select\" (f64.const nan) (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_gt_select\" (f64.const 0.0) (f64.const -0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_gt_select\" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_ge_select\" (f64.const 0.0) (f64.const nan)) (f64.const nan))\n(assert_return (invoke \"f64.no_fold_ge_select\" (f64.const nan) (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_ge_select\" (f64.const 0.0) (f64.const -0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_ge_select\" (f64.const -0.0) (f64.const 0.0)) (f64.const -0.0))\n\n;; Test that x<y?x:y, etc. using if and else aren't folded to min, etc.\n\n(module\n  (func (export \"f32.no_fold_lt_if\") (param $x f32) (param $y f32) (result f32)\n    (if (result f32) (f32.lt (local.get $x) (local.get $y))\n      (then (local.get $x)) (else (local.get $y))\n    )\n  )\n  (func (export \"f32.no_fold_le_if\") (param $x f32) (param $y f32) (result f32)\n    (if (result f32) (f32.le (local.get $x) (local.get $y))\n      (then (local.get $x)) (else (local.get $y))\n    )\n  )\n  (func (export \"f32.no_fold_gt_if\") (param $x f32) (param $y f32) (result f32)\n    (if (result f32) (f32.gt (local.get $x) (local.get $y))\n      (then (local.get $x)) (else (local.get $y))\n    )\n  )\n  (func (export \"f32.no_fold_ge_if\") (param $x f32) (param $y f32) (result f32)\n    (if (result f32) (f32.ge (local.get $x) (local.get $y))\n      (then (local.get $x)) (else (local.get $y))\n    )\n  )\n\n  (func (export \"f64.no_fold_lt_if\") (param $x f64) (param $y f64) (result f64)\n    (if (result f64) (f64.lt (local.get $x) (local.get $y))\n      (then (local.get $x)) (else (local.get $y))\n    )\n  )\n  (func (export \"f64.no_fold_le_if\") (param $x f64) (param $y f64) (result f64)\n    (if (result f64) (f64.le (local.get $x) (local.get $y))\n      (then (local.get $x)) (else (local.get $y))\n    )\n  )\n  (func (export \"f64.no_fold_gt_if\") (param $x f64) (param $y f64) (result f64)\n    (if (result f64) (f64.gt (local.get $x) (local.get $y))\n      (then (local.get $x)) (else (local.get $y))\n    )\n  )\n  (func (export \"f64.no_fold_ge_if\") (param $x f64) (param $y f64) (result f64)\n    (if (result f64) (f64.ge (local.get $x) (local.get $y))\n      (then (local.get $x)) (else (local.get $y))\n    )\n  )\n)\n\n(assert_return (invoke \"f32.no_fold_lt_if\" (f32.const 0.0) (f32.const nan)) (f32.const nan))\n(assert_return (invoke \"f32.no_fold_lt_if\" (f32.const nan) (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_lt_if\" (f32.const 0.0) (f32.const -0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_lt_if\" (f32.const -0.0) (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_le_if\" (f32.const 0.0) (f32.const nan)) (f32.const nan))\n(assert_return (invoke \"f32.no_fold_le_if\" (f32.const nan) (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_le_if\" (f32.const 0.0) (f32.const -0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_le_if\" (f32.const -0.0) (f32.const 0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_gt_if\" (f32.const 0.0) (f32.const nan)) (f32.const nan))\n(assert_return (invoke \"f32.no_fold_gt_if\" (f32.const nan) (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_gt_if\" (f32.const 0.0) (f32.const -0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_gt_if\" (f32.const -0.0) (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_ge_if\" (f32.const 0.0) (f32.const nan)) (f32.const nan))\n(assert_return (invoke \"f32.no_fold_ge_if\" (f32.const nan) (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_ge_if\" (f32.const 0.0) (f32.const -0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_ge_if\" (f32.const -0.0) (f32.const 0.0)) (f32.const -0.0))\n(assert_return (invoke \"f64.no_fold_lt_if\" (f64.const 0.0) (f64.const nan)) (f64.const nan))\n(assert_return (invoke \"f64.no_fold_lt_if\" (f64.const nan) (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_lt_if\" (f64.const 0.0) (f64.const -0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_lt_if\" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_le_if\" (f64.const 0.0) (f64.const nan)) (f64.const nan))\n(assert_return (invoke \"f64.no_fold_le_if\" (f64.const nan) (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_le_if\" (f64.const 0.0) (f64.const -0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_le_if\" (f64.const -0.0) (f64.const 0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_gt_if\" (f64.const 0.0) (f64.const nan)) (f64.const nan))\n(assert_return (invoke \"f64.no_fold_gt_if\" (f64.const nan) (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_gt_if\" (f64.const 0.0) (f64.const -0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_gt_if\" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_ge_if\" (f64.const 0.0) (f64.const nan)) (f64.const nan))\n(assert_return (invoke \"f64.no_fold_ge_if\" (f64.const nan) (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_ge_if\" (f64.const 0.0) (f64.const -0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_ge_if\" (f64.const -0.0) (f64.const 0.0)) (f64.const -0.0))\n\n;; Test that x<0?-x:x, etc. using select aren't folded to abs.\n\n(module\n  (func (export \"f32.no_fold_lt_select_to_abs\") (param $x f32) (result f32) (select (f32.neg (local.get $x)) (local.get $x) (f32.lt (local.get $x) (f32.const 0.0))))\n  (func (export \"f32.no_fold_le_select_to_abs\") (param $x f32) (result f32) (select (f32.neg (local.get $x)) (local.get $x) (f32.le (local.get $x) (f32.const -0.0))))\n  (func (export \"f32.no_fold_gt_select_to_abs\") (param $x f32) (result f32) (select (local.get $x) (f32.neg (local.get $x)) (f32.gt (local.get $x) (f32.const -0.0))))\n  (func (export \"f32.no_fold_ge_select_to_abs\") (param $x f32) (result f32) (select (local.get $x) (f32.neg (local.get $x)) (f32.ge (local.get $x) (f32.const 0.0))))\n\n  (func (export \"f64.no_fold_lt_select_to_abs\") (param $x f64) (result f64) (select (f64.neg (local.get $x)) (local.get $x) (f64.lt (local.get $x) (f64.const 0.0))))\n  (func (export \"f64.no_fold_le_select_to_abs\") (param $x f64) (result f64) (select (f64.neg (local.get $x)) (local.get $x) (f64.le (local.get $x) (f64.const -0.0))))\n  (func (export \"f64.no_fold_gt_select_to_abs\") (param $x f64) (result f64) (select (local.get $x) (f64.neg (local.get $x)) (f64.gt (local.get $x) (f64.const -0.0))))\n  (func (export \"f64.no_fold_ge_select_to_abs\") (param $x f64) (result f64) (select (local.get $x) (f64.neg (local.get $x)) (f64.ge (local.get $x) (f64.const 0.0))))\n)\n\n(assert_return (invoke \"f32.no_fold_lt_select_to_abs\" (f32.const nan:0x200000)) (f32.const nan:0x200000))\n(assert_return (invoke \"f32.no_fold_lt_select_to_abs\" (f32.const -nan)) (f32.const -nan))\n(assert_return (invoke \"f32.no_fold_lt_select_to_abs\" (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_lt_select_to_abs\" (f32.const -0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_le_select_to_abs\" (f32.const nan:0x200000)) (f32.const nan:0x200000))\n(assert_return (invoke \"f32.no_fold_le_select_to_abs\" (f32.const -nan)) (f32.const -nan))\n(assert_return (invoke \"f32.no_fold_le_select_to_abs\" (f32.const 0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_le_select_to_abs\" (f32.const -0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_gt_select_to_abs\" (f32.const nan:0x200000)) (f32.const -nan:0x200000))\n(assert_return (invoke \"f32.no_fold_gt_select_to_abs\" (f32.const -nan)) (f32.const nan))\n(assert_return (invoke \"f32.no_fold_gt_select_to_abs\" (f32.const 0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_gt_select_to_abs\" (f32.const -0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_ge_select_to_abs\" (f32.const nan:0x200000)) (f32.const -nan:0x200000))\n(assert_return (invoke \"f32.no_fold_ge_select_to_abs\" (f32.const -nan)) (f32.const nan))\n(assert_return (invoke \"f32.no_fold_ge_select_to_abs\" (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_ge_select_to_abs\" (f32.const -0.0)) (f32.const -0.0))\n(assert_return (invoke \"f64.no_fold_lt_select_to_abs\" (f64.const nan:0x4000000000000)) (f64.const nan:0x4000000000000))\n(assert_return (invoke \"f64.no_fold_lt_select_to_abs\" (f64.const -nan)) (f64.const -nan))\n(assert_return (invoke \"f64.no_fold_lt_select_to_abs\" (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_lt_select_to_abs\" (f64.const -0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_le_select_to_abs\" (f64.const nan:0x4000000000000)) (f64.const nan:0x4000000000000))\n(assert_return (invoke \"f64.no_fold_le_select_to_abs\" (f64.const -nan)) (f64.const -nan))\n(assert_return (invoke \"f64.no_fold_le_select_to_abs\" (f64.const 0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_le_select_to_abs\" (f64.const -0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_gt_select_to_abs\" (f64.const nan:0x4000000000000)) (f64.const -nan:0x4000000000000))\n(assert_return (invoke \"f64.no_fold_gt_select_to_abs\" (f64.const -nan)) (f64.const nan))\n(assert_return (invoke \"f64.no_fold_gt_select_to_abs\" (f64.const 0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_gt_select_to_abs\" (f64.const -0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_ge_select_to_abs\" (f64.const nan:0x4000000000000)) (f64.const -nan:0x4000000000000))\n(assert_return (invoke \"f64.no_fold_ge_select_to_abs\" (f64.const -nan)) (f64.const nan))\n(assert_return (invoke \"f64.no_fold_ge_select_to_abs\" (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_ge_select_to_abs\" (f64.const -0.0)) (f64.const -0.0))\n\n;; Test that x<0?-x:x, etc. using if aren't folded to abs.\n\n(module\n  (func (export \"f32.no_fold_lt_if_to_abs\") (param $x f32) (result f32)\n    (if (result f32) (f32.lt (local.get $x) (f32.const 0.0))\n      (then (f32.neg (local.get $x))) (else (local.get $x))\n    )\n  )\n  (func (export \"f32.no_fold_le_if_to_abs\") (param $x f32) (result f32)\n    (if (result f32) (f32.le (local.get $x) (f32.const -0.0))\n      (then (f32.neg (local.get $x))) (else (local.get $x))\n    )\n  )\n  (func (export \"f32.no_fold_gt_if_to_abs\") (param $x f32) (result f32)\n    (if (result f32) (f32.gt (local.get $x) (f32.const -0.0))\n      (then (local.get $x)) (else (f32.neg (local.get $x)))\n    )\n  )\n  (func (export \"f32.no_fold_ge_if_to_abs\") (param $x f32) (result f32)\n    (if (result f32) (f32.ge (local.get $x) (f32.const 0.0))\n      (then (local.get $x)) (else (f32.neg (local.get $x)))\n    )\n  )\n\n  (func (export \"f64.no_fold_lt_if_to_abs\") (param $x f64) (result f64)\n    (if (result f64) (f64.lt (local.get $x) (f64.const 0.0))\n      (then (f64.neg (local.get $x))) (else (local.get $x))\n    )\n  )\n  (func (export \"f64.no_fold_le_if_to_abs\") (param $x f64) (result f64)\n    (if (result f64) (f64.le (local.get $x) (f64.const -0.0))\n      (then (f64.neg (local.get $x))) (else (local.get $x))\n    )\n  )\n  (func (export \"f64.no_fold_gt_if_to_abs\") (param $x f64) (result f64)\n    (if (result f64) (f64.gt (local.get $x) (f64.const -0.0))\n      (then (local.get $x)) (else (f64.neg (local.get $x)))\n    )\n  )\n  (func (export \"f64.no_fold_ge_if_to_abs\") (param $x f64) (result f64)\n    (if (result f64) (f64.ge (local.get $x) (f64.const 0.0))\n      (then (local.get $x)) (else (f64.neg (local.get $x)))\n    )\n  )\n)\n\n(assert_return (invoke \"f32.no_fold_lt_if_to_abs\" (f32.const nan:0x200000)) (f32.const nan:0x200000))\n(assert_return (invoke \"f32.no_fold_lt_if_to_abs\" (f32.const -nan)) (f32.const -nan))\n(assert_return (invoke \"f32.no_fold_lt_if_to_abs\" (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_lt_if_to_abs\" (f32.const -0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_le_if_to_abs\" (f32.const nan:0x200000)) (f32.const nan:0x200000))\n(assert_return (invoke \"f32.no_fold_le_if_to_abs\" (f32.const -nan)) (f32.const -nan))\n(assert_return (invoke \"f32.no_fold_le_if_to_abs\" (f32.const 0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_le_if_to_abs\" (f32.const -0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_gt_if_to_abs\" (f32.const nan:0x200000)) (f32.const -nan:0x200000))\n(assert_return (invoke \"f32.no_fold_gt_if_to_abs\" (f32.const -nan)) (f32.const nan))\n(assert_return (invoke \"f32.no_fold_gt_if_to_abs\" (f32.const 0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_gt_if_to_abs\" (f32.const -0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_ge_if_to_abs\" (f32.const nan:0x200000)) (f32.const -nan:0x200000))\n(assert_return (invoke \"f32.no_fold_ge_if_to_abs\" (f32.const -nan)) (f32.const nan))\n(assert_return (invoke \"f32.no_fold_ge_if_to_abs\" (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_ge_if_to_abs\" (f32.const -0.0)) (f32.const -0.0))\n(assert_return (invoke \"f64.no_fold_lt_if_to_abs\" (f64.const nan:0x4000000000000)) (f64.const nan:0x4000000000000))\n(assert_return (invoke \"f64.no_fold_lt_if_to_abs\" (f64.const -nan)) (f64.const -nan))\n(assert_return (invoke \"f64.no_fold_lt_if_to_abs\" (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_lt_if_to_abs\" (f64.const -0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_le_if_to_abs\" (f64.const nan:0x4000000000000)) (f64.const nan:0x4000000000000))\n(assert_return (invoke \"f64.no_fold_le_if_to_abs\" (f64.const -nan)) (f64.const -nan))\n(assert_return (invoke \"f64.no_fold_le_if_to_abs\" (f64.const 0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_le_if_to_abs\" (f64.const -0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_gt_if_to_abs\" (f64.const nan:0x4000000000000)) (f64.const -nan:0x4000000000000))\n(assert_return (invoke \"f64.no_fold_gt_if_to_abs\" (f64.const -nan)) (f64.const nan))\n(assert_return (invoke \"f64.no_fold_gt_if_to_abs\" (f64.const 0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_gt_if_to_abs\" (f64.const -0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_ge_if_to_abs\" (f64.const nan:0x4000000000000)) (f64.const -nan:0x4000000000000))\n(assert_return (invoke \"f64.no_fold_ge_if_to_abs\" (f64.const -nan)) (f64.const nan))\n(assert_return (invoke \"f64.no_fold_ge_if_to_abs\" (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_ge_if_to_abs\" (f64.const -0.0)) (f64.const -0.0))\n\n;; Test for a historic spreadsheet bug.\n;; https://support.microsoft.com/en-us/kb/78113\n\n(module\n  (func (export \"f32.incorrect_correction\") (result f32)\n    (f32.sub (f32.sub (f32.add (f32.const 1.333) (f32.const 1.225)) (f32.const 1.333)) (f32.const 1.225))\n  )\n  (func (export \"f64.incorrect_correction\") (result f64)\n    (f64.sub (f64.sub (f64.add (f64.const 1.333) (f64.const 1.225)) (f64.const 1.333)) (f64.const 1.225))\n  )\n)\n\n(assert_return (invoke \"f32.incorrect_correction\") (f32.const 0x1p-23))\n(assert_return (invoke \"f64.incorrect_correction\") (f64.const -0x1p-52))\n\n;; Test for a historical calculator bug.\n;; http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=735\n\n(module\n  (func (export \"calculate\") (result f32)\n    (local $x f32)\n    (local $r f32)\n    (local $q f32)\n    (local $z0 f32)\n    (local $z1 f32)\n    (local.set $x (f32.const 156.25))\n    (local.set $r (f32.const 208.333333334))\n    (local.set $q (f32.const 1.77951304201))\n    (local.set $z0 (f32.div (f32.mul (f32.neg (local.get $r)) (local.get $x)) (f32.sub (f32.mul (local.get $x) (local.get $q)) (local.get $r))))\n    (local.set $z1 (f32.div (f32.mul (f32.neg (local.get $r)) (local.get $x)) (f32.sub (f32.mul (local.get $x) (local.get $q)) (local.get $r))))\n    (block (br_if 0 (f32.eq (local.get $z0) (local.get $z1))) (unreachable))\n    (local.get $z1)\n  )\n)\n\n(assert_return (invoke \"calculate\") (f32.const -0x1.d2ed46p+8))\n\n(module\n  (func (export \"calculate\") (result f64)\n    (local $x f64)\n    (local $r f64)\n    (local $q f64)\n    (local $z0 f64)\n    (local $z1 f64)\n    (local.set $x (f64.const 156.25))\n    (local.set $r (f64.const 208.333333334))\n    (local.set $q (f64.const 1.77951304201))\n    (local.set $z0 (f64.div (f64.mul (f64.neg (local.get $r)) (local.get $x)) (f64.sub (f64.mul (local.get $x) (local.get $q)) (local.get $r))))\n    (local.set $z1 (f64.div (f64.mul (f64.neg (local.get $r)) (local.get $x)) (f64.sub (f64.mul (local.get $x) (local.get $q)) (local.get $r))))\n    (block (br_if 0 (f64.eq (local.get $z0) (local.get $z1))) (unreachable))\n    (local.get $z1)\n  )\n)\n\n(assert_return (invoke \"calculate\") (f64.const -0x1.d2ed4d0218c93p+8))\n\n;; Test that 0 - (-0 - x) is not optimized to x.\n;; https://llvm.org/bugs/show_bug.cgi?id=26746\n\n(module\n  (func (export \"llvm_pr26746\") (param $x f32) (result f32)\n    (f32.sub (f32.const 0.0) (f32.sub (f32.const -0.0) (local.get $x)))\n  )\n)\n\n(assert_return (invoke \"llvm_pr26746\" (f32.const -0.0)) (f32.const 0.0))\n\n;; Test for improperly reassociating an addition and a conversion.\n;; https://llvm.org/bugs/show_bug.cgi?id=27153\n\n(module\n  (func (export \"llvm_pr27153\") (param $x i32) (result f32)\n    (f32.add (f32.convert_i32_s (i32.and (local.get $x) (i32.const 268435455))) (f32.const -8388608.0))\n  )\n)\n\n(assert_return (invoke \"llvm_pr27153\" (i32.const 33554434)) (f32.const 25165824.000000))\n\n;; Test that (float)x + (float)y is not optimized to (float)(x + y) when unsafe.\n;; https://llvm.org/bugs/show_bug.cgi?id=27036\n\n(module\n  (func (export \"llvm_pr27036\") (param $x i32) (param $y i32) (result f32)\n    (f32.add (f32.convert_i32_s (i32.or (local.get $x) (i32.const -25034805)))\n             (f32.convert_i32_s (i32.and (local.get $y) (i32.const 14942208))))\n  )\n)\n\n(assert_return (invoke \"llvm_pr27036\" (i32.const -25034805) (i32.const 14942208)) (f32.const -0x1.340068p+23))\n\n;; Test for bugs in old versions of historic IEEE 754 platforms as reported in:\n;;\n;; N. L. Schryer. 1981. A Test of a Computer's Floating-Point Arithmetic Unit.\n;; Tech. Rep. Computer Science Technical Report 89, AT&T Bell Laboratories, Feb.\n;;\n;; specifically, the appendices describing IEEE systems with \"The Past\" sections\n;; describing specific bugs. The 0 < 0 bug is omitted here due to being already\n;; covered elsewhere.\n(module\n  (func (export \"thepast0\") (param $a f64) (param $b f64) (param $c f64) (param $d f64) (result f64)\n    (f64.div (f64.mul (local.get $a) (local.get $b)) (f64.mul (local.get $c) (local.get $d)))\n  )\n\n  (func (export \"thepast1\") (param $a f64) (param $b f64) (param $c f64) (result f64)\n    (f64.sub (f64.mul (local.get $a) (local.get $b)) (local.get $c))\n  )\n\n  (func (export \"thepast2\") (param $a f32) (param $b f32) (param $c f32) (result f32)\n    (f32.mul (f32.mul (local.get $a) (local.get $b)) (local.get $c))\n  )\n)\n\n(assert_return (invoke \"thepast0\" (f64.const 0x1p-1021) (f64.const 0x1.fffffffffffffp-1) (f64.const 0x1p1) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp-1022))\n(assert_return (invoke \"thepast1\" (f64.const 0x1p-54) (f64.const 0x1.fffffffffffffp-1) (f64.const 0x1p-54)) (f64.const -0x1p-107))\n(assert_return (invoke \"thepast2\" (f32.const 0x1p-125) (f32.const 0x1p-1) (f32.const 0x1p0)) (f32.const 0x1p-126))\n\n;; Test for floating point tolerances observed in some GPUs.\n;; https://community.amd.com/thread/145582\n\n(module\n  (func (export \"inverse\") (param $x f32) (result f32)\n    (f32.div (f32.const 1.0) (local.get $x))\n  )\n)\n\n(assert_return (invoke \"inverse\" (f32.const 96.0)) (f32.const 0x1.555556p-7))\n\n;; Test for incorrect rounding on sqrt(4.0).\n;; http://www.askvg.com/microsoft-windows-calculator-bug/\n\n(module\n  (func (export \"f32_sqrt_minus_2\") (param $x f32) (result f32)\n    (f32.sub (f32.sqrt (local.get $x)) (f32.const 2.0))\n  )\n\n  (func (export \"f64_sqrt_minus_2\") (param $x f64) (result f64)\n    (f64.sub (f64.sqrt (local.get $x)) (f64.const 2.0))\n  )\n)\n\n(assert_return (invoke \"f32_sqrt_minus_2\" (f32.const 4.0)) (f32.const 0.0))\n(assert_return (invoke \"f64_sqrt_minus_2\" (f64.const 4.0)) (f64.const 0.0))\n\n;; Test that 1.0 / (1.0 / x) is not optimized to x.\n\n(module\n  (func (export \"f32.no_fold_recip_recip\") (param $x f32) (result f32)\n    (f32.div (f32.const 1.0) (f32.div (f32.const 1.0) (local.get $x))))\n\n  (func (export \"f64.no_fold_recip_recip\") (param $x f64) (result f64)\n    (f64.div (f64.const 1.0) (f64.div (f64.const 1.0) (local.get $x))))\n)\n\n(assert_return (invoke \"f32.no_fold_recip_recip\" (f32.const -0x1.e8bf18p+65)) (f32.const -0x1.e8bf16p+65))\n(assert_return (invoke \"f32.no_fold_recip_recip\" (f32.const 0x1.e24248p-77)) (f32.const 0x1.e24246p-77))\n(assert_return (invoke \"f32.no_fold_recip_recip\" (f32.const 0x1.caf0e8p-64)) (f32.const 0x1.caf0eap-64))\n(assert_return (invoke \"f32.no_fold_recip_recip\" (f32.const -0x1.e66982p+4)) (f32.const -0x1.e66984p+4))\n(assert_return (invoke \"f32.no_fold_recip_recip\" (f32.const 0x1.f99916p+70)) (f32.const 0x1.f99914p+70))\n\n(assert_return (invoke \"f32.no_fold_recip_recip\" (f32.const -0x0p+0)) (f32.const -0x0p+0))\n(assert_return (invoke \"f32.no_fold_recip_recip\" (f32.const 0x0p+0)) (f32.const 0x0p+0))\n(assert_return (invoke \"f32.no_fold_recip_recip\" (f32.const -inf)) (f32.const -inf))\n(assert_return (invoke \"f32.no_fold_recip_recip\" (f32.const inf)) (f32.const inf))\n\n(assert_return (invoke \"f64.no_fold_recip_recip\" (f64.const -0x1.d81248dda63dp+148)) (f64.const -0x1.d81248dda63d1p+148))\n(assert_return (invoke \"f64.no_fold_recip_recip\" (f64.const -0x1.f4750312039e3p+66)) (f64.const -0x1.f4750312039e2p+66))\n(assert_return (invoke \"f64.no_fold_recip_recip\" (f64.const 0x1.fa50630eec7f6p+166)) (f64.const 0x1.fa50630eec7f5p+166))\n(assert_return (invoke \"f64.no_fold_recip_recip\" (f64.const 0x1.db0598617ba92p-686)) (f64.const 0x1.db0598617ba91p-686))\n(assert_return (invoke \"f64.no_fold_recip_recip\" (f64.const 0x1.85f1638a0c82bp+902)) (f64.const 0x1.85f1638a0c82ap+902))\n\n(assert_return (invoke \"f64.no_fold_recip_recip\" (f64.const -0x0p+0)) (f64.const -0x0p+0))\n(assert_return (invoke \"f64.no_fold_recip_recip\" (f64.const 0x0p+0)) (f64.const 0x0p+0))\n(assert_return (invoke \"f64.no_fold_recip_recip\" (f64.const -inf)) (f64.const -inf))\n(assert_return (invoke \"f64.no_fold_recip_recip\" (f64.const inf)) (f64.const inf))\n\n;; Test that (x+y) * (x-y) is not optimized to x*x - y*y.\n\n(module\n  (func (export \"f32.no_algebraic_factoring\") (param $x f32) (param $y f32) (result f32)\n    (f32.mul (f32.add (local.get $x) (local.get $y))\n             (f32.sub (local.get $x) (local.get $y))))\n\n  (func (export \"f64.no_algebraic_factoring\") (param $x f64) (param $y f64) (result f64)\n    (f64.mul (f64.add (local.get $x) (local.get $y))\n             (f64.sub (local.get $x) (local.get $y))))\n)\n\n(assert_return (invoke \"f32.no_algebraic_factoring\" (f32.const -0x1.ef678ep-55) (f32.const 0x1.c160b8p-54)) (f32.const -0x1.129402p-107))\n(assert_return (invoke \"f32.no_algebraic_factoring\" (f32.const -0x1.2d76bcp+24) (f32.const 0x1.f4089cp+24)) (f32.const -0x1.36d89ap+49))\n(assert_return (invoke \"f32.no_algebraic_factoring\" (f32.const 0x1.7ca2b2p+45) (f32.const -0x1.08513cp+47)) (f32.const -0x1.db10dep+93))\n(assert_return (invoke \"f32.no_algebraic_factoring\" (f32.const 0x1.7d5e3p+17) (f32.const -0x1.c783b4p+7)) (f32.const 0x1.1c10a6p+35))\n(assert_return (invoke \"f32.no_algebraic_factoring\" (f32.const -0x1.daf96p+7) (f32.const -0x1.dac6bp+19)) (f32.const -0x1.b8422ep+39))\n\n(assert_return (invoke \"f64.no_algebraic_factoring\" (f64.const 0x1.e17c0a02ac6b5p-476) (f64.const 0x1.e8f13f1fcdc14p-463)) (f64.const -0x1.d2ec518f62863p-925))\n(assert_return (invoke \"f64.no_algebraic_factoring\" (f64.const 0x1.971b55a57e3a3p-377) (f64.const 0x1.edeb4233c1b27p-399)) (f64.const 0x1.43b3f69fb258bp-753))\n(assert_return (invoke \"f64.no_algebraic_factoring\" (f64.const -0x1.c3b9dc02472fap-378) (f64.const -0x1.74e9faebaff14p-369)) (f64.const -0x1.0f9c07e8caa25p-737))\n(assert_return (invoke \"f64.no_algebraic_factoring\" (f64.const -0x1.afaf4688ed019p+179) (f64.const 0x1.b07171cb49e94p+188)) (f64.const -0x1.6d3f2e2bebcf7p+377))\n(assert_return (invoke \"f64.no_algebraic_factoring\" (f64.const 0x1.4377a98948f12p+114) (f64.const -0x1.500c05bd24c97p+90)) (f64.const 0x1.98b72dbf7bf72p+228))\n\n;; Test that x*x - y*y is not optimized to (x+y) * (x-y).\n\n(module\n  (func (export \"f32.no_algebraic_factoring\") (param $x f32) (param $y f32) (result f32)\n    (f32.sub (f32.mul (local.get $x) (local.get $x))\n             (f32.mul (local.get $y) (local.get $y))))\n\n  (func (export \"f64.no_algebraic_factoring\") (param $x f64) (param $y f64) (result f64)\n    (f64.sub (f64.mul (local.get $x) (local.get $x))\n             (f64.mul (local.get $y) (local.get $y))))\n)\n\n(assert_return (invoke \"f32.no_algebraic_factoring\" (f32.const 0x1.8e2c14p-46) (f32.const 0x1.bad59ap-39)) (f32.const -0x1.7efe5p-77))\n(assert_return (invoke \"f32.no_algebraic_factoring\" (f32.const -0x1.7ef192p+41) (f32.const -0x1.db184ap+33)) (f32.const 0x1.1e6932p+83))\n(assert_return (invoke \"f32.no_algebraic_factoring\" (f32.const 0x1.7eb458p-12) (f32.const -0x1.52c498p-13)) (f32.const 0x1.cc0bc6p-24))\n(assert_return (invoke \"f32.no_algebraic_factoring\" (f32.const 0x1.2675c6p-44) (f32.const -0x1.edd31ap-46)) (f32.const 0x1.17294cp-88))\n(assert_return (invoke \"f32.no_algebraic_factoring\" (f32.const 0x1.9a5f92p+51) (f32.const -0x1.2b0098p+52)) (f32.const -0x1.7189a6p+103))\n\n(assert_return (invoke \"f64.no_algebraic_factoring\" (f64.const 0x1.749a128f18f69p+356) (f64.const -0x1.0bc97ee1354e1p+337)) (f64.const 0x1.0f28115518d74p+713))\n(assert_return (invoke \"f64.no_algebraic_factoring\" (f64.const -0x1.2dab01b2215eap+309) (f64.const -0x1.e12b288bff2bdp+331)) (f64.const -0x1.c4319ad25d201p+663))\n(assert_return (invoke \"f64.no_algebraic_factoring\" (f64.const 0x1.3ed898431e102p+42) (f64.const -0x1.c409183fa92e6p+39)) (f64.const 0x1.80a611103c71dp+84))\n(assert_return (invoke \"f64.no_algebraic_factoring\" (f64.const -0x1.be663e4c0e4b2p+182) (f64.const -0x1.da85703760d25p+166)) (f64.const 0x1.853434f1a2ffep+365))\n(assert_return (invoke \"f64.no_algebraic_factoring\" (f64.const -0x1.230e09952df1cp-236) (f64.const -0x1.fa2752adfadc9p-237)) (f64.const 0x1.42e43156bd1b8p-474))\n\n;; Test that platforms where SIMD instructions flush subnormals don't implicitly\n;; optimize using SIMD instructions.\n\n(module\n  (memory (data\n    \"\\01\\00\\00\\00\\01\\00\\00\\80\\01\\00\\00\\00\\01\\00\\00\\80\"\n    \"\\01\\00\\00\\00\\01\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\"\n    \"\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\"\n  ))\n\n  (func (export \"f32.simple_x4_sum\")\n    (param $i i32)\n    (param $j i32)\n    (param $k i32)\n    (local $x0 f32) (local $x1 f32) (local $x2 f32) (local $x3 f32)\n    (local $y0 f32) (local $y1 f32) (local $y2 f32) (local $y3 f32)\n    (local.set $x0 (f32.load offset=0 (local.get $i)))\n    (local.set $x1 (f32.load offset=4 (local.get $i)))\n    (local.set $x2 (f32.load offset=8 (local.get $i)))\n    (local.set $x3 (f32.load offset=12 (local.get $i)))\n    (local.set $y0 (f32.load offset=0 (local.get $j)))\n    (local.set $y1 (f32.load offset=4 (local.get $j)))\n    (local.set $y2 (f32.load offset=8 (local.get $j)))\n    (local.set $y3 (f32.load offset=12 (local.get $j)))\n    (f32.store offset=0 (local.get $k) (f32.add (local.get $x0) (local.get $y0)))\n    (f32.store offset=4 (local.get $k) (f32.add (local.get $x1) (local.get $y1)))\n    (f32.store offset=8 (local.get $k) (f32.add (local.get $x2) (local.get $y2)))\n    (f32.store offset=12 (local.get $k) (f32.add (local.get $x3) (local.get $y3)))\n  )\n\n  (func (export \"f32.load\")\n    (param $k i32) (result f32)\n    (f32.load (local.get $k))\n  )\n)\n\n(assert_return (invoke \"f32.simple_x4_sum\" (i32.const 0) (i32.const 16) (i32.const 32)))\n(assert_return (invoke \"f32.load\" (i32.const 32)) (f32.const 0x1p-148))\n(assert_return (invoke \"f32.load\" (i32.const 36)) (f32.const 0x0p+0))\n(assert_return (invoke \"f32.load\" (i32.const 40)) (f32.const 0x1p-149))\n(assert_return (invoke \"f32.load\" (i32.const 44)) (f32.const -0x1p-149))\n\n(module\n  (memory (data\n    \"\\01\\00\\00\\00\\00\\00\\00\\00\\01\\00\\00\\00\\00\\00\\00\\80\\01\\00\\00\\00\\00\\00\\00\\00\\01\\00\\00\\00\\00\\00\\00\\80\"\n    \"\\01\\00\\00\\00\\00\\00\\00\\00\\01\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\"\n    \"\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\"\n  ))\n\n  (func (export \"f64.simple_x4_sum\")\n    (param $i i32)\n    (param $j i32)\n    (param $k i32)\n    (local $x0 f64) (local $x1 f64) (local $x2 f64) (local $x3 f64)\n    (local $y0 f64) (local $y1 f64) (local $y2 f64) (local $y3 f64)\n    (local.set $x0 (f64.load offset=0 (local.get $i)))\n    (local.set $x1 (f64.load offset=8 (local.get $i)))\n    (local.set $x2 (f64.load offset=16 (local.get $i)))\n    (local.set $x3 (f64.load offset=24 (local.get $i)))\n    (local.set $y0 (f64.load offset=0 (local.get $j)))\n    (local.set $y1 (f64.load offset=8 (local.get $j)))\n    (local.set $y2 (f64.load offset=16 (local.get $j)))\n    (local.set $y3 (f64.load offset=24 (local.get $j)))\n    (f64.store offset=0 (local.get $k) (f64.add (local.get $x0) (local.get $y0)))\n    (f64.store offset=8 (local.get $k) (f64.add (local.get $x1) (local.get $y1)))\n    (f64.store offset=16 (local.get $k) (f64.add (local.get $x2) (local.get $y2)))\n    (f64.store offset=24 (local.get $k) (f64.add (local.get $x3) (local.get $y3)))\n  )\n\n  (func (export \"f64.load\")\n    (param $k i32) (result f64)\n    (f64.load (local.get $k))\n  )\n)\n\n(assert_return (invoke \"f64.simple_x4_sum\" (i32.const 0) (i32.const 32) (i32.const 64)))\n(assert_return (invoke \"f64.load\" (i32.const 64)) (f64.const 0x0.0000000000001p-1021))\n(assert_return (invoke \"f64.load\" (i32.const 72)) (f64.const 0x0p+0))\n(assert_return (invoke \"f64.load\" (i32.const 80)) (f64.const 0x0.0000000000001p-1022))\n(assert_return (invoke \"f64.load\" (i32.const 88)) (f64.const -0x0.0000000000001p-1022))\n\n;; Test that plain summation is not reassociated, and that Kahan summation\n;; isn't optimized into plain summation.\n\n(module\n  (memory (data\n    \"\\c4\\c5\\57\\24\\a5\\84\\c8\\0b\\6d\\b8\\4b\\2e\\f2\\76\\17\\1c\\ca\\4a\\56\\1e\\1b\\6e\\71\\22\"\n    \"\\5d\\17\\1e\\6e\\bf\\cd\\14\\5c\\c7\\21\\55\\51\\39\\9c\\1f\\b2\\51\\f0\\a3\\93\\d7\\c1\\2c\\ae\"\n    \"\\7e\\a8\\28\\3a\\01\\21\\f4\\0a\\58\\93\\f8\\42\\77\\9f\\83\\39\\6a\\5f\\ba\\f7\\0a\\d8\\51\\6a\"\n    \"\\34\\ca\\ad\\c6\\34\\0e\\d8\\26\\dc\\4c\\33\\1c\\ed\\29\\90\\a8\\78\\0f\\d1\\ce\\76\\31\\23\\83\"\n    \"\\b8\\35\\e8\\f2\\44\\b0\\d3\\a1\\fc\\bb\\32\\e1\\b0\\ba\\69\\44\\09\\d6\\d9\\7d\\ff\\2e\\c0\\5a\"\n    \"\\36\\14\\33\\14\\3e\\a9\\fa\\87\\6d\\8b\\bc\\ce\\9d\\a7\\fd\\c4\\e9\\85\\3f\\dd\\d7\\e1\\18\\a6\"\n    \"\\50\\26\\72\\6e\\3f\\73\\0f\\f8\\12\\93\\23\\34\\61\\76\\12\\48\\c0\\9b\\05\\93\\eb\\ac\\86\\de\"\n    \"\\94\\3e\\55\\e8\\8c\\e8\\dd\\e4\\fc\\95\\47\\be\\56\\03\\21\\20\\4c\\e6\\bf\\7b\\f6\\7f\\d5\\ba\"\n    \"\\73\\1c\\c1\\14\\8f\\c4\\27\\96\\b3\\bd\\33\\ff\\78\\41\\5f\\c0\\5a\\ce\\f6\\67\\6e\\73\\9a\\17\"\n    \"\\66\\70\\03\\f8\\ce\\27\\a3\\52\\b2\\9f\\3b\\bf\\fb\\ae\\ed\\d3\\5a\\f8\\37\\57\\f0\\f5\\6e\\ef\"\n    \"\\b1\\4d\\70\\3d\\54\\a7\\01\\9a\\85\\08\\48\\91\\f5\\9d\\0c\\60\\87\\5b\\d9\\54\\1e\\51\\6d\\88\"\n    \"\\8e\\08\\8c\\a5\\71\\3a\\56\\08\\67\\46\\8f\\8f\\13\\2a\\2c\\ec\\2c\\1f\\b4\\62\\2b\\6f\\41\\0a\"\n    \"\\c4\\65\\42\\a2\\31\\6b\\2c\\7d\\3e\\bb\\75\\ac\\86\\97\\30\\d9\\48\\cd\\9a\\1f\\56\\c4\\c6\\e4\"\n    \"\\12\\c0\\9d\\fb\\ee\\02\\8c\\ce\\1c\\f2\\1e\\a1\\78\\23\\db\\c4\\1e\\49\\03\\d3\\71\\cc\\08\\50\"\n    \"\\c5\\d8\\5c\\ed\\d5\\b5\\65\\ac\\b5\\c9\\21\\d2\\c9\\29\\76\\de\\f0\\30\\1a\\5b\\3c\\f2\\3b\\db\"\n    \"\\3a\\39\\82\\3a\\16\\08\\6f\\a8\\f1\\be\\69\\69\\99\\71\\a6\\05\\d3\\14\\93\\2a\\16\\f2\\2f\\11\"\n    \"\\c7\\7e\\20\\bb\\91\\44\\ee\\f8\\e4\\01\\53\\c0\\b9\\7f\\f0\\bf\\f0\\03\\9c\\6d\\b1\\df\\a2\\44\"\n    \"\\01\\6d\\6b\\71\\2b\\5c\\b3\\21\\19\\46\\5e\\8f\\db\\91\\d3\\7c\\78\\6b\\b7\\12\\00\\8f\\eb\\bd\"\n    \"\\8a\\f5\\d4\\2e\\c4\\c1\\1e\\df\\73\\63\\59\\47\\49\\03\\0a\\b7\\cf\\24\\cf\\9c\\0e\\44\\7a\\9e\"\n    \"\\14\\fb\\42\\bf\\9d\\39\\30\\9e\\a0\\ab\\2f\\d1\\ae\\9e\\6a\\83\\43\\e3\\55\\7d\\85\\bf\\63\\8a\"\n    \"\\f8\\96\\10\\1f\\fe\\6d\\e7\\22\\1b\\e1\\69\\46\\8a\\44\\c8\\c8\\f9\\0c\\2b\\19\\07\\a5\\02\\3e\"\n    \"\\f2\\30\\10\\9a\\85\\8a\\5f\\ef\\81\\45\\a0\\77\\b1\\03\\10\\73\\4b\\ae\\98\\9d\\47\\bf\\9a\\2d\"\n    \"\\3a\\d5\\0f\\03\\66\\e3\\3d\\53\\d9\\40\\ce\\1f\\6f\\32\\2f\\21\\2b\\23\\21\\6c\\62\\d4\\a7\\3e\"\n    \"\\a8\\ce\\28\\31\\2d\\00\\3d\\67\\5e\\af\\a0\\cf\\2e\\d2\\b9\\6b\\84\\eb\\69\\08\\3c\\62\\36\\be\"\n    \"\\12\\fd\\36\\7f\\88\\3e\\ad\\bc\\0b\\c0\\41\\c4\\50\\b6\\e3\\50\\31\\e8\\ce\\e2\\96\\65\\55\\9c\"\n    \"\\16\\46\\e6\\b0\\2d\\3a\\e8\\81\\05\\b0\\bf\\34\\f7\\bc\\10\\1c\\fb\\cc\\3c\\f1\\85\\97\\42\\9f\"\n    \"\\eb\\14\\8d\\3c\\bf\\d7\\17\\88\\49\\9d\\8b\\2b\\b2\\3a\\83\\d1\\4f\\04\\9e\\a1\\0f\\ad\\08\\9d\"\n    \"\\54\\af\\d1\\82\\c3\\ec\\32\\2f\\02\\8f\\05\\21\\2d\\a2\\b7\\e4\\f4\\6f\\2e\\81\\2b\\0b\\9c\\fc\"\n    \"\\cb\\fe\\74\\02\\f9\\db\\f4\\f3\\ea\\00\\a8\\ec\\d1\\99\\74\\26\\dd\\d6\\34\\d5\\25\\b1\\46\\dd\"\n    \"\\9c\\aa\\71\\f5\\60\\b0\\88\\c8\\e0\\0b\\59\\5a\\25\\4f\\29\\66\\f9\\e3\\2e\\fe\\e9\\da\\e5\\18\"\n    \"\\4f\\27\\62\\f4\\ce\\a4\\21\\95\\74\\c7\\57\\64\\27\\9a\\4c\\fd\\54\\7d\\61\\ce\\c3\\ac\\87\\46\"\n    \"\\9c\\fa\\ff\\09\\ca\\79\\97\\67\\24\\74\\ca\\d4\\21\\83\\26\\25\\19\\12\\37\\64\\19\\e5\\65\\e0\"\n    \"\\74\\75\\8e\\dd\\c8\\ef\\74\\c7\\d8\\21\\2b\\79\\04\\51\\46\\65\\60\\03\\5d\\fa\\d8\\f4\\65\\a4\"\n    \"\\9e\\5d\\23\\da\\d7\\8a\\92\\80\\a4\\de\\78\\3c\\f1\\57\\42\\6d\\cd\\c9\\2f\\d5\\a4\\9e\\ab\\40\"\n    \"\\f4\\cb\\1b\\d7\\a3\\ca\\fc\\eb\\a7\\01\\b2\\9a\\69\\4e\\46\\9b\\18\\4e\\dd\\79\\a7\\aa\\a6\\52\"\n    \"\\39\\1e\\ef\\30\\cc\\9b\\bd\\5b\\ee\\4c\\21\\6d\\30\\00\\72\\b0\\46\\5f\\08\\cf\\c5\\b9\\e0\\3e\"\n    \"\\c2\\b3\\0c\\dc\\8e\\64\\de\\19\\42\\79\\cf\\43\\ea\\43\\5d\\8e\\88\\f7\\ab\\15\\dc\\3f\\c8\\67\"\n    \"\\20\\db\\b8\\64\\b1\\47\\1f\\de\\f2\\cb\\3f\\59\\9f\\d8\\46\\90\\dc\\ae\\2f\\22\\f9\\e2\\31\\89\"\n    \"\\d9\\9c\\1c\\4c\\d3\\a9\\4a\\57\\84\\9c\\9f\\ea\\2c\\3c\\ae\\3c\\c3\\1e\\8b\\e5\\4e\\17\\01\\25\"\n    \"\\db\\34\\46\\5f\\15\\ea\\05\\0c\\7c\\d9\\45\\8c\\19\\d0\\73\\8a\\96\\16\\dd\\44\\f9\\05\\b7\\5b\"\n    \"\\71\\b0\\e6\\21\\36\\5f\\75\\89\\91\\73\\75\\ab\\7d\\ae\\d3\\73\\ec\\37\\c6\\ea\\55\\75\\ef\\ea\"\n    \"\\ab\\8b\\7b\\11\\dc\\6d\\1a\\b2\\6a\\c4\\25\\cf\\aa\\e3\\9f\\49\\49\\89\\cb\\37\\9b\\0a\\a7\\01\"\n    \"\\60\\70\\dc\\b7\\c8\\83\\e1\\42\\f5\\be\\ad\\62\\94\\ad\\8d\\a1\"\n  ))\n\n  (func (export \"f32.kahan_sum\") (param $p i32) (param $n i32) (result f32)\n    (local $sum f32)\n    (local $c f32)\n    (local $t f32)\n    (block $exit\n      (loop $top\n        (local.set $t\n          (f32.sub\n            (f32.sub\n              (local.tee $sum\n                (f32.add\n                  (local.get $c)\n                  (local.tee $t\n                    (f32.sub (f32.load (local.get $p)) (local.get $t))\n                  )\n                )\n              )\n              (local.get $c)\n            )\n            (local.get $t)\n          )\n        )\n        (local.set $p (i32.add (local.get $p) (i32.const 4)))\n        (local.set $c (local.get $sum))\n        (br_if $top (local.tee $n (i32.add (local.get $n) (i32.const -1))))\n      )\n    )\n    (local.get $sum)\n  )\n\n  (func (export \"f32.plain_sum\") (param $p i32) (param $n i32) (result f32)\n    (local $sum f32)\n    (block $exit\n      (loop $top\n        (local.set $sum (f32.add (local.get $sum) (f32.load (local.get $p))))\n        (local.set $p (i32.add (local.get $p) (i32.const 4)))\n        (local.set $n (i32.add (local.get $n) (i32.const -1)))\n        (br_if $top (local.get $n))\n      )\n    )\n    (local.get $sum)\n  )\n)\n\n(assert_return (invoke \"f32.kahan_sum\" (i32.const 0) (i32.const 256)) (f32.const -0x1.101a1ap+104))\n(assert_return (invoke \"f32.plain_sum\" (i32.const 0) (i32.const 256)) (f32.const -0x1.a0343ap+103))\n\n(module\n  (memory (data \"\\13\\05\\84\\42\\5d\\a2\\2c\\c6\\43\\db\\55\\a9\\cd\\da\\55\\e3\\73\\fc\\58\\d6\\ba\\d5\\00\\fd\\83\\35\\42\\88\\8b\\13\\5d\\38\\4a\\47\\0d\\72\\73\\a1\\1a\\ef\\c4\\45\\17\\57\\d8\\c9\\46\\e0\\8d\\6c\\e1\\37\\70\\c8\\83\\5b\\55\\5e\\5a\\2d\\73\\1e\\56\\c8\\e1\\6d\\69\\14\\78\\0a\\8a\\5a\\64\\3a\\09\\c7\\a8\\87\\c5\\f0\\d3\\5d\\e6\\03\\fc\\93\\be\\26\\ca\\d6\\a9\\91\\60\\bd\\b0\\ed\\ae\\f7\\30\\7e\\92\\3a\\6f\\a7\\59\\8e\\aa\\7d\\bf\\67\\58\\2a\\54\\f8\\4e\\fe\\ed\\35\\58\\a6\\51\\bf\\42\\e5\\4b\\66\\27\\24\\6d\\7f\\42\\2d\\28\\92\\18\\ec\\08\\ae\\e7\\55\\da\\b1\\a6\\65\\a5\\72\\50\\47\\1b\\b8\\a9\\54\\d7\\a6\\06\\5b\\0f\\42\\58\\83\\8a\\17\\82\\c6\\10\\43\\a0\\c0\\2e\\6d\\bc\\5a\\85\\53\\72\\7f\\ad\\44\\bc\\30\\3c\\55\\b2\\24\\9a\\74\\3a\\9e\\e1\\d8\\0f\\70\\fc\\a9\\3a\\cd\\93\\4b\\ec\\e3\\7e\\dd\\5d\\27\\cd\\f8\\a0\\9d\\1c\\11\\c0\\57\\2e\\fd\\c8\\13\\32\\cc\\3a\\1a\\7d\\a3\\41\\55\\ed\\c3\\82\\49\\2a\\04\\1e\\ef\\73\\b9\\2e\\2e\\e3\\5f\\f4\\df\\e6\\b2\\33\\0c\\39\\3f\\6f\\44\\6a\\03\\c1\\42\\b9\\fa\\b1\\c8\\ed\\a5\\58\\99\\7f\\ed\\b4\\72\\9e\\79\\eb\\fb\\43\\82\\45\\aa\\bb\\95\\d2\\ff\\28\\9e\\f6\\a1\\ad\\95\\d6\\55\\95\\0d\\6f\\60\\11\\c7\\78\\3e\\49\\f2\\7e\\48\\f4\\a2\\71\\d0\\13\\8e\\b3\\de\\99\\52\\e3\\45\\74\\ea\\76\\0e\\1b\\2a\\c8\\ee\\14\\01\\c4\\50\\5b\\36\\3c\\ef\\ba\\72\\a2\\a6\\08\\f8\\7b\\36\\9d\\f9\\ef\\0b\\c7\\56\\2d\\5c\\f0\\9d\\5d\\de\\fc\\b8\\ad\\0f\\64\\0e\\97\\15\\32\\26\\c2\\31\\e6\\05\\1e\\ef\\cb\\17\\1b\\6d\\15\\0b\\74\\5d\\d3\\2e\\f8\\6b\\86\\b4\\ba\\73\\52\\53\\99\\a9\\76\\20\\45\\c9\\40\\80\\6b\\14\\ed\\a1\\fa\\80\\46\\e6\\26\\d2\\e6\\98\\c4\\57\\bf\\c4\\1c\\a4\\90\\7a\\36\\94\\14\\ba\\15\\89\\6e\\e6\\9c\\37\\8c\\f4\\de\\12\\22\\5d\\a1\\79\\50\\67\\0d\\3d\\7a\\e9\\d4\\aa\\2e\\7f\\2a\\7a\\30\\3d\\ea\\5d\\12\\48\\fe\\e1\\18\\cd\\a4\\57\\a2\\87\\3e\\b6\\9a\\8b\\db\\da\\9d\\78\\9c\\cf\\8d\\b1\\4f\\90\\b4\\34\\e0\\9d\\f6\\ca\\fe\\4c\\3b\\78\\6d\\0a\\5c\\18\\9f\\61\\b9\\dd\\b4\\e0\\0f\\76\\e0\\1b\\69\\0d\\5e\\58\\73\\70\\5e\\0e\\2d\\a1\\7d\\ff\\20\\eb\\91\\34\\92\\ac\\38\\72\\2a\\1f\\8e\\71\\2e\\6a\\f1\\af\\c7\\27\\70\\d9\\c4\\57\\f7\\d2\\3c\\1d\\b8\\f0\\f0\\64\\cf\\dc\\ae\\be\\a3\\cc\\3e\\22\\7d\\4e\\69\\21\\63\\17\\ed\\03\\02\\54\\9a\\0f\\50\\4e\\13\\5a\\35\\a1\\22\\a4\\df\\86\\c2\\74\\79\\16\\b8\\69\\69\\a0\\52\\5d\\11\\64\\bd\\5b\\93\\fc\\69\\a0\\f4\\13\\d0\\81\\51\\dd\\fa\\0c\\15\\c3\\7a\\c9\\62\\7a\\a9\\1d\\c9\\e6\\5a\\b3\\5b\\97\\02\\3c\\64\\22\\12\\3c\\22\\90\\64\\2d\\30\\54\\4c\\b4\\a1\\22\\09\\57\\22\\5e\\8e\\38\\2b\\02\\a8\\ae\\f6\\be\\0d\\2b\\f2\\03\\ad\\fa\\10\\01\\71\\77\\2a\\30\\02\\95\\f6\\00\\3e\\d0\\c4\\8d\\34\\19\\50\\21\\0a\\bc\\50\\da\\3c\\30\\d6\\3a\\31\\94\\8d\\3a\\fe\\ef\\14\\57\\9d\\4b\\93\\00\\96\\24\\0c\\6f\\fd\\bc\\23\\76\\02\\6c\\eb\\52\\72\\80\\11\\7e\\80\\3a\\13\\12\\38\\1d\\38\\49\\95\\40\\27\\8a\\44\\7b\\e8\\dc\\6d\\8c\\8c\\8e\\3c\\b5\\b3\\18\\0e\\f6\\08\\1a\\84\\41\\35\\ff\\8b\\b8\\93\\40\\ea\\e1\\51\\1d\\89\\a5\\8d\\42\\68\\29\\ea\\2f\\c1\\7a\\52\\eb\\90\\5d\\4d\\d6\\80\\e3\\d7\\75\\48\\ce\\ed\\d3\\01\\1c\\8d\\5b\\a5\\94\\0d\\78\\cf\\f1\\06\\13\\2f\\98\\02\\a4\\6d\\2e\\6c\\f2\\d5\\74\\29\\89\\4c\\f9\\03\\f5\\c7\\18\\ad\\7a\\f0\\68\\f8\\5c\\d6\\59\\87\\6e\\d6\\3f\\06\\be\\86\\20\\e3\\41\\91\\22\\f3\\6e\\8b\\f0\\68\\1c\\57\\a7\\fc\\b0\\7c\\9e\\99\\0b\\96\\1a\\89\\5f\\e6\\0d\\7c\\08\\51\\a0\\a2\\67\\9a\\47\\00\\93\\6b\\f9\\28\\f0\\68\\db\\62\\f1\\e0\\65\\2c\\53\\33\\e0\\a7\\ca\\11\\42\\30\\f6\\af\\01\\c1\\65\\3d\\32\\01\\6f\\ab\\2e\\be\\d3\\8b\\be\\14\\c3\\ff\\ec\\fb\\f0\\f9\\c5\\0c\\05\\6f\\01\\09\\6b\\e3\\34\\31\\0c\\1f\\66\\a6\\42\\bc\\1a\\87\\49\\16\\16\\8c\\b0\\90\\0d\\34\\8c\\0a\\e1\\09\\5e\\10\\a4\\6b\\56\\cc\\f0\\c9\\bb\\dc\\b8\\5c\\ce\\f6\\cc\\8d\\75\\7e\\b3\\07\\88\\04\\2f\\b4\\5e\\c9\\e3\\4a\\23\\73\\19\\62\\6c\\9a\\03\\76\\44\\86\\9c\\60\\fc\\db\\72\\8f\\27\\a0\\dd\\b3\\c5\\da\\ff\\f9\\ec\\6a\\b1\\7b\\d3\\cf\\50\\37\\c9\\7a\\78\\0c\\e4\\3a\\b6\\f5\\e6\\f4\\98\\6e\\42\\7d\\35\\73\\8b\\45\\c0\\56\\97\\cd\\6d\\ce\\cf\\ad\\31\\b3\\c3\\54\\fa\\ef\\d5\\c0\\f4\\6a\\5f\\54\\e7\\49\\3e\\33\\0a\\30\\38\\fd\\d9\\05\\ff\\a5\\3f\\57\\46\\14\\b5\\91\\17\\ca\\6b\\98\\23\\7a\\65\\b3\\6c\\02\\b4\\cc\\79\\5d\\58\\d8\\b3\\d5\\94\\ae\\f4\\6d\\75\\65\\f7\\92\\bf\\7e\\47\\4c\\3c\\ee\\db\\ac\\f1\\32\\5d\\fb\\6f\\41\\1c\\34\\c8\\83\\4f\\c2\\58\\01\\be\\05\\3e\\66\\16\\a6\\04\\6d\\5d\\4f\\86\\09\\27\\82\\25\\12\\cd\\3a\\cd\\ce\\6b\\bc\\ca\\ac\\28\\9b\\ee\\6a\\25\\86\\9e\\45\\70\\c6\\d2\\bd\\3b\\7d\\42\\e5\\27\\af\\c7\\1d\\f4\\81\\c8\\b3\\76\\8a\\a8\\36\\a3\\ae\\2a\\e6\\18\\e1\\36\\22\\ad\\f6\\25\\72\\b0\\39\\8b\\01\\9a\\22\\7b\\84\\c3\\2d\\5f\\72\\a4\\98\\ac\\15\\70\\e7\\d4\\18\\e2\\7d\\d2\\30\\7c\\33\\08\\cd\\ca\\c4\\22\\85\\88\\75\\81\\c6\\4a\\74\\58\\8d\\e0\\e8\\ac\\c5\\ab\\75\\5a\\f4\\28\\12\\f0\\18\\45\\52\\f2\\97\\b2\\93\\41\\6f\\8d\\7f\\db\\70\\fb\\a3\\5d\\1f\\a7\\8d\\98\\20\\2b\\22\\9f\\3a\\01\\b5\\8b\\1b\\d2\\cb\\14\\03\\0e\\14\\14\\d2\\19\\5a\\1f\\ce\\5e\\cd\\81\\79\\15\\01\\ca\\de\\73\\74\\8c\\56\\20\\9f\\77\\2d\\25\\16\\f6\\61\\51\\1d\\a4\\8e\\9b\\98\\a5\\c6\\ec\\a8\\45\\57\\82\\59\\78\\0d\\90\\b4\\df\\51\\b0\\c3\\82\\94\\cc\\b3\\53\\09\\15\\6d\\96\\6c\\3a\\40\\47\\b7\\4a\\7a\\05\\2f\\a1\\1e\\8c\\9d\\a0\\20\\88\\fb\\52\\b7\\9f\\f3\\f3\\bb\\5f\\e7\\8a\\61\\a7\\21\\b1\\ac\\fa\\09\\aa\\a4\\6c\\bc\\24\\80\\ba\\2a\\e9\\65\\ff\\70\\ff\\cc\\fa\\65\\87\\76\\f3\\c5\\15\\ce\\cb\\e8\\42\\31\\00\\0c\\91\\57\\d9\\e0\\9d\\35\\54\\24\\ad\\a4\\d8\\f9\\08\\67\\63\\c8\\cf\\81\\dd\\90\\a2\\d7\\c4\\07\\4a\\e6\\10\\6f\\67\\e7\\27\\d4\\23\\59\\18\\f2\\a8\\9d\\5f\\d8\\94\\30\\aa\\54\\86\\4f\\87\\9d\\82\\b5\\26\\ca\\a6\\96\\bf\\cf\\55\\f9\\9d\\37\\01\\19\\48\\43\\c5\\94\\6c\\f3\\74\\97\\58\\4c\\3c\\9d\\08\\e8\\04\\c2\\58\\30\\76\\e1\\a0\\f8\\ea\\e9\\c5\\ae\\cf\\78\\9e\\a9\\0c\\ac\\b3\\44\\42\\e0\\bc\\5d\\1b\\9c\\49\\58\\4a\\1c\\19\\49\\c1\\3a\\ea\\f5\\eb\\3b\\81\\a9\\4b\\70\\0c\\cc\\9e\\1a\\d3\\2f\\b7\\52\\2f\\20\\3b\\eb\\64\\51\\1d\\a0\\2d\\b2\\3e\\be\\13\\85\\48\\92\\32\\2e\\db\\5c\\a1\\e7\\8c\\45\\91\\35\\01\\0a\\93\\c2\\eb\\09\\ce\\f3\\d2\\22\\24\\d0\\8c\\cc\\1d\\9d\\38\\c8\\4d\\e3\\82\\cc\\64\\15\\06\\2d\\e7\\01\\2f\\ab\\bb\\b5\\04\\4c\\92\\1c\\7a\\d6\\3f\\e8\\5f\\31\\15\\0c\\dc\\e4\\31\\b4\\c4\\25\\3e\\2a\\aa\\00\\9e\\c8\\e5\\21\\7a\\7f\\29\\f1\\c0\\af\\1d\\5e\\e8\\63\\39\\ad\\f8\\7e\\6c\\c8\\c5\\7f\\c2\\a8\\97\\27\\0a\\d9\\f4\\21\\6a\\ea\\03\\09\\fb\\f7\\96\\3b\\83\\79\\5f\\7c\\4b\\30\\9f\\56\\35\\de\\b4\\73\\d4\\95\\f0\\14\\c3\\74\\2f\\0d\\a3\\1d\\4e\\8d\\31\\24\\b3\\1a\\84\\85\\62\\5a\\7b\\3c\\14\\39\\17\\e6\\6d\\eb\\37\\c2\\00\\58\\5b\\0b\\e3\\3c\\8a\\62\\e1\\f8\\35\\4b\\56\\e2\\87\\60\\8b\\be\\a7\\38\\91\\77\\54\\a9\\5a\\24\\25\\90\\9f\\a5\\42\\77\\f3\\5c\\39\\df\\ff\\74\\07\\76\\a1\\cd\\1f\\62\\0b\\81\\81\\68\\af\\05\\c1\\c0\\7f\\26\\ee\\c0\\91\\a3\\6a\\7d\\29\\61\\45\\27\\e5\\57\\88\\dc\\0d\\97\\04\\1a\\33\\a9\\44\\8a\\da\\02\\10\\45\\3f\\8e\\55\\a6\\76\\8c\\4d\\e3\\f1\\89\\83\\c8\\d0\\f8\\9b\\50\\77\\9f\\47\\df\\4c\\9c\\66\\0d\\aa\\18\\b8\\5f\\4f\\c4\\01\\ce\\dc\\84\\ac\\46\\9e\\69\\e1\\76\\45\\6b\\61\\89\\e4\\5d\\94\\bb\\11\\83\\9f\\78\\d8\\0a\\d2\\f5\\7e\\5d\\43\\ea\\bc\\10\\f1\\3a\\c9\\e2\\64\\fb\\53\\65\\d0\\c7\\b4\\a7\\fb\\d4\\05\\53\\25\\d0\\cd\\29\\88\\00\\56\\25\\24\\7d\\5d\\b4\\f3\\41\\9f\\e9\\b5\\f7\\ae\\64\\2c\\e3\\c9\\6d\\d5\\84\\3a\\72\\12\\b8\\7a\\d9\\1b\\09\\e8\\38\\da\\26\\4f\\04\\ce\\03\\71\\6e\\8a\\44\\7b\\5c\\81\\59\\9c\\d2\\e4\\c3\\ba\\59\\a6\\e5\\28\\a7\\8f\\9a\\e4\\d5\\4e\\b9\\ca\\7f\\cb\\75\\b8\\2b\\43\\3e\\b3\\15\\46\\b1\\a5\\bc\\9d\\9e\\38\\15\\f1\\bd\\1b\\21\\aa\\f1\\82\\00\\95\\fc\\a7\\77\\47\\39\\a7\\33\\43\\92\\d7\\52\\40\\4b\\06\\81\\8a\\a0\\bd\\f1\\6b\\99\\84\\42\\5b\\e2\\3b\\c5\\5e\\12\\5c\\28\\4d\\b6\\0e\\4e\\c8\\5c\\e8\\01\\8a\\c5\\e7\\e4\\9d\\42\\ee\\5d\\9c\\c4\\eb\\eb\\68\\09\\27\\92\\95\\9a\\11\\54\\73\\c4\\12\\80\\fb\\7d\\fe\\c5\\08\\60\\7f\\36\\41\\e0\\10\\ba\\d6\\2b\\6c\\f1\\b4\\17\\fe\\26\\34\\e3\\4b\\f8\\a8\\e3\\91\\be\\4f\\2a\\fc\\da\\81\\b8\\e7\\fe\\d5\\26\\50\\47\\f3\\1a\\65\\32\\81\\e0\\05\\b8\\4f\\32\\31\\26\\00\\4a\\53\\97\\c2\\c3\\0e\\2e\\a1\\26\\54\\ab\\05\\8e\\56\\2f\\7d\\af\\22\\84\\68\\a5\\8b\\97\\f6\\a4\\fd\\a8\\cc\\75\\41\\96\\86\\fd\\27\\3d\\29\\86\\8d\\7f\\4c\\d4\\8e\\73\\41\\f4\\1e\\e2\\dd\\58\\27\\97\\ce\\9c\\94\\cf\\7a\\04\\2f\\dc\\ed\"\n  ))\n\n  (func (export \"f64.kahan_sum\") (param $p i32) (param $n i32) (result f64)\n    (local $sum f64)\n    (local $c f64)\n    (local $t f64)\n    (block $exit\n      (loop $top\n        (local.set $t\n          (f64.sub\n            (f64.sub\n              (local.tee $sum\n                (f64.add\n                  (local.get $c)\n                  (local.tee $t\n                    (f64.sub (f64.load (local.get $p)) (local.get $t))\n                  )\n                )\n              )\n              (local.get $c)\n            )\n            (local.get $t)\n          )\n        )\n        (local.set $p (i32.add (local.get $p) (i32.const 8)))\n        (local.set $c (local.get $sum))\n        (br_if $top (local.tee $n (i32.add (local.get $n) (i32.const -1))))\n      )\n    )\n    (local.get $sum)\n  )\n\n  (func (export \"f64.plain_sum\") (param $p i32) (param $n i32) (result f64)\n    (local $sum f64)\n    (block $exit\n      (loop $top\n        (local.set $sum (f64.add (local.get $sum) (f64.load (local.get $p))))\n        (local.set $p (i32.add (local.get $p) (i32.const 8)))\n        (local.set $n (i32.add (local.get $n) (i32.const -1)))\n        (br_if $top (local.get $n))\n      )\n    )\n    (local.get $sum)\n  )\n)\n\n(assert_return (invoke \"f64.kahan_sum\" (i32.const 0) (i32.const 256)) (f64.const 0x1.dd7cb2a5ffc88p+998))\n(assert_return (invoke \"f64.plain_sum\" (i32.const 0) (i32.const 256)) (f64.const 0x1.dd7cb2a63fc87p+998))\n\n;; Test that -(x - y) is not folded to y - x.\n\n(module\n  (func (export \"f32.no_fold_neg_sub\") (param $x f32) (param $y f32) (result f32)\n    (f32.neg (f32.sub (local.get $x) (local.get $y))))\n\n  (func (export \"f64.no_fold_neg_sub\") (param $x f64) (param $y f64) (result f64)\n    (f64.neg (f64.sub (local.get $x) (local.get $y))))\n)\n\n(assert_return (invoke \"f32.no_fold_neg_sub\" (f32.const -0.0) (f32.const -0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_neg_sub\" (f32.const 0.0) (f32.const -0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_neg_sub\" (f32.const -0.0) (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_neg_sub\" (f32.const 0.0) (f32.const 0.0)) (f32.const -0.0))\n\n(assert_return (invoke \"f64.no_fold_neg_sub\" (f64.const -0.0) (f64.const -0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_neg_sub\" (f64.const 0.0) (f64.const -0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_neg_sub\" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_neg_sub\" (f64.const 0.0) (f64.const 0.0)) (f64.const -0.0))\n\n;; Test that -(x + y) is not folded to (-x + -y).\n\n(module\n  (func (export \"f32.no_fold_neg_add\") (param $x f32) (param $y f32) (result f32)\n    (f32.neg (f32.add (local.get $x) (local.get $y))))\n\n  (func (export \"f64.no_fold_neg_add\") (param $x f64) (param $y f64) (result f64)\n    (f64.neg (f64.add (local.get $x) (local.get $y))))\n)\n\n(assert_return (invoke \"f32.no_fold_neg_add\" (f32.const -0.0) (f32.const -0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_neg_add\" (f32.const 0.0) (f32.const -0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_neg_add\" (f32.const -0.0) (f32.const 0.0)) (f32.const -0.0))\n(assert_return (invoke \"f32.no_fold_neg_add\" (f32.const 0.0) (f32.const 0.0)) (f32.const -0.0))\n\n(assert_return (invoke \"f64.no_fold_neg_add\" (f64.const -0.0) (f64.const -0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_neg_add\" (f64.const 0.0) (f64.const -0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_neg_add\" (f64.const -0.0) (f64.const 0.0)) (f64.const -0.0))\n(assert_return (invoke \"f64.no_fold_neg_add\" (f64.const 0.0) (f64.const 0.0)) (f64.const -0.0))\n\n;; Test that (-x + -y) is not folded to -(x + y).\n\n(module\n  (func (export \"f32.no_fold_add_neg_neg\") (param $x f32) (param $y f32) (result f32)\n    (f32.add (f32.neg (local.get $x)) (f32.neg (local.get $y))))\n\n  (func (export \"f64.no_fold_add_neg_neg\") (param $x f64) (param $y f64) (result f64)\n    (f64.add (f64.neg (local.get $x)) (f64.neg (local.get $y))))\n)\n\n(assert_return (invoke \"f32.no_fold_add_neg_neg\" (f32.const -0.0) (f32.const -0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_add_neg_neg\" (f32.const 0.0) (f32.const -0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_add_neg_neg\" (f32.const -0.0) (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_add_neg_neg\" (f32.const 0.0) (f32.const 0.0)) (f32.const -0.0))\n\n(assert_return (invoke \"f64.no_fold_add_neg_neg\" (f64.const -0.0) (f64.const -0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_add_neg_neg\" (f64.const 0.0) (f64.const -0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_add_neg_neg\" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_add_neg_neg\" (f64.const 0.0) (f64.const 0.0)) (f64.const -0.0))\n\n;; Test that -x + x is not folded to 0.0.\n\n(module\n  (func (export \"f32.no_fold_add_neg\") (param $x f32) (result f32)\n    (f32.add (f32.neg (local.get $x)) (local.get $x)))\n\n  (func (export \"f64.no_fold_add_neg\") (param $x f64) (result f64)\n    (f64.add (f64.neg (local.get $x)) (local.get $x)))\n)\n\n(assert_return (invoke \"f32.no_fold_add_neg\" (f32.const 0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_add_neg\" (f32.const -0.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.no_fold_add_neg\" (f32.const inf)) (f32.const nan:canonical))\n(assert_return (invoke \"f32.no_fold_add_neg\" (f32.const -inf)) (f32.const nan:canonical))\n\n(assert_return (invoke \"f64.no_fold_add_neg\" (f64.const 0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_add_neg\" (f64.const -0.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.no_fold_add_neg\" (f64.const inf)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_add_neg\" (f64.const -inf)) (f64.const nan:canonical))\n\n;; Test that x+x+x+x+x+x is not folded to x * 6.\n\n(module\n  (func (export \"f32.no_fold_6x_via_add\") (param $x f32) (result f32)\n    (f32.add (f32.add (f32.add (f32.add (f32.add\n    (local.get $x)\n    (local.get $x)) (local.get $x)) (local.get $x))\n    (local.get $x)) (local.get $x)))\n\n  (func (export \"f64.no_fold_6x_via_add\") (param $x f64) (result f64)\n    (f64.add (f64.add (f64.add (f64.add (f64.add\n    (local.get $x)\n    (local.get $x)) (local.get $x)) (local.get $x))\n    (local.get $x)) (local.get $x)))\n)\n\n(assert_return (invoke \"f32.no_fold_6x_via_add\" (f32.const -0x1.598a0cp+99)) (f32.const -0x1.03278ap+102))\n(assert_return (invoke \"f32.no_fold_6x_via_add\" (f32.const -0x1.d3e7acp-77)) (f32.const -0x1.5eedc2p-74))\n(assert_return (invoke \"f32.no_fold_6x_via_add\" (f32.const 0x1.00fa02p-77)) (f32.const 0x1.817702p-75))\n(assert_return (invoke \"f32.no_fold_6x_via_add\" (f32.const -0x1.51f434p-31)) (f32.const -0x1.faee4cp-29))\n(assert_return (invoke \"f32.no_fold_6x_via_add\" (f32.const -0x1.00328ap+80)) (f32.const -0x1.804bcep+82))\n\n(assert_return (invoke \"f64.no_fold_6x_via_add\" (f64.const -0x1.310e15acaffe6p+68)) (f64.const -0x1.c995208307fdap+70))\n(assert_return (invoke \"f64.no_fold_6x_via_add\" (f64.const -0x1.aad62c78fa9b4p-535)) (f64.const -0x1.4020a15abbf46p-532))\n(assert_return (invoke \"f64.no_fold_6x_via_add\" (f64.const -0x1.f8fbfa94f6ab2p+271)) (f64.const -0x1.7abcfbefb9005p+274))\n(assert_return (invoke \"f64.no_fold_6x_via_add\" (f64.const 0x1.756ccc2830a8ep+751)) (f64.const 0x1.1811991e247ebp+754))\n(assert_return (invoke \"f64.no_fold_6x_via_add\" (f64.const -0x1.8fd1ab1d2402ap+234)) (f64.const -0x1.2bdd4055db01fp+237))\n\n;; Test that (x/y)/z is not optimized to x/(y*z),\n;; which is an \"allowable alternative Form\" in Fortran.\n\n(module\n  (func (export \"f32.no_fold_div_div\") (param $x f32) (param $y f32) (param $z f32) (result f32)\n    (f32.div (f32.div (local.get $x) (local.get $y)) (local.get $z)))\n\n  (func (export \"f64.no_fold_div_div\") (param $x f64) (param $y f64) (param $z f64) (result f64)\n    (f64.div (f64.div (local.get $x) (local.get $y)) (local.get $z)))\n)\n\n(assert_return (invoke \"f32.no_fold_div_div\" (f32.const -0x1.f70228p+78) (f32.const -0x1.fbc612p-16) (f32.const -0x1.8c379p+10)) (f32.const -0x1.47b43cp+83))\n(assert_return (invoke \"f32.no_fold_div_div\" (f32.const 0x1.d29d2ep-70) (f32.const 0x1.f3a17ep+110) (f32.const -0x1.64d41p-112)) (f32.const -0x0p+0))\n(assert_return (invoke \"f32.no_fold_div_div\" (f32.const 0x1.867f98p+43) (f32.const 0x1.30acfcp-105) (f32.const 0x1.e210d8p+105)) (f32.const inf))\n(assert_return (invoke \"f32.no_fold_div_div\" (f32.const -0x1.c4001ap-14) (f32.const -0x1.9beb6cp+124) (f32.const -0x1.74f34cp-43)) (f32.const -0x1.819874p-96))\n(assert_return (invoke \"f32.no_fold_div_div\" (f32.const 0x1.db0e6ep+46) (f32.const 0x1.55eea2p+56) (f32.const -0x1.f3134p+124)) (f32.const -0x1.6cep-135))\n\n(assert_return (invoke \"f64.no_fold_div_div\" (f64.const 0x1.b4dc8ec3c7777p+337) (f64.const 0x1.9f95ac2d1863p+584) (f64.const -0x1.d4318abba341ep-782)) (f64.const -0x1.2649159d87e02p+534))\n(assert_return (invoke \"f64.no_fold_div_div\" (f64.const -0x1.ac53af5eb445fp+791) (f64.const 0x1.8549c0a4ceb13p-29) (f64.const 0x1.64e384003c801p+316)) (f64.const -0x1.9417cdccbae91p+503))\n(assert_return (invoke \"f64.no_fold_div_div\" (f64.const -0x1.d2685afb27327p+2) (f64.const -0x1.abb1eeed3dbebp+880) (f64.const 0x1.a543e2e6968a3p+170)) (f64.const 0x0.0000002a69a5fp-1022))\n(assert_return (invoke \"f64.no_fold_div_div\" (f64.const -0x1.47ddede78ad1cp+825) (f64.const 0x1.6d932d070a367p-821) (f64.const 0x1.79cf18cc64fp+961)) (f64.const -inf))\n(assert_return (invoke \"f64.no_fold_div_div\" (f64.const -0x1.f73d4979a9379p-888) (f64.const 0x1.4d83b53e97788p-596) (f64.const -0x1.f8f86c9603b5bp-139)) (f64.const 0x1.87a7bd89c586cp-154))\n\n;; Test that (x/y)*(z/w) is not optimized to (x*z)/(y*w), example from\n;; http://perso.ens-lyon.fr/jean-michel.muller/Handbook.html\n;; section 7.4.1: FORTRAN Floating Point in a Nutshell: Philosophy\n\n(module\n  (func (export \"f32.no_fold_mul_divs\") (param $x f32) (param $y f32) (param $z f32) (param $w f32) (result f32)\n    (f32.mul (f32.div (local.get $x) (local.get $y)) (f32.div (local.get $z) (local.get $w))))\n\n  (func (export \"f64.no_fold_mul_divs\") (param $x f64) (param $y f64) (param $z f64) (param $w f64) (result f64)\n    (f64.mul (f64.div (local.get $x) (local.get $y)) (f64.div (local.get $z) (local.get $w))))\n)\n\n(assert_return (invoke \"f32.no_fold_mul_divs\" (f32.const -0x1.c483bep-109) (f32.const 0x1.ee1c3cp-92) (f32.const 0x1.800756p-88) (f32.const -0x1.95b972p+4)) (f32.const 0x1.bbd30cp-110))\n(assert_return (invoke \"f32.no_fold_mul_divs\" (f32.const -0x1.0f4262p+102) (f32.const 0x1.248498p+25) (f32.const 0x1.f66a7cp-17) (f32.const 0x1.897fc8p-3)) (f32.const -0x1.2f1aa4p+63))\n(assert_return (invoke \"f32.no_fold_mul_divs\" (f32.const -0x1.df5f22p+33) (f32.const -0x1.fcee3ep+39) (f32.const -0x1.9ea914p+29) (f32.const -0x1.2c4d3p+10)) (f32.const 0x1.4cf51cp+13))\n(assert_return (invoke \"f32.no_fold_mul_divs\" (f32.const -0x1.f568bcp+109) (f32.const 0x1.d9963p-34) (f32.const 0x1.37a87ap-16) (f32.const 0x1.a1524ap+78)) (f32.const -inf))\n(assert_return (invoke \"f32.no_fold_mul_divs\" (f32.const 0x1.3dd592p-53) (f32.const -0x1.332c22p-64) (f32.const 0x1.b01064p-91) (f32.const 0x1.92bb3ap-36)) (f32.const -0x1.1c2dbp-44))\n\n(assert_return (invoke \"f64.no_fold_mul_divs\" (f64.const -0x1.363d6764f7b12p-819) (f64.const -0x1.ed5471f660b5fp-464) (f64.const -0x1.671b0a7f3a42p+547) (f64.const 0x1.0633be34ba1f2p+186)) (f64.const -0x1.b8fa2b76baeebp+5))\n(assert_return (invoke \"f64.no_fold_mul_divs\" (f64.const -0x1.37880182e0fa8p+115) (f64.const 0x1.f842631576147p-920) (f64.const -0x1.999372231d156p+362) (f64.const -0x1.d5db481ab9554p+467)) (f64.const -inf))\n(assert_return (invoke \"f64.no_fold_mul_divs\" (f64.const -0x1.9a747c8d4b541p+308) (f64.const -0x1.99092ad6bbdc8p+192) (f64.const -0x1.cb23755c20101p-140) (f64.const -0x1.de8716f6b0b6ap+732)) (f64.const 0x1.ecf584c8466a5p-757))\n(assert_return (invoke \"f64.no_fold_mul_divs\" (f64.const -0x1.c424b2ece903dp+129) (f64.const -0x1.568ce281db37fp-347) (f64.const 0x1.53900b99fd3dp-957) (f64.const 0x1.5c33952254dadp+223)) (f64.const 0x0p+0))\n(assert_return (invoke \"f64.no_fold_mul_divs\" (f64.const 0x1.a8ec2cecb32a9p-18) (f64.const 0x1.58acab0051851p-277) (f64.const 0x1.35e87c9077f7fp-620) (f64.const -0x1.925ee37ffb386p+352)) (f64.const -0x1.e6286970b31bfp-714))\n\n;; Test that (x/z)+(y/z) is not optimized to (x+y)/z.\n\n(module\n  (func (export \"f32.no_fold_add_divs\") (param $x f32) (param $y f32) (param $z f32) (result f32)\n    (f32.add (f32.div (local.get $x) (local.get $z)) (f32.div (local.get $y) (local.get $z))))\n\n  (func (export \"f64.no_fold_add_divs\") (param $x f64) (param $y f64) (param $z f64) (result f64)\n    (f64.add (f64.div (local.get $x) (local.get $z)) (f64.div (local.get $y) (local.get $z))))\n)\n\n(assert_return (invoke \"f32.no_fold_add_divs\" (f32.const 0x1.795e7p+8) (f32.const -0x1.48a5eep-5) (f32.const -0x1.9a244cp+126)) (f32.const -0x1.d709b6p-119))\n(assert_return (invoke \"f32.no_fold_add_divs\" (f32.const -0x1.ae89e8p-63) (f32.const -0x1.e9903ep-49) (f32.const -0x1.370a8cp+47)) (f32.const 0x1.92f3f6p-96))\n(assert_return (invoke \"f32.no_fold_add_divs\" (f32.const -0x1.626408p-46) (f32.const 0x1.2ee5b2p-64) (f32.const -0x1.ecefaap+48)) (f32.const 0x1.701864p-95))\n(assert_return (invoke \"f32.no_fold_add_divs\" (f32.const -0x1.061d3p-101) (f32.const 0x1.383492p-98) (f32.const -0x1.1d92d2p+88)) (f32.const 0x0p+0))\n(assert_return (invoke \"f32.no_fold_add_divs\" (f32.const 0x1.1ea39ep-10) (f32.const 0x1.a7fffep-3) (f32.const 0x1.6fc574p-123)) (f32.const 0x1.28b2dep+120))\n\n(assert_return (invoke \"f64.no_fold_add_divs\" (f64.const -0x1.c5fcc3273b136p+430) (f64.const 0x1.892a09eed8f6fp+434) (f64.const 0x1.8258b71e64397p+911)) (f64.const 0x1.e36eb9706ad82p-478))\n(assert_return (invoke \"f64.no_fold_add_divs\" (f64.const -0x1.2215d4061b5b3p+53) (f64.const 0x1.fb6184d97f27cp+5) (f64.const -0x1.f3bb59dacc0ebp-957)) (f64.const 0x1.2934eb0118be3p+1009))\n(assert_return (invoke \"f64.no_fold_add_divs\" (f64.const -0x1.e7a4533741d8ep-967) (f64.const 0x1.a519bb7feb802p-976) (f64.const 0x1.1f8a43454e51ap+504)) (f64.const 0x0p+0))\n(assert_return (invoke \"f64.no_fold_add_divs\" (f64.const 0x1.991c6cf93e2b4p+313) (f64.const -0x1.f2f7432698d11p+329) (f64.const 0x1.0d8c1b2453617p-126)) (f64.const -0x1.d9e1d84ddd1d4p+455))\n(assert_return (invoke \"f64.no_fold_add_divs\" (f64.const -0x1.d436849dc1271p-728) (f64.const 0x1.19d1c1450e52dp-755) (f64.const 0x1.fa1be69ea06fep-70)) (f64.const -0x1.d9a9b1c2f5623p-659))\n\n;; Test that sqrt(x*x) is not optimized to abs(x).\n\n(module\n  (func (export \"f32.no_fold_sqrt_square\") (param $x f32) (result f32)\n    (f32.sqrt (f32.mul (local.get $x) (local.get $x))))\n\n  (func (export \"f64.no_fold_sqrt_square\") (param $x f64) (result f64)\n    (f64.sqrt (f64.mul (local.get $x) (local.get $x))))\n)\n\n(assert_return (invoke \"f32.no_fold_sqrt_square\" (f32.const -0x1.5cb316p-66)) (f32.const 0x1.5cb322p-66))\n(assert_return (invoke \"f32.no_fold_sqrt_square\" (f32.const -0x1.b0f9e4p-73)) (f32.const 0x1.b211b2p-73))\n(assert_return (invoke \"f32.no_fold_sqrt_square\" (f32.const -0x1.de417cp-71)) (f32.const 0x1.de65b8p-71))\n(assert_return (invoke \"f32.no_fold_sqrt_square\" (f32.const 0x1.64c872p-86)) (f32.const 0x0p+0))\n(assert_return (invoke \"f32.no_fold_sqrt_square\" (f32.const 0x1.e199e4p+108)) (f32.const inf))\n\n(assert_return (invoke \"f64.no_fold_sqrt_square\" (f64.const 0x1.1759d657203fdp-529)) (f64.const 0x1.1759dd57545f3p-529))\n(assert_return (invoke \"f64.no_fold_sqrt_square\" (f64.const -0x1.4c68de1c78d83p-514)) (f64.const 0x1.4c68de1c78d81p-514))\n(assert_return (invoke \"f64.no_fold_sqrt_square\" (f64.const -0x1.214736edb6e1ep-521)) (f64.const 0x1.214736ed9cf8dp-521))\n(assert_return (invoke \"f64.no_fold_sqrt_square\" (f64.const -0x1.0864b9f68457p-616)) (f64.const 0x0p+0))\n(assert_return (invoke \"f64.no_fold_sqrt_square\" (f64.const 0x1.b2a9855995abap+856)) (f64.const inf))\n\n;; Test that sqrt(x)*sqrt(y) is not optimized to sqrt(x*y).\n\n(module\n  (func (export \"f32.no_fold_mul_sqrts\") (param $x f32) (param $y f32) (result f32)\n    (f32.mul (f32.sqrt (local.get $x)) (f32.sqrt (local.get $y))))\n\n  (func (export \"f64.no_fold_mul_sqrts\") (param $x f64) (param $y f64) (result f64)\n    (f64.mul (f64.sqrt (local.get $x)) (f64.sqrt (local.get $y))))\n)\n\n(assert_return (invoke \"f32.no_fold_mul_sqrts\" (f32.const 0x1.dddda8p-125) (f32.const -0x1.25d22ap-83)) (f32.const nan:canonical))\n(assert_return (invoke \"f32.no_fold_mul_sqrts\" (f32.const 0x1.418d14p-92) (f32.const 0x1.c6535cp-32)) (f32.const 0x1.7e373ap-62))\n(assert_return (invoke \"f32.no_fold_mul_sqrts\" (f32.const 0x1.4de7ep-88) (f32.const 0x1.84ff18p+6)) (f32.const 0x1.686668p-41))\n(assert_return (invoke \"f32.no_fold_mul_sqrts\" (f32.const 0x1.78091ep+101) (f32.const 0x1.81feb8p-9)) (f32.const 0x1.7cfb98p+46))\n(assert_return (invoke \"f32.no_fold_mul_sqrts\" (f32.const 0x1.583ap-56) (f32.const 0x1.14ba2ap-9)) (f32.const 0x1.b47a8ep-33))\n\n(assert_return (invoke \"f64.no_fold_mul_sqrts\" (f64.const -0x1.d1144cc28cdbep-635) (f64.const -0x1.bf9bc373d3b6ap-8)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_mul_sqrts\" (f64.const 0x1.5a7eb976bebc9p-643) (f64.const 0x1.f30cb8865a4cap-404)) (f64.const 0x1.260a1032d6e76p-523))\n(assert_return (invoke \"f64.no_fold_mul_sqrts\" (f64.const 0x1.711a0c1707935p-89) (f64.const 0x1.6fb5de51a20d3p-913)) (f64.const 0x1.7067ca28e31ecp-501))\n(assert_return (invoke \"f64.no_fold_mul_sqrts\" (f64.const 0x1.fb0bbea33b076p-363) (f64.const 0x1.d963b34894158p-573)) (f64.const 0x1.e9edc1fa624afp-468))\n(assert_return (invoke \"f64.no_fold_mul_sqrts\" (f64.const 0x1.8676eab7a4d0dp+24) (f64.const 0x1.75a58231ba7a5p+513)) (f64.const 0x1.0e16aebe203b3p+269))\n\n;; Test that sqrt(x)/sqrt(y) is not optimized to sqrt(x/y).\n\n(module\n  (func (export \"f32.no_fold_div_sqrts\") (param $x f32) (param $y f32) (result f32)\n    (f32.div (f32.sqrt (local.get $x)) (f32.sqrt (local.get $y))))\n\n  (func (export \"f64.no_fold_div_sqrts\") (param $x f64) (param $y f64) (result f64)\n    (f64.div (f64.sqrt (local.get $x)) (f64.sqrt (local.get $y))))\n)\n\n(assert_return (invoke \"f32.no_fold_div_sqrts\" (f32.const -0x1.bea9bap+25) (f32.const -0x1.db776ep-58)) (f32.const nan:canonical))\n(assert_return (invoke \"f32.no_fold_div_sqrts\" (f32.const 0x1.b983b6p+32) (f32.const 0x1.901f1ep+27)) (f32.const 0x1.7c4df6p+2))\n(assert_return (invoke \"f32.no_fold_div_sqrts\" (f32.const 0x1.d45e72p-120) (f32.const 0x1.ab49ccp+15)) (f32.const 0x1.7b0b04p-68))\n(assert_return (invoke \"f32.no_fold_div_sqrts\" (f32.const 0x1.b2e444p+59) (f32.const 0x1.5b8b16p-30)) (f32.const 0x1.94fca8p+44))\n(assert_return (invoke \"f32.no_fold_div_sqrts\" (f32.const 0x1.835aa6p-112) (f32.const 0x1.d17128p-103)) (f32.const 0x1.4a468p-5))\n\n(assert_return (invoke \"f64.no_fold_div_sqrts\" (f64.const -0x1.509fc16411167p-711) (f64.const -0x1.9c4255f5d6517p-187)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.no_fold_div_sqrts\" (f64.const 0x1.b6897bddac76p-587) (f64.const 0x1.104578b4c91f3p+541)) (f64.const 0x1.44e4f21f26cc9p-564))\n(assert_return (invoke \"f64.no_fold_div_sqrts\" (f64.const 0x1.ac83451b08989p+523) (f64.const 0x1.8da575c6d12b8p-109)) (f64.const 0x1.09c003991ce17p+316))\n(assert_return (invoke \"f64.no_fold_div_sqrts\" (f64.const 0x1.bab7836456417p-810) (f64.const 0x1.1ff60d03ba607p+291)) (f64.const 0x1.c0e6c833bf657p-551))\n(assert_return (invoke \"f64.no_fold_div_sqrts\" (f64.const 0x1.a957816ad9515p-789) (f64.const 0x1.8c18a3a222ab1p+945)) (f64.const 0x1.0948539781e92p-867))\n\n;; Test that (x*sqrt(y))/y is not optimized to x/sqrt(y).\n\n(module\n  (func (export \"f32.no_fold_mul_sqrt_div\") (param $x f32) (param $y f32) (result f32)\n    (f32.div (f32.mul (local.get $x) (f32.sqrt (local.get $y))) (local.get $y)))\n\n  (func (export \"f64.no_fold_mul_sqrt_div\") (param $x f64) (param $y f64) (result f64)\n    (f64.div (f64.mul (local.get $x) (f64.sqrt (local.get $y))) (local.get $y)))\n)\n\n(assert_return (invoke \"f32.no_fold_mul_sqrt_div\" (f32.const -0x1.f4a7cap+81) (f32.const 0x1.c09adep+92)) (f32.const -inf))\n(assert_return (invoke \"f32.no_fold_mul_sqrt_div\" (f32.const -0x1.90bf1cp-120) (f32.const 0x1.8dbe88p-97)) (f32.const -0x0p+0))\n(assert_return (invoke \"f32.no_fold_mul_sqrt_div\" (f32.const 0x1.8570e8p+29) (f32.const 0x1.217d3p-128)) (f32.const 0x1.6e391ap+93))\n(assert_return (invoke \"f32.no_fold_mul_sqrt_div\" (f32.const -0x1.5b4652p+43) (f32.const 0x1.a9d71cp+112)) (f32.const -0x1.0d423ap-13))\n(assert_return (invoke \"f32.no_fold_mul_sqrt_div\" (f32.const -0x1.910604p+8) (f32.const 0x1.0ca912p+7)) (f32.const -0x1.14cdecp+5))\n\n(assert_return (invoke \"f64.no_fold_mul_sqrt_div\" (f64.const 0x1.1dcdeb857305fp+698) (f64.const 0x1.a066171c40eb9p+758)) (f64.const inf))\n(assert_return (invoke \"f64.no_fold_mul_sqrt_div\" (f64.const -0x1.8b4f1c218e2abp-827) (f64.const 0x1.5e1ee65953b0bp-669)) (f64.const -0x0p+0))\n(assert_return (invoke \"f64.no_fold_mul_sqrt_div\" (f64.const 0x1.74ee531ddba38p-425) (f64.const 0x1.f370f758857f3p+560)) (f64.const 0x1.0aff34269583ep-705))\n(assert_return (invoke \"f64.no_fold_mul_sqrt_div\" (f64.const -0x1.27f216b0da6c5p+352) (f64.const 0x1.8e0b4e0b9fd7ep-483)) (f64.const -0x1.4fa558aad514ep+593))\n(assert_return (invoke \"f64.no_fold_mul_sqrt_div\" (f64.const 0x1.4c6955df9912bp+104) (f64.const 0x1.0cca42c9d371ep+842)) (f64.const 0x1.4468072f54294p-317))\n\n;; Test that subnormals are not flushed even in an intermediate value in an\n;; expression with a normal result.\n\n(module\n  (func (export \"f32.no_flush_intermediate_subnormal\") (param $x f32) (param $y f32) (param $z f32) (result f32)\n    (f32.mul (f32.mul (local.get $x) (local.get $y)) (local.get $z)))\n\n  (func (export \"f64.no_flush_intermediate_subnormal\") (param $x f64) (param $y f64) (param $z f64) (result f64)\n    (f64.mul (f64.mul (local.get $x) (local.get $y)) (local.get $z)))\n)\n\n(assert_return (invoke \"f32.no_flush_intermediate_subnormal\" (f32.const 0x1p-126) (f32.const 0x1p-23) (f32.const 0x1p23)) (f32.const 0x1p-126))\n(assert_return (invoke \"f64.no_flush_intermediate_subnormal\" (f64.const 0x1p-1022) (f64.const 0x1p-52) (f64.const 0x1p52)) (f64.const 0x1p-1022))\n\n;; Test corner cases of John Hauser's microarchitectural recoding scheme.\n;; https://github.com/riscv/riscv-tests/blob/695b86a6fcbe06ffbed8891af7e6fe7bf2062543/isa/rv64uf/recoding.S\n\n(module\n  (func (export \"f32.recoding_eq\") (param $x f32) (param $y f32) (result i32)\n    (f32.eq (f32.mul (local.get $x) (local.get $y)) (local.get $x)))\n\n  (func (export \"f32.recoding_le\") (param $x f32) (param $y f32) (result i32)\n    (f32.le (f32.mul (local.get $x) (local.get $y)) (local.get $x)))\n\n  (func (export \"f32.recoding_lt\") (param $x f32) (param $y f32) (result i32)\n    (f32.lt (f32.mul (local.get $x) (local.get $y)) (local.get $x)))\n\n  (func (export \"f64.recoding_eq\") (param $x f64) (param $y f64) (result i32)\n    (f64.eq (f64.mul (local.get $x) (local.get $y)) (local.get $x)))\n\n  (func (export \"f64.recoding_le\") (param $x f64) (param $y f64) (result i32)\n    (f64.le (f64.mul (local.get $x) (local.get $y)) (local.get $x)))\n\n  (func (export \"f64.recoding_lt\") (param $x f64) (param $y f64) (result i32)\n    (f64.lt (f64.mul (local.get $x) (local.get $y)) (local.get $x)))\n\n  (func (export \"recoding_demote\") (param $x f64) (param $y f32) (result f32)\n    (f32.mul (f32.demote_f64 (local.get $x)) (local.get $y)))\n)\n\n(assert_return (invoke \"f32.recoding_eq\" (f32.const -inf) (f32.const 3.0)) (i32.const 1))\n(assert_return (invoke \"f32.recoding_le\" (f32.const -inf) (f32.const 3.0)) (i32.const 1))\n(assert_return (invoke \"f32.recoding_lt\" (f32.const -inf) (f32.const 3.0)) (i32.const 0))\n\n(assert_return (invoke \"f32.recoding_eq\" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"f32.recoding_le\" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"f32.recoding_lt\" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 0))\n\n(assert_return (invoke \"f64.recoding_eq\" (f64.const -inf) (f64.const 3.0)) (i32.const 1))\n(assert_return (invoke \"f64.recoding_le\" (f64.const -inf) (f64.const 3.0)) (i32.const 1))\n(assert_return (invoke \"f64.recoding_lt\" (f64.const -inf) (f64.const 3.0)) (i32.const 0))\n\n(assert_return (invoke \"f64.recoding_eq\" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"f64.recoding_le\" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 1))\n(assert_return (invoke \"f64.recoding_lt\" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 0))\n\n(assert_return (invoke \"recoding_demote\" (f64.const 0x1.4c8f8p-132) (f32.const 1221)) (f32.const 0x1.8c8a1cp-122))\n\n;; Test that division is not done as on an extended-base system.\n;; http://www.ucbtest.org/goldberg/addendum.html\n\n(module\n  (func (export \"f32.no_extended_precision_div\") (param $x f32) (param $y f32) (param $z f32) (result i32)\n    (f32.eq (f32.div (local.get $x) (local.get $y)) (local.get $z)))\n\n  (func (export \"f64.no_extended_precision_div\") (param $x f64) (param $y f64) (param $z f64) (result i32)\n    (f64.eq (f64.div (local.get $x) (local.get $y)) (local.get $z)))\n)\n\n(assert_return (invoke \"f32.no_extended_precision_div\" (f32.const 3.0) (f32.const 7.0) (f32.const 0x1.b6db6ep-2)) (i32.const 1))\n(assert_return (invoke \"f64.no_extended_precision_div\" (f64.const 3.0) (f64.const 7.0) (f64.const 0x1.b6db6db6db6dbp-2)) (i32.const 1))\n\n;; a*x + b*x == (a+b)*x for all x only if the operations a*x, b*x, and (a+b)\n;; are all exact operations, which is true only if a and b are exact powers of\n;; 2. Even then, if a==-b and x==-0, then a*x+b*x==0.0, (a+b)*x==-0.0.\n;; https://dlang.org/d-floating-point.html\n\n(module\n  (func (export \"f32.no_distribute_exact\") (param $x f32) (result f32)\n    (f32.add (f32.mul (f32.const -8.0) (local.get $x)) (f32.mul (f32.const 8.0) (local.get $x))))\n\n  (func (export \"f64.no_distribute_exact\") (param $x f64) (result f64)\n    (f64.add (f64.mul (f64.const -8.0) (local.get $x)) (f64.mul (f64.const 8.0) (local.get $x))))\n)\n\n(assert_return (invoke \"f32.no_distribute_exact\" (f32.const -0.0)) (f32.const 0.0))\n(assert_return (invoke \"f64.no_distribute_exact\" (f64.const -0.0)) (f64.const 0.0))\n\n;; Test that various approximations of sqrt(2), sqrt(3), and sqrt(5) compute the\n;; expected approximation.\n;; https://xkcd.com/1047/\n(module\n  (func (export \"f32.sqrt\") (param f32) (result f32)\n    (f32.sqrt (local.get 0)))\n\n  (func (export \"f32.xkcd_sqrt_2\") (param f32) (param f32) (param f32) (param f32) (result f32)\n    (f32.add (f32.div (local.get 0) (local.get 1)) (f32.div (local.get 2) (f32.sub (local.get 3) (local.get 2)))))\n\n  (func (export \"f32.xkcd_sqrt_3\") (param f32) (param f32) (param f32) (result f32)\n    (f32.div (f32.mul (local.get 0) (local.get 1)) (local.get 2)))\n\n  (func (export \"f32.xkcd_sqrt_5\") (param f32) (param f32) (param f32) (result f32)\n    (f32.add (f32.div (local.get 0) (local.get 1)) (f32.div (local.get 2) (local.get 0))))\n\n  (func (export \"f32.xkcd_better_sqrt_5\") (param f32) (param f32) (param f32) (param f32) (result f32)\n    (f32.div (f32.add (local.get 0) (f32.mul (local.get 1) (local.get 2))) (f32.sub (local.get 3) (f32.mul (local.get 1) (local.get 2)))))\n\n  (func (export \"f64.sqrt\") (param f64) (result f64)\n    (f64.sqrt (local.get 0)))\n\n  (func (export \"f64.xkcd_sqrt_2\") (param f64) (param f64) (param f64) (param f64) (result f64)\n    (f64.add (f64.div (local.get 0) (local.get 1)) (f64.div (local.get 2) (f64.sub (local.get 3) (local.get 2)))))\n\n  (func (export \"f64.xkcd_sqrt_3\") (param f64) (param f64) (param f64) (result f64)\n    (f64.div (f64.mul (local.get 0) (local.get 1)) (local.get 2)))\n\n  (func (export \"f64.xkcd_sqrt_5\") (param f64) (param f64) (param f64) (result f64)\n    (f64.add (f64.div (local.get 0) (local.get 1)) (f64.div (local.get 2) (local.get 0))))\n\n  (func (export \"f64.xkcd_better_sqrt_5\") (param f64) (param f64) (param f64) (param f64) (result f64)\n    (f64.div (f64.add (local.get 0) (f64.mul (local.get 1) (local.get 2))) (f64.sub (local.get 3) (f64.mul (local.get 1) (local.get 2)))))\n)\n\n(assert_return (invoke \"f32.sqrt\" (f32.const 2.0)) (f32.const 0x1.6a09e6p+0))\n(assert_return (invoke \"f32.xkcd_sqrt_2\" (f32.const 3.0) (f32.const 5.0) (f32.const 0x1.921fb6p+1) (f32.const 7.0)) (f32.const 0x1.6a0a54p+0))\n(assert_return (invoke \"f32.sqrt\" (f32.const 3.0)) (f32.const 0x1.bb67aep+0))\n(assert_return (invoke \"f32.xkcd_sqrt_3\" (f32.const 2.0) (f32.const 0x1.5bf0a8p+1) (f32.const 0x1.921fb6p+1)) (f32.const 0x1.bb02d4p+0))\n(assert_return (invoke \"f32.sqrt\" (f32.const 5.0)) (f32.const 0x1.1e377ap+1))\n(assert_return (invoke \"f32.xkcd_sqrt_5\" (f32.const 2.0) (f32.const 0x1.5bf0a8p+1) (f32.const 3.0)) (f32.const 0x1.1e2d58p+1))\n(assert_return (invoke \"f32.xkcd_better_sqrt_5\" (f32.const 13.0) (f32.const 4.0) (f32.const 0x1.921fb6p+1) (f32.const 24.0)) (f32.const 0x1.1e377ap+1))\n\n(assert_return (invoke \"f64.sqrt\" (f64.const 2.0)) (f64.const 0x1.6a09e667f3bcdp+0))\n(assert_return (invoke \"f64.xkcd_sqrt_2\" (f64.const 3.0) (f64.const 5.0) (f64.const 0x1.921fb54442d18p+1) (f64.const 7.0)) (f64.const 0x1.6a0a5362b055fp+0))\n(assert_return (invoke \"f64.sqrt\" (f64.const 3.0)) (f64.const 0x1.bb67ae8584caap+0))\n(assert_return (invoke \"f64.xkcd_sqrt_3\" (f64.const 2.0) (f64.const 0x1.5bf0a8b145769p+1) (f64.const 0x1.921fb54442d18p+1)) (f64.const 0x1.bb02d4eca8f95p+0))\n(assert_return (invoke \"f64.sqrt\" (f64.const 5.0)) (f64.const 0x1.1e3779b97f4a8p+1))\n(assert_return (invoke \"f64.xkcd_sqrt_5\" (f64.const 2.0) (f64.const 0x1.5bf0a8b145769p+1) (f64.const 3.0)) (f64.const 0x1.1e2d58d8b3bcep+1))\n(assert_return (invoke \"f64.xkcd_better_sqrt_5\" (f64.const 13.0) (f64.const 4.0) (f64.const 0x1.921fb54442d18p+1) (f64.const 24.0)) (f64.const 0x1.1e3778509a5a3p+1))\n\n;; Compute the floating-point radix.\n;; M. A. Malcom. Algorithms to reveal properties of floating-point arithmetic.\n;; Communications of the ACM, 15(11):949-951, November 1972.\n(module\n  (func (export \"f32.compute_radix\") (param $0 f32) (param $1 f32) (result f32)\n    (loop $label$0\n      (br_if $label$0\n        (f32.eq\n          (f32.add\n            (f32.sub\n              (f32.add\n                (local.tee $0 (f32.add (local.get $0) (local.get $0)))\n                (f32.const 1)\n              )\n              (local.get $0)\n            )\n            (f32.const -1)\n          )\n          (f32.const 0)\n        )\n      )\n    )\n    (loop $label$2\n      (br_if $label$2\n        (f32.ne\n          (f32.sub\n            (f32.sub\n              (f32.add\n                (local.get $0)\n                (local.tee $1 (f32.add (local.get $1) (f32.const 1)))\n              )\n              (local.get $0)\n            )\n            (local.get $1)\n          )\n          (f32.const 0)\n        )\n      )\n    )\n    (local.get $1)\n  )\n\n  (func (export \"f64.compute_radix\") (param $0 f64) (param $1 f64) (result f64)\n    (loop $label$0\n      (br_if $label$0\n        (f64.eq\n          (f64.add\n            (f64.sub\n              (f64.add\n                (local.tee $0 (f64.add (local.get $0) (local.get $0)))\n                (f64.const 1)\n              )\n              (local.get $0)\n            )\n            (f64.const -1)\n          )\n          (f64.const 0)\n        )\n      )\n    )\n    (loop $label$2\n      (br_if $label$2\n        (f64.ne\n          (f64.sub\n            (f64.sub\n              (f64.add\n                (local.get $0)\n                (local.tee $1 (f64.add (local.get $1) (f64.const 1)))\n              )\n              (local.get $0)\n            )\n            (local.get $1)\n          )\n          (f64.const 0)\n        )\n      )\n    )\n    (local.get $1)\n  )\n)\n\n(assert_return (invoke \"f32.compute_radix\" (f32.const 1.0) (f32.const 1.0)) (f32.const 2.0))\n(assert_return (invoke \"f64.compute_radix\" (f64.const 1.0) (f64.const 1.0)) (f64.const 2.0))\n\n;; Test that (x - 1) * y + y is not optimized to x * y.\n;; http://blog.frama-c.com/index.php?post/2013/05/14/Contrarianism\n\n(module\n  (func (export \"f32.no_fold_sub1_mul_add\") (param $x f32) (param $y f32) (result f32)\n    (f32.add (f32.mul (f32.sub (local.get $x) (f32.const 1.0)) (local.get $y)) (local.get $y)))\n\n  (func (export \"f64.no_fold_sub1_mul_add\") (param $x f64) (param $y f64) (result f64)\n    (f64.add (f64.mul (f64.sub (local.get $x) (f64.const 1.0)) (local.get $y)) (local.get $y)))\n)\n\n(assert_return (invoke \"f32.no_fold_sub1_mul_add\" (f32.const 0x1p-32) (f32.const 1.0)) (f32.const 0x0p+0))\n(assert_return (invoke \"f64.no_fold_sub1_mul_add\" (f64.const 0x1p-64) (f64.const 1.0)) (f64.const 0x0p+0))\n\n;; Test that x+z >= y+z is not optimized to x >= y (monotonicity).\n;; http://cs.nyu.edu/courses/spring13/CSCI-UA.0201-003/lecture6.pdf\n\n(module\n  (func (export \"f32.no_fold_add_le_monotonicity\") (param $x f32) (param $y f32) (param $z f32) (result i32)\n    (f32.le (f32.add (local.get $x) (local.get $z)) (f32.add (local.get $y) (local.get $z))))\n\n  (func (export \"f32.no_fold_add_ge_monotonicity\") (param $x f32) (param $y f32) (param $z f32) (result i32)\n    (f32.ge (f32.add (local.get $x) (local.get $z)) (f32.add (local.get $y) (local.get $z))))\n\n  (func (export \"f64.no_fold_add_le_monotonicity\") (param $x f64) (param $y f64) (param $z f64) (result i32)\n    (f64.le (f64.add (local.get $x) (local.get $z)) (f64.add (local.get $y) (local.get $z))))\n\n  (func (export \"f64.no_fold_add_ge_monotonicity\") (param $x f64) (param $y f64) (param $z f64) (result i32)\n    (f64.ge (f64.add (local.get $x) (local.get $z)) (f64.add (local.get $y) (local.get $z))))\n)\n\n(assert_return (invoke \"f32.no_fold_add_le_monotonicity\" (f32.const 0.0) (f32.const 0.0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"f32.no_fold_add_le_monotonicity\" (f32.const inf) (f32.const -inf) (f32.const inf)) (i32.const 0))\n(assert_return (invoke \"f64.no_fold_add_le_monotonicity\" (f64.const 0.0) (f64.const 0.0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"f64.no_fold_add_le_monotonicity\" (f64.const inf) (f64.const -inf) (f64.const inf)) (i32.const 0))\n\n;; Test that !(x < y) and friends are not optimized to x >= y and friends.\n\n(module\n  (func (export \"f32.not_lt\") (param $x f32) (param $y f32) (result i32)\n    (i32.eqz (f32.lt (local.get $x) (local.get $y))))\n\n  (func (export \"f32.not_le\") (param $x f32) (param $y f32) (result i32)\n    (i32.eqz (f32.le (local.get $x) (local.get $y))))\n\n  (func (export \"f32.not_gt\") (param $x f32) (param $y f32) (result i32)\n    (i32.eqz (f32.gt (local.get $x) (local.get $y))))\n\n  (func (export \"f32.not_ge\") (param $x f32) (param $y f32) (result i32)\n    (i32.eqz (f32.ge (local.get $x) (local.get $y))))\n\n  (func (export \"f64.not_lt\") (param $x f64) (param $y f64) (result i32)\n    (i32.eqz (f64.lt (local.get $x) (local.get $y))))\n\n  (func (export \"f64.not_le\") (param $x f64) (param $y f64) (result i32)\n    (i32.eqz (f64.le (local.get $x) (local.get $y))))\n\n  (func (export \"f64.not_gt\") (param $x f64) (param $y f64) (result i32)\n    (i32.eqz (f64.gt (local.get $x) (local.get $y))))\n\n  (func (export \"f64.not_ge\") (param $x f64) (param $y f64) (result i32)\n    (i32.eqz (f64.ge (local.get $x) (local.get $y))))\n)\n\n(assert_return (invoke \"f32.not_lt\" (f32.const nan) (f32.const 0.0)) (i32.const 1))\n(assert_return (invoke \"f32.not_le\" (f32.const nan) (f32.const 0.0)) (i32.const 1))\n(assert_return (invoke \"f32.not_gt\" (f32.const nan) (f32.const 0.0)) (i32.const 1))\n(assert_return (invoke \"f32.not_ge\" (f32.const nan) (f32.const 0.0)) (i32.const 1))\n(assert_return (invoke \"f64.not_lt\" (f64.const nan) (f64.const 0.0)) (i32.const 1))\n(assert_return (invoke \"f64.not_le\" (f64.const nan) (f64.const 0.0)) (i32.const 1))\n(assert_return (invoke \"f64.not_gt\" (f64.const nan) (f64.const 0.0)) (i32.const 1))\n(assert_return (invoke \"f64.not_ge\" (f64.const nan) (f64.const 0.0)) (i32.const 1))\n\n;; Test that a method for approximating a \"machine epsilon\" produces the expected\n;; approximation.\n;; http://blogs.mathworks.com/cleve/2014/07/07/floating-point-numbers/#24cb4f4d-b8a9-4c19-b22b-9d2a9f7f3812\n\n(module\n  (func (export \"f32.epsilon\") (result f32)\n    (f32.sub (f32.const 1.0) (f32.mul (f32.const 3.0) (f32.sub (f32.div (f32.const 4.0) (f32.const 3.0)) (f32.const 1.0)))))\n\n  (func (export \"f64.epsilon\") (result f64)\n    (f64.sub (f64.const 1.0) (f64.mul (f64.const 3.0) (f64.sub (f64.div (f64.const 4.0) (f64.const 3.0)) (f64.const 1.0)))))\n)\n\n(assert_return (invoke \"f32.epsilon\") (f32.const -0x1p-23))\n(assert_return (invoke \"f64.epsilon\") (f64.const 0x1p-52))\n\n;; Test that a method for computing a \"machine epsilon\" produces the expected\n;; result.\n;; https://www.math.utah.edu/~beebe/software/ieee/\n\n(module\n  (func (export \"f32.epsilon\") (result f32)\n    (local $x f32)\n    (local $result f32)\n    (local.set $x (f32.const 1))\n    (loop $loop\n      (br_if $loop\n        (f32.gt\n          (f32.add\n            (local.tee $x\n              (f32.mul\n                (local.tee $result (local.get $x))\n                (f32.const 0.5)\n              )\n            )\n            (f32.const 1)\n          )\n          (f32.const 1)\n        )\n      )\n    )\n    (local.get $result)\n  )\n\n  (func (export \"f64.epsilon\") (result f64)\n    (local $x f64)\n    (local $result f64)\n    (local.set $x (f64.const 1))\n    (loop $loop\n      (br_if $loop\n        (f64.gt\n          (f64.add\n            (local.tee $x\n              (f64.mul\n                (local.tee $result (local.get $x))\n                (f64.const 0.5)\n              )\n            )\n            (f64.const 1)\n          )\n          (f64.const 1)\n        )\n      )\n    )\n    (local.get $result)\n  )\n)\n\n(assert_return (invoke \"f32.epsilon\") (f32.const 0x1p-23))\n(assert_return (invoke \"f64.epsilon\") (f64.const 0x1p-52))\n\n;; Test that floating-point numbers are not optimized as if they form a\n;; trichotomy.\n\n(module\n  (func (export \"f32.no_trichotomy_lt\") (param $x f32) (param $y f32) (result i32)\n    (i32.or (f32.lt (local.get $x) (local.get $y)) (f32.ge (local.get $x) (local.get $y))))\n  (func (export \"f32.no_trichotomy_le\") (param $x f32) (param $y f32) (result i32)\n    (i32.or (f32.le (local.get $x) (local.get $y)) (f32.gt (local.get $x) (local.get $y))))\n  (func (export \"f32.no_trichotomy_gt\") (param $x f32) (param $y f32) (result i32)\n    (i32.or (f32.gt (local.get $x) (local.get $y)) (f32.le (local.get $x) (local.get $y))))\n  (func (export \"f32.no_trichotomy_ge\") (param $x f32) (param $y f32) (result i32)\n    (i32.or (f32.ge (local.get $x) (local.get $y)) (f32.lt (local.get $x) (local.get $y))))\n\n  (func (export \"f64.no_trichotomy_lt\") (param $x f64) (param $y f64) (result i32)\n    (i32.or (f64.lt (local.get $x) (local.get $y)) (f64.ge (local.get $x) (local.get $y))))\n  (func (export \"f64.no_trichotomy_le\") (param $x f64) (param $y f64) (result i32)\n    (i32.or (f64.le (local.get $x) (local.get $y)) (f64.gt (local.get $x) (local.get $y))))\n  (func (export \"f64.no_trichotomy_gt\") (param $x f64) (param $y f64) (result i32)\n    (i32.or (f64.gt (local.get $x) (local.get $y)) (f64.le (local.get $x) (local.get $y))))\n  (func (export \"f64.no_trichotomy_ge\") (param $x f64) (param $y f64) (result i32)\n    (i32.or (f64.ge (local.get $x) (local.get $y)) (f64.lt (local.get $x) (local.get $y))))\n)\n\n(assert_return (invoke \"f32.no_trichotomy_lt\" (f32.const 0.0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"f32.no_trichotomy_le\" (f32.const 0.0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"f32.no_trichotomy_gt\" (f32.const 0.0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"f32.no_trichotomy_ge\" (f32.const 0.0) (f32.const nan)) (i32.const 0))\n(assert_return (invoke \"f64.no_trichotomy_lt\" (f64.const 0.0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"f64.no_trichotomy_le\" (f64.const 0.0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"f64.no_trichotomy_gt\" (f64.const 0.0) (f64.const nan)) (i32.const 0))\n(assert_return (invoke \"f64.no_trichotomy_ge\" (f64.const 0.0) (f64.const nan)) (i32.const 0))\n\n;; Some test harnesses which can run this testsuite are unable to perform tests\n;; of NaN bitpatterns. The following tests whether the underlying platform is\n;; generally producing the kinds of NaNs expected.\n(module\n  (func (export \"f32.arithmetic_nan_bitpattern\")\n        (param $x i32) (param $y i32) (result i32)\n    (i32.and (i32.reinterpret_f32\n               (f32.div\n                 (f32.reinterpret_i32 (local.get $x))\n                 (f32.reinterpret_i32 (local.get $y))))\n             (i32.const 0x7fc00000)))\n  (func (export \"f32.canonical_nan_bitpattern\")\n        (param $x i32) (param $y i32) (result i32)\n    (i32.and (i32.reinterpret_f32\n               (f32.div\n                 (f32.reinterpret_i32 (local.get $x))\n                 (f32.reinterpret_i32 (local.get $y))))\n             (i32.const 0x7fffffff)))\n  (func (export \"f32.nonarithmetic_nan_bitpattern\")\n        (param $x i32) (result i32)\n    (i32.reinterpret_f32 (f32.neg (f32.reinterpret_i32 (local.get $x)))))\n\n  (func (export \"f64.arithmetic_nan_bitpattern\")\n        (param $x i64) (param $y i64) (result i64)\n    (i64.and (i64.reinterpret_f64\n               (f64.div\n                 (f64.reinterpret_i64 (local.get $x))\n                 (f64.reinterpret_i64 (local.get $y))))\n             (i64.const 0x7ff8000000000000)))\n  (func (export \"f64.canonical_nan_bitpattern\")\n        (param $x i64) (param $y i64) (result i64)\n    (i64.and (i64.reinterpret_f64\n               (f64.div\n                 (f64.reinterpret_i64 (local.get $x))\n                 (f64.reinterpret_i64 (local.get $y))))\n             (i64.const 0x7fffffffffffffff)))\n  (func (export \"f64.nonarithmetic_nan_bitpattern\")\n        (param $x i64) (result i64)\n    (i64.reinterpret_f64 (f64.neg (f64.reinterpret_i64 (local.get $x)))))\n\n  ;; Versions of no_fold testcases that only care about NaN bitpatterns.\n  (func (export \"f32.no_fold_sub_zero\") (param $x i32) (result i32)\n    (i32.and (i32.reinterpret_f32 (f32.sub (f32.reinterpret_i32 (local.get $x)) (f32.const 0.0)))\n             (i32.const 0x7fc00000)))\n  (func (export \"f32.no_fold_neg0_sub\") (param $x i32) (result i32)\n    (i32.and (i32.reinterpret_f32 (f32.sub (f32.const -0.0) (f32.reinterpret_i32 (local.get $x))))\n             (i32.const 0x7fc00000)))\n  (func (export \"f32.no_fold_mul_one\") (param $x i32) (result i32)\n    (i32.and (i32.reinterpret_f32 (f32.mul (f32.reinterpret_i32 (local.get $x)) (f32.const 1.0)))\n             (i32.const 0x7fc00000)))\n  (func (export \"f32.no_fold_neg1_mul\") (param $x i32) (result i32)\n    (i32.and (i32.reinterpret_f32 (f32.mul (f32.const -1.0) (f32.reinterpret_i32 (local.get $x))))\n             (i32.const 0x7fc00000)))\n  (func (export \"f32.no_fold_div_one\") (param $x i32) (result i32)\n    (i32.and (i32.reinterpret_f32 (f32.div (f32.reinterpret_i32 (local.get $x)) (f32.const 1.0)))\n             (i32.const 0x7fc00000)))\n  (func (export \"f32.no_fold_div_neg1\") (param $x i32) (result i32)\n    (i32.and (i32.reinterpret_f32 (f32.div (f32.reinterpret_i32 (local.get $x)) (f32.const -1.0)))\n             (i32.const 0x7fc00000)))\n  (func (export \"f64.no_fold_sub_zero\") (param $x i64) (result i64)\n    (i64.and (i64.reinterpret_f64 (f64.sub (f64.reinterpret_i64 (local.get $x)) (f64.const 0.0)))\n             (i64.const 0x7ff8000000000000)))\n  (func (export \"f64.no_fold_neg0_sub\") (param $x i64) (result i64)\n    (i64.and (i64.reinterpret_f64 (f64.sub (f64.const -0.0) (f64.reinterpret_i64 (local.get $x))))\n             (i64.const 0x7ff8000000000000)))\n  (func (export \"f64.no_fold_mul_one\") (param $x i64) (result i64)\n    (i64.and (i64.reinterpret_f64 (f64.mul (f64.reinterpret_i64 (local.get $x)) (f64.const 1.0)))\n             (i64.const 0x7ff8000000000000)))\n  (func (export \"f64.no_fold_neg1_mul\") (param $x i64) (result i64)\n    (i64.and (i64.reinterpret_f64 (f64.mul (f64.const -1.0) (f64.reinterpret_i64 (local.get $x))))\n             (i64.const 0x7ff8000000000000)))\n  (func (export \"f64.no_fold_div_one\") (param $x i64) (result i64)\n    (i64.and (i64.reinterpret_f64 (f64.div (f64.reinterpret_i64 (local.get $x)) (f64.const 1.0)))\n             (i64.const 0x7ff8000000000000)))\n  (func (export \"f64.no_fold_div_neg1\") (param $x i64) (result i64)\n    (i64.and (i64.reinterpret_f64 (f64.div (f64.reinterpret_i64 (local.get $x)) (f64.const -1.0)))\n             (i64.const 0x7ff8000000000000)))\n  (func (export \"no_fold_promote_demote\") (param $x i32) (result i32)\n    (i32.and (i32.reinterpret_f32 (f32.demote_f64 (f64.promote_f32 (f32.reinterpret_i32 (local.get $x)))))\n             (i32.const 0x7fc00000)))\n)\n\n(assert_return (invoke \"f32.arithmetic_nan_bitpattern\" (i32.const 0x7f803210) (i32.const 0x7f803210)) (i32.const 0x7fc00000))\n(assert_return (invoke \"f32.canonical_nan_bitpattern\" (i32.const 0) (i32.const 0)) (i32.const 0x7fc00000))\n(assert_return (invoke \"f32.canonical_nan_bitpattern\" (i32.const 0x7fc00000) (i32.const 0x7fc00000)) (i32.const 0x7fc00000))\n(assert_return (invoke \"f32.canonical_nan_bitpattern\" (i32.const 0xffc00000) (i32.const 0x7fc00000)) (i32.const 0x7fc00000))\n(assert_return (invoke \"f32.canonical_nan_bitpattern\" (i32.const 0x7fc00000) (i32.const 0xffc00000)) (i32.const 0x7fc00000))\n(assert_return (invoke \"f32.canonical_nan_bitpattern\" (i32.const 0xffc00000) (i32.const 0xffc00000)) (i32.const 0x7fc00000))\n(assert_return (invoke \"f32.nonarithmetic_nan_bitpattern\" (i32.const 0x7fc03210)) (i32.const 0xffc03210))\n(assert_return (invoke \"f32.nonarithmetic_nan_bitpattern\" (i32.const 0xffc03210)) (i32.const 0x7fc03210))\n(assert_return (invoke \"f32.nonarithmetic_nan_bitpattern\" (i32.const 0x7f803210)) (i32.const 0xff803210))\n(assert_return (invoke \"f32.nonarithmetic_nan_bitpattern\" (i32.const 0xff803210)) (i32.const 0x7f803210))\n(assert_return (invoke \"f64.arithmetic_nan_bitpattern\" (i64.const 0x7ff0000000003210) (i64.const 0x7ff0000000003210)) (i64.const 0x7ff8000000000000))\n(assert_return (invoke \"f64.canonical_nan_bitpattern\" (i64.const 0) (i64.const 0)) (i64.const 0x7ff8000000000000))\n(assert_return (invoke \"f64.canonical_nan_bitpattern\" (i64.const 0x7ff8000000000000) (i64.const 0x7ff8000000000000)) (i64.const 0x7ff8000000000000))\n(assert_return (invoke \"f64.canonical_nan_bitpattern\" (i64.const 0xfff8000000000000) (i64.const 0x7ff8000000000000)) (i64.const 0x7ff8000000000000))\n(assert_return (invoke \"f64.canonical_nan_bitpattern\" (i64.const 0x7ff8000000000000) (i64.const 0xfff8000000000000)) (i64.const 0x7ff8000000000000))\n(assert_return (invoke \"f64.canonical_nan_bitpattern\" (i64.const 0xfff8000000000000) (i64.const 0xfff8000000000000)) (i64.const 0x7ff8000000000000))\n(assert_return (invoke \"f64.nonarithmetic_nan_bitpattern\" (i64.const 0x7ff8000000003210)) (i64.const 0xfff8000000003210))\n(assert_return (invoke \"f64.nonarithmetic_nan_bitpattern\" (i64.const 0xfff8000000003210)) (i64.const 0x7ff8000000003210))\n(assert_return (invoke \"f64.nonarithmetic_nan_bitpattern\" (i64.const 0x7ff0000000003210)) (i64.const 0xfff0000000003210))\n(assert_return (invoke \"f64.nonarithmetic_nan_bitpattern\" (i64.const 0xfff0000000003210)) (i64.const 0x7ff0000000003210))\n(assert_return (invoke \"f32.no_fold_sub_zero\" (i32.const 0x7fa00000)) (i32.const 0x7fc00000))\n(assert_return (invoke \"f32.no_fold_neg0_sub\" (i32.const 0x7fa00000)) (i32.const 0x7fc00000))\n(assert_return (invoke \"f32.no_fold_mul_one\" (i32.const 0x7fa00000)) (i32.const 0x7fc00000))\n(assert_return (invoke \"f32.no_fold_neg1_mul\" (i32.const 0x7fa00000)) (i32.const 0x7fc00000))\n(assert_return (invoke \"f32.no_fold_div_one\" (i32.const 0x7fa00000)) (i32.const 0x7fc00000))\n(assert_return (invoke \"f32.no_fold_div_neg1\" (i32.const 0x7fa00000)) (i32.const 0x7fc00000))\n(assert_return (invoke \"f64.no_fold_sub_zero\" (i64.const 0x7ff4000000000000)) (i64.const 0x7ff8000000000000))\n(assert_return (invoke \"f64.no_fold_neg0_sub\" (i64.const 0x7ff4000000000000)) (i64.const 0x7ff8000000000000))\n(assert_return (invoke \"f64.no_fold_mul_one\" (i64.const 0x7ff4000000000000)) (i64.const 0x7ff8000000000000))\n(assert_return (invoke \"f64.no_fold_neg1_mul\" (i64.const 0x7ff4000000000000)) (i64.const 0x7ff8000000000000))\n(assert_return (invoke \"f64.no_fold_div_one\" (i64.const 0x7ff4000000000000)) (i64.const 0x7ff8000000000000))\n(assert_return (invoke \"f64.no_fold_div_neg1\" (i64.const 0x7ff4000000000000)) (i64.const 0x7ff8000000000000))\n(assert_return (invoke \"no_fold_promote_demote\" (i32.const 0x7fa00000)) (i32.const 0x7fc00000))\n\n;; Test that IEEE 754 double precision does, in fact, compute a certain dot\n;; product correctly.\n\n(module\n  (func (export \"dot_product_example\")\n        (param $x0 f64) (param $x1 f64) (param $x2 f64) (param $x3 f64)\n        (param $y0 f64) (param $y1 f64) (param $y2 f64) (param $y3 f64)\n        (result f64)\n    (f64.add (f64.add (f64.add\n      (f64.mul (local.get $x0) (local.get $y0))\n      (f64.mul (local.get $x1) (local.get $y1)))\n      (f64.mul (local.get $x2) (local.get $y2)))\n      (f64.mul (local.get $x3) (local.get $y3)))\n  )\n\n  (func (export \"with_binary_sum_collapse\")\n        (param $x0 f64) (param $x1 f64) (param $x2 f64) (param $x3 f64)\n        (param $y0 f64) (param $y1 f64) (param $y2 f64) (param $y3 f64)\n        (result f64)\n      (f64.add (f64.add (f64.mul (local.get $x0) (local.get $y0))\n                        (f64.mul (local.get $x1) (local.get $y1)))\n               (f64.add (f64.mul (local.get $x2) (local.get $y2))\n                        (f64.mul (local.get $x3) (local.get $y3))))\n  )\n)\n\n(assert_return (invoke \"dot_product_example\"\n    (f64.const 3.2e7) (f64.const 1.0) (f64.const -1.0) (f64.const 8.0e7)\n    (f64.const 4.0e7) (f64.const 1.0) (f64.const -1.0) (f64.const -1.6e7))\n  (f64.const 2.0))\n(assert_return (invoke \"with_binary_sum_collapse\"\n    (f64.const 3.2e7) (f64.const 1.0) (f64.const -1.0) (f64.const 8.0e7)\n    (f64.const 4.0e7) (f64.const 1.0) (f64.const -1.0) (f64.const -1.6e7))\n  (f64.const 2.0))\n\n;; http://www.vinc17.org/research/fptest.en.html#contract2fma\n\n(module\n  (func (export \"f32.contract2fma\")\n        (param $x f32) (param $y f32) (result f32)\n    (f32.sqrt (f32.sub (f32.mul (local.get $x) (local.get $x))\n                       (f32.mul (local.get $y) (local.get $y)))))\n  (func (export \"f64.contract2fma\")\n        (param $x f64) (param $y f64) (result f64)\n    (f64.sqrt (f64.sub (f64.mul (local.get $x) (local.get $x))\n                       (f64.mul (local.get $y) (local.get $y)))))\n)\n\n(assert_return (invoke \"f32.contract2fma\" (f32.const 1.0) (f32.const 1.0)) (f32.const 0.0))\n(assert_return (invoke \"f32.contract2fma\" (f32.const 0x1.19999ap+0) (f32.const 0x1.19999ap+0)) (f32.const 0.0))\n(assert_return (invoke \"f32.contract2fma\" (f32.const 0x1.333332p+0) (f32.const 0x1.333332p+0)) (f32.const 0.0))\n(assert_return (invoke \"f64.contract2fma\" (f64.const 1.0) (f64.const 1.0)) (f64.const 0.0))\n(assert_return (invoke \"f64.contract2fma\" (f64.const 0x1.199999999999ap+0) (f64.const 0x1.199999999999ap+0)) (f64.const 0.0))\n(assert_return (invoke \"f64.contract2fma\" (f64.const 0x1.3333333333333p+0) (f64.const 0x1.3333333333333p+0)) (f64.const 0.0))\n\n;; Test that floating-point isn't implemented with QuickBasic for MS-DOS.\n;; https://support.microsoft.com/en-us/help/42980/-complete-tutorial-to-understand-ieee-floating-point-errors\n\n(module\n  (func (export \"f32.division_by_small_number\")\n        (param $a f32) (param $b f32) (param $c f32) (result f32)\n    (f32.sub (local.get $a) (f32.div (local.get $b) (local.get $c))))\n  (func (export \"f64.division_by_small_number\")\n        (param $a f64) (param $b f64) (param $c f64) (result f64)\n    (f64.sub (local.get $a) (f64.div (local.get $b) (local.get $c))))\n)\n\n(assert_return (invoke \"f32.division_by_small_number\" (f32.const 112000000) (f32.const 100000) (f32.const 0.0009)) (f32.const 888888))\n(assert_return (invoke \"f64.division_by_small_number\" (f64.const 112000000) (f64.const 100000) (f64.const 0.0009)) (f64.const 888888.8888888806))\n\n;; Test a simple golden ratio computation.\n;; http://mathworld.wolfram.com/GoldenRatio.html\n\n(module\n  (func (export \"f32.golden_ratio\") (param $a f32) (param $b f32) (param $c f32) (result f32)\n    (f32.mul (local.get 0) (f32.add (local.get 1) (f32.sqrt (local.get 2)))))\n  (func (export \"f64.golden_ratio\") (param $a f64) (param $b f64) (param $c f64) (result f64)\n    (f64.mul (local.get 0) (f64.add (local.get 1) (f64.sqrt (local.get 2)))))\n)\n\n(assert_return (invoke \"f32.golden_ratio\" (f32.const 0.5) (f32.const 1.0) (f32.const 5.0)) (f32.const 1.618034))\n(assert_return (invoke \"f64.golden_ratio\" (f64.const 0.5) (f64.const 1.0) (f64.const 5.0)) (f64.const 1.618033988749895))\n\n;; Test some silver means computations.\n;; http://mathworld.wolfram.com/SilverRatio.html\n\n(module\n  (func (export \"f32.silver_means\") (param $n f32) (result f32)\n    (f32.mul (f32.const 0.5)\n             (f32.add (local.get $n)\n                      (f32.sqrt (f32.add (f32.mul (local.get $n) (local.get $n))\n                                         (f32.const 4.0))))))\n  (func (export \"f64.silver_means\") (param $n f64) (result f64)\n    (f64.mul (f64.const 0.5)\n             (f64.add (local.get $n)\n                      (f64.sqrt (f64.add (f64.mul (local.get $n) (local.get $n))\n                                         (f64.const 4.0))))))\n)\n\n(assert_return (invoke \"f32.silver_means\" (f32.const 0.0)) (f32.const 1.0))\n(assert_return (invoke \"f32.silver_means\" (f32.const 1.0)) (f32.const 1.6180340))\n(assert_return (invoke \"f32.silver_means\" (f32.const 2.0)) (f32.const 2.4142136))\n(assert_return (invoke \"f32.silver_means\" (f32.const 3.0)) (f32.const 3.3027756))\n(assert_return (invoke \"f32.silver_means\" (f32.const 4.0)) (f32.const 4.2360680))\n(assert_return (invoke \"f32.silver_means\" (f32.const 5.0)) (f32.const 5.1925821))\n(assert_return (invoke \"f64.silver_means\" (f64.const 0.0)) (f64.const 1.0))\n(assert_return (invoke \"f64.silver_means\" (f64.const 1.0)) (f64.const 1.618033988749895))\n(assert_return (invoke \"f64.silver_means\" (f64.const 2.0)) (f64.const 2.414213562373095))\n(assert_return (invoke \"f64.silver_means\" (f64.const 3.0)) (f64.const 3.302775637731995))\n(assert_return (invoke \"f64.silver_means\" (f64.const 4.0)) (f64.const 4.236067977499790))\n(assert_return (invoke \"f64.silver_means\" (f64.const 5.0)) (f64.const 5.192582403567252))\n\n;; Test that an f64 0.4 isn't double-rounded as via extended precision.\n;; https://bugs.llvm.org/show_bug.cgi?id=11200\n\n(module\n  (func (export \"point_four\") (param $four f64) (param $ten f64) (result i32)\n    (f64.lt (f64.div (local.get $four) (local.get $ten)) (f64.const 0.4)))\n)\n\n(assert_return (invoke \"point_four\" (f64.const 4.0) (f64.const 10.0)) (i32.const 0))\n\n;; Test an approximation function for tau; it should produces the correctly\n;; rounded result after (and only after) the expected number of iterations.\n\n(module\n  (func (export \"tau\") (param i32) (result f64)\n    (local f64 f64 f64 f64)\n    f64.const 0x0p+0\n    local.set 1\n    block\n      local.get 0\n      i32.const 1\n      i32.lt_s\n      br_if 0\n      f64.const 0x1p+0\n      local.set 2\n      f64.const 0x0p+0\n      local.set 3\n      loop\n        local.get 1\n        local.get 2\n        f64.const 0x1p+3\n        local.get 3\n        f64.const 0x1p+3\n        f64.mul\n        local.tee 4\n        f64.const 0x1p+0\n        f64.add\n        f64.div\n        f64.const 0x1p+2\n        local.get 4\n        f64.const 0x1p+2\n        f64.add\n        f64.div\n        f64.sub\n        f64.const 0x1p+1\n        local.get 4\n        f64.const 0x1.4p+2\n        f64.add\n        f64.div\n        f64.sub\n        f64.const 0x1p+1\n        local.get 4\n        f64.const 0x1.8p+2\n        f64.add\n        f64.div\n        f64.sub\n        f64.mul\n        f64.add\n        local.set 1\n        local.get 3\n        f64.const 0x1p+0\n        f64.add\n        local.set 3\n        local.get 2\n        f64.const 0x1p-4\n        f64.mul\n        local.set 2\n        local.get 0\n        i32.const -1\n        i32.add\n        local.tee 0\n        br_if 0\n      end\n    end\n    local.get 1\n  )\n)\n\n(assert_return (invoke \"tau\" (i32.const 10)) (f64.const 0x1.921fb54442d14p+2))\n(assert_return (invoke \"tau\" (i32.const 11)) (f64.const 0x1.921fb54442d18p+2))\n\n;; Test that y < 0 ? x : (x + 1) is not folded to x + (y < 0).\n\n(module\n  (func (export \"f32.no_fold_conditional_inc\") (param $x f32) (param $y f32) (result f32)\n    (select (local.get $x)\n            (f32.add (local.get $x) (f32.const 1.0))\n            (f32.lt (local.get $y) (f32.const 0.0))))\n  (func (export \"f64.no_fold_conditional_inc\") (param $x f64) (param $y f64) (result f64)\n    (select (local.get $x)\n            (f64.add (local.get $x) (f64.const 1.0))\n            (f64.lt (local.get $y) (f64.const 0.0))))\n)\n\n(assert_return (invoke \"f32.no_fold_conditional_inc\" (f32.const -0.0) (f32.const -1.0)) (f32.const -0.0))\n(assert_return (invoke \"f64.no_fold_conditional_inc\" (f64.const -0.0) (f64.const -1.0)) (f64.const -0.0))\n"
  },
  {
    "path": "test/core/float_literals.wast",
    "content": ";; Test floating-point literal parsing.\n\n(module\n  ;; f32 special values\n  (func (export \"f32.nan\") (result i32) (i32.reinterpret_f32 (f32.const nan)))\n  (func (export \"f32.positive_nan\") (result i32) (i32.reinterpret_f32 (f32.const +nan)))\n  (func (export \"f32.negative_nan\") (result i32) (i32.reinterpret_f32 (f32.const -nan)))\n  (func (export \"f32.plain_nan\") (result i32) (i32.reinterpret_f32 (f32.const nan:0x400000)))\n  (func (export \"f32.informally_known_as_plain_snan\") (result i32) (i32.reinterpret_f32 (f32.const nan:0x200000)))\n  (func (export \"f32.all_ones_nan\") (result i32) (i32.reinterpret_f32 (f32.const -nan:0x7fffff)))\n  (func (export \"f32.misc_nan\") (result i32) (i32.reinterpret_f32 (f32.const nan:0x012345)))\n  (func (export \"f32.misc_positive_nan\") (result i32) (i32.reinterpret_f32 (f32.const +nan:0x304050)))\n  (func (export \"f32.misc_negative_nan\") (result i32) (i32.reinterpret_f32 (f32.const -nan:0x2abcde)))\n  (func (export \"f32.infinity\") (result i32) (i32.reinterpret_f32 (f32.const inf)))\n  (func (export \"f32.positive_infinity\") (result i32) (i32.reinterpret_f32 (f32.const +inf)))\n  (func (export \"f32.negative_infinity\") (result i32) (i32.reinterpret_f32 (f32.const -inf)))\n\n  ;; f32 numbers\n  (func (export \"f32.zero\") (result i32) (i32.reinterpret_f32 (f32.const 0x0.0p0)))\n  (func (export \"f32.positive_zero\") (result i32) (i32.reinterpret_f32 (f32.const +0x0.0p0)))\n  (func (export \"f32.negative_zero\") (result i32) (i32.reinterpret_f32 (f32.const -0x0.0p0)))\n  (func (export \"f32.misc\") (result i32) (i32.reinterpret_f32 (f32.const 0x1.921fb6p+2)))\n  (func (export \"f32.min_positive\") (result i32) (i32.reinterpret_f32 (f32.const 0x1p-149)))\n  (func (export \"f32.min_normal\") (result i32) (i32.reinterpret_f32 (f32.const 0x1p-126)))\n  (func (export \"f32.max_finite\") (result i32) (i32.reinterpret_f32 (f32.const 0x1.fffffep+127)))\n  (func (export \"f32.max_subnormal\") (result i32) (i32.reinterpret_f32 (f32.const 0x1.fffffcp-127)))\n  (func (export \"f32.trailing_dot\") (result i32) (i32.reinterpret_f32 (f32.const 0x1.p10)))\n\n  ;; f32 in decimal format\n  (func (export \"f32_dec.zero\") (result i32) (i32.reinterpret_f32 (f32.const 0.0e0)))\n  (func (export \"f32_dec.positive_zero\") (result i32) (i32.reinterpret_f32 (f32.const +0.0e0)))\n  (func (export \"f32_dec.negative_zero\") (result i32) (i32.reinterpret_f32 (f32.const -0.0e0)))\n  (func (export \"f32_dec.misc\") (result i32) (i32.reinterpret_f32 (f32.const 6.28318548202514648)))\n  (func (export \"f32_dec.min_positive\") (result i32) (i32.reinterpret_f32 (f32.const 1.4013e-45)))\n  (func (export \"f32_dec.min_normal\") (result i32) (i32.reinterpret_f32 (f32.const 1.1754944e-38)))\n  (func (export \"f32_dec.max_subnormal\") (result i32) (i32.reinterpret_f32 (f32.const 1.1754942e-38)))\n  (func (export \"f32_dec.max_finite\") (result i32) (i32.reinterpret_f32 (f32.const 3.4028234e+38)))\n  (func (export \"f32_dec.trailing_dot\") (result i32) (i32.reinterpret_f32 (f32.const 1.e10)))\n\n  ;; https://twitter.com/Archivd/status/994637336506912768\n  (func (export \"f32_dec.root_beer_float\") (result i32) (i32.reinterpret_f32 (f32.const 1.000000119)))\n\n  ;; f64 special values\n  (func (export \"f64.nan\") (result i64) (i64.reinterpret_f64 (f64.const nan)))\n  (func (export \"f64.positive_nan\") (result i64) (i64.reinterpret_f64 (f64.const +nan)))\n  (func (export \"f64.negative_nan\") (result i64) (i64.reinterpret_f64 (f64.const -nan)))\n  (func (export \"f64.plain_nan\") (result i64) (i64.reinterpret_f64 (f64.const nan:0x8000000000000)))\n  (func (export \"f64.informally_known_as_plain_snan\") (result i64) (i64.reinterpret_f64 (f64.const nan:0x4000000000000)))\n  (func (export \"f64.all_ones_nan\") (result i64) (i64.reinterpret_f64 (f64.const -nan:0xfffffffffffff)))\n  (func (export \"f64.misc_nan\") (result i64) (i64.reinterpret_f64 (f64.const nan:0x0123456789abc)))\n  (func (export \"f64.misc_positive_nan\") (result i64) (i64.reinterpret_f64 (f64.const +nan:0x3040506070809)))\n  (func (export \"f64.misc_negative_nan\") (result i64) (i64.reinterpret_f64 (f64.const -nan:0x2abcdef012345)))\n  (func (export \"f64.infinity\") (result i64) (i64.reinterpret_f64 (f64.const inf)))\n  (func (export \"f64.positive_infinity\") (result i64) (i64.reinterpret_f64 (f64.const +inf)))\n  (func (export \"f64.negative_infinity\") (result i64) (i64.reinterpret_f64 (f64.const -inf)))\n\n  ;; f64 numbers\n  (func (export \"f64.zero\") (result i64) (i64.reinterpret_f64 (f64.const 0x0.0p0)))\n  (func (export \"f64.positive_zero\") (result i64) (i64.reinterpret_f64 (f64.const +0x0.0p0)))\n  (func (export \"f64.negative_zero\") (result i64) (i64.reinterpret_f64 (f64.const -0x0.0p0)))\n  (func (export \"f64.misc\") (result i64) (i64.reinterpret_f64 (f64.const 0x1.921fb54442d18p+2)))\n  (func (export \"f64.min_positive\") (result i64) (i64.reinterpret_f64 (f64.const 0x0.0000000000001p-1022)))\n  (func (export \"f64.min_normal\") (result i64) (i64.reinterpret_f64 (f64.const 0x1p-1022)))\n  (func (export \"f64.max_subnormal\") (result i64) (i64.reinterpret_f64 (f64.const 0x0.fffffffffffffp-1022)))\n  (func (export \"f64.max_finite\") (result i64) (i64.reinterpret_f64 (f64.const 0x1.fffffffffffffp+1023)))\n  (func (export \"f64.trailing_dot\") (result i64) (i64.reinterpret_f64 (f64.const 0x1.p100)))\n\n  ;; f64 numbers in decimal format\n  (func (export \"f64_dec.zero\") (result i64) (i64.reinterpret_f64 (f64.const 0.0e0)))\n  (func (export \"f64_dec.positive_zero\") (result i64) (i64.reinterpret_f64 (f64.const +0.0e0)))\n  (func (export \"f64_dec.negative_zero\") (result i64) (i64.reinterpret_f64 (f64.const -0.0e0)))\n  (func (export \"f64_dec.misc\") (result i64) (i64.reinterpret_f64 (f64.const 6.28318530717958623)))\n  (func (export \"f64_dec.min_positive\") (result i64) (i64.reinterpret_f64 (f64.const 4.94066e-324)))\n  (func (export \"f64_dec.min_normal\") (result i64) (i64.reinterpret_f64 (f64.const 2.2250738585072012e-308)))\n  (func (export \"f64_dec.max_subnormal\") (result i64) (i64.reinterpret_f64 (f64.const 2.2250738585072011e-308)))\n  (func (export \"f64_dec.max_finite\") (result i64) (i64.reinterpret_f64 (f64.const 1.7976931348623157e+308)))\n  (func (export \"f64_dec.trailing_dot\") (result i64) (i64.reinterpret_f64 (f64.const 1.e100)))\n\n  ;; https://twitter.com/Archivd/status/994637336506912768\n  (func (export \"f64_dec.root_beer_float\") (result i64) (i64.reinterpret_f64 (f64.const 1.000000119)))\n\n  (func (export \"f32-dec-sep1\") (result f32) (f32.const 1_000_000))\n  (func (export \"f32-dec-sep2\") (result f32) (f32.const 1_0_0_0))\n  (func (export \"f32-dec-sep3\") (result f32) (f32.const 100_3.141_592))\n  (func (export \"f32-dec-sep4\") (result f32) (f32.const 99e+1_3))\n  (func (export \"f32-dec-sep5\") (result f32) (f32.const 122_000.11_3_54E0_2_3))\n  (func (export \"f32-hex-sep1\") (result f32) (f32.const 0xa_0f_00_99))\n  (func (export \"f32-hex-sep2\") (result f32) (f32.const 0x1_a_A_0_f))\n  (func (export \"f32-hex-sep3\") (result f32) (f32.const 0xa0_ff.f141_a59a))\n  (func (export \"f32-hex-sep4\") (result f32) (f32.const 0xf0P+1_3))\n  (func (export \"f32-hex-sep5\") (result f32) (f32.const 0x2a_f00a.1f_3_eep2_3))\n\n  (func (export \"f64-dec-sep1\") (result f64) (f64.const 1_000_000))\n  (func (export \"f64-dec-sep2\") (result f64) (f64.const 1_0_0_0))\n  (func (export \"f64-dec-sep3\") (result f64) (f64.const 100_3.141_592))\n  (func (export \"f64-dec-sep4\") (result f64) (f64.const 99e-1_23))\n  (func (export \"f64-dec-sep5\") (result f64) (f64.const 122_000.11_3_54e0_2_3))\n  (func (export \"f64-hex-sep1\") (result f64) (f64.const 0xa_f00f_0000_9999))\n  (func (export \"f64-hex-sep2\") (result f64) (f64.const 0x1_a_A_0_f))\n  (func (export \"f64-hex-sep3\") (result f64) (f64.const 0xa0_ff.f141_a59a))\n  (func (export \"f64-hex-sep4\") (result f64) (f64.const 0xf0P+1_3))\n  (func (export \"f64-hex-sep5\") (result f64) (f64.const 0x2a_f00a.1f_3_eep2_3))\n)\n\n(assert_return (invoke \"f32.nan\") (i32.const 0x7fc00000))\n(assert_return (invoke \"f32.positive_nan\") (i32.const 0x7fc00000))\n(assert_return (invoke \"f32.negative_nan\") (i32.const 0xffc00000))\n(assert_return (invoke \"f32.plain_nan\") (i32.const 0x7fc00000))\n(assert_return (invoke \"f32.informally_known_as_plain_snan\") (i32.const 0x7fa00000))\n(assert_return (invoke \"f32.all_ones_nan\") (i32.const 0xffffffff))\n(assert_return (invoke \"f32.misc_nan\") (i32.const 0x7f812345))\n(assert_return (invoke \"f32.misc_positive_nan\") (i32.const 0x7fb04050))\n(assert_return (invoke \"f32.misc_negative_nan\") (i32.const 0xffaabcde))\n(assert_return (invoke \"f32.infinity\") (i32.const 0x7f800000))\n(assert_return (invoke \"f32.positive_infinity\") (i32.const 0x7f800000))\n(assert_return (invoke \"f32.negative_infinity\") (i32.const 0xff800000))\n(assert_return (invoke \"f32.zero\") (i32.const 0))\n(assert_return (invoke \"f32.positive_zero\") (i32.const 0))\n(assert_return (invoke \"f32.negative_zero\") (i32.const 0x80000000))\n(assert_return (invoke \"f32.misc\") (i32.const 0x40c90fdb))\n(assert_return (invoke \"f32.min_positive\") (i32.const 1))\n(assert_return (invoke \"f32.min_normal\") (i32.const 0x800000))\n(assert_return (invoke \"f32.max_subnormal\") (i32.const 0x7fffff))\n(assert_return (invoke \"f32.max_finite\") (i32.const 0x7f7fffff))\n(assert_return (invoke \"f32.trailing_dot\") (i32.const 0x44800000))\n(assert_return (invoke \"f32_dec.zero\") (i32.const 0))\n(assert_return (invoke \"f32_dec.positive_zero\") (i32.const 0))\n(assert_return (invoke \"f32_dec.negative_zero\") (i32.const 0x80000000))\n(assert_return (invoke \"f32_dec.misc\") (i32.const 0x40c90fdb))\n(assert_return (invoke \"f32_dec.min_positive\") (i32.const 1))\n(assert_return (invoke \"f32_dec.min_normal\") (i32.const 0x800000))\n(assert_return (invoke \"f32_dec.max_subnormal\") (i32.const 0x7fffff))\n(assert_return (invoke \"f32_dec.max_finite\") (i32.const 0x7f7fffff))\n(assert_return (invoke \"f32_dec.trailing_dot\") (i32.const 0x501502f9))\n(assert_return (invoke \"f32_dec.root_beer_float\") (i32.const 0x3f800001))\n\n(assert_return (invoke \"f64.nan\") (i64.const 0x7ff8000000000000))\n(assert_return (invoke \"f64.positive_nan\") (i64.const 0x7ff8000000000000))\n(assert_return (invoke \"f64.negative_nan\") (i64.const 0xfff8000000000000))\n(assert_return (invoke \"f64.plain_nan\") (i64.const 0x7ff8000000000000))\n(assert_return (invoke \"f64.informally_known_as_plain_snan\") (i64.const 0x7ff4000000000000))\n(assert_return (invoke \"f64.all_ones_nan\") (i64.const 0xffffffffffffffff))\n(assert_return (invoke \"f64.misc_nan\") (i64.const 0x7ff0123456789abc))\n(assert_return (invoke \"f64.misc_positive_nan\") (i64.const 0x7ff3040506070809))\n(assert_return (invoke \"f64.misc_negative_nan\") (i64.const 0xfff2abcdef012345))\n(assert_return (invoke \"f64.infinity\") (i64.const 0x7ff0000000000000))\n(assert_return (invoke \"f64.positive_infinity\") (i64.const 0x7ff0000000000000))\n(assert_return (invoke \"f64.negative_infinity\") (i64.const 0xfff0000000000000))\n(assert_return (invoke \"f64.zero\") (i64.const 0))\n(assert_return (invoke \"f64.positive_zero\") (i64.const 0))\n(assert_return (invoke \"f64.negative_zero\") (i64.const 0x8000000000000000))\n(assert_return (invoke \"f64.misc\") (i64.const 0x401921fb54442d18))\n(assert_return (invoke \"f64.min_positive\") (i64.const 1))\n(assert_return (invoke \"f64.min_normal\") (i64.const 0x10000000000000))\n(assert_return (invoke \"f64.max_subnormal\") (i64.const 0xfffffffffffff))\n(assert_return (invoke \"f64.max_finite\") (i64.const 0x7fefffffffffffff))\n(assert_return (invoke \"f64.trailing_dot\") (i64.const 0x4630000000000000))\n(assert_return (invoke \"f64_dec.zero\") (i64.const 0))\n(assert_return (invoke \"f64_dec.positive_zero\") (i64.const 0))\n(assert_return (invoke \"f64_dec.negative_zero\") (i64.const 0x8000000000000000))\n(assert_return (invoke \"f64_dec.misc\") (i64.const 0x401921fb54442d18))\n(assert_return (invoke \"f64_dec.min_positive\") (i64.const 1))\n(assert_return (invoke \"f64_dec.min_normal\") (i64.const 0x10000000000000))\n(assert_return (invoke \"f64_dec.max_subnormal\") (i64.const 0xfffffffffffff))\n(assert_return (invoke \"f64_dec.max_finite\") (i64.const 0x7fefffffffffffff))\n(assert_return (invoke \"f64_dec.trailing_dot\") (i64.const 0x54b249ad2594c37d))\n(assert_return (invoke \"f64_dec.root_beer_float\") (i64.const 0x3ff000001ff19e24))\n\n(assert_return (invoke \"f32-dec-sep1\") (f32.const 1000000))\n(assert_return (invoke \"f32-dec-sep2\") (f32.const 1000))\n(assert_return (invoke \"f32-dec-sep3\") (f32.const 1003.141592))\n(assert_return (invoke \"f32-dec-sep4\") (f32.const 99e+13))\n(assert_return (invoke \"f32-dec-sep5\") (f32.const 122000.11354e23))\n(assert_return (invoke \"f32-hex-sep1\") (f32.const 0xa0f0099))\n(assert_return (invoke \"f32-hex-sep2\") (f32.const 0x1aa0f))\n(assert_return (invoke \"f32-hex-sep3\") (f32.const 0xa0ff.f141a59a))\n(assert_return (invoke \"f32-hex-sep4\") (f32.const 0xf0P+13))\n(assert_return (invoke \"f32-hex-sep5\") (f32.const 0x2af00a.1f3eep23))\n\n(assert_return (invoke \"f64-dec-sep1\") (f64.const 1000000))\n(assert_return (invoke \"f64-dec-sep2\") (f64.const 1000))\n(assert_return (invoke \"f64-dec-sep3\") (f64.const 1003.141592))\n(assert_return (invoke \"f64-dec-sep4\") (f64.const 99e-123))\n(assert_return (invoke \"f64-dec-sep5\") (f64.const 122000.11354e23))\n(assert_return (invoke \"f64-hex-sep1\") (f64.const 0xaf00f00009999))\n(assert_return (invoke \"f64-hex-sep2\") (f64.const 0x1aa0f))\n(assert_return (invoke \"f64-hex-sep3\") (f64.const 0xa0ff.f141a59a))\n(assert_return (invoke \"f64-hex-sep4\") (f64.const 0xf0P+13))\n(assert_return (invoke \"f64-hex-sep5\") (f64.const 0x2af00a.1f3eep23))\n\n;; Test parsing a float from binary\n(module binary\n  ;; (func (export \"4294967249\") (result f64) (f64.const 4294967249))\n  \"\\00\\61\\73\\6d\\01\\00\\00\\00\\01\\85\\80\\80\\80\\00\\01\\60\"\n  \"\\00\\01\\7c\\03\\82\\80\\80\\80\\00\\01\\00\\07\\8e\\80\\80\\80\"\n  \"\\00\\01\\0a\\34\\32\\39\\34\\39\\36\\37\\32\\34\\39\\00\\00\\0a\"\n  \"\\91\\80\\80\\80\\00\\01\\8b\\80\\80\\80\\00\\00\\44\\00\\00\\20\"\n  \"\\fa\\ff\\ff\\ef\\41\\0b\"\n)\n\n(assert_return (invoke \"4294967249\") (f64.const 4294967249))\n\n(assert_malformed\n  (module quote \"(global f32 (f32.const _100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const +_100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const -_100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 99_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 1__000))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const _1.0))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 1.0_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 1_.0))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 1._0))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const _1e1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 1e1_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 1_e1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 1e_1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const _1.0e1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 1.0e1_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 1.0_e1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 1.0e_1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 1.0e+_1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 1.0e_+1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const _0x100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0_x100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0x_100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0x00_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0xff__ffff))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0x_1.0))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0x1.0_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0x1_.0))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0x1._0))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0x_1p1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0x1p1_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0x1_p1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0x1p_1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0x_1.0p1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0x1.0p1_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0x1.0_p1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0x1.0p_1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0x1.0p+_1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f32 (f32.const 0x1.0p_+1))\")\n  \"unknown operator\"\n)\n\n(assert_malformed\n  (module quote \"(global f64 (f64.const _100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const +_100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const -_100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 99_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 1__000))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const _1.0))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 1.0_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 1_.0))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 1._0))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const _1e1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 1e1_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 1_e1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 1e_1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const _1.0e1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 1.0e1_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 1.0_e1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 1.0e_1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 1.0e+_1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 1.0e_+1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const _0x100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0_x100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0x_100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0x00_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0xff__ffff))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0x_1.0))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0x1.0_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0x1_.0))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0x1._0))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0x_1p1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0x1p1_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0x1_p1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0x1p_1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0x_1.0p1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0x1.0p1_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0x1.0_p1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0x1.0p_1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0x1.0p+_1))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global f64 (f64.const 0x1.0p_+1))\")\n  \"unknown operator\"\n)\n"
  },
  {
    "path": "test/core/float_memory.wast",
    "content": ";; Test that floating-point load and store are bit-preserving.\n\n;; Test that load and store do not canonicalize NaNs as x87 does.\n\n(module\n  (memory (data \"\\00\\00\\a0\\7f\"))\n\n  (func (export \"f32.load\") (result f32) (f32.load (i32.const 0)))\n  (func (export \"i32.load\") (result i32) (i32.load (i32.const 0)))\n  (func (export \"f32.store\") (f32.store (i32.const 0) (f32.const nan:0x200000)))\n  (func (export \"i32.store\") (i32.store (i32.const 0) (i32.const 0x7fa00000)))\n  (func (export \"reset\") (i32.store (i32.const 0) (i32.const 0)))\n)\n\n(assert_return (invoke \"i32.load\") (i32.const 0x7fa00000))\n(assert_return (invoke \"f32.load\") (f32.const nan:0x200000))\n(invoke \"reset\")\n(assert_return (invoke \"i32.load\") (i32.const 0x0))\n(assert_return (invoke \"f32.load\") (f32.const 0.0))\n(invoke \"f32.store\")\n(assert_return (invoke \"i32.load\") (i32.const 0x7fa00000))\n(assert_return (invoke \"f32.load\") (f32.const nan:0x200000))\n(invoke \"reset\")\n(assert_return (invoke \"i32.load\") (i32.const 0x0))\n(assert_return (invoke \"f32.load\") (f32.const 0.0))\n(invoke \"i32.store\")\n(assert_return (invoke \"i32.load\") (i32.const 0x7fa00000))\n(assert_return (invoke \"f32.load\") (f32.const nan:0x200000))\n\n(module\n  (memory (data \"\\00\\00\\00\\00\\00\\00\\f4\\7f\"))\n\n  (func (export \"f64.load\") (result f64) (f64.load (i32.const 0)))\n  (func (export \"i64.load\") (result i64) (i64.load (i32.const 0)))\n  (func (export \"f64.store\") (f64.store (i32.const 0) (f64.const nan:0x4000000000000)))\n  (func (export \"i64.store\") (i64.store (i32.const 0) (i64.const 0x7ff4000000000000)))\n  (func (export \"reset\") (i64.store (i32.const 0) (i64.const 0)))\n)\n\n(assert_return (invoke \"i64.load\") (i64.const 0x7ff4000000000000))\n(assert_return (invoke \"f64.load\") (f64.const nan:0x4000000000000))\n(invoke \"reset\")\n(assert_return (invoke \"i64.load\") (i64.const 0x0))\n(assert_return (invoke \"f64.load\") (f64.const 0.0))\n(invoke \"f64.store\")\n(assert_return (invoke \"i64.load\") (i64.const 0x7ff4000000000000))\n(assert_return (invoke \"f64.load\") (f64.const nan:0x4000000000000))\n(invoke \"reset\")\n(assert_return (invoke \"i64.load\") (i64.const 0x0))\n(assert_return (invoke \"f64.load\") (f64.const 0.0))\n(invoke \"i64.store\")\n(assert_return (invoke \"i64.load\") (i64.const 0x7ff4000000000000))\n(assert_return (invoke \"f64.load\") (f64.const nan:0x4000000000000))\n\n;; Test that unaligned load and store do not canonicalize NaNs.\n\n(module\n  (memory (data \"\\00\\00\\00\\a0\\7f\"))\n\n  (func (export \"f32.load\") (result f32) (f32.load (i32.const 1)))\n  (func (export \"i32.load\") (result i32) (i32.load (i32.const 1)))\n  (func (export \"f32.store\") (f32.store (i32.const 1) (f32.const nan:0x200000)))\n  (func (export \"i32.store\") (i32.store (i32.const 1) (i32.const 0x7fa00000)))\n  (func (export \"reset\") (i32.store (i32.const 1) (i32.const 0)))\n)\n\n(assert_return (invoke \"i32.load\") (i32.const 0x7fa00000))\n(assert_return (invoke \"f32.load\") (f32.const nan:0x200000))\n(invoke \"reset\")\n(assert_return (invoke \"i32.load\") (i32.const 0x0))\n(assert_return (invoke \"f32.load\") (f32.const 0.0))\n(invoke \"f32.store\")\n(assert_return (invoke \"i32.load\") (i32.const 0x7fa00000))\n(assert_return (invoke \"f32.load\") (f32.const nan:0x200000))\n(invoke \"reset\")\n(assert_return (invoke \"i32.load\") (i32.const 0x0))\n(assert_return (invoke \"f32.load\") (f32.const 0.0))\n(invoke \"i32.store\")\n(assert_return (invoke \"i32.load\") (i32.const 0x7fa00000))\n(assert_return (invoke \"f32.load\") (f32.const nan:0x200000))\n\n(module\n  (memory (data \"\\00\\00\\00\\00\\00\\00\\00\\f4\\7f\"))\n\n  (func (export \"f64.load\") (result f64) (f64.load (i32.const 1)))\n  (func (export \"i64.load\") (result i64) (i64.load (i32.const 1)))\n  (func (export \"f64.store\") (f64.store (i32.const 1) (f64.const nan:0x4000000000000)))\n  (func (export \"i64.store\") (i64.store (i32.const 1) (i64.const 0x7ff4000000000000)))\n  (func (export \"reset\") (i64.store (i32.const 1) (i64.const 0)))\n)\n\n(assert_return (invoke \"i64.load\") (i64.const 0x7ff4000000000000))\n(assert_return (invoke \"f64.load\") (f64.const nan:0x4000000000000))\n(invoke \"reset\")\n(assert_return (invoke \"i64.load\") (i64.const 0x0))\n(assert_return (invoke \"f64.load\") (f64.const 0.0))\n(invoke \"f64.store\")\n(assert_return (invoke \"i64.load\") (i64.const 0x7ff4000000000000))\n(assert_return (invoke \"f64.load\") (f64.const nan:0x4000000000000))\n(invoke \"reset\")\n(assert_return (invoke \"i64.load\") (i64.const 0x0))\n(assert_return (invoke \"f64.load\") (f64.const 0.0))\n(invoke \"i64.store\")\n(assert_return (invoke \"i64.load\") (i64.const 0x7ff4000000000000))\n(assert_return (invoke \"f64.load\") (f64.const nan:0x4000000000000))\n\n;; Test that load and store do not canonicalize NaNs as some JS engines do.\n\n(module\n  (memory (data \"\\01\\00\\d0\\7f\"))\n\n  (func (export \"f32.load\") (result f32) (f32.load (i32.const 0)))\n  (func (export \"i32.load\") (result i32) (i32.load (i32.const 0)))\n  (func (export \"f32.store\") (f32.store (i32.const 0) (f32.const nan:0x500001)))\n  (func (export \"i32.store\") (i32.store (i32.const 0) (i32.const 0x7fd00001)))\n  (func (export \"reset\") (i32.store (i32.const 0) (i32.const 0)))\n)\n\n(assert_return (invoke \"i32.load\") (i32.const 0x7fd00001))\n(assert_return (invoke \"f32.load\") (f32.const nan:0x500001))\n(invoke \"reset\")\n(assert_return (invoke \"i32.load\") (i32.const 0x0))\n(assert_return (invoke \"f32.load\") (f32.const 0.0))\n(invoke \"f32.store\")\n(assert_return (invoke \"i32.load\") (i32.const 0x7fd00001))\n(assert_return (invoke \"f32.load\") (f32.const nan:0x500001))\n(invoke \"reset\")\n(assert_return (invoke \"i32.load\") (i32.const 0x0))\n(assert_return (invoke \"f32.load\") (f32.const 0.0))\n(invoke \"i32.store\")\n(assert_return (invoke \"i32.load\") (i32.const 0x7fd00001))\n(assert_return (invoke \"f32.load\") (f32.const nan:0x500001))\n\n(module\n  (memory (data \"\\01\\00\\00\\00\\00\\00\\fc\\7f\"))\n\n  (func (export \"f64.load\") (result f64) (f64.load (i32.const 0)))\n  (func (export \"i64.load\") (result i64) (i64.load (i32.const 0)))\n  (func (export \"f64.store\") (f64.store (i32.const 0) (f64.const nan:0xc000000000001)))\n  (func (export \"i64.store\") (i64.store (i32.const 0) (i64.const 0x7ffc000000000001)))\n  (func (export \"reset\") (i64.store (i32.const 0) (i64.const 0)))\n)\n\n(assert_return (invoke \"i64.load\") (i64.const 0x7ffc000000000001))\n(assert_return (invoke \"f64.load\") (f64.const nan:0xc000000000001))\n(invoke \"reset\")\n(assert_return (invoke \"i64.load\") (i64.const 0x0))\n(assert_return (invoke \"f64.load\") (f64.const 0.0))\n(invoke \"f64.store\")\n(assert_return (invoke \"i64.load\") (i64.const 0x7ffc000000000001))\n(assert_return (invoke \"f64.load\") (f64.const nan:0xc000000000001))\n(invoke \"reset\")\n(assert_return (invoke \"i64.load\") (i64.const 0x0))\n(assert_return (invoke \"f64.load\") (f64.const 0.0))\n(invoke \"i64.store\")\n(assert_return (invoke \"i64.load\") (i64.const 0x7ffc000000000001))\n(assert_return (invoke \"f64.load\") (f64.const nan:0xc000000000001))\n"
  },
  {
    "path": "test/core/float_misc.wast",
    "content": ";; Platforms intended to run WebAssembly must support IEEE 754 arithmetic.\n;; This testsuite is not currently sufficient for full IEEE 754 conformance\n;; testing; platforms are currently expected to meet these requirements in\n;; their own way (widely-used hardware platforms already do this).\n;;\n;; What this testsuite does test is that (a) the platform is basically IEEE 754\n;; rather than something else entirely, (b) it's configured correctly for\n;; WebAssembly (rounding direction, exception masks, precision level, subnormal\n;; mode, etc.), (c) the WebAssembly implementation doesn't perform any common\n;; value-changing optimizations, and (d) that the WebAssembly implementation\n;; doesn't exhibit any known implementation bugs.\n;;\n;; This file supplements f32.wast, f64.wast, f32_bitwise.wast, f64_bitwise.wast,\n;; f32_cmp.wast, and f64_cmp.wast with additional single-instruction tests\n;; covering additional miscellaneous interesting cases.\n\n(module\n  (func (export \"f32.add\") (param $x f32) (param $y f32) (result f32) (f32.add (local.get $x) (local.get $y)))\n  (func (export \"f32.sub\") (param $x f32) (param $y f32) (result f32) (f32.sub (local.get $x) (local.get $y)))\n  (func (export \"f32.mul\") (param $x f32) (param $y f32) (result f32) (f32.mul (local.get $x) (local.get $y)))\n  (func (export \"f32.div\") (param $x f32) (param $y f32) (result f32) (f32.div (local.get $x) (local.get $y)))\n  (func (export \"f32.sqrt\") (param $x f32) (result f32) (f32.sqrt (local.get $x)))\n  (func (export \"f32.abs\") (param $x f32) (result f32) (f32.abs (local.get $x)))\n  (func (export \"f32.neg\") (param $x f32) (result f32) (f32.neg (local.get $x)))\n  (func (export \"f32.copysign\") (param $x f32) (param $y f32) (result f32) (f32.copysign (local.get $x) (local.get $y)))\n  (func (export \"f32.ceil\") (param $x f32) (result f32) (f32.ceil (local.get $x)))\n  (func (export \"f32.floor\") (param $x f32) (result f32) (f32.floor (local.get $x)))\n  (func (export \"f32.trunc\") (param $x f32) (result f32) (f32.trunc (local.get $x)))\n  (func (export \"f32.nearest\") (param $x f32) (result f32) (f32.nearest (local.get $x)))\n  (func (export \"f32.min\") (param $x f32) (param $y f32) (result f32) (f32.min (local.get $x) (local.get $y)))\n  (func (export \"f32.max\") (param $x f32) (param $y f32) (result f32) (f32.max (local.get $x) (local.get $y)))\n\n  (func (export \"f64.add\") (param $x f64) (param $y f64) (result f64) (f64.add (local.get $x) (local.get $y)))\n  (func (export \"f64.sub\") (param $x f64) (param $y f64) (result f64) (f64.sub (local.get $x) (local.get $y)))\n  (func (export \"f64.mul\") (param $x f64) (param $y f64) (result f64) (f64.mul (local.get $x) (local.get $y)))\n  (func (export \"f64.div\") (param $x f64) (param $y f64) (result f64) (f64.div (local.get $x) (local.get $y)))\n  (func (export \"f64.sqrt\") (param $x f64) (result f64) (f64.sqrt (local.get $x)))\n  (func (export \"f64.abs\") (param $x f64) (result f64) (f64.abs (local.get $x)))\n  (func (export \"f64.neg\") (param $x f64) (result f64) (f64.neg (local.get $x)))\n  (func (export \"f64.copysign\") (param $x f64) (param $y f64) (result f64) (f64.copysign (local.get $x) (local.get $y)))\n  (func (export \"f64.ceil\") (param $x f64) (result f64) (f64.ceil (local.get $x)))\n  (func (export \"f64.floor\") (param $x f64) (result f64) (f64.floor (local.get $x)))\n  (func (export \"f64.trunc\") (param $x f64) (result f64) (f64.trunc (local.get $x)))\n  (func (export \"f64.nearest\") (param $x f64) (result f64) (f64.nearest (local.get $x)))\n  (func (export \"f64.min\") (param $x f64) (param $y f64) (result f64) (f64.min (local.get $x) (local.get $y)))\n  (func (export \"f64.max\") (param $x f64) (param $y f64) (result f64) (f64.max (local.get $x) (local.get $y)))\n)\n\n;; Miscellaneous values.\n(assert_return (invoke \"f32.add\" (f32.const 1.1234567890) (f32.const 1.2345e-10)) (f32.const 1.123456789))\n(assert_return (invoke \"f64.add\" (f64.const 1.1234567890) (f64.const 1.2345e-10)) (f64.const 0x1.1f9add37c11f7p+0))\n\n;; Test adding the greatest value to 1.0 that rounds back to 1.0, and the\n;; least that rounds to something greater.\n(assert_return (invoke \"f32.add\" (f32.const 1.0) (f32.const 0x1p-24)) (f32.const 0x1.0p+0))\n(assert_return (invoke \"f32.add\" (f32.const 1.0) (f32.const 0x1.000002p-24)) (f32.const 0x1.000002p+0))\n(assert_return (invoke \"f64.add\" (f64.const 1.0) (f64.const 0x1p-53)) (f64.const 0x1.0p+0))\n(assert_return (invoke \"f64.add\" (f64.const 1.0) (f64.const 0x1.0000000000001p-53)) (f64.const 0x1.0000000000001p+0))\n\n;; Max subnormal + min subnormal = min normal.\n(assert_return (invoke \"f32.add\" (f32.const 0x1p-149) (f32.const 0x1.fffffcp-127)) (f32.const 0x1p-126))\n(assert_return (invoke \"f64.add\" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.fffffffffffffp-1022)) (f64.const 0x1p-1022))\n\n;; Test for a case of double rounding, example from:\n;; http://perso.ens-lyon.fr/jean-michel.muller/Handbook.html\n;; section 3.3.1: A typical problem: \"double rounding\"\n(assert_return (invoke \"f32.add\" (f32.const 0x1p+31) (f32.const 1024.25)) (f32.const 0x1.000008p+31))\n(assert_return (invoke \"f64.add\" (f64.const 0x1p+63) (f64.const 1024.25)) (f64.const 0x1.0000000000001p+63))\n\n;; Test a case that was \"tricky\" on MMIX.\n;; http://mmix.cs.hm.edu/bugs/bug_rounding.html\n(assert_return (invoke \"f64.add\" (f64.const -0x1p-1008) (f64.const 0x0.0000000001716p-1022)) (f64.const -0x1.fffffffffffffp-1009))\n\n;; http://www.vinc17.org/software/tst-ieee754.xsl\n(assert_return (invoke \"f64.add\" (f64.const 9007199254740992) (f64.const 1.00001)) (f64.const 9007199254740994))\n\n;; http://www.vinc17.org/software/test.java\n(assert_return (invoke \"f64.add\" (f64.const 9007199254740994) (f64.const 0x1.fffep-1)) (f64.const 9007199254740994))\n\n;; Computations that round differently in ties-to-odd mode.\n(assert_return (invoke \"f32.add\" (f32.const 0x1p23) (f32.const 0x1p-1)) (f32.const 0x1p23))\n(assert_return (invoke \"f32.add\" (f32.const 0x1.000002p+23) (f32.const 0x1p-1)) (f32.const 0x1.000004p+23))\n(assert_return (invoke \"f64.add\" (f64.const 0x1p52) (f64.const 0x1p-1)) (f64.const 0x1p52))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.0000000000001p+52) (f64.const 0x1p-1)) (f64.const 0x1.0000000000002p+52))\n\n;; Computations that round differently in round-upward mode.\n(assert_return (invoke \"f32.add\" (f32.const -0x1.39675ap+102) (f32.const 0x1.76c94cp-99)) (f32.const -0x1.39675ap+102))\n(assert_return (invoke \"f32.add\" (f32.const 0x1.6c0f24p+67) (f32.const -0x1.2b92dp+52)) (f32.const 0x1.6c0cccp+67))\n(assert_return (invoke \"f32.add\" (f32.const 0x1.e62318p-83) (f32.const 0x1.f74abep-125)) (f32.const 0x1.e62318p-83))\n(assert_return (invoke \"f32.add\" (f32.const 0x1.2a71d4p+39) (f32.const -0x1.c9f10cp+55)) (f32.const -0x1.c9efe2p+55))\n(assert_return (invoke \"f32.add\" (f32.const 0x1.f8f736p-15) (f32.const 0x1.7bd45ep+106)) (f32.const 0x1.7bd45ep+106))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.f33e1fbca27aap-413) (f64.const -0x1.6b192891ed61p+249)) (f64.const -0x1.6b192891ed61p+249))\n(assert_return (invoke \"f64.add\" (f64.const -0x1.46f75d130eeb1p+76) (f64.const 0x1.25275d6f7a4acp-184)) (f64.const -0x1.46f75d130eeb1p+76))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.04dec9265a731p-148) (f64.const -0x1.11eed4e8c127cp-12)) (f64.const -0x1.11eed4e8c127cp-12))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.05773b7166b0ap+497) (f64.const 0x1.134022f2da37bp+66)) (f64.const 0x1.05773b7166b0ap+497))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.ef4f794282a82p+321) (f64.const 0x1.14a82266badep+394)) (f64.const 0x1.14a82266badep+394))\n\n;; Computations that round differently in round-downward mode.\n(assert_return (invoke \"f32.add\" (f32.const 0x1.1bf976p+72) (f32.const -0x1.7f5868p+20)) (f32.const 0x1.1bf976p+72))\n(assert_return (invoke \"f32.add\" (f32.const 0x1.7f9c6cp-45) (f32.const -0x1.b9bb0ep-78)) (f32.const 0x1.7f9c6cp-45))\n(assert_return (invoke \"f32.add\" (f32.const -0x1.32d1bcp-42) (f32.const 0x1.f7d214p+125)) (f32.const 0x1.f7d214p+125))\n(assert_return (invoke \"f32.add\" (f32.const -0x1.8e5c0ep-44) (f32.const -0x1.3afa4cp-106)) (f32.const -0x1.8e5c0ep-44))\n(assert_return (invoke \"f32.add\" (f32.const 0x1.13cd78p-10) (f32.const -0x1.3af316p-107)) (f32.const 0x1.13cd78p-10))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.f8dd15ca97d4ap+179) (f64.const -0x1.367317d1fe8bfp-527)) (f64.const 0x1.f8dd15ca97d4ap+179))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.5db08d739228cp+155) (f64.const -0x1.fb316fa147dcbp-61)) (f64.const 0x1.5db08d739228cp+155))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.bbb403cb85c07p-404) (f64.const -0x1.7e44046b8bbf3p-979)) (f64.const 0x1.bbb403cb85c07p-404))\n(assert_return (invoke \"f64.add\" (f64.const -0x1.34d38af291831p+147) (f64.const -0x1.9890b47439953p+139)) (f64.const -0x1.366c1ba705bcap+147))\n(assert_return (invoke \"f64.add\" (f64.const -0x1.b61dedf4e0306p+3) (f64.const 0x1.09e2f31773c4ap+290)) (f64.const 0x1.09e2f31773c4ap+290))\n\n;; Computations that round differently in round-toward-zero mode.\n(assert_return (invoke \"f32.add\" (f32.const -0x1.129bd8p-117) (f32.const 0x1.c75012p-43)) (f32.const 0x1.c75012p-43))\n(assert_return (invoke \"f32.add\" (f32.const -0x1.c204a2p-16) (f32.const 0x1.80b132p-27)) (f32.const -0x1.c1d48cp-16))\n(assert_return (invoke \"f32.add\" (f32.const -0x1.decc1cp+36) (f32.const 0x1.c688dap-109)) (f32.const -0x1.decc1cp+36))\n(assert_return (invoke \"f32.add\" (f32.const 0x1.61ce6ap-118) (f32.const -0x1.772892p+30)) (f32.const -0x1.772892p+30))\n(assert_return (invoke \"f32.add\" (f32.const -0x1.3dc826p-120) (f32.const 0x1.fc3f66p+95)) (f32.const 0x1.fc3f66p+95))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.bf68acc263a0fp-777) (f64.const -0x1.5f9352965e5a6p+1004)) (f64.const -0x1.5f9352965e5a6p+1004))\n(assert_return (invoke \"f64.add\" (f64.const -0x1.76eaa70911f51p+516) (f64.const -0x1.2d746324ce47ap+493)) (f64.const -0x1.76eaa963fabb6p+516))\n(assert_return (invoke \"f64.add\" (f64.const -0x1.b637d82c15a7ap-967) (f64.const 0x1.cc654ccab4152p-283)) (f64.const 0x1.cc654ccab4152p-283))\n(assert_return (invoke \"f64.add\" (f64.const -0x1.a5b1fb66e846ep-509) (f64.const 0x1.4bdd36f0bb5ccp-860)) (f64.const -0x1.a5b1fb66e846ep-509))\n(assert_return (invoke \"f64.add\" (f64.const -0x1.14108da880f9ep+966) (f64.const 0x1.417f35701e89fp+800)) (f64.const -0x1.14108da880f9ep+966))\n\n;; Computations that round differently on x87.\n(assert_return (invoke \"f64.add\" (f64.const -0x1.fa0caf21ffebcp+804) (f64.const 0x1.4ca8fdcff89f9p+826)) (f64.const 0x1.4ca8f5e7c5e31p+826))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.016f1fcbdfd38p+784) (f64.const 0x1.375dffcbc9a2cp+746)) (f64.const 0x1.016f1fcbe4b0fp+784))\n(assert_return (invoke \"f64.add\" (f64.const -0x1.dffda6d5bff3ap+624) (f64.const 0x1.f9e8cc2dff782p+674)) (f64.const 0x1.f9e8cc2dff77bp+674))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.fff4b43687dfbp+463) (f64.const 0x1.0fd5617c4a809p+517)) (f64.const 0x1.0fd5617c4a809p+517))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.535d380035da2p-995) (f64.const 0x1.cce37dddbb73bp-963)) (f64.const 0x1.cce37ddf0ed0fp-963))\n\n;; Computations that round differently when computed via f32.\n(assert_return (invoke \"f64.add\" (f64.const -0x1.d91cd3fc0c66fp+752) (f64.const -0x1.4e18c80229734p+952)) (f64.const -0x1.4e18c80229734p+952))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.afc70fd36e372p+193) (f64.const -0x1.bd10a9b377b46p+273)) (f64.const -0x1.bd10a9b377b46p+273))\n(assert_return (invoke \"f64.add\" (f64.const -0x1.2abd570b078b2p+302) (f64.const 0x1.b3c1ad759cb5bp-423)) (f64.const -0x1.2abd570b078b2p+302))\n(assert_return (invoke \"f64.add\" (f64.const -0x1.5b2ae84c0686cp-317) (f64.const -0x1.dba7a1c022823p+466)) (f64.const -0x1.dba7a1c022823p+466))\n(assert_return (invoke \"f64.add\" (f64.const -0x1.ac627bd7cbf38p-198) (f64.const 0x1.2312e265b8d59p-990)) (f64.const -0x1.ac627bd7cbf38p-198))\n\n;; Computations that utilize the maximum exponent value to avoid overflow.\n(assert_return (invoke \"f32.add\" (f32.const 0x1.2b91ap+116) (f32.const 0x1.cbcd52p+127)) (f32.const 0x1.cbf2c4p+127))\n(assert_return (invoke \"f32.add\" (f32.const 0x1.96f392p+127) (f32.const -0x1.6b3fecp+107)) (f32.const 0x1.96f37cp+127))\n(assert_return (invoke \"f32.add\" (f32.const 0x1.132f1cp+118) (f32.const -0x1.63d632p+127)) (f32.const -0x1.634c9ap+127))\n(assert_return (invoke \"f32.add\" (f32.const -0x1.1dda64p+120) (f32.const -0x1.ef02ep+127)) (f32.const -0x1.f13e94p+127))\n(assert_return (invoke \"f32.add\" (f32.const -0x1.4ad8dap+127) (f32.const -0x1.eae082p+125)) (f32.const -0x1.c590fap+127))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.017099f2a4b8bp+1023) (f64.const 0x1.1f63b28f05454p+981)) (f64.const 0x1.017099f2a5009p+1023))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.d88b6c74984efp+1023) (f64.const 0x1.33b444775eabcp+990)) (f64.const 0x1.d88b6c7532291p+1023))\n(assert_return (invoke \"f64.add\" (f64.const -0x1.84576422fdf5p+1023) (f64.const 0x1.60ee6aa12fb9cp+1012)) (f64.const -0x1.842b4655a9cf1p+1023))\n(assert_return (invoke \"f64.add\" (f64.const -0x1.9aaace3e79f7dp+1001) (f64.const 0x1.e4068af295cb6p+1023)) (f64.const 0x1.e4068487ea926p+1023))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.06cdae79f27b9p+1023) (f64.const -0x1.e05cb0c96f975p+991)) (f64.const 0x1.06cdae78121eep+1023))\n\n;; Computations that utilize the minimum exponent value.\n(assert_return (invoke \"f32.add\" (f32.const 0x1.6a1a2p-127) (f32.const 0x1.378p-140)) (f32.const 0x1.6a23dcp-127))\n(assert_return (invoke \"f32.add\" (f32.const 0x1.28p-144) (f32.const -0x1p-148)) (f32.const 0x1.18p-144))\n(assert_return (invoke \"f32.add\" (f32.const -0x1p-146) (f32.const 0x1.c3cap-128)) (f32.const 0x1.c3c9cp-128))\n(assert_return (invoke \"f32.add\" (f32.const -0x1.4p-145) (f32.const 0x1.424052p-122)) (f32.const 0x1.42405p-122))\n(assert_return (invoke \"f32.add\" (f32.const 0x1.c5p-141) (f32.const -0x1.72f8p-135)) (f32.const -0x1.6be4p-135))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.4774c681d1e21p-1022) (f64.const -0x1.271e58e9f58cap-1021)) (f64.const -0x1.06c7eb5219373p-1022))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.10b3a75e31916p-1021) (f64.const -0x1.ffb82b0e868a7p-1021)) (f64.const -0x1.de090760a9f22p-1022))\n(assert_return (invoke \"f64.add\" (f64.const -0x0.6b58448b8098ap-1022) (f64.const -0x1.579796ed04cbep-1022)) (f64.const -0x1.c2efdb7885648p-1022))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.9eb9e7baae8d1p-1020) (f64.const -0x1.d58e136f8c6eep-1020)) (f64.const -0x0.db50aed377874p-1022))\n(assert_return (invoke \"f64.add\" (f64.const -0x1.f1115deeafa0bp-1022) (f64.const 0x1.221b1c87dca29p-1022)) (f64.const -0x0.cef64166d2fe2p-1022))\n\n;; Test an add of the second-greatest finite value with the distance to greatest\n;; finite value.\n(assert_return (invoke \"f32.add\" (f32.const 0x1.fffffcp+127) (f32.const 0x1p+104)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.ffffffffffffep+1023) (f64.const 0x1p+971)) (f64.const 0x1.fffffffffffffp+1023))\n\n;; http://news.harvard.edu/gazette/story/2013/09/dawn-of-a-revolution/\n(assert_return (invoke \"f32.add\" (f32.const 2.0) (f32.const 2.0)) (f32.const 4.0))\n(assert_return (invoke \"f64.add\" (f64.const 2.0) (f64.const 2.0)) (f64.const 4.0))\n\n;; Test rounding above the greatest finite value.\n(assert_return (invoke \"f32.add\" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+102)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"f32.add\" (f32.const 0x1.fffffep+127) (f32.const 0x1p+103)) (f32.const inf))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+969)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"f64.add\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+970)) (f64.const inf))\n\n;; Test for a historic spreadsheet bug.\n;; https://blogs.office.com/2007/09/25/calculation-issue-update/\n(assert_return (invoke \"f32.sub\" (f32.const 65536.0) (f32.const 0x1p-37)) (f32.const 65536.0))\n(assert_return (invoke \"f64.sub\" (f64.const 65536.0) (f64.const 0x1p-37)) (f64.const 0x1.fffffffffffffp+15))\n\n;; Test subtracting the greatest value from 1.0 that rounds back to 1.0, and the\n;; least that rounds to something less.\n(assert_return (invoke \"f32.sub\" (f32.const 1.0) (f32.const 0x1p-25)) (f32.const 0x1.0p+0))\n(assert_return (invoke \"f32.sub\" (f32.const 1.0) (f32.const 0x1.000002p-25)) (f32.const 0x1.fffffep-1))\n(assert_return (invoke \"f64.sub\" (f64.const 1.0) (f64.const 0x1p-54)) (f64.const 0x1.0p+0))\n(assert_return (invoke \"f64.sub\" (f64.const 1.0) (f64.const 0x1.0000000000001p-54)) (f64.const 0x1.fffffffffffffp-1))\n\n;; Computations that round differently in round-upward mode.\n(assert_return (invoke \"f32.sub\" (f32.const 0x1.ee2466p-106) (f32.const -0x1.16277ep+119)) (f32.const 0x1.16277ep+119))\n(assert_return (invoke \"f32.sub\" (f32.const -0x1.446f9ep+119) (f32.const -0x1.4396a4p+43)) (f32.const -0x1.446f9ep+119))\n(assert_return (invoke \"f32.sub\" (f32.const 0x1.74773cp+0) (f32.const -0x1.a25512p-82)) (f32.const 0x1.74773cp+0))\n(assert_return (invoke \"f32.sub\" (f32.const 0x1.9345c4p-117) (f32.const 0x1.6792c2p-76)) (f32.const -0x1.6792c2p-76))\n(assert_return (invoke \"f32.sub\" (f32.const 0x1.9ecfa4p-18) (f32.const -0x1.864b44p-107)) (f32.const 0x1.9ecfa4p-18))\n(assert_return (invoke \"f64.sub\" (f64.const -0x1.5b798875e7845p-333) (f64.const -0x1.b5147117452fep-903)) (f64.const -0x1.5b798875e7845p-333))\n(assert_return (invoke \"f64.sub\" (f64.const -0x1.6c87baeb6d72dp+552) (f64.const -0x1.64fb35d4b5571p-158)) (f64.const -0x1.6c87baeb6d72dp+552))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1.b3d369fcf74bp-461) (f64.const -0x1.ea1668c0dec93p-837)) (f64.const 0x1.b3d369fcf74bp-461))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1.0abd449353eadp-1005) (f64.const -0x1.0422ea3e82ee9p+154)) (f64.const 0x1.0422ea3e82ee9p+154))\n(assert_return (invoke \"f64.sub\" (f64.const -0x1.aadbc6b43cc3dp-143) (f64.const -0x1.e7f922ef1ee58p-539)) (f64.const -0x1.aadbc6b43cc3dp-143))\n\n;; Computations that round differently in round-downward mode.\n(assert_return (invoke \"f32.sub\" (f32.const -0x1.61e262p+108) (f32.const -0x1.baf3e4p+112)) (f32.const 0x1.a4d5bep+112))\n(assert_return (invoke \"f32.sub\" (f32.const -0x1.62c2f6p+109) (f32.const 0x1.6e514ap+6)) (f32.const -0x1.62c2f6p+109))\n(assert_return (invoke \"f32.sub\" (f32.const -0x1.287c94p-83) (f32.const 0x1.0f2f9cp-24)) (f32.const -0x1.0f2f9cp-24))\n(assert_return (invoke \"f32.sub\" (f32.const -0x1.c8825cp-77) (f32.const -0x1.4aead6p-12)) (f32.const 0x1.4aead6p-12))\n(assert_return (invoke \"f32.sub\" (f32.const -0x1.2976a4p+99) (f32.const 0x1.c6e3b8p-59)) (f32.const -0x1.2976a4p+99))\n(assert_return (invoke \"f64.sub\" (f64.const -0x1.76cb28ae6c045p+202) (f64.const -0x1.0611f2af4e9b9p+901)) (f64.const 0x1.0611f2af4e9b9p+901))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1.baf35eff22e9ep-368) (f64.const 0x1.5c3e08ecf73ecp-451)) (f64.const 0x1.baf35eff22e9ep-368))\n(assert_return (invoke \"f64.sub\" (f64.const -0x1.8fd354b376f1fp-200) (f64.const 0x1.513c860f386ffp-508)) (f64.const -0x1.8fd354b376f1fp-200))\n(assert_return (invoke \"f64.sub\" (f64.const -0x1.760d447230ae6p-992) (f64.const -0x1.16f788438ae3ep-328)) (f64.const 0x1.16f788438ae3ep-328))\n(assert_return (invoke \"f64.sub\" (f64.const -0x1.73aab4fcfc7ap+112) (f64.const 0x1.7c589f990b884p+171)) (f64.const -0x1.7c589f990b884p+171))\n\n;; Computations that round differently in round-toward-zero mode.\n(assert_return (invoke \"f32.sub\" (f32.const 0x1.ea264cp+95) (f32.const 0x1.852988p-15)) (f32.const 0x1.ea264cp+95))\n(assert_return (invoke \"f32.sub\" (f32.const -0x1.14ec7cp+19) (f32.const -0x1.0ad3fep-35)) (f32.const -0x1.14ec7cp+19))\n(assert_return (invoke \"f32.sub\" (f32.const -0x1.3251dap-36) (f32.const -0x1.49c97ep-56)) (f32.const -0x1.3251c6p-36))\n(assert_return (invoke \"f32.sub\" (f32.const -0x1.13565ep-14) (f32.const 0x1.2f89a8p-13)) (f32.const -0x1.b934d8p-13))\n(assert_return (invoke \"f32.sub\" (f32.const -0x1.6032b6p-33) (f32.const -0x1.bb5196p-104)) (f32.const -0x1.6032b6p-33))\n(assert_return (invoke \"f64.sub\" (f64.const -0x1.b5b0797af491p-157) (f64.const -0x1.694b8348189e8p+722)) (f64.const 0x1.694b8348189e8p+722))\n(assert_return (invoke \"f64.sub\" (f64.const -0x1.72b142826ed73p+759) (f64.const -0x1.010477bc9afbdp+903)) (f64.const 0x1.010477bc9afbdp+903))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1.83273b6bb94cfp-796) (f64.const 0x1.1a93f948a2abbp+181)) (f64.const -0x1.1a93f948a2abbp+181))\n(assert_return (invoke \"f64.sub\" (f64.const -0x1.207e7156cbf2p-573) (f64.const 0x1.cf3f12fd3814dp-544)) (f64.const -0x1.cf3f13063c086p-544))\n(assert_return (invoke \"f64.sub\" (f64.const -0x1.837e6844f1718p-559) (f64.const -0x1.1c29b757f98abp-14)) (f64.const 0x1.1c29b757f98abp-14))\n\n;; Computations that round differently on x87.\n(assert_return (invoke \"f64.sub\" (f64.const 0x1.c21151a709b6cp-78) (f64.const 0x1.0a12fff8910f6p-115)) (f64.const 0x1.c21151a701663p-78))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1.c57912aae2f64p-982) (f64.const 0x1.dbfbd4800b7cfp-1010)) (f64.const 0x1.c579128d2338fp-982))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1.ffef4399af9c6p-254) (f64.const 0x1.edb96dfaea8b1p-200)) (f64.const -0x1.edb96dfaea8b1p-200))\n(assert_return (invoke \"f64.sub\" (f64.const -0x1.363eee391cde2p-39) (f64.const -0x1.a65462000265fp-69)) (f64.const -0x1.363eee32838c9p-39))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1.59016dba002a1p-25) (f64.const 0x1.5d4374f124cccp-3)) (f64.const -0x1.5d436f8d1f15dp-3))\n\n;; Computations that round differently when computed via f32.\n(assert_return (invoke \"f64.sub\" (f64.const -0x1.18196bca005cfp-814) (f64.const -0x1.db7b01ce3f52fp-766)) (f64.const 0x1.db7b01ce3f51dp-766))\n(assert_return (invoke \"f64.sub\" (f64.const -0x1.d17b3528d219p+33) (f64.const 0x1.fd739d4ea220ap+367)) (f64.const -0x1.fd739d4ea220ap+367))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1.dea46994de319p+114) (f64.const 0x1.b5b19cd55c7d3p-590)) (f64.const 0x1.dea46994de319p+114))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1.b60f9b2fbd9ecp-489) (f64.const -0x1.6f81c59ec5b8ep-694)) (f64.const 0x1.b60f9b2fbd9ecp-489))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1.5e423fe8571f4p-57) (f64.const 0x1.9624ed7c162dfp-618)) (f64.const 0x1.5e423fe8571f4p-57))\n\n;; pow(e, π) - π\n;; https://xkcd.com/217/\n(assert_return (invoke \"f32.sub\" (f32.const 0x1.724046p+4) (f32.const 0x1.921fb6p+1)) (f32.const 0x1.3ffc5p+4))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1.724046eb0933ap+4) (f64.const 0x1.921fb54442d18p+1)) (f64.const 0x1.3ffc504280d97p+4))\n\n;; https://www.cnet.com/news/googles-calculator-muffs-some-math-problems/\n(assert_return (invoke \"f32.sub\" (f32.const 2999999) (f32.const 2999998)) (f32.const 1.0))\n(assert_return (invoke \"f32.sub\" (f32.const 1999999) (f32.const 1999995)) (f32.const 4.0))\n(assert_return (invoke \"f32.sub\" (f32.const 1999999) (f32.const 1999993)) (f32.const 6.0))\n(assert_return (invoke \"f32.sub\" (f32.const 400002) (f32.const 400001)) (f32.const 1.0))\n(assert_return (invoke \"f32.sub\" (f32.const 400002) (f32.const 400000)) (f32.const 2.0))\n(assert_return (invoke \"f64.sub\" (f64.const 2999999999999999) (f64.const 2999999999999998)) (f64.const 1.0))\n(assert_return (invoke \"f64.sub\" (f64.const 1999999999999999) (f64.const 1999999999999995)) (f64.const 4.0))\n(assert_return (invoke \"f64.sub\" (f64.const 1999999999999999) (f64.const 1999999999999993)) (f64.const 6.0))\n(assert_return (invoke \"f64.sub\" (f64.const 400000000000002) (f64.const 400000000000001)) (f64.const 1.0))\n(assert_return (invoke \"f64.sub\" (f64.const 400000000000002) (f64.const 400000000000000)) (f64.const 2.0))\n\n;; Min normal - max subnormal = min subnormal.\n(assert_return (invoke \"f32.sub\" (f32.const 0x1p-126) (f32.const 0x1.fffffcp-127)) (f32.const 0x1p-149))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1p-1022) (f64.const 0x0.fffffffffffffp-1022)) (f64.const 0x0.0000000000001p-1022))\n\n;; Test subtraction of numbers very close to 1.\n(assert_return (invoke \"f32.sub\" (f32.const 0x1.000002p+0) (f32.const 0x1.fffffep-1)) (f32.const 0x1.8p-23))\n(assert_return (invoke \"f32.sub\" (f32.const 0x1.000002p+0) (f32.const 0x1.0p+0)) (f32.const 0x1p-23))\n(assert_return (invoke \"f32.sub\" (f32.const 0x1p+0) (f32.const 0x1.fffffep-1)) (f32.const 0x1p-24))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1.0000000000001p+0) (f64.const 0x1.fffffffffffffp-1)) (f64.const 0x1.8p-52))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1.0000000000001p+0) (f64.const 0x1.0p+0)) (f64.const 0x1p-52))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp-1)) (f64.const 0x1p-53))\n\n;; Test the least value that can be subtracted from the max value to produce a\n;; different value.\n(assert_return (invoke \"f32.sub\" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+102)) (f32.const 0x1.fffffep+127))\n(assert_return (invoke \"f32.sub\" (f32.const 0x1.fffffep+127) (f32.const 0x1p+103)) (f32.const 0x1.fffffcp+127))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+969)) (f64.const 0x1.fffffffffffffp+1023))\n(assert_return (invoke \"f64.sub\" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+970)) (f64.const 0x1.ffffffffffffep+1023))\n\n;; Miscellaneous values.\n(assert_return (invoke \"f32.mul\" (f32.const 1e15) (f32.const 1e15)) (f32.const 0x1.93e592p+99))\n(assert_return (invoke \"f32.mul\" (f32.const 1e20) (f32.const 1e20)) (f32.const inf))\n(assert_return (invoke \"f32.mul\" (f32.const 1e25) (f32.const 1e25)) (f32.const inf))\n(assert_return (invoke \"f64.mul\" (f64.const 1e15) (f64.const 1e15)) (f64.const 0x1.93e5939a08ceap+99))\n(assert_return (invoke \"f64.mul\" (f64.const 1e20) (f64.const 1e20)) (f64.const 0x1.d6329f1c35ca5p+132))\n(assert_return (invoke \"f64.mul\" (f64.const 1e25) (f64.const 1e25)) (f64.const 0x1.11b0ec57e649bp+166))\n\n;; Test for a case of double rounding, example from:\n;; http://perso.ens-lyon.fr/jean-michel.muller/Handbook.html\n;; section 3.3.1: A typical problem: \"double rounding\"\n(assert_return (invoke \"f32.mul\" (f32.const 1848874880.0) (f32.const 19954563072.0)) (f32.const 0x1.000002p+65))\n(assert_return (invoke \"f64.mul\" (f64.const 1848874847.0) (f64.const 19954562207.0)) (f64.const 3.6893488147419111424e+19))\n\n;; Test for a historic spreadsheet bug.\n;; http://www.joelonsoftware.com/items/2007/09/26b.html\n(assert_return (invoke \"f32.mul\" (f32.const 77.1) (f32.const 850)) (f32.const 65535))\n(assert_return (invoke \"f64.mul\" (f64.const 77.1) (f64.const 850)) (f64.const 65534.99999999999272404))\n\n;; Computations that round differently in round-upward mode.\n(assert_return (invoke \"f32.mul\" (f32.const -0x1.14df2ep+61) (f32.const 0x1.748878p-36)) (f32.const -0x1.92e7e8p+25))\n(assert_return (invoke \"f32.mul\" (f32.const -0x1.5629e2p+102) (f32.const -0x1.c33012p-102)) (f32.const 0x1.2d8604p+1))\n(assert_return (invoke \"f32.mul\" (f32.const -0x1.b17694p+92) (f32.const -0x1.e4b56ap-97)) (f32.const 0x1.9a5baep-4))\n(assert_return (invoke \"f32.mul\" (f32.const -0x1.1626a6p+79) (f32.const -0x1.c57d7p-75)) (f32.const 0x1.ecbaaep+4))\n(assert_return (invoke \"f32.mul\" (f32.const 0x1.7acf72p+53) (f32.const 0x1.6c89acp+5)) (f32.const 0x1.0db556p+59))\n(assert_return (invoke \"f64.mul\" (f64.const -0x1.25c293f6f37e4p+425) (f64.const 0x1.f5fd4fa41c6d8p+945)) (f64.const -inf))\n(assert_return (invoke \"f64.mul\" (f64.const -0x1.cc1ae79fffc5bp-986) (f64.const -0x1.c36ccc2861ca6p-219)) (f64.const 0x0p+0))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.c0232b3e64b56p+606) (f64.const -0x1.f6939cf3affaap+106)) (f64.const -0x1.b7e3aedf190d3p+713))\n(assert_return (invoke \"f64.mul\" (f64.const -0x1.60f289966b271p-313) (f64.const 0x1.28a5497f0c259p+583)) (f64.const -0x1.98fc50bcec259p+270))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.37dab12d3afa2p+795) (f64.const 0x1.81e156bd393f1p-858)) (f64.const 0x1.d6126554b8298p-63))\n\n;; Computations that round differently in round-downward mode.\n(assert_return (invoke \"f32.mul\" (f32.const -0x1.3f57a2p-89) (f32.const -0x1.041d68p+92)) (f32.const 0x1.4479bp+3))\n(assert_return (invoke \"f32.mul\" (f32.const 0x1.4d0582p+73) (f32.const 0x1.6e043ap+19)) (f32.const 0x1.dc236p+92))\n(assert_return (invoke \"f32.mul\" (f32.const -0x1.2fdap-32) (f32.const -0x1.e1731cp+74)) (f32.const 0x1.1db89ep+43))\n(assert_return (invoke \"f32.mul\" (f32.const 0x1.7bc8fep+67) (f32.const -0x1.3ad592p+15)) (f32.const -0x1.d3115ep+82))\n(assert_return (invoke \"f32.mul\" (f32.const 0x1.936742p+30) (f32.const -0x1.a7a19p+66)) (f32.const -0x1.4dc71ap+97))\n(assert_return (invoke \"f64.mul\" (f64.const -0x1.ba737b4ca3b13p-639) (f64.const 0x1.8923309857438p-314)) (f64.const -0x1.53bc0d07baa37p-952))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.7c1932e610219p-276) (f64.const -0x1.2605db646489fp-635)) (f64.const -0x1.b48da2b0d2ae3p-911))\n(assert_return (invoke \"f64.mul\" (f64.const -0x1.e43cdf3b2108p+329) (f64.const -0x1.99d96abbd61d1p+835)) (f64.const inf))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.4c19466551da3p+947) (f64.const 0x1.0bdcd6c7646e9p-439)) (f64.const 0x1.5b7cd8c3f638ap+508))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.ff1da1726e3dfp+339) (f64.const -0x1.043c44f52b158p+169)) (f64.const -0x1.03c9364bb585cp+509))\n\n;; Computations that round differently in round-toward-zero mode.\n(assert_return (invoke \"f32.mul\" (f32.const -0x1.907e8ap+46) (f32.const -0x1.5d3668p+95)) (f32.const inf))\n(assert_return (invoke \"f32.mul\" (f32.const -0x1.8c9f74p-3) (f32.const 0x1.e2b452p-99)) (f32.const -0x1.75edccp-101))\n(assert_return (invoke \"f32.mul\" (f32.const -0x1.cc605ap-19) (f32.const 0x1.ec321ap+105)) (f32.const -0x1.ba91a4p+87))\n(assert_return (invoke \"f32.mul\" (f32.const -0x1.5fbb7ap+56) (f32.const 0x1.a8965ep-96)) (f32.const -0x1.23ae8ep-39))\n(assert_return (invoke \"f32.mul\" (f32.const -0x1.fb7f12p+16) (f32.const 0x1.3a701ap-119)) (f32.const -0x1.37ac0cp-102))\n(assert_return (invoke \"f64.mul\" (f64.const -0x1.5b0266454c26bp-496) (f64.const -0x1.af5787e3e0399p+433)) (f64.const 0x1.2457d81949e0bp-62))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.0d54a82393d45p+478) (f64.const -0x1.425760807ceaep-764)) (f64.const -0x1.532068c8d0d5dp-286))\n(assert_return (invoke \"f64.mul\" (f64.const -0x1.b532af981786p+172) (f64.const 0x1.ada95085ba36fp+359)) (f64.const -0x1.6ee38c1e01864p+532))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.e132f4d49d1cep+768) (f64.const -0x1.a75afe9a7d864p+374)) (f64.const -inf))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.68bbf1cfff90ap+81) (f64.const 0x1.09cd17d652c5p+70)) (f64.const 0x1.768b8d67d794p+151))\n\n;; Computations that round differently on x87.\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.f99fb602c89b7p-341) (f64.const 0x1.6caab46a31a2ep-575)) (f64.const 0x1.68201f986e9d7p-915))\n(assert_return (invoke \"f64.mul\" (f64.const -0x1.86999c5eee379p-9) (f64.const 0x1.6e3b9e0d53e0dp+723)) (f64.const -0x1.17654a0ef35f5p+715))\n(assert_return (invoke \"f64.mul\" (f64.const -0x1.069571b176f9p+367) (f64.const -0x1.e248b6ab0a0e3p-652)) (f64.const 0x1.eeaff575cae1dp-285))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.c217645777dd2p+775) (f64.const 0x1.d93f5715dd646p+60)) (f64.const 0x1.a0064aa1d920dp+836))\n(assert_return (invoke \"f64.mul\" (f64.const -0x1.848981b6e694ap-276) (f64.const 0x1.f5aacb64a0d19p+896)) (f64.const -0x1.7cb2296e6c2e5p+621))\n\n;; Computations that round differently on x87 in double-precision mode.\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.db3bd2a286944p-599) (f64.const 0x1.ce910af1d55cap-425)) (f64.const 0x0.d6accdd538a39p-1022))\n(assert_return (invoke \"f64.mul\" (f64.const -0x1.aca223916012p-57) (f64.const -0x1.2b2b4958dd228p-966)) (f64.const 0x0.fa74eccae5615p-1022))\n(assert_return (invoke \"f64.mul\" (f64.const -0x1.bd062def16cffp-488) (f64.const -0x1.7ddd91a0c4c0ep-536)) (f64.const 0x0.a5f4d7769d90dp-1022))\n(assert_return (invoke \"f64.mul\" (f64.const -0x1.c6a56169e9cep-772) (f64.const 0x1.517d55a474122p-255)) (f64.const -0x0.12baf260afb77p-1022))\n(assert_return (invoke \"f64.mul\" (f64.const -0x1.08951b0b41705p-516) (f64.const -0x1.102dc27168d09p-507)) (f64.const 0x0.8ca6dbf3f592bp-1022))\n\n;; Computations that round differently when computed via f32.\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.8d0dea50c8c9bp+852) (f64.const 0x1.21cac31d87a24p-881)) (f64.const 0x1.c177311f7cd73p-29))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.98049118e3063p-7) (f64.const 0x1.6362525151b58p-149)) (f64.const 0x1.1b358514103f9p-155))\n(assert_return (invoke \"f64.mul\" (f64.const -0x1.ea65cb0631323p+1) (f64.const 0x1.fce683201a19bp-41)) (f64.const -0x1.e76dc8c223667p-39))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.e4d235961d543p-373) (f64.const 0x1.bc56f20ef9a48p-205)) (f64.const 0x1.a4c09efcb71d6p-577))\n(assert_return (invoke \"f64.mul\" (f64.const -0x1.b9612e66faba8p+77) (f64.const 0x1.e2bc6aa782273p-348)) (f64.const -0x1.a026ea4f81db1p-270))\n\n;; Test the least positive value with a positive square.\n(assert_return (invoke \"f32.mul\" (f32.const 0x1p-75) (f32.const 0x1p-75)) (f32.const 0x0p+0))\n(assert_return (invoke \"f32.mul\" (f32.const 0x1.000002p-75) (f32.const 0x1.000002p-75)) (f32.const 0x1p-149))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.6a09e667f3bccp-538) (f64.const 0x1.6a09e667f3bccp-538)) (f64.const 0x0p+0))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.6a09e667f3bcdp-538) (f64.const 0x1.6a09e667f3bcdp-538)) (f64.const 0x0.0000000000001p-1022))\n\n;; Test the greatest positive value with a finite square.\n(assert_return (invoke \"f32.mul\" (f32.const 0x1.fffffep+63) (f32.const 0x1.fffffep+63)) (f32.const 0x1.fffffcp+127))\n(assert_return (invoke \"f32.mul\" (f32.const 0x1p+64) (f32.const 0x1p+64)) (f32.const inf))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.fffffffffffffp+511) (f64.const 0x1.fffffffffffffp+511)) (f64.const 0x1.ffffffffffffep+1023))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1p+512) (f64.const 0x1p+512)) (f64.const inf))\n\n;; Test the squares of values very close to 1.\n(assert_return (invoke \"f32.mul\" (f32.const 0x1.000002p+0) (f32.const 0x1.000002p+0)) (f32.const 0x1.000004p+0))\n(assert_return (invoke \"f32.mul\" (f32.const 0x1.fffffep-1) (f32.const 0x1.fffffep-1)) (f32.const 0x1.fffffcp-1))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.0000000000001p+0) (f64.const 0x1.0000000000001p+0)) (f64.const 0x1.0000000000002p+0))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.fffffffffffffp-1) (f64.const 0x1.fffffffffffffp-1)) (f64.const 0x1.ffffffffffffep-1))\n\n;; Test multiplication of numbers very close to 1.\n(assert_return (invoke \"f32.mul\" (f32.const 0x1.000002p+0) (f32.const 0x1.fffffep-1)) (f32.const 0x1p+0))\n(assert_return (invoke \"f32.mul\" (f32.const 0x1.000004p+0) (f32.const 0x1.fffffcp-1)) (f32.const 0x1.000002p+0))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.0000000000001p+0) (f64.const 0x1.fffffffffffffp-1)) (f64.const 0x1p+0))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1.0000000000002p+0) (f64.const 0x1.ffffffffffffep-1)) (f64.const 0x1.0000000000001p+0))\n\n;; Test MIN * EPSILON.\n;; http://www.mpfr.org/mpfr-2.0.1/patch2\n(assert_return (invoke \"f32.mul\" (f32.const 0x1p-126) (f32.const 0x1p-23)) (f32.const 0x1p-149))\n(assert_return (invoke \"f64.mul\" (f64.const 0x1p-1022) (f64.const 0x1p-52)) (f64.const 0x0.0000000000001p-1022))\n\n;; http://opencores.org/bug,view,2454\n(assert_return (invoke \"f32.mul\" (f32.const -0x1.0006p+4) (f32.const 0x1.ap-132)) (f32.const -0x1.a009cp-128))\n\n;; Miscellaneous values.\n(assert_return (invoke \"f32.div\" (f32.const 1.123456789) (f32.const 100)) (f32.const 0x1.702264p-7))\n(assert_return (invoke \"f32.div\" (f32.const 8391667.0) (f32.const 12582905.0)) (f32.const 0x1.55754p-1))\n(assert_return (invoke \"f32.div\" (f32.const 65536.0) (f32.const 0x1p-37)) (f32.const 0x1p+53))\n(assert_return (invoke \"f32.div\" (f32.const 0x1.dcbf6ap+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.dcbf68p-128))\n(assert_return (invoke \"f32.div\" (f32.const 4) (f32.const 3)) (f32.const 0x1.555556p+0))\n(assert_return (invoke \"f64.div\" (f64.const 1.123456789) (f64.const 100)) (f64.const 0.01123456789))\n(assert_return (invoke \"f64.div\" (f64.const 8391667.0) (f64.const 12582905.0)) (f64.const 0x1.55753f1d9ba27p-1))\n(assert_return (invoke \"f64.div\" (f64.const 65536.0) (f64.const 0x1p-37)) (f64.const 0x1p+53))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.dcbf6ap+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.772fda8p-1022))\n(assert_return (invoke \"f64.div\" (f64.const 4) (f64.const 3)) (f64.const 0x1.5555555555555p+0))\n\n;; Test for a historic hardware bug.\n;; https://en.wikipedia.org/wiki/Pentium_FDIV_bug\n(assert_return (invoke \"f32.div\" (f32.const 4195835) (f32.const 3145727)) (f32.const 0x1.557542p+0))\n(assert_return (invoke \"f64.div\" (f64.const 4195835) (f64.const 3145727)) (f64.const 0x1.557541c7c6b43p+0))\n\n;; Computations that round differently in round-upward mode.\n(assert_return (invoke \"f32.div\" (f32.const 0x1.6a6c5ap-48) (f32.const 0x1.fa0b7p+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"f32.div\" (f32.const 0x1.616fb2p-87) (f32.const 0x1.332172p+68)) (f32.const 0x0p+0))\n(assert_return (invoke \"f32.div\" (f32.const -0x1.96e778p+16) (f32.const 0x1.eb0c56p-80)) (f32.const -0x1.a8440ap+95))\n(assert_return (invoke \"f32.div\" (f32.const -0x1.e2624p-76) (f32.const -0x1.ed236ep-122)) (f32.const 0x1.f4d584p+45))\n(assert_return (invoke \"f32.div\" (f32.const -0x1.e2374ep+41) (f32.const 0x1.71fcdcp-80)) (f32.const -0x1.4da706p+121))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.163c09d0c38c1p+147) (f64.const 0x1.e04cc737348e6p+223)) (f64.const 0x1.289921caeed23p-77))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.d6867e741e0a9p-626) (f64.const 0x1.335eb19a9aae4p-972)) (f64.const 0x1.87e342d11f519p+346))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.d5edf648aeb98p+298) (f64.const 0x1.0dda15b079355p+640)) (f64.const -0x1.bdceaf9734b5cp-342))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.b683e3934aedap+691) (f64.const 0x1.c364e1df00dffp+246)) (f64.const -0x1.f16456e7afe3bp+444))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.44ca7539cc851p+540) (f64.const 0x1.58501bccc58fep+453)) (f64.const -0x1.e2f8657e0924ep+86))\n\n;; Computations that round differently in round-downward mode.\n(assert_return (invoke \"f32.div\" (f32.const -0x1.c2c54ap+69) (f32.const -0x1.00d142p-86)) (f32.const inf))\n(assert_return (invoke \"f32.div\" (f32.const 0x1.e35abep-46) (f32.const 0x1.c69dfp+44)) (f32.const 0x1.102eb4p-90))\n(assert_return (invoke \"f32.div\" (f32.const 0x1.45ff2ap+0) (f32.const -0x1.1e8754p+89)) (f32.const -0x1.23434ep-89))\n(assert_return (invoke \"f32.div\" (f32.const 0x1.8db18ap-51) (f32.const 0x1.47c678p-128)) (f32.const 0x1.369b96p+77))\n(assert_return (invoke \"f32.div\" (f32.const 0x1.78599p+90) (f32.const 0x1.534144p+87)) (f32.const 0x1.1bfddcp+3))\n(assert_return (invoke \"f64.div\" (f64.const 0x0.f331c4f47eb51p-1022) (f64.const -0x1.c7ff45bf6f03ap+362)) (f64.const -0x0p+0))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.0fc8707b9d19cp-987) (f64.const 0x1.77524d5f4a563p-536)) (f64.const -0x1.72c1a937d231p-452))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.edb3aa64bb338p-403) (f64.const -0x1.1c7c164320e4p+45)) (f64.const 0x1.bc44cc1c5ae63p-448))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.6534b34e8686bp+80) (f64.const 0x1.c34a7fc59e3c3p-791)) (f64.const -0x1.95421bf291b66p+870))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.91f58d7ed1237p+236) (f64.const -0x1.f190d808383c8p+55)) (f64.const 0x1.9d9eb0836f906p+180))\n\n;; Computations that round differently in round-toward-zero mode.\n(assert_return (invoke \"f32.div\" (f32.const 0x1.64b2a4p+26) (f32.const 0x1.e95752p-119)) (f32.const inf))\n(assert_return (invoke \"f32.div\" (f32.const -0x1.53c9b6p+77) (f32.const 0x1.d689ap+27)) (f32.const -0x1.71baa4p+49))\n(assert_return (invoke \"f32.div\" (f32.const 0x1.664a8ap+38) (f32.const -0x1.59dba2p+96)) (f32.const -0x1.0933f4p-58))\n(assert_return (invoke \"f32.div\" (f32.const -0x1.99e0fap+111) (f32.const -0x1.c2b5a8p+9)) (f32.const 0x1.d19de6p+101))\n(assert_return (invoke \"f32.div\" (f32.const -0x1.5a815ap+92) (f32.const -0x1.b5820ap+13)) (f32.const 0x1.9580b8p+78))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.81fd1e2af7bebp-655) (f64.const 0x1.edefc4eae536cp-691)) (f64.const -0x1.901abdd91b661p+35))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.47cf932953c43p+782) (f64.const -0x1.bc40496b1f2a1p-553)) (f64.const inf))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.2bd2e8fbdcad7p-746) (f64.const 0x1.b115674cc476ep-65)) (f64.const -0x1.62752bf19fa81p-682))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.f923e3fea9efep+317) (f64.const -0x1.8044c74d27a39p-588)) (f64.const 0x1.5086518cc7186p+905))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.516ed2051d6bbp+181) (f64.const -0x1.c9f455eb9c2eep+214)) (f64.const -0x1.79414d67f2889p-34))\n\n;; Computations that round differently on x87.\n(assert_return (invoke \"f64.div\" (f64.const -0x1.9c52726aed366p+585) (f64.const -0x1.7d0568c75660fp+195)) (f64.const 0x1.1507ca2a65f23p+390))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.522672f461667p+546) (f64.const -0x1.36d36572c9f71p+330)) (f64.const 0x1.1681369370619p+216))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.01051b4e8cd61p+185) (f64.const -0x1.2cbb5ca3d33ebp+965)) (f64.const -0x1.b59471598a2f3p-781))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.5f93bb80fc2cbp+217) (f64.const 0x1.7e051aae9f0edp+427)) (f64.const 0x1.d732fa926ba4fp-211))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.e251d762163ccp+825) (f64.const 0x1.3ee63581e1796p+349)) (f64.const -0x1.8330077d90a07p+476))\n\n;; Computations that round differently on x87 in double-precision mode.\n(assert_return (invoke \"f64.div\" (f64.const 0x1.dcbf69f10006dp+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.772fda7c4001bp-1022))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.e14169442fbcap-1011) (f64.const 0x1.505451d62ff7dp+12)) (f64.const 0x0.b727e85f38b39p-1022))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.d3ebe726ec964p-144) (f64.const -0x1.4a7bfc0b83608p+880)) (f64.const 0x0.5a9d8c50cbf87p-1022))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.6c3def770aee1p-393) (f64.const -0x1.8b84724347598p+631)) (f64.const 0x0.3af0707fcd0c7p-1022))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.16abda1bb3cb3p-856) (f64.const 0x1.6c9c7198eb1e6p+166)) (f64.const 0x0.c3a8fd6741649p-1022))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.7057d6ab553cap-1005) (f64.const -0x1.2abf1e98660ebp+23)) (f64.const -0x0.04ee8d8ec01cdp-1022))\n\n;; Computations that round differently when div is mul by reciprocal.\n(assert_return (invoke \"f32.div\" (f32.const 0x1.ada9aap+89) (f32.const 0x1.69884cp+42)) (f32.const 0x1.303e2ep+47))\n(assert_return (invoke \"f32.div\" (f32.const 0x1.8281c8p+90) (f32.const -0x1.62883cp+106)) (f32.const -0x1.17169cp-16))\n(assert_return (invoke \"f32.div\" (f32.const 0x1.5c6be2p+81) (f32.const 0x1.d01dfep-1)) (f32.const 0x1.805e32p+81))\n(assert_return (invoke \"f32.div\" (f32.const -0x1.bbd252p+19) (f32.const -0x1.fba95p+33)) (f32.const 0x1.bf9d56p-15))\n(assert_return (invoke \"f32.div\" (f32.const -0x1.0f41d6p-42) (f32.const -0x1.3f2dbep+56)) (f32.const 0x1.b320d8p-99))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.b2348a1c81899p+61) (f64.const -0x1.4a58aad903dd3p-861)) (f64.const -0x1.507c1e2a41b35p+922))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.23fa5137a918ap-130) (f64.const -0x1.7268db1951263p-521)) (f64.const -0x1.93965e0d896bep+390))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.dcb3915d82deep+669) (f64.const 0x1.50caaa1dc6b19p+638)) (f64.const 0x1.6a58ec814b09dp+31))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.046e378c0cc46p+182) (f64.const 0x1.ac925009a922bp+773)) (f64.const -0x1.3720aa94dab18p-592))\n(assert_return (invoke \"f64.div\" (f64.const -0x1.8945fd69d8e11p-871) (f64.const -0x1.0a37870af809ap-646)) (f64.const 0x1.7a2e286c62382p-225))\n\n;; Computations that round differently when computed via f32.\n(assert_return (invoke \"f64.div\" (f64.const 0x1.82002af0ea1f3p-57) (f64.const 0x1.d0a9b0c2fa339p+0)) (f64.const 0x1.a952fbd1fc17cp-58))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.1e12b515db471p-102) (f64.const -0x1.41fc3c94fba5p-42)) (f64.const -0x1.c6e50cccb7cb6p-61))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.aba5adcd6f583p-41) (f64.const 0x1.17dfac639ce0fp-112)) (f64.const 0x1.872b0a008c326p+71))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.cf82510d0ae6bp+89) (f64.const 0x1.0207d86498053p+97)) (f64.const 0x1.cbdc804e2cf14p-8))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.4c82cbb508e21p-11) (f64.const -0x1.6b57208c2d5d5p+52)) (f64.const -0x1.d48e8b369129ap-64))\n\n;; Division involving the maximum subnormal value and the minimum normal value.\n(assert_return (invoke \"f32.div\" (f32.const 0x1p-126) (f32.const 0x1.fffffcp-127)) (f32.const 0x1.000002p+0))\n(assert_return (invoke \"f32.div\" (f32.const 0x1.fffffcp-127) (f32.const 0x1p-126)) (f32.const 0x1.fffffcp-1))\n(assert_return (invoke \"f64.div\" (f64.const 0x1p-1022) (f64.const 0x0.fffffffffffffp-1022)) (f64.const 0x1.0000000000001p+0))\n(assert_return (invoke \"f64.div\" (f64.const 0x0.fffffffffffffp-1022) (f64.const 0x1p-1022)) (f64.const 0x1.ffffffffffffep-1))\n\n;; Test the least positive value with a positive quotient with the maximum value.\n(assert_return (invoke \"f32.div\" (f32.const 0x1.fffffep-23) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))\n(assert_return (invoke \"f32.div\" (f32.const 0x1p-22) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-149))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.fffffffffffffp-52) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))\n(assert_return (invoke \"f64.div\" (f64.const 0x1p-51) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022))\n\n;; Test the least positive value with a finite reciprocal.\n(assert_return (invoke \"f32.div\" (f32.const 1.0) (f32.const 0x1p-128)) (f32.const inf))\n(assert_return (invoke \"f32.div\" (f32.const 1.0) (f32.const 0x1.000008p-128)) (f32.const 0x1.fffffp+127))\n(assert_return (invoke \"f64.div\" (f64.const 1.0) (f64.const 0x0.4p-1022)) (f64.const inf))\n(assert_return (invoke \"f64.div\" (f64.const 1.0) (f64.const 0x0.4000000000001p-1022)) (f64.const 0x1.ffffffffffff8p+1023))\n\n;; Test the least positive value that has a subnormal reciprocal.\n(assert_return (invoke \"f32.div\" (f32.const 1.0) (f32.const 0x1.000002p+126)) (f32.const 0x1.fffffcp-127))\n(assert_return (invoke \"f32.div\" (f32.const 1.0) (f32.const 0x1p+126)) (f32.const 0x1p-126))\n(assert_return (invoke \"f64.div\" (f64.const 1.0) (f64.const 0x1.0000000000001p+1022)) (f64.const 0x0.fffffffffffffp-1022))\n(assert_return (invoke \"f64.div\" (f64.const 1.0) (f64.const 0x1p+1022)) (f64.const 0x1p-1022))\n\n;; Test that the last binary digit of 1.0/3.0 is even in f32,\n;; https://en.wikipedia.org/wiki/Single-precision_floating-point_format#Single-precision_examples\n;;\n;; and odd in f64,\n;; https://en.wikipedia.org/wiki/Double-precision_floating-point_format#Double-precision_examples\n;;\n;; and that 1.0/3.0, 3.0/9.0, and 9.0/27.0 all agree.\n;; http://www.netlib.org/paranoia\n(assert_return (invoke \"f32.div\" (f32.const 0x1p+0) (f32.const 0x1.8p+1)) (f32.const 0x1.555556p-2))\n(assert_return (invoke \"f32.div\" (f32.const 0x3p+0) (f32.const 0x1.2p+3)) (f32.const 0x1.555556p-2))\n(assert_return (invoke \"f32.div\" (f32.const 0x1.2p+3) (f32.const 0x1.bp+4)) (f32.const 0x1.555556p-2))\n(assert_return (invoke \"f64.div\" (f64.const 0x1p+0) (f64.const 0x1.8p+1)) (f64.const 0x1.5555555555555p-2))\n(assert_return (invoke \"f64.div\" (f64.const 0x3p+0) (f64.const 0x1.2p+3)) (f64.const 0x1.5555555555555p-2))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.2p+3) (f64.const 0x1.bp+4)) (f64.const 0x1.5555555555555p-2))\n\n;; Test division of numbers very close to 1.\n(assert_return (invoke \"f32.div\" (f32.const 0x1.000002p+0) (f32.const 0x1.fffffep-1)) (f32.const 0x1.000004p+0))\n(assert_return (invoke \"f32.div\" (f32.const 0x1.fffffep-1) (f32.const 0x1.000002p+0)) (f32.const 0x1.fffffap-1))\n(assert_return (invoke \"f32.div\" (f32.const 0x1.0p+0) (f32.const 0x1.fffffep-1)) (f32.const 0x1.000002p+0))\n(assert_return (invoke \"f32.div\" (f32.const 0x1.0p+0) (f32.const 0x1.000002p+0)) (f32.const 0x1.fffffcp-1))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.0000000000001p+0) (f64.const 0x1.fffffffffffffp-1)) (f64.const 0x1.0000000000002p+0))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.fffffffffffffp-1) (f64.const 0x1.0000000000001p+0)) (f64.const 0x1.ffffffffffffdp-1))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.0p+0) (f64.const 0x1.fffffffffffffp-1)) (f64.const 0x1.0000000000001p+0))\n(assert_return (invoke \"f64.div\" (f64.const 0x1.0p+0) (f64.const 0x1.0000000000001p+0)) (f64.const 0x1.ffffffffffffep-1))\n\n;; Test for bugs found in an early RISC-V implementation.\n;; https://github.com/riscv/riscv-tests/pull/8\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.56p+7)) (f32.const 0x1.a2744cp+3))\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.594dfcp-23)) (f32.const 0x1.a4789cp-12))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.56p+7)) (f64.const 0x1.a2744ce9674f5p+3))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.594dfc70aa105p-23)) (f64.const 0x1.a4789c0e37f99p-12))\n\n;; Computations that round differently on x87.\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.0263fcc94f259p-164)) (f64.const 0x1.0131485de579fp-82))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.352dfa278c43dp+338)) (f64.const 0x1.195607dac5417p+169))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.b15daa23924fap+402)) (f64.const 0x1.4d143db561493p+201))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.518c8e68cb753p-37)) (f64.const 0x1.9fb8ef1ad5bfdp-19))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.86d8b6518078ep-370)) (f64.const 0x1.3c5142a48fcadp-185))\n\n;; Test another sqrt case on x87.\n;; https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52593\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.fffffffffffffp-1)) (f64.const 0x1.fffffffffffffp-1))\n\n;; Computations that round differently in round-upward mode.\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.098064p-3)) (f32.const 0x1.70b23p-2))\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.d9befp+100)) (f32.const 0x1.5c4052p+50))\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.42b5b6p-4)) (f32.const 0x1.1f6d0ep-2))\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.3684dp-71)) (f32.const 0x1.8ebae2p-36))\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.d8bc4ep-11)) (f32.const 0x1.ebf9eap-6))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.5c39f220d5704p-924)) (f64.const 0x1.2a92bc24ceae9p-462))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.53521a635745cp+727)) (f64.const 0x1.a0cfdc4ef8ff1p+363))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.dfd5bbc9f4678p+385)) (f64.const 0x1.efa817117c94cp+192))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.33f9640811cd4p+105)) (f64.const 0x1.8d17c9243baa3p+52))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.6c0ef0267ff45p+999)) (f64.const 0x1.afbcfae3f2b4p+499))\n\n;; Computations that round differently in round-downward mode.\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.26a62ep+27)) (f32.const 0x1.84685p+13))\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.166002p-113)) (f32.const 0x1.798762p-57))\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.3dfb5p-15)) (f32.const 0x1.937e38p-8))\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.30eb2cp-120)) (f32.const 0x1.176406p-60))\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.cb705cp-123)) (f32.const 0x1.e5020ap-62))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.edae8aea0543p+695)) (f64.const 0x1.f6c1ea4fc8dd2p+347))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.f7ee4bda5c9c3p-763)) (f64.const 0x1.fbf30bdaf11c5p-382))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.a48f348266ad1p-30)) (f64.const 0x1.481ee7540baf7p-15))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.feb5a1ce3ed9cp-242)) (f64.const 0x1.6995060c20d46p-121))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.957d9796e3834p+930)) (f64.const 0x1.42305213157bap+465))\n\n;; Computations that round differently in round-toward-zero mode.\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.65787cp+118)) (f32.const 0x1.2e82a4p+59))\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.736044p+15)) (f32.const 0x1.b40e4p+7))\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.a00edp-1)) (f32.const 0x1.cd8aecp-1))\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.7a4c8p-87)) (f32.const 0x1.b819e4p-44))\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.5d24d4p-94)) (f32.const 0x1.2af75ep-47))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.a008948ead274p+738)) (f64.const 0x1.4659b37c39b19p+369))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.70f6199ed21f5p-381)) (f64.const 0x1.b2a2bddf3300dp-191))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.35c1d49f2a352p+965)) (f64.const 0x1.8e3d9f01a9716p+482))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.3fbdcfb2b2a15p-45)) (f64.const 0x1.949ba4feca42ap-23))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.c201b94757145p-492)) (f64.const 0x1.5369ee6bf2967p-246))\n\n;; Computations that round differently when computed via f32.\n(assert_return (invoke \"f64.sqrt\" (f64.const -0x1.360e8d0032adp-963)) (f64.const nan:canonical))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.d9a6f5eef0503p+103)) (f64.const 0x1.ec73f56c166f6p+51))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.aa051a5c4ec27p-760)) (f64.const 0x1.4a3e771ff5149p-380))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.e5522a741babep-276)) (f64.const 0x1.607ae2b6feb7dp-138))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.4832badc0c061p+567)) (f64.const 0x1.99ec7934139b2p+283))\n\n;; Test the least value with a sqrt that rounds to one.\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.000002p+0)) (f32.const 0x1p+0))\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.000004p+0)) (f32.const 0x1.000002p+0))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.0000000000001p+0)) (f64.const 0x1p+0))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.0000000000002p+0)) (f64.const 0x1.0000000000001p+0))\n\n;; Test the greatest value less than one for which sqrt is not an identity.\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.fffffcp-1)) (f32.const 0x1.fffffep-1))\n(assert_return (invoke \"f32.sqrt\" (f32.const 0x1.fffffap-1)) (f32.const 0x1.fffffcp-1))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.ffffffffffffep-1)) (f64.const 0x1.fffffffffffffp-1))\n(assert_return (invoke \"f64.sqrt\" (f64.const 0x1.ffffffffffffdp-1)) (f64.const 0x1.ffffffffffffep-1))\n\n;; Test that the bitwise floating point operators are bitwise on NaN.\n\n(assert_return (invoke \"f32.abs\" (f32.const nan:0x0f1e2)) (f32.const nan:0x0f1e2))\n(assert_return (invoke \"f32.abs\" (f32.const -nan:0x0f1e2)) (f32.const nan:0x0f1e2))\n(assert_return (invoke \"f64.abs\" (f64.const nan:0x0f1e27a6b)) (f64.const nan:0x0f1e27a6b))\n(assert_return (invoke \"f64.abs\" (f64.const -nan:0x0f1e27a6b)) (f64.const nan:0x0f1e27a6b))\n\n(assert_return (invoke \"f32.neg\" (f32.const nan:0x0f1e2)) (f32.const -nan:0x0f1e2))\n(assert_return (invoke \"f32.neg\" (f32.const -nan:0x0f1e2)) (f32.const nan:0x0f1e2))\n(assert_return (invoke \"f64.neg\" (f64.const nan:0x0f1e27a6b)) (f64.const -nan:0x0f1e27a6b))\n(assert_return (invoke \"f64.neg\" (f64.const -nan:0x0f1e27a6b)) (f64.const nan:0x0f1e27a6b))\n\n(assert_return (invoke \"f32.copysign\" (f32.const nan:0x0f1e2) (f32.const nan)) (f32.const nan:0x0f1e2))\n(assert_return (invoke \"f32.copysign\" (f32.const nan:0x0f1e2) (f32.const -nan)) (f32.const -nan:0x0f1e2))\n(assert_return (invoke \"f32.copysign\" (f32.const -nan:0x0f1e2) (f32.const nan)) (f32.const nan:0x0f1e2))\n(assert_return (invoke \"f32.copysign\" (f32.const -nan:0x0f1e2) (f32.const -nan)) (f32.const -nan:0x0f1e2))\n(assert_return (invoke \"f64.copysign\" (f64.const nan:0x0f1e27a6b) (f64.const nan)) (f64.const nan:0x0f1e27a6b))\n(assert_return (invoke \"f64.copysign\" (f64.const nan:0x0f1e27a6b) (f64.const -nan)) (f64.const -nan:0x0f1e27a6b))\n(assert_return (invoke \"f64.copysign\" (f64.const -nan:0x0f1e27a6b) (f64.const nan)) (f64.const nan:0x0f1e27a6b))\n(assert_return (invoke \"f64.copysign\" (f64.const -nan:0x0f1e27a6b) (f64.const -nan)) (f64.const -nan:0x0f1e27a6b))\n\n;; Test values close to 1.0.\n(assert_return (invoke \"f32.ceil\" (f32.const 0x1.fffffep-1)) (f32.const 1.0))\n(assert_return (invoke \"f32.ceil\" (f32.const 0x1.000002p+0)) (f32.const 2.0))\n(assert_return (invoke \"f64.ceil\" (f64.const 0x1.fffffffffffffp-1)) (f64.const 1.0))\n(assert_return (invoke \"f64.ceil\" (f64.const 0x1.0000000000001p+0)) (f64.const 2.0))\n\n;; Test the maximum and minimum value for which ceil is not an identity operator.\n(assert_return (invoke \"f32.ceil\" (f32.const 0x1.fffffep+22)) (f32.const 0x1p+23))\n(assert_return (invoke \"f32.ceil\" (f32.const -0x1.fffffep+22)) (f32.const -0x1.fffffcp+22))\n(assert_return (invoke \"f64.ceil\" (f64.const 0x1.fffffffffffffp+51)) (f64.const 0x1p+52))\n(assert_return (invoke \"f64.ceil\" (f64.const -0x1.fffffffffffffp+51)) (f64.const -0x1.ffffffffffffep+51))\n\n;; Test that implementations don't do the x+0x1p52-0x1p52 trick outside the\n;; range where it's safe.\n(assert_return (invoke \"f32.ceil\" (f32.const 0x1.fffffep+23)) (f32.const 0x1.fffffep+23))\n(assert_return (invoke \"f32.ceil\" (f32.const -0x1.fffffep+23)) (f32.const -0x1.fffffep+23))\n(assert_return (invoke \"f64.ceil\" (f64.const 0x1.fffffffffffffp+52)) (f64.const 0x1.fffffffffffffp+52))\n(assert_return (invoke \"f64.ceil\" (f64.const -0x1.fffffffffffffp+52)) (f64.const -0x1.fffffffffffffp+52))\n\n;; Test values close to -1.0.\n(assert_return (invoke \"f32.floor\" (f32.const -0x1.fffffep-1)) (f32.const -1.0))\n(assert_return (invoke \"f32.floor\" (f32.const -0x1.000002p+0)) (f32.const -2.0))\n(assert_return (invoke \"f64.floor\" (f64.const -0x1.fffffffffffffp-1)) (f64.const -1.0))\n(assert_return (invoke \"f64.floor\" (f64.const -0x1.0000000000001p+0)) (f64.const -2.0))\n\n;; Test the maximum and minimum value for which floor is not an identity operator.\n(assert_return (invoke \"f32.floor\" (f32.const -0x1.fffffep+22)) (f32.const -0x1p+23))\n(assert_return (invoke \"f32.floor\" (f32.const 0x1.fffffep+22)) (f32.const 0x1.fffffcp+22))\n(assert_return (invoke \"f64.floor\" (f64.const -0x1.fffffffffffffp+51)) (f64.const -0x1p+52))\n(assert_return (invoke \"f64.floor\" (f64.const 0x1.fffffffffffffp+51)) (f64.const 0x1.ffffffffffffep+51))\n\n;; Test that floor isn't implemented as XMVectorFloor.\n;; http://dss.stephanierct.com/DevBlog/?p=8#comment-4\n(assert_return (invoke \"f32.floor\" (f32.const 88607.0)) (f32.const 88607.0))\n(assert_return (invoke \"f64.floor\" (f64.const 88607.0)) (f64.const 88607.0))\n\n;; Test the maximum and minimum value for which trunc is not an identity operator.\n(assert_return (invoke \"f32.trunc\" (f32.const -0x1.fffffep+22)) (f32.const -0x1.fffffcp+22))\n(assert_return (invoke \"f32.trunc\" (f32.const 0x1.fffffep+22)) (f32.const 0x1.fffffcp+22))\n(assert_return (invoke \"f64.trunc\" (f64.const -0x1.fffffffffffffp+51)) (f64.const -0x1.ffffffffffffep+51))\n(assert_return (invoke \"f64.trunc\" (f64.const 0x1.fffffffffffffp+51)) (f64.const 0x1.ffffffffffffep+51))\n\n;; Test that nearest isn't implemented naively.\n;; http://blog.frama-c.com/index.php?post/2013/05/02/nearbyintf1\n;; http://blog.frama-c.com/index.php?post/2013/05/04/nearbyintf3\n(assert_return (invoke \"f32.nearest\" (f32.const 0x1.000002p+23)) (f32.const 0x1.000002p+23))\n(assert_return (invoke \"f32.nearest\" (f32.const 0x1.000004p+23)) (f32.const 0x1.000004p+23))\n(assert_return (invoke \"f32.nearest\" (f32.const 0x1.fffffep-2)) (f32.const 0.0))\n(assert_return (invoke \"f32.nearest\" (f32.const 0x1.fffffep+47)) (f32.const 0x1.fffffep+47))\n(assert_return (invoke \"f64.nearest\" (f64.const 0x1.0000000000001p+52)) (f64.const 0x1.0000000000001p+52))\n(assert_return (invoke \"f64.nearest\" (f64.const 0x1.0000000000002p+52)) (f64.const 0x1.0000000000002p+52))\n(assert_return (invoke \"f64.nearest\" (f64.const 0x1.fffffffffffffp-2)) (f64.const 0.0))\n(assert_return (invoke \"f64.nearest\" (f64.const 0x1.fffffffffffffp+105)) (f64.const 0x1.fffffffffffffp+105))\n\n;; Nearest should not round halfway cases away from zero (as C's round(3) does)\n;; or up (as JS's Math.round does).\n(assert_return (invoke \"f32.nearest\" (f32.const 4.5)) (f32.const 4.0))\n(assert_return (invoke \"f32.nearest\" (f32.const -4.5)) (f32.const -4.0))\n(assert_return (invoke \"f32.nearest\" (f32.const -3.5)) (f32.const -4.0))\n(assert_return (invoke \"f64.nearest\" (f64.const 4.5)) (f64.const 4.0))\n(assert_return (invoke \"f64.nearest\" (f64.const -4.5)) (f64.const -4.0))\n(assert_return (invoke \"f64.nearest\" (f64.const -3.5)) (f64.const -4.0))\n\n;; Test the maximum and minimum value for which nearest is not an identity operator.\n(assert_return (invoke \"f32.nearest\" (f32.const -0x1.fffffep+22)) (f32.const -0x1p+23))\n(assert_return (invoke \"f32.nearest\" (f32.const 0x1.fffffep+22)) (f32.const 0x1p+23))\n(assert_return (invoke \"f64.nearest\" (f64.const -0x1.fffffffffffffp+51)) (f64.const -0x1p+52))\n(assert_return (invoke \"f64.nearest\" (f64.const 0x1.fffffffffffffp+51)) (f64.const 0x1p+52))\n"
  },
  {
    "path": "test/core/forward.wast",
    "content": "(module\n  (func $even (export \"even\") (param $n i32) (result i32)\n    (if (result i32) (i32.eq (local.get $n) (i32.const 0))\n      (then (i32.const 1))\n      (else (call $odd (i32.sub (local.get $n) (i32.const 1))))\n    )\n  )\n\n  (func $odd (export \"odd\") (param $n i32) (result i32)\n    (if (result i32) (i32.eq (local.get $n) (i32.const 0))\n      (then (i32.const 0))\n      (else (call $even (i32.sub (local.get $n) (i32.const 1))))\n    )\n  )\n)\n\n(assert_return (invoke \"even\" (i32.const 13)) (i32.const 0))\n(assert_return (invoke \"even\" (i32.const 20)) (i32.const 1))\n(assert_return (invoke \"odd\" (i32.const 13)) (i32.const 1))\n(assert_return (invoke \"odd\" (i32.const 20)) (i32.const 0))\n"
  },
  {
    "path": "test/core/func.wast",
    "content": ";; Test `func` declarations, i.e. functions\n\n(module\n  ;; Auxiliary definition\n  (type $sig (func))\n  (func $dummy)\n\n  ;; Syntax\n\n  (func)\n  (func (export \"f\"))\n  (func $f)\n  (func $h (export \"g\"))\n\n  (func (local))\n  (func (local) (local))\n  (func (local i32))\n  (func (local $x i32))\n  (func (local i32 f64 i64))\n  (func (local i32) (local f64))\n  (func (local i32 f32) (local $x i64) (local) (local i32 f64))\n\n  (func (param))\n  (func (param) (param))\n  (func (param i32))\n  (func (param $x i32))\n  (func (param i32 f64 i64))\n  (func (param i32) (param f64))\n  (func (param i32 f32) (param $x i64) (param) (param i32 f64))\n\n  (func (result))\n  (func (result) (result))\n  (func (result i32) (unreachable))\n  (func (result i32 f64 f32) (unreachable))\n  (func (result i32) (result f64) (unreachable))\n  (func (result i32 f32) (result i64) (result) (result i32 f64) (unreachable))\n\n  (type $sig-1 (func))\n  (type $sig-2 (func (result i32)))\n  (type $sig-3 (func (param $x i32)))\n  (type $sig-4 (func (param i32 f64 i32) (result i32)))\n\n  (func (export \"type-use-1\") (type $sig-1))\n  (func (export \"type-use-2\") (type $sig-2) (i32.const 0))\n  (func (export \"type-use-3\") (type $sig-3))\n  (func (export \"type-use-4\") (type $sig-4) (i32.const 0))\n  (func (export \"type-use-5\") (type $sig-2) (result i32) (i32.const 0))\n  (func (export \"type-use-6\") (type $sig-3) (param i32))\n  (func (export \"type-use-7\")\n    (type $sig-4) (param i32) (param f64 i32) (result i32) (i32.const 0)\n  )\n\n  (func (type $sig))\n  (func (type $forward))  ;; forward reference\n\n  (func $complex\n    (param i32 f32) (param $x i64) (param) (param i32)\n    (result) (result i32) (result) (result i64 i32)\n    (local f32) (local $y i32) (local i64 i32) (local) (local f64 i32)\n    (unreachable) (unreachable)\n  )\n  (func $complex-sig\n    (type $sig)\n    (local f32) (local $y i32) (local i64 i32) (local) (local f64 i32)\n    (unreachable) (unreachable)\n  )\n\n  (type $forward (func))\n\n  ;; Typing of locals\n\n  (func (export \"local-first-i32\") (result i32) (local i32 i32) (local.get 0))\n  (func (export \"local-first-i64\") (result i64) (local i64 i64) (local.get 0))\n  (func (export \"local-first-f32\") (result f32) (local f32 f32) (local.get 0))\n  (func (export \"local-first-f64\") (result f64) (local f64 f64) (local.get 0))\n  (func (export \"local-second-i32\") (result i32) (local i32 i32) (local.get 1))\n  (func (export \"local-second-i64\") (result i64) (local i64 i64) (local.get 1))\n  (func (export \"local-second-f32\") (result f32) (local f32 f32) (local.get 1))\n  (func (export \"local-second-f64\") (result f64) (local f64 f64) (local.get 1))\n  (func (export \"local-mixed\") (result f64)\n    (local f32) (local $x i32) (local i64 i32) (local) (local f64 i32)\n    (drop (f32.neg (local.get 0)))\n    (drop (i32.eqz (local.get 1)))\n    (drop (i64.eqz (local.get 2)))\n    (drop (i32.eqz (local.get 3)))\n    (drop (f64.neg (local.get 4)))\n    (drop (i32.eqz (local.get 5)))\n    (local.get 4)\n  )\n\n  ;; Typing of parameters\n\n  (func (export \"param-first-i32\") (param i32 i32) (result i32) (local.get 0))\n  (func (export \"param-first-i64\") (param i64 i64) (result i64) (local.get 0))\n  (func (export \"param-first-f32\") (param f32 f32) (result f32) (local.get 0))\n  (func (export \"param-first-f64\") (param f64 f64) (result f64) (local.get 0))\n  (func (export \"param-second-i32\") (param i32 i32) (result i32) (local.get 1))\n  (func (export \"param-second-i64\") (param i64 i64) (result i64) (local.get 1))\n  (func (export \"param-second-f32\") (param f32 f32) (result f32) (local.get 1))\n  (func (export \"param-second-f64\") (param f64 f64) (result f64) (local.get 1))\n  (func (export \"param-mixed\") (param f32 i32) (param) (param $x i64) (param i32 f64 i32)\n    (result f64)\n    (drop (f32.neg (local.get 0)))\n    (drop (i32.eqz (local.get 1)))\n    (drop (i64.eqz (local.get 2)))\n    (drop (i32.eqz (local.get 3)))\n    (drop (f64.neg (local.get 4)))\n    (drop (i32.eqz (local.get 5)))\n    (local.get 4)\n  )\n\n  ;; Typing of results\n\n  (func (export \"empty\"))\n  (func (export \"value-void\") (call $dummy))\n  (func (export \"value-i32\") (result i32) (i32.const 77))\n  (func (export \"value-i64\") (result i64) (i64.const 7777))\n  (func (export \"value-f32\") (result f32) (f32.const 77.7))\n  (func (export \"value-f64\") (result f64) (f64.const 77.77))\n  (func (export \"value-i32-f64\") (result i32 f64) (i32.const 77) (f64.const 7))\n  (func (export \"value-i32-i32-i32\") (result i32 i32 i32)\n    (i32.const 1) (i32.const 2) (i32.const 3)\n  )\n  (func (export \"value-block-void\") (block (call $dummy) (call $dummy)))\n  (func (export \"value-block-i32\") (result i32)\n    (block (result i32) (call $dummy) (i32.const 77))\n  )\n  (func (export \"value-block-i32-i64\") (result i32 i64)\n    (block (result i32 i64) (call $dummy) (i32.const 1) (i64.const 2))\n  )\n\n  (func (export \"return-empty\") (return))\n  (func (export \"return-i32\") (result i32) (return (i32.const 78)))\n  (func (export \"return-i64\") (result i64) (return (i64.const 7878)))\n  (func (export \"return-f32\") (result f32) (return (f32.const 78.7)))\n  (func (export \"return-f64\") (result f64) (return (f64.const 78.78)))\n  (func (export \"return-i32-f64\") (result i32 f64)\n    (return (i32.const 78) (f64.const 78.78))\n  )\n  (func (export \"return-i32-i32-i32\") (result i32 i32 i32)\n    (return (i32.const 1) (i32.const 2) (i32.const 3))\n  )\n  (func (export \"return-block-i32\") (result i32)\n    (return (block (result i32) (call $dummy) (i32.const 77)))\n  )\n  (func (export \"return-block-i32-i64\") (result i32 i64)\n    (return (block (result i32 i64) (call $dummy) (i32.const 1) (i64.const 2)))\n  )\n\n  (func (export \"break-empty\") (br 0))\n  (func (export \"break-i32\") (result i32) (br 0 (i32.const 79)))\n  (func (export \"break-i64\") (result i64) (br 0 (i64.const 7979)))\n  (func (export \"break-f32\") (result f32) (br 0 (f32.const 79.9)))\n  (func (export \"break-f64\") (result f64) (br 0 (f64.const 79.79)))\n  (func (export \"break-i32-f64\") (result i32 f64)\n    (br 0 (i32.const 79) (f64.const 79.79))\n  )\n  (func (export \"break-i32-i32-i32\") (result i32 i32 i32)\n    (br 0 (i32.const 1) (i32.const 2) (i32.const 3))\n  )\n  (func (export \"break-block-i32\") (result i32)\n    (br 0 (block (result i32) (call $dummy) (i32.const 77)))\n  )\n  (func (export \"break-block-i32-i64\") (result i32 i64)\n    (br 0 (block (result i32 i64) (call $dummy) (i32.const 1) (i64.const 2)))\n  )\n\n  (func (export \"break-br_if-empty\") (param i32)\n    (br_if 0 (local.get 0))\n  )\n  (func (export \"break-br_if-num\") (param i32) (result i32)\n    (drop (br_if 0 (i32.const 50) (local.get 0))) (i32.const 51)\n  )\n  (func (export \"break-br_if-num-num\") (param i32) (result i32 i64)\n    (drop (drop (br_if 0 (i32.const 50) (i64.const 51) (local.get 0))))\n    (i32.const 51) (i64.const 52)\n  )\n\n  (func (export \"break-br_table-empty\") (param i32)\n    (br_table 0 0 0 (local.get 0))\n  )\n  (func (export \"break-br_table-num\") (param i32) (result i32)\n    (br_table 0 0 (i32.const 50) (local.get 0)) (i32.const 51)\n  )\n  (func (export \"break-br_table-num-num\") (param i32) (result i32 i64)\n    (br_table 0 0 (i32.const 50) (i64.const 51) (local.get 0))\n    (i32.const 51) (i64.const 52)\n  )\n  (func (export \"break-br_table-nested-empty\") (param i32)\n    (block (br_table 0 1 0 (local.get 0)))\n  )\n  (func (export \"break-br_table-nested-num\") (param i32) (result i32)\n    (i32.add\n      (block (result i32)\n        (br_table 0 1 0 (i32.const 50) (local.get 0)) (i32.const 51)\n      )\n      (i32.const 2)\n    )\n  )\n  (func (export \"break-br_table-nested-num-num\") (param i32) (result i32 i32)\n    (i32.add\n      (block (result i32 i32)\n        (br_table 0 1 0 (i32.const 50) (i32.const 51) (local.get 0))\n        (i32.const 51) (i32.const -3)\n      )\n    )\n    (i32.const 52)\n  )\n\n  ;; Large signatures\n\n  (func (export \"large-sig\")\n    (param i32 i64 f32 f32 i32 f64 f32 i32 i32 i32 f32 f64 f64 f64 i32 i32 f32)\n    (result f64 f32 i32 i32 i32 i64 f32 i32 i32 f32 f64 f64 i32 f32 i32 f64)\n    (local.get 5)\n    (local.get 2)\n    (local.get 0)\n    (local.get 8)\n    (local.get 7)\n    (local.get 1)\n    (local.get 3)\n    (local.get 9)\n    (local.get 4)\n    (local.get 6)\n    (local.get 13)\n    (local.get 11)\n    (local.get 15)\n    (local.get 16)\n    (local.get 14)\n    (local.get 12)\n  )\n\n  ;; Default initialization of locals\n\n  (func (export \"init-local-i32\") (result i32) (local i32) (local.get 0))\n  (func (export \"init-local-i64\") (result i64) (local i64) (local.get 0))\n  (func (export \"init-local-f32\") (result f32) (local f32) (local.get 0))\n  (func (export \"init-local-f64\") (result f64) (local f64) (local.get 0))\n)\n\n(assert_return (invoke \"type-use-1\"))\n(assert_return (invoke \"type-use-2\") (i32.const 0))\n(assert_return (invoke \"type-use-3\" (i32.const 1)))\n(assert_return\n  (invoke \"type-use-4\" (i32.const 1) (f64.const 1) (i32.const 1))\n  (i32.const 0)\n)\n(assert_return (invoke \"type-use-5\") (i32.const 0))\n(assert_return (invoke \"type-use-6\" (i32.const 1)))\n(assert_return\n  (invoke \"type-use-7\" (i32.const 1) (f64.const 1) (i32.const 1))\n  (i32.const 0)\n)\n\n(assert_return (invoke \"local-first-i32\") (i32.const 0))\n(assert_return (invoke \"local-first-i64\") (i64.const 0))\n(assert_return (invoke \"local-first-f32\") (f32.const 0))\n(assert_return (invoke \"local-first-f64\") (f64.const 0))\n(assert_return (invoke \"local-second-i32\") (i32.const 0))\n(assert_return (invoke \"local-second-i64\") (i64.const 0))\n(assert_return (invoke \"local-second-f32\") (f32.const 0))\n(assert_return (invoke \"local-second-f64\") (f64.const 0))\n(assert_return (invoke \"local-mixed\") (f64.const 0))\n\n(assert_return\n  (invoke \"param-first-i32\" (i32.const 2) (i32.const 3)) (i32.const 2)\n)\n(assert_return\n  (invoke \"param-first-i64\" (i64.const 2) (i64.const 3)) (i64.const 2)\n)\n(assert_return\n  (invoke \"param-first-f32\" (f32.const 2) (f32.const 3)) (f32.const 2)\n)\n(assert_return\n  (invoke \"param-first-f64\" (f64.const 2) (f64.const 3)) (f64.const 2)\n)\n(assert_return\n  (invoke \"param-second-i32\" (i32.const 2) (i32.const 3)) (i32.const 3)\n)\n(assert_return\n  (invoke \"param-second-i64\" (i64.const 2) (i64.const 3)) (i64.const 3)\n)\n(assert_return\n  (invoke \"param-second-f32\" (f32.const 2) (f32.const 3)) (f32.const 3)\n)\n(assert_return\n  (invoke \"param-second-f64\" (f64.const 2) (f64.const 3)) (f64.const 3)\n)\n\n(assert_return\n  (invoke \"param-mixed\"\n    (f32.const 1) (i32.const 2) (i64.const 3)\n    (i32.const 4) (f64.const 5.5) (i32.const 6)\n  )\n  (f64.const 5.5)\n)\n\n(assert_return (invoke \"empty\"))\n(assert_return (invoke \"value-void\"))\n(assert_return (invoke \"value-i32\") (i32.const 77))\n(assert_return (invoke \"value-i64\") (i64.const 7777))\n(assert_return (invoke \"value-f32\") (f32.const 77.7))\n(assert_return (invoke \"value-f64\") (f64.const 77.77))\n(assert_return (invoke \"value-i32-f64\") (i32.const 77) (f64.const 7))\n(assert_return (invoke \"value-i32-i32-i32\")\n  (i32.const 1) (i32.const 2) (i32.const 3)\n)\n(assert_return (invoke \"value-block-void\"))\n(assert_return (invoke \"value-block-i32\") (i32.const 77))\n(assert_return (invoke \"value-block-i32-i64\") (i32.const 1) (i64.const 2))\n\n(assert_return (invoke \"return-empty\"))\n(assert_return (invoke \"return-i32\") (i32.const 78))\n(assert_return (invoke \"return-i64\") (i64.const 7878))\n(assert_return (invoke \"return-f32\") (f32.const 78.7))\n(assert_return (invoke \"return-f64\") (f64.const 78.78))\n(assert_return (invoke \"return-i32-f64\") (i32.const 78) (f64.const 78.78))\n(assert_return (invoke \"return-i32-i32-i32\")\n  (i32.const 1) (i32.const 2) (i32.const 3)\n)\n(assert_return (invoke \"return-block-i32\") (i32.const 77))\n(assert_return (invoke \"return-block-i32-i64\") (i32.const 1) (i64.const 2))\n\n(assert_return (invoke \"break-empty\"))\n(assert_return (invoke \"break-i32\") (i32.const 79))\n(assert_return (invoke \"break-i64\") (i64.const 7979))\n(assert_return (invoke \"break-f32\") (f32.const 79.9))\n(assert_return (invoke \"break-f64\") (f64.const 79.79))\n(assert_return (invoke \"break-i32-f64\") (i32.const 79) (f64.const 79.79))\n(assert_return (invoke \"break-i32-i32-i32\")\n  (i32.const 1) (i32.const 2) (i32.const 3)\n)\n(assert_return (invoke \"break-block-i32\") (i32.const 77))\n(assert_return (invoke \"break-block-i32-i64\") (i32.const 1) (i64.const 2))\n\n(assert_return (invoke \"break-br_if-empty\" (i32.const 0)))\n(assert_return (invoke \"break-br_if-empty\" (i32.const 2)))\n(assert_return (invoke \"break-br_if-num\" (i32.const 0)) (i32.const 51))\n(assert_return (invoke \"break-br_if-num\" (i32.const 1)) (i32.const 50))\n(assert_return (invoke \"break-br_if-num-num\" (i32.const 0))\n  (i32.const 51) (i64.const 52)\n)\n(assert_return (invoke \"break-br_if-num-num\" (i32.const 1))\n  (i32.const 50) (i64.const 51)\n)\n\n(assert_return (invoke \"break-br_table-empty\" (i32.const 0)))\n(assert_return (invoke \"break-br_table-empty\" (i32.const 1)))\n(assert_return (invoke \"break-br_table-empty\" (i32.const 5)))\n(assert_return (invoke \"break-br_table-empty\" (i32.const -1)))\n(assert_return (invoke \"break-br_table-num\" (i32.const 0)) (i32.const 50))\n(assert_return (invoke \"break-br_table-num\" (i32.const 1)) (i32.const 50))\n(assert_return (invoke \"break-br_table-num\" (i32.const 10)) (i32.const 50))\n(assert_return (invoke \"break-br_table-num\" (i32.const -100)) (i32.const 50))\n(assert_return (invoke \"break-br_table-num-num\" (i32.const 0))\n  (i32.const 50) (i64.const 51)\n)\n(assert_return (invoke \"break-br_table-num-num\" (i32.const 1))\n  (i32.const 50) (i64.const 51)\n)\n(assert_return (invoke \"break-br_table-num-num\" (i32.const 10))\n  (i32.const 50) (i64.const 51)\n)\n(assert_return (invoke \"break-br_table-num-num\" (i32.const -100))\n  (i32.const 50) (i64.const 51)\n)\n(assert_return (invoke \"break-br_table-nested-empty\" (i32.const 0)))\n(assert_return (invoke \"break-br_table-nested-empty\" (i32.const 1)))\n(assert_return (invoke \"break-br_table-nested-empty\" (i32.const 3)))\n(assert_return (invoke \"break-br_table-nested-empty\" (i32.const -2)))\n(assert_return\n  (invoke \"break-br_table-nested-num\" (i32.const 0)) (i32.const 52)\n)\n(assert_return\n  (invoke \"break-br_table-nested-num\" (i32.const 1)) (i32.const 50)\n)\n(assert_return\n  (invoke \"break-br_table-nested-num\" (i32.const 2)) (i32.const 52)\n)\n(assert_return\n  (invoke \"break-br_table-nested-num\" (i32.const -3)) (i32.const 52)\n)\n(assert_return\n  (invoke \"break-br_table-nested-num-num\" (i32.const 0))\n  (i32.const 101) (i32.const 52)\n)\n(assert_return\n  (invoke \"break-br_table-nested-num-num\" (i32.const 1))\n  (i32.const 50) (i32.const 51)\n)\n(assert_return\n  (invoke \"break-br_table-nested-num-num\" (i32.const 2))\n  (i32.const 101) (i32.const 52)\n)\n(assert_return\n  (invoke \"break-br_table-nested-num-num\" (i32.const -3))\n  (i32.const 101) (i32.const 52)\n)\n\n(assert_return\n  (invoke \"large-sig\"\n    (i32.const 0) (i64.const 1) (f32.const 2) (f32.const 3)\n    (i32.const 4) (f64.const 5) (f32.const 6) (i32.const 7)\n    (i32.const 8) (i32.const 9) (f32.const 10) (f64.const 11)\n    (f64.const 12) (f64.const 13) (i32.const 14) (i32.const 15)\n    (f32.const 16)\n  )\n  (f64.const 5) (f32.const 2) (i32.const 0) (i32.const 8)\n  (i32.const 7) (i64.const 1) (f32.const 3) (i32.const 9)\n  (i32.const 4) (f32.const 6) (f64.const 13) (f64.const 11)\n  (i32.const 15) (f32.const 16) (i32.const 14) (f64.const 12)\n)\n\n(assert_return (invoke \"init-local-i32\") (i32.const 0))\n(assert_return (invoke \"init-local-i64\") (i64.const 0))\n(assert_return (invoke \"init-local-f32\") (f32.const 0))\n(assert_return (invoke \"init-local-f64\") (f64.const 0))\n\n\n;; Expansion of inline function types\n\n(module\n  (func $f (result f64) (f64.const 0))  ;; adds implicit type definition\n  (func $g (param i32))                 ;; reuses explicit type definition\n  (type $t (func (param i32)))\n\n  (func $i32->void (type 0))                ;; (param i32)\n  (func $void->f64 (type 1) (f64.const 0))  ;; (result f64)\n  (func $check\n    (call $i32->void (i32.const 0))\n    (drop (call $void->f64))\n  )\n)\n\n(assert_invalid\n  (module\n    (func $f (result f64) (f64.const 0))  ;; adds implicit type definition\n    (func $g (param i32))                 ;; reuses explicit type definition\n    (func $h (result f64) (f64.const 1))  ;; reuses implicit type definition\n    (type $t (func (param i32)))\n\n    (func (type 2))  ;; does not exist\n  )\n  \"unknown type\"\n)\n\n(assert_malformed\n  (module quote\n    \"(func $f (result f64) (f64.const 0))\"  ;; adds implicit type definition\n    \"(func $g (param i32))\"                 ;; reuses explicit type definition\n    \"(func $h (result f64) (f64.const 1))\"  ;; reuses implicit type definition\n    \"(type $t (func (param i32)))\"\n\n    \"(func (type 2) (param i32))\"  ;; does not exist\n  )\n  \"unknown type\"\n)\n\n(module\n  (type $proc (func (result i32)))\n  (type $sig (func (param i32) (result i32)))\n\n  (func (export \"f\") (type $sig)\n    (local $var i32)\n    (local.get $var)\n  )\n\n  (func $g (type $sig)\n    (local $var i32)\n    (local.get $var)\n  )\n  (func (export \"g\") (type $sig)\n    (call $g (local.get 0))\n  )\n\n  (func (export \"p\") (type $proc)\n    (local $var i32)\n    (local.set 0 (i32.const 42))\n    (local.get $var)\n  )\n)\n\n(assert_return (invoke \"f\" (i32.const 42)) (i32.const 0))\n(assert_return (invoke \"g\" (i32.const 42)) (i32.const 0))\n(assert_return (invoke \"p\") (i32.const 42))\n\n\n(module\n  (type $sig (func))\n\n  (func $empty-sig-1)  ;; should be assigned type $sig\n  (func $complex-sig-1 (param f64 i64 f64 i64 f64 i64 f32 i32))\n  (func $empty-sig-2)  ;; should be assigned type $sig\n  (func $complex-sig-2 (param f64 i64 f64 i64 f64 i64 f32 i32))\n  (func $complex-sig-3 (param f64 i64 f64 i64 f64 i64 f32 i32))\n  (func $complex-sig-4 (param i64 i64 f64 i64 f64 i64 f32 i32))\n  (func $complex-sig-5 (param i64 i64 f64 i64 f64 i64 f32 i32))\n\n  (type $empty-sig-duplicate (func))\n  (type $complex-sig-duplicate (func (param i64 i64 f64 i64 f64 i64 f32 i32)))\n  (table funcref\n    (elem\n      $complex-sig-3 $empty-sig-2 $complex-sig-1 $complex-sig-3 $empty-sig-1\n      $complex-sig-4 $complex-sig-5\n    )\n  )\n\n  (func (export \"signature-explicit-reused\")\n    (call_indirect (type $sig) (i32.const 1))\n    (call_indirect (type $sig) (i32.const 4))\n  )\n\n  (func (export \"signature-implicit-reused\")\n    ;; The implicit index 3 in this test depends on the function and\n    ;; type definitions, and may need adapting if they change.\n    (call_indirect (type 3)\n      (f64.const 0) (i64.const 0) (f64.const 0) (i64.const 0)\n      (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0)\n      (i32.const 0)\n    )\n    (call_indirect (type 3)\n      (f64.const 0) (i64.const 0) (f64.const 0) (i64.const 0)\n      (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0)\n      (i32.const 2)\n    )\n    (call_indirect (type 3)\n      (f64.const 0) (i64.const 0) (f64.const 0) (i64.const 0)\n      (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0)\n      (i32.const 3)\n    )\n  )\n\n  (func (export \"signature-explicit-duplicate\")\n    (call_indirect (type $empty-sig-duplicate) (i32.const 1))\n  )\n\n  (func (export \"signature-implicit-duplicate\")\n    (call_indirect (type $complex-sig-duplicate)\n      (i64.const 0) (i64.const 0) (f64.const 0) (i64.const 0)\n      (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0)\n      (i32.const 5)\n    )\n    (call_indirect (type $complex-sig-duplicate)\n      (i64.const 0) (i64.const 0) (f64.const 0) (i64.const 0)\n      (f64.const 0) (i64.const 0) (f32.const 0) (i32.const 0)\n      (i32.const 6)\n    )\n  )\n)\n\n(assert_return (invoke \"signature-explicit-reused\"))\n(assert_return (invoke \"signature-implicit-reused\"))\n(assert_return (invoke \"signature-explicit-duplicate\"))\n(assert_return (invoke \"signature-implicit-duplicate\"))\n\n\n;; Malformed type use\n\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (type $sig) (result i32) (param i32) (i32.const 0))\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (param i32) (type $sig) (result i32) (i32.const 0))\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (param i32) (result i32) (type $sig) (i32.const 0))\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (result i32) (type $sig) (param i32) (i32.const 0))\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (result i32) (param i32) (type $sig) (i32.const 0))\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(func (result i32) (param i32) (i32.const 0))\"\n  )\n  \"unexpected token\"\n)\n\n(assert_malformed\n  (module quote\n    \"(type $sig (func))\"\n    \"(func (type $sig) (result i32) (i32.const 0))\"\n  )\n  \"inline function type\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (type $sig) (result i32) (i32.const 0))\"\n  )\n  \"inline function type\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (type $sig) (param i32) (i32.const 0))\"\n  )\n  \"inline function type\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32 i32) (result i32)))\"\n    \"(func (type $sig) (param i32) (result i32) (unreachable))\"\n  )\n  \"inline function type\"\n)\n\n\n;; Invalid typing of locals\n\n(assert_invalid\n  (module (func $type-local-num-vs-num (result i64) (local i32) (local.get 0)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-local-num-vs-num (local f32) (i32.eqz (local.get 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-local-num-vs-num (local f64 i64) (f64.neg (local.get 1))))\n  \"type mismatch\"\n)\n\n\n;; Invalid typing of parameters\n\n(assert_invalid\n  (module (func $type-param-num-vs-num (param i32) (result i64) (local.get 0)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-num (param f32) (i32.eqz (local.get 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-num (param f64 i64) (f64.neg (local.get 1))))\n  \"type mismatch\"\n)\n\n\n;; Invalid typing of result\n\n(assert_invalid\n  (module (func $type-empty-i32 (result i32)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-i64 (result i64)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-f32 (result f32)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-f64 (result f64)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-f64-i32 (result f64 i32)))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-value-void-vs-num (result i32)\n    (nop)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-void-vs-nums (result i32 i32)\n    (nop)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-num-vs-void\n    (i32.const 0)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-nums-vs-void\n    (i32.const 0) (i64.const 0)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-num-vs-num (result i32)\n    (f32.const 0)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-num-vs-nums (result f32 f32)\n    (f32.const 0)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-nums-vs-num (result f32)\n    (f32.const 0) (f32.const 0)\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-return-last-empty-vs-num (result i32)\n    (return)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-return-last-empty-vs-nums (result i32 i32)\n    (return)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-return-last-void-vs-num (result i32)\n    (return (nop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-return-last-void-vs-nums (result i32 i64)\n    (return (nop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-return-last-num-vs-num (result i32)\n    (return (i64.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-return-last-num-vs-nums (result i64 i64)\n    (return (i64.const 0))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-return-empty-vs-num (result i32)\n    (return) (i32.const 1)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-return-empty-vs-nums (result i32 i32)\n    (return) (i32.const 1) (i32.const 2)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-return-partial-vs-nums (result i32 i32)\n    (i32.const 1) (return) (i32.const 2)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-return-void-vs-num (result i32)\n    (return (nop)) (i32.const 1)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-return-void-vs-nums (result i32 i32)\n    (return (nop)) (i32.const 1)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-return-num-vs-num (result i32)\n    (return (i64.const 1)) (i32.const 1)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-return-num-vs-nums (result i32 i32)\n    (return (i64.const 1)) (i32.const 1) (i32.const 2)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-return-first-num-vs-num (result i32)\n    (return (i64.const 1)) (return (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-return-first-num-vs-nums (result i32 i32)\n    (return (i32.const 1)) (return (i32.const 1) (i32.const 2))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-break-last-void-vs-num (result i32)\n    (br 0)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-last-void-vs-nums (result i32 i32)\n    (br 0)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-last-num-vs-num (result i32)\n    (br 0 (f32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-last-num-vs-nums (result i32 i32)\n    (br 0 (i32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-void-vs-num (result i32)\n    (br 0) (i32.const 1)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-void-vs-nums (result i32 i32)\n    (br 0) (i32.const 1) (i32.const 2)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-num-vs-num (result i32)\n    (br 0 (i64.const 1)) (i32.const 1)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-num-vs-nums (result i32 i32)\n    (br 0 (i32.const 1)) (i32.const 1) (i32.const 2)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-first-num-vs-num (result i32)\n    (br 0 (i64.const 1)) (br 0 (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-break-nested-empty-vs-num (result i32)\n    (block (br 1)) (br 0 (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-empty-vs-nums (result i32 i32)\n    (block (br 1)) (br 0 (i32.const 1) (i32.const 2))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-void-vs-num (result i32)\n    (block (br 1 (nop))) (br 0 (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-void-vs-nums (result i32 i32)\n    (block (br 1 (nop))) (br 0 (i32.const 1) (i32.const 2))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-num-vs-num (result i32)\n    (block (br 1 (i64.const 1))) (br 0 (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-break-nested-num-vs-nums (result i32 i32)\n    (block (result i32) (br 1 (i32.const 1))) (br 0 (i32.const 1) (i32.const 2))\n  ))\n  \"type mismatch\"\n)\n\n\n;; Syntax errors\n\n(assert_malformed\n  (module quote \"(func (nop) (local i32))\")\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote \"(func (nop) (param i32))\")\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote \"(func (nop) (result i32))\")\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote \"(func (local i32) (param i32))\")\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote \"(func (local i32) (result i32) (local.get 0))\")\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote \"(func (result i32) (param i32) (local.get 0))\")\n  \"unexpected token\"\n)\n\n;; Duplicate name errors\n\n(assert_malformed (module quote\n  \"(func $foo)\"\n  \"(func $foo)\")\n  \"duplicate func\")\n(assert_malformed (module quote\n  \"(import \\\"\\\" \\\"\\\" (func $foo))\"\n  \"(func $foo)\")\n  \"duplicate func\")\n(assert_malformed (module quote\n  \"(import \\\"\\\" \\\"\\\" (func $foo))\"\n  \"(import \\\"\\\" \\\"\\\" (func $foo))\")\n  \"duplicate func\")\n\n(assert_malformed (module quote \"(func (param $foo i32) (param $foo i32))\")\n  \"duplicate local\")\n(assert_malformed (module quote \"(func (param $foo i32) (local $foo i32))\")\n  \"duplicate local\")\n(assert_malformed (module quote \"(func (local $foo i32) (local $foo i32))\")\n  \"duplicate local\")\n"
  },
  {
    "path": "test/core/func_ptrs.wast",
    "content": "(module\n  (type    (func))                           ;; 0: void -> void\n  (type $S (func))                           ;; 1: void -> void\n  (type    (func (param)))                   ;; 2: void -> void\n  (type    (func (result i32)))              ;; 3: void -> i32\n  (type    (func (param) (result i32)))      ;; 4: void -> i32\n  (type $T (func (param i32) (result i32)))  ;; 5: i32 -> i32\n  (type $U (func (param i32)))               ;; 6: i32 -> void\n\n  (func $print (import \"spectest\" \"print_i32\") (type 6))\n\n  (func (type 0))\n  (func (type $S))\n\n  (func (export \"one\") (type 4) (i32.const 13))\n  (func (export \"two\") (type $T) (i32.add (local.get 0) (i32.const 1)))\n\n  ;; Both signature and parameters are allowed (and required to match)\n  ;; since this allows the naming of parameters.\n  (func (export \"three\") (type $T) (param $a i32) (result i32)\n    (i32.sub (local.get 0) (i32.const 2))\n  )\n\n  (func (export \"four\") (type $U) (call $print (local.get 0)))\n)\n\n(assert_return (invoke \"one\") (i32.const 13))\n(assert_return (invoke \"two\" (i32.const 13)) (i32.const 14))\n(assert_return (invoke \"three\" (i32.const 13)) (i32.const 11))\n(invoke \"four\" (i32.const 83))\n\n(assert_invalid (module (elem (i32.const 0))) \"unknown table\")\n(assert_invalid (module (elem (i32.const 0) 0) (func)) \"unknown table\")\n\n(assert_invalid\n  (module (table 1 funcref) (elem (i64.const 0)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (table 1 funcref) (elem (i32.ctz (i32.const 0))))\n  \"constant expression required\"\n)\n(assert_invalid\n  (module (table 1 funcref) (elem (nop)))\n  \"constant expression required\"\n)\n\n(assert_invalid (module (func (type 42))) \"unknown type\")\n(assert_invalid (module (import \"spectest\" \"print_i32\" (func (type 43)))) \"unknown type\")\n\n(module\n  (type $T (func (param) (result i32)))\n  (type $U (func (param) (result i32)))\n  (table funcref (elem $t1 $t2 $t3 $u1 $u2 $t1 $t3))\n\n  (func $t1 (type $T) (i32.const 1))\n  (func $t2 (type $T) (i32.const 2))\n  (func $t3 (type $T) (i32.const 3))\n  (func $u1 (type $U) (i32.const 4))\n  (func $u2 (type $U) (i32.const 5))\n\n  (func (export \"callt\") (param $i i32) (result i32)\n    (call_indirect (type $T) (local.get $i))\n  )\n\n  (func (export \"callu\") (param $i i32) (result i32)\n    (call_indirect (type $U) (local.get $i))\n  )\n)\n\n(assert_return (invoke \"callt\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"callt\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"callt\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"callt\" (i32.const 3)) (i32.const 4))\n(assert_return (invoke \"callt\" (i32.const 4)) (i32.const 5))\n(assert_return (invoke \"callt\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"callt\" (i32.const 6)) (i32.const 3))\n(assert_trap (invoke \"callt\" (i32.const 7)) \"undefined element\")\n(assert_trap (invoke \"callt\" (i32.const 100)) \"undefined element\")\n(assert_trap (invoke \"callt\" (i32.const -1)) \"undefined element\")\n\n(assert_return (invoke \"callu\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"callu\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"callu\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"callu\" (i32.const 3)) (i32.const 4))\n(assert_return (invoke \"callu\" (i32.const 4)) (i32.const 5))\n(assert_return (invoke \"callu\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"callu\" (i32.const 6)) (i32.const 3))\n(assert_trap (invoke \"callu\" (i32.const 7)) \"undefined element\")\n(assert_trap (invoke \"callu\" (i32.const 100)) \"undefined element\")\n(assert_trap (invoke \"callu\" (i32.const -1)) \"undefined element\")\n\n(module\n  (type $T (func (result i32)))\n  (table funcref (elem 0 1))\n\n  (func $t1 (type $T) (i32.const 1))\n  (func $t2 (type $T) (i32.const 2))\n\n  (func (export \"callt\") (param $i i32) (result i32)\n    (call_indirect (type $T) (local.get $i))\n  )\n)\n\n(assert_return (invoke \"callt\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"callt\" (i32.const 1)) (i32.const 2))\n"
  },
  {
    "path": "test/core/global.wast",
    "content": ";; Test globals\n\n(module\n  (global (import \"spectest\" \"global_i32\") i32)\n  (global (import \"spectest\" \"global_i64\") i64)\n\n  (global $a i32 (i32.const -2))\n  (global (;3;) f32 (f32.const -3))\n  (global (;4;) f64 (f64.const -4))\n  (global $b i64 (i64.const -5))\n\n  (global $x (mut i32) (i32.const -12))\n  (global (;7;) (mut f32) (f32.const -13))\n  (global (;8;) (mut f64) (f64.const -14))\n  (global $y (mut i64) (i64.const -15))\n\n  (global $z1 i32 (global.get 0))\n  (global $z2 i64 (global.get 1))\n\n  (global $r externref (ref.null extern))\n  (global $mr (mut externref) (ref.null extern))\n  (global funcref (ref.null func))\n\n  (func (export \"get-a\") (result i32) (global.get $a))\n  (func (export \"get-b\") (result i64) (global.get $b))\n  (func (export \"get-r\") (result externref) (global.get $r))\n  (func (export \"get-mr\") (result externref) (global.get $mr))\n  (func (export \"get-x\") (result i32) (global.get $x))\n  (func (export \"get-y\") (result i64) (global.get $y))\n  (func (export \"get-z1\") (result i32) (global.get $z1))\n  (func (export \"get-z2\") (result i64) (global.get $z2))\n  (func (export \"set-x\") (param i32) (global.set $x (local.get 0)))\n  (func (export \"set-y\") (param i64) (global.set $y (local.get 0)))\n  (func (export \"set-mr\") (param externref) (global.set $mr (local.get 0)))\n\n  (func (export \"get-3\") (result f32) (global.get 3))\n  (func (export \"get-4\") (result f64) (global.get 4))\n  (func (export \"get-7\") (result f32) (global.get 7))\n  (func (export \"get-8\") (result f64) (global.get 8))\n  (func (export \"set-7\") (param f32) (global.set 7 (local.get 0)))\n  (func (export \"set-8\") (param f64) (global.set 8 (local.get 0)))\n\n  ;; As the argument of control constructs and instructions\n\n  (memory 1)\n\n  (func $dummy)\n\n  (func (export \"as-select-first\") (result i32)\n    (select (global.get $x) (i32.const 2) (i32.const 3))\n  )\n  (func (export \"as-select-mid\") (result i32)\n    (select (i32.const 2) (global.get $x) (i32.const 3))\n  )\n  (func (export \"as-select-last\") (result i32)\n    (select (i32.const 2) (i32.const 3) (global.get $x))\n  )\n\n  (func (export \"as-loop-first\") (result i32)\n    (loop (result i32)\n      (global.get $x) (call $dummy) (call $dummy)\n    )\n  )\n  (func (export \"as-loop-mid\") (result i32)\n    (loop (result i32)\n      (call $dummy) (global.get $x) (call $dummy)\n    )\n  )\n  (func (export \"as-loop-last\") (result i32)\n    (loop (result i32)\n      (call $dummy) (call $dummy) (global.get $x)\n    )\n  )\n\n  (func (export \"as-if-condition\") (result i32)\n    (if (result i32) (global.get $x)\n      (then (call $dummy) (i32.const 2))\n      (else (call $dummy) (i32.const 3))\n    )\n  )\n  (func (export \"as-if-then\") (result i32)\n    (if (result i32) (i32.const 1)\n      (then (global.get $x)) (else (i32.const 2))\n    )\n  )\n  (func (export \"as-if-else\") (result i32)\n    (if (result i32) (i32.const 0)\n      (then (i32.const 2)) (else (global.get $x))\n    )\n  )\n\n  (func (export \"as-br_if-first\") (result i32)\n    (block (result i32)\n      (br_if 0 (global.get $x) (i32.const 2))\n      (return (i32.const 3))\n    )\n  )\n  (func (export \"as-br_if-last\") (result i32)\n    (block (result i32)\n      (br_if 0 (i32.const 2) (global.get $x))\n      (return (i32.const 3))\n    )\n  )\n\n  (func (export \"as-br_table-first\") (result i32)\n    (block (result i32)\n      (global.get $x) (i32.const 2) (br_table 0 0)\n    )\n  )\n  (func (export \"as-br_table-last\") (result i32)\n    (block (result i32)\n      (i32.const 2) (global.get $x) (br_table 0 0)\n    )\n  )\n\n  (func $func (param i32 i32) (result i32) (local.get 0))\n  (type $check (func (param i32 i32) (result i32)))\n  (table funcref (elem $func))\n  (func (export \"as-call_indirect-first\") (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (global.get $x) (i32.const 2) (i32.const 0)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-mid\") (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (i32.const 2) (global.get $x) (i32.const 0)\n      )\n    )\n  )\n (func (export \"as-call_indirect-last\") (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (i32.const 2) (i32.const 0) (global.get $x)\n      )\n    )\n  )\n\n  (func (export \"as-store-first\")\n    (global.get $x) (i32.const 1) (i32.store)\n  )\n  (func (export \"as-store-last\")\n    (i32.const 0) (global.get $x) (i32.store)\n  )\n  (func (export \"as-load-operand\") (result i32)\n    (i32.load (global.get $x))\n  )\n  (func (export \"as-memory.grow-value\") (result i32)\n    (memory.grow (global.get $x))\n  )\n\n  (func $f (param i32) (result i32) (local.get 0))\n  (func (export \"as-call-value\") (result i32)\n    (call $f (global.get $x))\n  )\n\n  (func (export \"as-return-value\") (result i32)\n    (global.get $x) (return)\n  )\n  (func (export \"as-drop-operand\")\n    (drop (global.get $x))\n  )\n  (func (export \"as-br-value\") (result i32)\n    (block (result i32) (br 0 (global.get $x)))\n  )\n\n  (func (export \"as-local.set-value\") (param i32) (result i32)\n    (local.set 0 (global.get $x))\n    (local.get 0)\n  )\n  (func (export \"as-local.tee-value\") (param i32) (result i32)\n    (local.tee 0 (global.get $x))\n  )\n  (func (export \"as-global.set-value\") (result i32)\n    (global.set $x (global.get $x))\n    (global.get $x)\n  )\n\n  (func (export \"as-unary-operand\") (result i32)\n    (i32.eqz (global.get $x))\n  )\n  (func (export \"as-binary-operand\") (result i32)\n    (i32.mul\n      (global.get $x) (global.get $x)\n    )\n  )\n  (func (export \"as-compare-operand\") (result i32)\n    (i32.gt_u\n      (global.get 0) (i32.const 1)\n    )\n  )\n)\n\n(assert_return (invoke \"get-a\") (i32.const -2))\n(assert_return (invoke \"get-b\") (i64.const -5))\n(assert_return (invoke \"get-r\") (ref.null extern))\n(assert_return (invoke \"get-mr\") (ref.null extern))\n(assert_return (invoke \"get-x\") (i32.const -12))\n(assert_return (invoke \"get-y\") (i64.const -15))\n(assert_return (invoke \"get-z1\") (i32.const 666))\n(assert_return (invoke \"get-z2\") (i64.const 666))\n\n(assert_return (invoke \"get-3\") (f32.const -3))\n(assert_return (invoke \"get-4\") (f64.const -4))\n(assert_return (invoke \"get-7\") (f32.const -13))\n(assert_return (invoke \"get-8\") (f64.const -14))\n\n(assert_return (invoke \"set-x\" (i32.const 6)))\n(assert_return (invoke \"set-y\" (i64.const 7)))\n\n(assert_return (invoke \"set-7\" (f32.const 8)))\n(assert_return (invoke \"set-8\" (f64.const 9)))\n\n(assert_return (invoke \"get-x\") (i32.const 6))\n(assert_return (invoke \"get-y\") (i64.const 7))\n(assert_return (invoke \"get-7\") (f32.const 8))\n(assert_return (invoke \"get-8\") (f64.const 9))\n\n(assert_return (invoke \"set-7\" (f32.const 8)))\n(assert_return (invoke \"set-8\" (f64.const 9)))\n(assert_return (invoke \"set-mr\" (ref.extern 10)))\n\n(assert_return (invoke \"get-x\") (i32.const 6))\n(assert_return (invoke \"get-y\") (i64.const 7))\n(assert_return (invoke \"get-7\") (f32.const 8))\n(assert_return (invoke \"get-8\") (f64.const 9))\n(assert_return (invoke \"get-mr\") (ref.extern 10))\n\n(assert_return (invoke \"as-select-first\") (i32.const 6))\n(assert_return (invoke \"as-select-mid\") (i32.const 2))\n(assert_return (invoke \"as-select-last\") (i32.const 2))\n\n(assert_return (invoke \"as-loop-first\") (i32.const 6))\n(assert_return (invoke \"as-loop-mid\") (i32.const 6))\n(assert_return (invoke \"as-loop-last\") (i32.const 6))\n\n(assert_return (invoke \"as-if-condition\") (i32.const 2))\n(assert_return (invoke \"as-if-then\") (i32.const 6))\n(assert_return (invoke \"as-if-else\") (i32.const 6))\n\n(assert_return (invoke \"as-br_if-first\") (i32.const 6))\n(assert_return (invoke \"as-br_if-last\") (i32.const 2))\n\n(assert_return (invoke \"as-br_table-first\") (i32.const 6))\n(assert_return (invoke \"as-br_table-last\") (i32.const 2))\n\n(assert_return (invoke \"as-call_indirect-first\") (i32.const 6))\n(assert_return (invoke \"as-call_indirect-mid\") (i32.const 2))\n(assert_trap (invoke \"as-call_indirect-last\") \"undefined element\")\n\n(assert_return (invoke \"as-store-first\"))\n(assert_return (invoke \"as-store-last\"))\n(assert_return (invoke \"as-load-operand\") (i32.const 1))\n(assert_return (invoke \"as-memory.grow-value\") (i32.const 1))\n\n(assert_return (invoke \"as-call-value\") (i32.const 6))\n\n(assert_return (invoke \"as-return-value\") (i32.const 6))\n(assert_return (invoke \"as-drop-operand\"))\n(assert_return (invoke \"as-br-value\") (i32.const 6))\n\n(assert_return (invoke \"as-local.set-value\" (i32.const 1)) (i32.const 6))\n(assert_return (invoke \"as-local.tee-value\" (i32.const 1)) (i32.const 6))\n(assert_return (invoke \"as-global.set-value\") (i32.const 6))\n\n(assert_return (invoke \"as-unary-operand\") (i32.const 0))\n(assert_return (invoke \"as-binary-operand\") (i32.const 36))\n(assert_return (invoke \"as-compare-operand\") (i32.const 1))\n\n(assert_invalid\n  (module (global f32 (f32.const 0)) (func (global.set 0 (f32.const 1))))\n  \"global is immutable\"\n)\n\n(assert_invalid\n  (module (import \"spectest\" \"global_i32\" (global i32)) (func (global.set 0 (i32.const 1))))\n  \"global is immutable\"\n)\n\n;; mutable globals can be exported\n(module (global (mut f32) (f32.const 0)) (export \"a\" (global 0)))\n(module (global (export \"a\") (mut f32) (f32.const 0)))\n\n(assert_invalid\n  (module (global f32 (f32.neg (f32.const 0))))\n  \"constant expression required\"\n)\n\n(assert_invalid\n  (module (global f32 (local.get 0)))\n  \"constant expression required\"\n)\n\n(assert_invalid\n  (module (global f32 (f32.neg (f32.const 1))))\n  \"constant expression required\"\n)\n\n(assert_invalid\n  (module (global i32 (i32.const 0) (nop)))\n  \"constant expression required\"\n)\n\n(assert_invalid\n  (module (global i32 (i32.ctz (i32.const 0))))\n  \"constant expression required\"\n)\n\n(assert_invalid\n  (module (global i32 (nop)))\n  \"constant expression required\"\n)\n\n(assert_invalid\n  (module (global i32 (f32.const 0)))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (global i32 (i32.const 0) (i32.const 0)))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (global i32 (;empty instruction sequence;)))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (global (import \"\" \"\") externref) (global funcref (global.get 0)))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (global (import \"test\" \"global-i32\") i32) (global i32 (global.get 0) (global.get 0)))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (global (import \"test\" \"global-i32\") i32) (global i32 (i32.const 0) (global.get 0)))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (global i32 (global.get 0)))\n  \"unknown global\"\n)\n\n(assert_invalid\n  (module (global i32 (global.get 1)) (global i32 (i32.const 0)))\n  \"unknown global\"\n)\n\n(assert_invalid\n  (module (global (import \"test\" \"global-i32\") i32) (global i32 (global.get 2)))\n  \"unknown global\"\n)\n\n(assert_invalid\n  (module (global (import \"test\" \"global-mut-i32\") (mut i32)) (global i32 (global.get 0)))\n  \"constant expression required\"\n)\n\n(module\n  (import \"spectest\" \"global_i32\" (global i32))\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\98\\80\\80\\80\\00\"             ;; import section\n      \"\\01\"                          ;; length 1\n      \"\\08\\73\\70\\65\\63\\74\\65\\73\\74\"  ;; \"spectest\"\n      \"\\0a\\67\\6c\\6f\\62\\61\\6c\\5f\\69\\33\\32\" ;; \"global_i32\"\n      \"\\03\"                          ;; GlobalImport\n      \"\\7f\"                          ;; i32\n      \"\\02\"                          ;; malformed mutability\n  )\n  \"malformed mutability\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\98\\80\\80\\80\\00\"             ;; import section\n      \"\\01\"                          ;; length 1\n      \"\\08\\73\\70\\65\\63\\74\\65\\73\\74\"  ;; \"spectest\"\n      \"\\0a\\67\\6c\\6f\\62\\61\\6c\\5f\\69\\33\\32\" ;; \"global_i32\"\n      \"\\03\"                          ;; GlobalImport\n      \"\\7f\"                          ;; i32\n      \"\\ff\"                          ;; malformed mutability\n  )\n  \"malformed mutability\"\n)\n\n(module\n  (global i32 (i32.const 0))\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\86\\80\\80\\80\\00\"  ;; global section\n      \"\\01\"               ;; length 1\n      \"\\7f\"               ;; i32\n      \"\\02\"               ;; malformed mutability\n      \"\\41\\00\"            ;; i32.const 0\n      \"\\0b\"               ;; end\n  )\n  \"malformed mutability\"\n)\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\06\\86\\80\\80\\80\\00\"  ;; global section\n      \"\\01\"               ;; length 1\n      \"\\7f\"               ;; i32\n      \"\\ff\"               ;; malformed mutability\n      \"\\41\\00\"            ;; i32.const 0\n      \"\\0b\"               ;; end\n  )\n  \"malformed mutability\"\n)\n\n;; global.get with invalid index\n(assert_invalid\n  (module (func (result i32) (global.get 0)))\n  \"unknown global\"\n)\n\n(assert_invalid\n  (module\n    (global i32 (i32.const 0))\n    (func (result i32) (global.get 1))\n  )\n  \"unknown global\"\n)\n\n(assert_invalid\n  (module\n    (import \"spectest\" \"global_i32\" (global i32))\n    (func (result i32) (global.get 1))\n  )\n  \"unknown global\"\n)\n\n(assert_invalid\n  (module\n    (import \"spectest\" \"global_i32\" (global i32))\n    (global i32 (i32.const 0))\n    (func (result i32) (global.get 2))\n  )\n  \"unknown global\"\n)\n\n;; global.set with invalid index\n(assert_invalid\n  (module (func (i32.const 0) (global.set 0)))\n  \"unknown global\"\n)\n\n(assert_invalid\n  (module\n    (global i32 (i32.const 0))\n    (func (i32.const 0) (global.set 1))\n  )\n  \"unknown global\"\n)\n\n(assert_invalid\n  (module\n    (import \"spectest\" \"global_i32\" (global i32))\n    (func (i32.const 0) (global.set 1))\n  )\n  \"unknown global\"\n)\n\n(assert_invalid\n  (module\n    (import \"spectest\" \"global_i32\" (global i32))\n    (global i32 (i32.const 0))\n    (func (i32.const 0) (global.set 2))\n  )\n  \"unknown global\"\n)\n\n\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-global.set-value-empty\n      (global.set $x)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-global.set-value-empty-in-block\n      (i32.const 0)\n      (block (global.set $x))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-global.set-value-empty-in-loop\n      (i32.const 0)\n      (loop (global.set $x))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-global.set-value-empty-in-then\n      (i32.const 0) (i32.const 0)\n      (if (then (global.set $x)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-global.set-value-empty-in-else\n      (i32.const 0) (i32.const 0)\n      (if (result i32) (then (i32.const 0)) (else (global.set $x)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-global.set-value-empty-in-br\n      (i32.const 0)\n      (block (br 0 (global.set $x)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-global.set-value-empty-in-br_if\n      (i32.const 0)\n      (block (br_if 0 (global.set $x)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-global.set-value-empty-in-br_table\n      (i32.const 0)\n      (block (br_table 0 (global.set $x)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-global.set-value-empty-in-return\n      (return (global.set $x))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-global.set-value-empty-in-select\n      (select (global.set $x) (i32.const 1) (i32.const 2))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-global.set-value-empty-in-call\n      (call 1 (global.set $x))\n    )\n    (func (param i32) (result i32) (local.get 0))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $f (param i32) (result i32) (local.get 0))\n    (type $sig (func (param i32) (result i32)))\n    (table funcref (elem $f))\n    (func $type-global.set-value-empty-in-call_indirect\n      (block (result i32)\n        (call_indirect (type $sig)\n          (global.set $x) (i32.const 0)\n        )\n      )\n    )\n  )\n  \"type mismatch\"\n)\n\n;; Duplicate identifier errors\n\n(assert_malformed (module quote\n  \"(global $foo i32 (i32.const 0))\"\n  \"(global $foo i32 (i32.const 0))\")\n  \"duplicate global\")\n(assert_malformed (module quote\n  \"(import \\\"\\\" \\\"\\\" (global $foo i32))\"\n  \"(global $foo i32 (i32.const 0))\")\n  \"duplicate global\")\n(assert_malformed (module quote\n  \"(import \\\"\\\" \\\"\\\" (global $foo i32))\"\n  \"(import \\\"\\\" \\\"\\\" (global $foo i32))\")\n  \"duplicate global\")\n"
  },
  {
    "path": "test/core/i32.wast",
    "content": ";; i32 operations\n\n(module\n  (func (export \"add\") (param $x i32) (param $y i32) (result i32) (i32.add (local.get $x) (local.get $y)))\n  (func (export \"sub\") (param $x i32) (param $y i32) (result i32) (i32.sub (local.get $x) (local.get $y)))\n  (func (export \"mul\") (param $x i32) (param $y i32) (result i32) (i32.mul (local.get $x) (local.get $y)))\n  (func (export \"div_s\") (param $x i32) (param $y i32) (result i32) (i32.div_s (local.get $x) (local.get $y)))\n  (func (export \"div_u\") (param $x i32) (param $y i32) (result i32) (i32.div_u (local.get $x) (local.get $y)))\n  (func (export \"rem_s\") (param $x i32) (param $y i32) (result i32) (i32.rem_s (local.get $x) (local.get $y)))\n  (func (export \"rem_u\") (param $x i32) (param $y i32) (result i32) (i32.rem_u (local.get $x) (local.get $y)))\n  (func (export \"and\") (param $x i32) (param $y i32) (result i32) (i32.and (local.get $x) (local.get $y)))\n  (func (export \"or\") (param $x i32) (param $y i32) (result i32) (i32.or (local.get $x) (local.get $y)))\n  (func (export \"xor\") (param $x i32) (param $y i32) (result i32) (i32.xor (local.get $x) (local.get $y)))\n  (func (export \"shl\") (param $x i32) (param $y i32) (result i32) (i32.shl (local.get $x) (local.get $y)))\n  (func (export \"shr_s\") (param $x i32) (param $y i32) (result i32) (i32.shr_s (local.get $x) (local.get $y)))\n  (func (export \"shr_u\") (param $x i32) (param $y i32) (result i32) (i32.shr_u (local.get $x) (local.get $y)))\n  (func (export \"rotl\") (param $x i32) (param $y i32) (result i32) (i32.rotl (local.get $x) (local.get $y)))\n  (func (export \"rotr\") (param $x i32) (param $y i32) (result i32) (i32.rotr (local.get $x) (local.get $y)))\n  (func (export \"clz\") (param $x i32) (result i32) (i32.clz (local.get $x)))\n  (func (export \"ctz\") (param $x i32) (result i32) (i32.ctz (local.get $x)))\n  (func (export \"popcnt\") (param $x i32) (result i32) (i32.popcnt (local.get $x)))\n  (func (export \"extend8_s\") (param $x i32) (result i32) (i32.extend8_s (local.get $x)))\n  (func (export \"extend16_s\") (param $x i32) (result i32) (i32.extend16_s (local.get $x)))\n  (func (export \"eqz\") (param $x i32) (result i32) (i32.eqz (local.get $x)))\n  (func (export \"eq\") (param $x i32) (param $y i32) (result i32) (i32.eq (local.get $x) (local.get $y)))\n  (func (export \"ne\") (param $x i32) (param $y i32) (result i32) (i32.ne (local.get $x) (local.get $y)))\n  (func (export \"lt_s\") (param $x i32) (param $y i32) (result i32) (i32.lt_s (local.get $x) (local.get $y)))\n  (func (export \"lt_u\") (param $x i32) (param $y i32) (result i32) (i32.lt_u (local.get $x) (local.get $y)))\n  (func (export \"le_s\") (param $x i32) (param $y i32) (result i32) (i32.le_s (local.get $x) (local.get $y)))\n  (func (export \"le_u\") (param $x i32) (param $y i32) (result i32) (i32.le_u (local.get $x) (local.get $y)))\n  (func (export \"gt_s\") (param $x i32) (param $y i32) (result i32) (i32.gt_s (local.get $x) (local.get $y)))\n  (func (export \"gt_u\") (param $x i32) (param $y i32) (result i32) (i32.gt_u (local.get $x) (local.get $y)))\n  (func (export \"ge_s\") (param $x i32) (param $y i32) (result i32) (i32.ge_s (local.get $x) (local.get $y)))\n  (func (export \"ge_u\") (param $x i32) (param $y i32) (result i32) (i32.ge_u (local.get $x) (local.get $y)))\n)\n\n(assert_return (invoke \"add\" (i32.const 1) (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"add\" (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"add\" (i32.const -1) (i32.const -1)) (i32.const -2))\n(assert_return (invoke \"add\" (i32.const -1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"add\" (i32.const 0x7fffffff) (i32.const 1)) (i32.const 0x80000000))\n(assert_return (invoke \"add\" (i32.const 0x80000000) (i32.const -1)) (i32.const 0x7fffffff))\n(assert_return (invoke \"add\" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"add\" (i32.const 0x3fffffff) (i32.const 1)) (i32.const 0x40000000))\n\n(assert_return (invoke \"sub\" (i32.const 1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"sub\" (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"sub\" (i32.const -1) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"sub\" (i32.const 0x7fffffff) (i32.const -1)) (i32.const 0x80000000))\n(assert_return (invoke \"sub\" (i32.const 0x80000000) (i32.const 1)) (i32.const 0x7fffffff))\n(assert_return (invoke \"sub\" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"sub\" (i32.const 0x3fffffff) (i32.const -1)) (i32.const 0x40000000))\n\n(assert_return (invoke \"mul\" (i32.const 1) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"mul\" (i32.const 1) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"mul\" (i32.const -1) (i32.const -1)) (i32.const 1))\n(assert_return (invoke \"mul\" (i32.const 0x10000000) (i32.const 4096)) (i32.const 0))\n(assert_return (invoke \"mul\" (i32.const 0x80000000) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"mul\" (i32.const 0x80000000) (i32.const -1)) (i32.const 0x80000000))\n(assert_return (invoke \"mul\" (i32.const 0x7fffffff) (i32.const -1)) (i32.const 0x80000001))\n(assert_return (invoke \"mul\" (i32.const 0x01234567) (i32.const 0x76543210)) (i32.const 0x358e7470))\n(assert_return (invoke \"mul\" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 1))\n\n(assert_trap (invoke \"div_s\" (i32.const 1) (i32.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"div_s\" (i32.const 0) (i32.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"div_s\" (i32.const 0x80000000) (i32.const -1)) \"integer overflow\")\n(assert_trap (invoke \"div_s\" (i32.const 0x80000000) (i32.const 0)) \"integer divide by zero\")\n(assert_return (invoke \"div_s\" (i32.const 1) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"div_s\" (i32.const 0) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"div_s\" (i32.const 0) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"div_s\" (i32.const -1) (i32.const -1)) (i32.const 1))\n(assert_return (invoke \"div_s\" (i32.const 0x80000000) (i32.const 2)) (i32.const 0xc0000000))\n(assert_return (invoke \"div_s\" (i32.const 0x80000001) (i32.const 1000)) (i32.const 0xffdf3b65))\n(assert_return (invoke \"div_s\" (i32.const 5) (i32.const 2)) (i32.const 2))\n(assert_return (invoke \"div_s\" (i32.const -5) (i32.const 2)) (i32.const -2))\n(assert_return (invoke \"div_s\" (i32.const 5) (i32.const -2)) (i32.const -2))\n(assert_return (invoke \"div_s\" (i32.const -5) (i32.const -2)) (i32.const 2))\n(assert_return (invoke \"div_s\" (i32.const 7) (i32.const 3)) (i32.const 2))\n(assert_return (invoke \"div_s\" (i32.const -7) (i32.const 3)) (i32.const -2))\n(assert_return (invoke \"div_s\" (i32.const 7) (i32.const -3)) (i32.const -2))\n(assert_return (invoke \"div_s\" (i32.const -7) (i32.const -3)) (i32.const 2))\n(assert_return (invoke \"div_s\" (i32.const 11) (i32.const 5)) (i32.const 2))\n(assert_return (invoke \"div_s\" (i32.const 17) (i32.const 7)) (i32.const 2))\n\n(assert_trap (invoke \"div_u\" (i32.const 1) (i32.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"div_u\" (i32.const 0) (i32.const 0)) \"integer divide by zero\")\n(assert_return (invoke \"div_u\" (i32.const 1) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"div_u\" (i32.const 0) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"div_u\" (i32.const -1) (i32.const -1)) (i32.const 1))\n(assert_return (invoke \"div_u\" (i32.const 0x80000000) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"div_u\" (i32.const 0x80000000) (i32.const 2)) (i32.const 0x40000000))\n(assert_return (invoke \"div_u\" (i32.const 0x8ff00ff0) (i32.const 0x10001)) (i32.const 0x8fef))\n(assert_return (invoke \"div_u\" (i32.const 0x80000001) (i32.const 1000)) (i32.const 0x20c49b))\n(assert_return (invoke \"div_u\" (i32.const 5) (i32.const 2)) (i32.const 2))\n(assert_return (invoke \"div_u\" (i32.const -5) (i32.const 2)) (i32.const 0x7ffffffd))\n(assert_return (invoke \"div_u\" (i32.const 5) (i32.const -2)) (i32.const 0))\n(assert_return (invoke \"div_u\" (i32.const -5) (i32.const -2)) (i32.const 0))\n(assert_return (invoke \"div_u\" (i32.const 7) (i32.const 3)) (i32.const 2))\n(assert_return (invoke \"div_u\" (i32.const 11) (i32.const 5)) (i32.const 2))\n(assert_return (invoke \"div_u\" (i32.const 17) (i32.const 7)) (i32.const 2))\n\n(assert_trap (invoke \"rem_s\" (i32.const 1) (i32.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"rem_s\" (i32.const 0) (i32.const 0)) \"integer divide by zero\")\n(assert_return (invoke \"rem_s\" (i32.const 0x7fffffff) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"rem_s\" (i32.const 1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"rem_s\" (i32.const 0) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"rem_s\" (i32.const 0) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"rem_s\" (i32.const -1) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"rem_s\" (i32.const 0x80000000) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"rem_s\" (i32.const 0x80000000) (i32.const 2)) (i32.const 0))\n(assert_return (invoke \"rem_s\" (i32.const 0x80000001) (i32.const 1000)) (i32.const -647))\n(assert_return (invoke \"rem_s\" (i32.const 5) (i32.const 2)) (i32.const 1))\n(assert_return (invoke \"rem_s\" (i32.const -5) (i32.const 2)) (i32.const -1))\n(assert_return (invoke \"rem_s\" (i32.const 5) (i32.const -2)) (i32.const 1))\n(assert_return (invoke \"rem_s\" (i32.const -5) (i32.const -2)) (i32.const -1))\n(assert_return (invoke \"rem_s\" (i32.const 7) (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"rem_s\" (i32.const -7) (i32.const 3)) (i32.const -1))\n(assert_return (invoke \"rem_s\" (i32.const 7) (i32.const -3)) (i32.const 1))\n(assert_return (invoke \"rem_s\" (i32.const -7) (i32.const -3)) (i32.const -1))\n(assert_return (invoke \"rem_s\" (i32.const 11) (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"rem_s\" (i32.const 17) (i32.const 7)) (i32.const 3))\n\n(assert_trap (invoke \"rem_u\" (i32.const 1) (i32.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"rem_u\" (i32.const 0) (i32.const 0)) \"integer divide by zero\")\n(assert_return (invoke \"rem_u\" (i32.const 1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"rem_u\" (i32.const 0) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"rem_u\" (i32.const -1) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"rem_u\" (i32.const 0x80000000) (i32.const -1)) (i32.const 0x80000000))\n(assert_return (invoke \"rem_u\" (i32.const 0x80000000) (i32.const 2)) (i32.const 0))\n(assert_return (invoke \"rem_u\" (i32.const 0x8ff00ff0) (i32.const 0x10001)) (i32.const 0x8001))\n(assert_return (invoke \"rem_u\" (i32.const 0x80000001) (i32.const 1000)) (i32.const 649))\n(assert_return (invoke \"rem_u\" (i32.const 5) (i32.const 2)) (i32.const 1))\n(assert_return (invoke \"rem_u\" (i32.const -5) (i32.const 2)) (i32.const 1))\n(assert_return (invoke \"rem_u\" (i32.const 5) (i32.const -2)) (i32.const 5))\n(assert_return (invoke \"rem_u\" (i32.const -5) (i32.const -2)) (i32.const -5))\n(assert_return (invoke \"rem_u\" (i32.const 7) (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"rem_u\" (i32.const 11) (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"rem_u\" (i32.const 17) (i32.const 7)) (i32.const 3))\n\n(assert_return (invoke \"and\" (i32.const 1) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"and\" (i32.const 0) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"and\" (i32.const 1) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"and\" (i32.const 0) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"and\" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"and\" (i32.const 0x7fffffff) (i32.const -1)) (i32.const 0x7fffffff))\n(assert_return (invoke \"and\" (i32.const 0xf0f0ffff) (i32.const 0xfffff0f0)) (i32.const 0xf0f0f0f0))\n(assert_return (invoke \"and\" (i32.const 0xffffffff) (i32.const 0xffffffff)) (i32.const 0xffffffff))\n\n(assert_return (invoke \"or\" (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"or\" (i32.const 0) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"or\" (i32.const 1) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"or\" (i32.const 0) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"or\" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const -1))\n(assert_return (invoke \"or\" (i32.const 0x80000000) (i32.const 0)) (i32.const 0x80000000))\n(assert_return (invoke \"or\" (i32.const 0xf0f0ffff) (i32.const 0xfffff0f0)) (i32.const 0xffffffff))\n(assert_return (invoke \"or\" (i32.const 0xffffffff) (i32.const 0xffffffff)) (i32.const 0xffffffff))\n\n(assert_return (invoke \"xor\" (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"xor\" (i32.const 0) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"xor\" (i32.const 1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"xor\" (i32.const 0) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"xor\" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const -1))\n(assert_return (invoke \"xor\" (i32.const 0x80000000) (i32.const 0)) (i32.const 0x80000000))\n(assert_return (invoke \"xor\" (i32.const -1) (i32.const 0x80000000)) (i32.const 0x7fffffff))\n(assert_return (invoke \"xor\" (i32.const -1) (i32.const 0x7fffffff)) (i32.const 0x80000000))\n(assert_return (invoke \"xor\" (i32.const 0xf0f0ffff) (i32.const 0xfffff0f0)) (i32.const 0x0f0f0f0f))\n(assert_return (invoke \"xor\" (i32.const 0xffffffff) (i32.const 0xffffffff)) (i32.const 0))\n\n(assert_return (invoke \"shl\" (i32.const 1) (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"shl\" (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"shl\" (i32.const 0x7fffffff) (i32.const 1)) (i32.const 0xfffffffe))\n(assert_return (invoke \"shl\" (i32.const 0xffffffff) (i32.const 1)) (i32.const 0xfffffffe))\n(assert_return (invoke \"shl\" (i32.const 0x80000000) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"shl\" (i32.const 0x40000000) (i32.const 1)) (i32.const 0x80000000))\n(assert_return (invoke \"shl\" (i32.const 1) (i32.const 31)) (i32.const 0x80000000))\n(assert_return (invoke \"shl\" (i32.const 1) (i32.const 32)) (i32.const 1))\n(assert_return (invoke \"shl\" (i32.const 1) (i32.const 33)) (i32.const 2))\n(assert_return (invoke \"shl\" (i32.const 1) (i32.const -1)) (i32.const 0x80000000))\n(assert_return (invoke \"shl\" (i32.const 1) (i32.const 0x7fffffff)) (i32.const 0x80000000))\n\n(assert_return (invoke \"shr_s\" (i32.const 1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"shr_s\" (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"shr_s\" (i32.const -1) (i32.const 1)) (i32.const -1))\n(assert_return (invoke \"shr_s\" (i32.const 0x7fffffff) (i32.const 1)) (i32.const 0x3fffffff))\n(assert_return (invoke \"shr_s\" (i32.const 0x80000000) (i32.const 1)) (i32.const 0xc0000000))\n(assert_return (invoke \"shr_s\" (i32.const 0x40000000) (i32.const 1)) (i32.const 0x20000000))\n(assert_return (invoke \"shr_s\" (i32.const 1) (i32.const 32)) (i32.const 1))\n(assert_return (invoke \"shr_s\" (i32.const 1) (i32.const 33)) (i32.const 0))\n(assert_return (invoke \"shr_s\" (i32.const 1) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"shr_s\" (i32.const 1) (i32.const 0x7fffffff)) (i32.const 0))\n(assert_return (invoke \"shr_s\" (i32.const 1) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"shr_s\" (i32.const 0x80000000) (i32.const 31)) (i32.const -1))\n(assert_return (invoke \"shr_s\" (i32.const -1) (i32.const 32)) (i32.const -1))\n(assert_return (invoke \"shr_s\" (i32.const -1) (i32.const 33)) (i32.const -1))\n(assert_return (invoke \"shr_s\" (i32.const -1) (i32.const -1)) (i32.const -1))\n(assert_return (invoke \"shr_s\" (i32.const -1) (i32.const 0x7fffffff)) (i32.const -1))\n(assert_return (invoke \"shr_s\" (i32.const -1) (i32.const 0x80000000)) (i32.const -1))\n\n(assert_return (invoke \"shr_u\" (i32.const 1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"shr_u\" (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"shr_u\" (i32.const -1) (i32.const 1)) (i32.const 0x7fffffff))\n(assert_return (invoke \"shr_u\" (i32.const 0x7fffffff) (i32.const 1)) (i32.const 0x3fffffff))\n(assert_return (invoke \"shr_u\" (i32.const 0x80000000) (i32.const 1)) (i32.const 0x40000000))\n(assert_return (invoke \"shr_u\" (i32.const 0x40000000) (i32.const 1)) (i32.const 0x20000000))\n(assert_return (invoke \"shr_u\" (i32.const 1) (i32.const 32)) (i32.const 1))\n(assert_return (invoke \"shr_u\" (i32.const 1) (i32.const 33)) (i32.const 0))\n(assert_return (invoke \"shr_u\" (i32.const 1) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"shr_u\" (i32.const 1) (i32.const 0x7fffffff)) (i32.const 0))\n(assert_return (invoke \"shr_u\" (i32.const 1) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"shr_u\" (i32.const 0x80000000) (i32.const 31)) (i32.const 1))\n(assert_return (invoke \"shr_u\" (i32.const -1) (i32.const 32)) (i32.const -1))\n(assert_return (invoke \"shr_u\" (i32.const -1) (i32.const 33)) (i32.const 0x7fffffff))\n(assert_return (invoke \"shr_u\" (i32.const -1) (i32.const -1)) (i32.const 1))\n(assert_return (invoke \"shr_u\" (i32.const -1) (i32.const 0x7fffffff)) (i32.const 1))\n(assert_return (invoke \"shr_u\" (i32.const -1) (i32.const 0x80000000)) (i32.const -1))\n\n(assert_return (invoke \"rotl\" (i32.const 1) (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"rotl\" (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"rotl\" (i32.const -1) (i32.const 1)) (i32.const -1))\n(assert_return (invoke \"rotl\" (i32.const 1) (i32.const 32)) (i32.const 1))\n(assert_return (invoke \"rotl\" (i32.const 0xabcd9876) (i32.const 1)) (i32.const 0x579b30ed))\n(assert_return (invoke \"rotl\" (i32.const 0xfe00dc00) (i32.const 4)) (i32.const 0xe00dc00f))\n(assert_return (invoke \"rotl\" (i32.const 0xb0c1d2e3) (i32.const 5)) (i32.const 0x183a5c76))\n(assert_return (invoke \"rotl\" (i32.const 0x00008000) (i32.const 37)) (i32.const 0x00100000))\n(assert_return (invoke \"rotl\" (i32.const 0xb0c1d2e3) (i32.const 0xff05)) (i32.const 0x183a5c76))\n(assert_return (invoke \"rotl\" (i32.const 0x769abcdf) (i32.const 0xffffffed)) (i32.const 0x579beed3))\n(assert_return (invoke \"rotl\" (i32.const 0x769abcdf) (i32.const 0x8000000d)) (i32.const 0x579beed3))\n(assert_return (invoke \"rotl\" (i32.const 1) (i32.const 31)) (i32.const 0x80000000))\n(assert_return (invoke \"rotl\" (i32.const 0x80000000) (i32.const 1)) (i32.const 1))\n\n(assert_return (invoke \"rotr\" (i32.const 1) (i32.const 1)) (i32.const 0x80000000))\n(assert_return (invoke \"rotr\" (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"rotr\" (i32.const -1) (i32.const 1)) (i32.const -1))\n(assert_return (invoke \"rotr\" (i32.const 1) (i32.const 32)) (i32.const 1))\n(assert_return (invoke \"rotr\" (i32.const 0xff00cc00) (i32.const 1)) (i32.const 0x7f806600))\n(assert_return (invoke \"rotr\" (i32.const 0x00080000) (i32.const 4)) (i32.const 0x00008000))\n(assert_return (invoke \"rotr\" (i32.const 0xb0c1d2e3) (i32.const 5)) (i32.const 0x1d860e97))\n(assert_return (invoke \"rotr\" (i32.const 0x00008000) (i32.const 37)) (i32.const 0x00000400))\n(assert_return (invoke \"rotr\" (i32.const 0xb0c1d2e3) (i32.const 0xff05)) (i32.const 0x1d860e97))\n(assert_return (invoke \"rotr\" (i32.const 0x769abcdf) (i32.const 0xffffffed)) (i32.const 0xe6fbb4d5))\n(assert_return (invoke \"rotr\" (i32.const 0x769abcdf) (i32.const 0x8000000d)) (i32.const 0xe6fbb4d5))\n(assert_return (invoke \"rotr\" (i32.const 1) (i32.const 31)) (i32.const 2))\n(assert_return (invoke \"rotr\" (i32.const 0x80000000) (i32.const 31)) (i32.const 1))\n\n(assert_return (invoke \"clz\" (i32.const 0xffffffff)) (i32.const 0))\n(assert_return (invoke \"clz\" (i32.const 0)) (i32.const 32))\n(assert_return (invoke \"clz\" (i32.const 0x00008000)) (i32.const 16))\n(assert_return (invoke \"clz\" (i32.const 0xff)) (i32.const 24))\n(assert_return (invoke \"clz\" (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"clz\" (i32.const 1)) (i32.const 31))\n(assert_return (invoke \"clz\" (i32.const 2)) (i32.const 30))\n(assert_return (invoke \"clz\" (i32.const 0x7fffffff)) (i32.const 1))\n\n(assert_return (invoke \"ctz\" (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"ctz\" (i32.const 0)) (i32.const 32))\n(assert_return (invoke \"ctz\" (i32.const 0x00008000)) (i32.const 15))\n(assert_return (invoke \"ctz\" (i32.const 0x00010000)) (i32.const 16))\n(assert_return (invoke \"ctz\" (i32.const 0x80000000)) (i32.const 31))\n(assert_return (invoke \"ctz\" (i32.const 0x7fffffff)) (i32.const 0))\n\n(assert_return (invoke \"popcnt\" (i32.const -1)) (i32.const 32))\n(assert_return (invoke \"popcnt\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"popcnt\" (i32.const 0x00008000)) (i32.const 1))\n(assert_return (invoke \"popcnt\" (i32.const 0x80008000)) (i32.const 2))\n(assert_return (invoke \"popcnt\" (i32.const 0x7fffffff)) (i32.const 31))\n(assert_return (invoke \"popcnt\" (i32.const 0xAAAAAAAA)) (i32.const 16))\n(assert_return (invoke \"popcnt\" (i32.const 0x55555555)) (i32.const 16))\n(assert_return (invoke \"popcnt\" (i32.const 0xDEADBEEF)) (i32.const 24))\n\n(assert_return (invoke \"extend8_s\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"extend8_s\" (i32.const 0x7f)) (i32.const 127))\n(assert_return (invoke \"extend8_s\" (i32.const 0x80)) (i32.const -128))\n(assert_return (invoke \"extend8_s\" (i32.const 0xff)) (i32.const -1))\n(assert_return (invoke \"extend8_s\" (i32.const 0x012345_00)) (i32.const 0))\n(assert_return (invoke \"extend8_s\" (i32.const 0xfedcba_80)) (i32.const -0x80))\n(assert_return (invoke \"extend8_s\" (i32.const -1)) (i32.const -1))\n\n(assert_return (invoke \"extend16_s\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"extend16_s\" (i32.const 0x7fff)) (i32.const 32767))\n(assert_return (invoke \"extend16_s\" (i32.const 0x8000)) (i32.const -32768))\n(assert_return (invoke \"extend16_s\" (i32.const 0xffff)) (i32.const -1))\n(assert_return (invoke \"extend16_s\" (i32.const 0x0123_0000)) (i32.const 0))\n(assert_return (invoke \"extend16_s\" (i32.const 0xfedc_8000)) (i32.const -0x8000))\n(assert_return (invoke \"extend16_s\" (i32.const -1)) (i32.const -1))\n\n(assert_return (invoke \"eqz\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"eqz\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"eqz\" (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"eqz\" (i32.const 0x7fffffff)) (i32.const 0))\n(assert_return (invoke \"eqz\" (i32.const 0xffffffff)) (i32.const 0))\n\n(assert_return (invoke \"eq\" (i32.const 0) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"eq\" (i32.const 1) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"eq\" (i32.const -1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"eq\" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"eq\" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 1))\n(assert_return (invoke \"eq\" (i32.const -1) (i32.const -1)) (i32.const 1))\n(assert_return (invoke \"eq\" (i32.const 1) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"eq\" (i32.const 0) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"eq\" (i32.const 0x80000000) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"eq\" (i32.const 0) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (i32.const 0x80000000) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"eq\" (i32.const -1) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 0))\n(assert_return (invoke \"eq\" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 0))\n\n(assert_return (invoke \"ne\" (i32.const 0) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"ne\" (i32.const 1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"ne\" (i32.const -1) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"ne\" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"ne\" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 0))\n(assert_return (invoke \"ne\" (i32.const -1) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"ne\" (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"ne\" (i32.const 0) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"ne\" (i32.const 0x80000000) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"ne\" (i32.const 0) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (i32.const 0x80000000) (i32.const -1)) (i32.const 1))\n(assert_return (invoke \"ne\" (i32.const -1) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 1))\n(assert_return (invoke \"ne\" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 1))\n\n(assert_return (invoke \"lt_s\" (i32.const 0) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"lt_s\" (i32.const 1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"lt_s\" (i32.const -1) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"lt_s\" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"lt_s\" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 0))\n(assert_return (invoke \"lt_s\" (i32.const -1) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"lt_s\" (i32.const 1) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"lt_s\" (i32.const 0) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"lt_s\" (i32.const 0x80000000) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"lt_s\" (i32.const 0) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"lt_s\" (i32.const 0x80000000) (i32.const -1)) (i32.const 1))\n(assert_return (invoke \"lt_s\" (i32.const -1) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"lt_s\" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 1))\n(assert_return (invoke \"lt_s\" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 0))\n\n(assert_return (invoke \"lt_u\" (i32.const 0) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i32.const 1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i32.const -1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i32.const -1) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i32.const 1) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i32.const 0) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"lt_u\" (i32.const 0x80000000) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i32.const 0) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"lt_u\" (i32.const 0x80000000) (i32.const -1)) (i32.const 1))\n(assert_return (invoke \"lt_u\" (i32.const -1) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 1))\n\n(assert_return (invoke \"le_s\" (i32.const 0) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i32.const 1) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i32.const -1) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i32.const -1) (i32.const -1)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i32.const 1) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"le_s\" (i32.const 0) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i32.const 0x80000000) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i32.const 0) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"le_s\" (i32.const 0x80000000) (i32.const -1)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i32.const -1) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"le_s\" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 0))\n\n(assert_return (invoke \"le_u\" (i32.const 0) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"le_u\" (i32.const 1) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"le_u\" (i32.const -1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"le_u\" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"le_u\" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 1))\n(assert_return (invoke \"le_u\" (i32.const -1) (i32.const -1)) (i32.const 1))\n(assert_return (invoke \"le_u\" (i32.const 1) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"le_u\" (i32.const 0) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"le_u\" (i32.const 0x80000000) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"le_u\" (i32.const 0) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"le_u\" (i32.const 0x80000000) (i32.const -1)) (i32.const 1))\n(assert_return (invoke \"le_u\" (i32.const -1) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"le_u\" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 0))\n(assert_return (invoke \"le_u\" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 1))\n\n(assert_return (invoke \"gt_s\" (i32.const 0) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i32.const 1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i32.const -1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i32.const -1) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"gt_s\" (i32.const 0) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i32.const 0x80000000) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i32.const 0) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"gt_s\" (i32.const 0x80000000) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i32.const -1) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"gt_s\" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 1))\n\n(assert_return (invoke \"gt_u\" (i32.const 0) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"gt_u\" (i32.const 1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"gt_u\" (i32.const -1) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"gt_u\" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"gt_u\" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 0))\n(assert_return (invoke \"gt_u\" (i32.const -1) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"gt_u\" (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"gt_u\" (i32.const 0) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"gt_u\" (i32.const 0x80000000) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"gt_u\" (i32.const 0) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"gt_u\" (i32.const 0x80000000) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"gt_u\" (i32.const -1) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"gt_u\" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 1))\n(assert_return (invoke \"gt_u\" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 0))\n\n(assert_return (invoke \"ge_s\" (i32.const 0) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"ge_s\" (i32.const 1) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"ge_s\" (i32.const -1) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"ge_s\" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"ge_s\" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 1))\n(assert_return (invoke \"ge_s\" (i32.const -1) (i32.const -1)) (i32.const 1))\n(assert_return (invoke \"ge_s\" (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"ge_s\" (i32.const 0) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"ge_s\" (i32.const 0x80000000) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"ge_s\" (i32.const 0) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"ge_s\" (i32.const 0x80000000) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"ge_s\" (i32.const -1) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"ge_s\" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 0))\n(assert_return (invoke \"ge_s\" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 1))\n\n(assert_return (invoke \"ge_u\" (i32.const 0) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i32.const 1) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i32.const -1) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i32.const 0x80000000) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i32.const -1) (i32.const -1)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i32.const 0) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"ge_u\" (i32.const 0x80000000) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i32.const 0) (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"ge_u\" (i32.const 0x80000000) (i32.const -1)) (i32.const 0))\n(assert_return (invoke \"ge_u\" (i32.const -1) (i32.const 0x80000000)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i32.const 0x80000000) (i32.const 0x7fffffff)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i32.const 0x7fffffff) (i32.const 0x80000000)) (i32.const 0))\n\n\n(assert_invalid\n  (module\n    (func $type-unary-operand-empty\n      (i32.eqz) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-unary-operand-empty-in-block\n      (i32.const 0)\n      (block (i32.eqz) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-unary-operand-empty-in-loop\n      (i32.const 0)\n      (loop (i32.eqz) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-unary-operand-empty-in-if\n      (i32.const 0) (i32.const 0)\n      (if (then (i32.eqz) (drop)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-unary-operand-empty-in-else\n      (i32.const 0) (i32.const 0)\n      (if (result i32) (then (i32.const 0)) (else (i32.eqz))) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-unary-operand-empty-in-br\n      (i32.const 0)\n      (block (br 0 (i32.eqz)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-unary-operand-empty-in-br_if\n      (i32.const 0)\n      (block (br_if 0 (i32.eqz) (i32.const 1)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-unary-operand-empty-in-br_table\n      (i32.const 0)\n      (block (br_table 0 (i32.eqz)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-unary-operand-empty-in-return\n      (return (i32.eqz)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-unary-operand-empty-in-select\n      (select (i32.eqz) (i32.const 1) (i32.const 2)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-unary-operand-empty-in-call\n      (call 1 (i32.eqz)) (drop)\n    )\n    (func (param i32) (result i32) (local.get 0))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $f (param i32) (result i32) (local.get 0))\n    (type $sig (func (param i32) (result i32)))\n    (table funcref (elem $f))\n    (func $type-unary-operand-empty-in-call_indirect\n      (block (result i32)\n        (call_indirect (type $sig)\n          (i32.eqz) (i32.const 0)\n        )\n        (drop)\n      )\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-unary-operand-empty-in-local.set\n      (local i32)\n      (local.set 0 (i32.eqz)) (local.get 0) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-unary-operand-empty-in-local.tee\n      (local i32)\n      (local.tee 0 (i32.eqz)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-unary-operand-empty-in-global.set\n      (global.set $x (i32.eqz)) (global.get $x) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-unary-operand-empty-in-memory.grow\n      (memory.grow (i32.eqz)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-unary-operand-empty-in-load\n      (i32.load (i32.eqz)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-unary-operand-empty-in-store\n      (i32.store (i32.eqz) (i32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (func $type-binary-1st-operand-empty\n      (i32.add) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-2nd-operand-empty\n      (i32.const 0) (i32.add) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-1st-operand-empty-in-block\n      (i32.const 0) (i32.const 0)\n      (block (i32.add) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-2nd-operand-empty-in-block\n      (i32.const 0)\n      (block (i32.const 0) (i32.add) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-1st-operand-empty-in-loop\n      (i32.const 0) (i32.const 0)\n      (loop (i32.add) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-2nd-operand-empty-in-loop\n      (i32.const 0)\n      (loop (i32.const 0) (i32.add) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-1st-operand-empty-in-if\n      (i32.const 0) (i32.const 0) (i32.const 0)\n      (if (i32.add) (then (drop)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-2nd-operand-empty-in-if\n      (i32.const 0) (i32.const 0)\n      (if (i32.const 0) (then (i32.add)) (else (drop)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-1st-operand-empty-in-else\n      (i32.const 0) (i32.const 0) (i32.const 0)\n      (if (result i32) (then (i32.const 0)) (else (i32.add) (i32.const 0)))\n      (drop) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-2nd-operand-empty-in-else\n      (i32.const 0) (i32.const 0)\n      (if (result i32) (then (i32.const 0)) (else (i32.add)))\n      (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-1st-operand-empty-in-br\n      (i32.const 0) (i32.const 0)\n      (block (br 0 (i32.add)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-2nd-operand-empty-in-br\n      (i32.const 0)\n      (block (br 0 (i32.const 0) (i32.add)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-1st-operand-empty-in-br_if\n      (i32.const 0) (i32.const 0)\n      (block (br_if 0 (i32.add) (i32.const 1)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-2nd-operand-empty-in-br_if\n      (i32.const 0)\n      (block (br_if 0 (i32.const 0) (i32.add) (i32.const 1)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-1st-operand-empty-in-br_table\n      (i32.const 0) (i32.const 0)\n      (block (br_table 0 (i32.add)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-2nd-operand-empty-in-br_table\n      (i32.const 0)\n      (block (br_table 0 (i32.const 0) (i32.add)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-1st-operand-empty-in-return\n      (return (i32.add)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-2nd-operand-empty-in-return\n      (return (i32.const 0) (i32.add)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-1st-operand-empty-in-select\n      (select (i32.add) (i32.const 1) (i32.const 2)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-2nd-operand-empty-in-select\n      (select (i32.const 0) (i32.add) (i32.const 1) (i32.const 2)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-1st-operand-empty-in-call\n      (call 1 (i32.add)) (drop)\n    )\n    (func (param i32 i32) (result i32) (local.get 0))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-2nd-operand-empty-in-call\n      (call 1 (i32.const 0) (i32.add)) (drop)\n    )\n    (func (param i32 i32) (result i32) (local.get 0))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $f (param i32) (result i32) (local.get 0))\n    (type $sig (func (param i32) (result i32)))\n    (table funcref (elem $f))\n    (func $type-binary-1st-operand-empty-in-call_indirect\n      (block (result i32)\n        (call_indirect (type $sig)\n          (i32.add) (i32.const 0)\n        )\n        (drop)\n      )\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $f (param i32) (result i32) (local.get 0))\n    (type $sig (func (param i32) (result i32)))\n    (table funcref (elem $f))\n    (func $type-binary-2nd-operand-empty-in-call_indirect\n      (block (result i32)\n        (call_indirect (type $sig)\n          (i32.const 0) (i32.add) (i32.const 0)\n        )\n        (drop)\n      )\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-1st-operand-empty-in-local.set\n      (local i32)\n      (local.set 0 (i32.add)) (local.get 0) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-2nd-operand-empty-in-local.set\n      (local i32)\n      (local.set 0 (i32.const 0) (i32.add)) (local.get 0) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-1st-operand-empty-in-local.tee\n      (local i32)\n      (local.tee 0 (i32.add)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-binary-2nd-operand-empty-in-local.tee\n      (local i32)\n      (local.tee 0 (i32.const 0) (i32.add)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-binary-1st-operand-empty-in-global.set\n      (global.set $x (i32.add)) (global.get $x) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-binary-2nd-operand-empty-in-global.set\n      (global.set $x (i32.const 0) (i32.add)) (global.get $x) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-binary-1st-operand-empty-in-memory.grow\n      (memory.grow (i32.add)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-binary-2nd-operand-empty-in-memory.grow\n      (memory.grow (i32.const 0) (i32.add)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-binary-1st-operand-empty-in-load\n      (i32.load (i32.add)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-binary-2nd-operand-empty-in-load\n      (i32.load (i32.const 0) (i32.add)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-binary-1st-operand-empty-in-store\n      (i32.store (i32.add) (i32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-binary-2nd-operand-empty-in-store\n      (i32.store (i32.const 1) (i32.add) (i32.const 0))\n    )\n  )\n  \"type mismatch\"\n)\n\n\n;; Type check\n\n(assert_invalid (module (func (result i32) (i32.add (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.and (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.div_s (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.div_u (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.mul (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.or (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.rem_s (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.rem_u (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.rotl (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.rotr (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.shl (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.shr_s (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.shr_u (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.sub (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.xor (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.eqz (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.clz (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.ctz (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.popcnt (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.eq (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.ge_s (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.ge_u (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.gt_s (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.gt_u (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.le_s (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.le_u (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.lt_s (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.lt_u (i64.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i32) (i32.ne (i64.const 0) (f32.const 0)))) \"type mismatch\")\n"
  },
  {
    "path": "test/core/i64.wast",
    "content": ";; i64 operations\n\n(module\n  (func (export \"add\") (param $x i64) (param $y i64) (result i64) (i64.add (local.get $x) (local.get $y)))\n  (func (export \"sub\") (param $x i64) (param $y i64) (result i64) (i64.sub (local.get $x) (local.get $y)))\n  (func (export \"mul\") (param $x i64) (param $y i64) (result i64) (i64.mul (local.get $x) (local.get $y)))\n  (func (export \"div_s\") (param $x i64) (param $y i64) (result i64) (i64.div_s (local.get $x) (local.get $y)))\n  (func (export \"div_u\") (param $x i64) (param $y i64) (result i64) (i64.div_u (local.get $x) (local.get $y)))\n  (func (export \"rem_s\") (param $x i64) (param $y i64) (result i64) (i64.rem_s (local.get $x) (local.get $y)))\n  (func (export \"rem_u\") (param $x i64) (param $y i64) (result i64) (i64.rem_u (local.get $x) (local.get $y)))\n  (func (export \"and\") (param $x i64) (param $y i64) (result i64) (i64.and (local.get $x) (local.get $y)))\n  (func (export \"or\") (param $x i64) (param $y i64) (result i64) (i64.or (local.get $x) (local.get $y)))\n  (func (export \"xor\") (param $x i64) (param $y i64) (result i64) (i64.xor (local.get $x) (local.get $y)))\n  (func (export \"shl\") (param $x i64) (param $y i64) (result i64) (i64.shl (local.get $x) (local.get $y)))\n  (func (export \"shr_s\") (param $x i64) (param $y i64) (result i64) (i64.shr_s (local.get $x) (local.get $y)))\n  (func (export \"shr_u\") (param $x i64) (param $y i64) (result i64) (i64.shr_u (local.get $x) (local.get $y)))\n  (func (export \"rotl\") (param $x i64) (param $y i64) (result i64) (i64.rotl (local.get $x) (local.get $y)))\n  (func (export \"rotr\") (param $x i64) (param $y i64) (result i64) (i64.rotr (local.get $x) (local.get $y)))\n  (func (export \"clz\") (param $x i64) (result i64) (i64.clz (local.get $x)))\n  (func (export \"ctz\") (param $x i64) (result i64) (i64.ctz (local.get $x)))\n  (func (export \"popcnt\") (param $x i64) (result i64) (i64.popcnt (local.get $x)))\n  (func (export \"extend8_s\") (param $x i64) (result i64) (i64.extend8_s (local.get $x)))\n  (func (export \"extend16_s\") (param $x i64) (result i64) (i64.extend16_s (local.get $x)))\n  (func (export \"extend32_s\") (param $x i64) (result i64) (i64.extend32_s (local.get $x)))\n  (func (export \"eqz\") (param $x i64) (result i32) (i64.eqz (local.get $x)))\n  (func (export \"eq\") (param $x i64) (param $y i64) (result i32) (i64.eq (local.get $x) (local.get $y)))\n  (func (export \"ne\") (param $x i64) (param $y i64) (result i32) (i64.ne (local.get $x) (local.get $y)))\n  (func (export \"lt_s\") (param $x i64) (param $y i64) (result i32) (i64.lt_s (local.get $x) (local.get $y)))\n  (func (export \"lt_u\") (param $x i64) (param $y i64) (result i32) (i64.lt_u (local.get $x) (local.get $y)))\n  (func (export \"le_s\") (param $x i64) (param $y i64) (result i32) (i64.le_s (local.get $x) (local.get $y)))\n  (func (export \"le_u\") (param $x i64) (param $y i64) (result i32) (i64.le_u (local.get $x) (local.get $y)))\n  (func (export \"gt_s\") (param $x i64) (param $y i64) (result i32) (i64.gt_s (local.get $x) (local.get $y)))\n  (func (export \"gt_u\") (param $x i64) (param $y i64) (result i32) (i64.gt_u (local.get $x) (local.get $y)))\n  (func (export \"ge_s\") (param $x i64) (param $y i64) (result i32) (i64.ge_s (local.get $x) (local.get $y)))\n  (func (export \"ge_u\") (param $x i64) (param $y i64) (result i32) (i64.ge_u (local.get $x) (local.get $y)))\n)\n\n(assert_return (invoke \"add\" (i64.const 1) (i64.const 1)) (i64.const 2))\n(assert_return (invoke \"add\" (i64.const 1) (i64.const 0)) (i64.const 1))\n(assert_return (invoke \"add\" (i64.const -1) (i64.const -1)) (i64.const -2))\n(assert_return (invoke \"add\" (i64.const -1) (i64.const 1)) (i64.const 0))\n(assert_return (invoke \"add\" (i64.const 0x7fffffffffffffff) (i64.const 1)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"add\" (i64.const 0x8000000000000000) (i64.const -1)) (i64.const 0x7fffffffffffffff))\n(assert_return (invoke \"add\" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i64.const 0))\n(assert_return (invoke \"add\" (i64.const 0x3fffffff) (i64.const 1)) (i64.const 0x40000000))\n\n(assert_return (invoke \"sub\" (i64.const 1) (i64.const 1)) (i64.const 0))\n(assert_return (invoke \"sub\" (i64.const 1) (i64.const 0)) (i64.const 1))\n(assert_return (invoke \"sub\" (i64.const -1) (i64.const -1)) (i64.const 0))\n(assert_return (invoke \"sub\" (i64.const 0x7fffffffffffffff) (i64.const -1)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"sub\" (i64.const 0x8000000000000000) (i64.const 1)) (i64.const 0x7fffffffffffffff))\n(assert_return (invoke \"sub\" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i64.const 0))\n(assert_return (invoke \"sub\" (i64.const 0x3fffffff) (i64.const -1)) (i64.const 0x40000000))\n\n(assert_return (invoke \"mul\" (i64.const 1) (i64.const 1)) (i64.const 1))\n(assert_return (invoke \"mul\" (i64.const 1) (i64.const 0)) (i64.const 0))\n(assert_return (invoke \"mul\" (i64.const -1) (i64.const -1)) (i64.const 1))\n(assert_return (invoke \"mul\" (i64.const 0x1000000000000000) (i64.const 4096)) (i64.const 0))\n(assert_return (invoke \"mul\" (i64.const 0x8000000000000000) (i64.const 0)) (i64.const 0))\n(assert_return (invoke \"mul\" (i64.const 0x8000000000000000) (i64.const -1)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"mul\" (i64.const 0x7fffffffffffffff) (i64.const -1)) (i64.const 0x8000000000000001))\n(assert_return (invoke \"mul\" (i64.const 0x0123456789abcdef) (i64.const 0xfedcba9876543210)) (i64.const 0x2236d88fe5618cf0))\n(assert_return (invoke \"mul\" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i64.const 1))\n\n(assert_trap (invoke \"div_s\" (i64.const 1) (i64.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"div_s\" (i64.const 0) (i64.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"div_s\" (i64.const 0x8000000000000000) (i64.const -1)) \"integer overflow\")\n(assert_trap (invoke \"div_s\" (i64.const 0x8000000000000000) (i64.const 0)) \"integer divide by zero\")\n(assert_return (invoke \"div_s\" (i64.const 1) (i64.const 1)) (i64.const 1))\n(assert_return (invoke \"div_s\" (i64.const 0) (i64.const 1)) (i64.const 0))\n(assert_return (invoke \"div_s\" (i64.const 0) (i64.const -1)) (i64.const 0))\n(assert_return (invoke \"div_s\" (i64.const -1) (i64.const -1)) (i64.const 1))\n(assert_return (invoke \"div_s\" (i64.const 0x8000000000000000) (i64.const 2)) (i64.const 0xc000000000000000))\n(assert_return (invoke \"div_s\" (i64.const 0x8000000000000001) (i64.const 1000)) (i64.const 0xffdf3b645a1cac09))\n(assert_return (invoke \"div_s\" (i64.const 5) (i64.const 2)) (i64.const 2))\n(assert_return (invoke \"div_s\" (i64.const -5) (i64.const 2)) (i64.const -2))\n(assert_return (invoke \"div_s\" (i64.const 5) (i64.const -2)) (i64.const -2))\n(assert_return (invoke \"div_s\" (i64.const -5) (i64.const -2)) (i64.const 2))\n(assert_return (invoke \"div_s\" (i64.const 7) (i64.const 3)) (i64.const 2))\n(assert_return (invoke \"div_s\" (i64.const -7) (i64.const 3)) (i64.const -2))\n(assert_return (invoke \"div_s\" (i64.const 7) (i64.const -3)) (i64.const -2))\n(assert_return (invoke \"div_s\" (i64.const -7) (i64.const -3)) (i64.const 2))\n(assert_return (invoke \"div_s\" (i64.const 11) (i64.const 5)) (i64.const 2))\n(assert_return (invoke \"div_s\" (i64.const 17) (i64.const 7)) (i64.const 2))\n\n(assert_trap (invoke \"div_u\" (i64.const 1) (i64.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"div_u\" (i64.const 0) (i64.const 0)) \"integer divide by zero\")\n(assert_return (invoke \"div_u\" (i64.const 1) (i64.const 1)) (i64.const 1))\n(assert_return (invoke \"div_u\" (i64.const 0) (i64.const 1)) (i64.const 0))\n(assert_return (invoke \"div_u\" (i64.const -1) (i64.const -1)) (i64.const 1))\n(assert_return (invoke \"div_u\" (i64.const 0x8000000000000000) (i64.const -1)) (i64.const 0))\n(assert_return (invoke \"div_u\" (i64.const 0x8000000000000000) (i64.const 2)) (i64.const 0x4000000000000000))\n(assert_return (invoke \"div_u\" (i64.const 0x8ff00ff00ff00ff0) (i64.const 0x100000001)) (i64.const 0x8ff00fef))\n(assert_return (invoke \"div_u\" (i64.const 0x8000000000000001) (i64.const 1000)) (i64.const 0x20c49ba5e353f7))\n(assert_return (invoke \"div_u\" (i64.const 5) (i64.const 2)) (i64.const 2))\n(assert_return (invoke \"div_u\" (i64.const -5) (i64.const 2)) (i64.const 0x7ffffffffffffffd))\n(assert_return (invoke \"div_u\" (i64.const 5) (i64.const -2)) (i64.const 0))\n(assert_return (invoke \"div_u\" (i64.const -5) (i64.const -2)) (i64.const 0))\n(assert_return (invoke \"div_u\" (i64.const 7) (i64.const 3)) (i64.const 2))\n(assert_return (invoke \"div_u\" (i64.const 11) (i64.const 5)) (i64.const 2))\n(assert_return (invoke \"div_u\" (i64.const 17) (i64.const 7)) (i64.const 2))\n\n(assert_trap (invoke \"rem_s\" (i64.const 1) (i64.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"rem_s\" (i64.const 0) (i64.const 0)) \"integer divide by zero\")\n(assert_return (invoke \"rem_s\" (i64.const 0x7fffffffffffffff) (i64.const -1)) (i64.const 0))\n(assert_return (invoke \"rem_s\" (i64.const 1) (i64.const 1)) (i64.const 0))\n(assert_return (invoke \"rem_s\" (i64.const 0) (i64.const 1)) (i64.const 0))\n(assert_return (invoke \"rem_s\" (i64.const 0) (i64.const -1)) (i64.const 0))\n(assert_return (invoke \"rem_s\" (i64.const -1) (i64.const -1)) (i64.const 0))\n(assert_return (invoke \"rem_s\" (i64.const 0x8000000000000000) (i64.const -1)) (i64.const 0))\n(assert_return (invoke \"rem_s\" (i64.const 0x8000000000000000) (i64.const 2)) (i64.const 0))\n(assert_return (invoke \"rem_s\" (i64.const 0x8000000000000001) (i64.const 1000)) (i64.const -807))\n(assert_return (invoke \"rem_s\" (i64.const 5) (i64.const 2)) (i64.const 1))\n(assert_return (invoke \"rem_s\" (i64.const -5) (i64.const 2)) (i64.const -1))\n(assert_return (invoke \"rem_s\" (i64.const 5) (i64.const -2)) (i64.const 1))\n(assert_return (invoke \"rem_s\" (i64.const -5) (i64.const -2)) (i64.const -1))\n(assert_return (invoke \"rem_s\" (i64.const 7) (i64.const 3)) (i64.const 1))\n(assert_return (invoke \"rem_s\" (i64.const -7) (i64.const 3)) (i64.const -1))\n(assert_return (invoke \"rem_s\" (i64.const 7) (i64.const -3)) (i64.const 1))\n(assert_return (invoke \"rem_s\" (i64.const -7) (i64.const -3)) (i64.const -1))\n(assert_return (invoke \"rem_s\" (i64.const 11) (i64.const 5)) (i64.const 1))\n(assert_return (invoke \"rem_s\" (i64.const 17) (i64.const 7)) (i64.const 3))\n\n(assert_trap (invoke \"rem_u\" (i64.const 1) (i64.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"rem_u\" (i64.const 0) (i64.const 0)) \"integer divide by zero\")\n(assert_return (invoke \"rem_u\" (i64.const 1) (i64.const 1)) (i64.const 0))\n(assert_return (invoke \"rem_u\" (i64.const 0) (i64.const 1)) (i64.const 0))\n(assert_return (invoke \"rem_u\" (i64.const -1) (i64.const -1)) (i64.const 0))\n(assert_return (invoke \"rem_u\" (i64.const 0x8000000000000000) (i64.const -1)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"rem_u\" (i64.const 0x8000000000000000) (i64.const 2)) (i64.const 0))\n(assert_return (invoke \"rem_u\" (i64.const 0x8ff00ff00ff00ff0) (i64.const 0x100000001)) (i64.const 0x80000001))\n(assert_return (invoke \"rem_u\" (i64.const 0x8000000000000001) (i64.const 1000)) (i64.const 809))\n(assert_return (invoke \"rem_u\" (i64.const 5) (i64.const 2)) (i64.const 1))\n(assert_return (invoke \"rem_u\" (i64.const -5) (i64.const 2)) (i64.const 1))\n(assert_return (invoke \"rem_u\" (i64.const 5) (i64.const -2)) (i64.const 5))\n(assert_return (invoke \"rem_u\" (i64.const -5) (i64.const -2)) (i64.const -5))\n(assert_return (invoke \"rem_u\" (i64.const 7) (i64.const 3)) (i64.const 1))\n(assert_return (invoke \"rem_u\" (i64.const 11) (i64.const 5)) (i64.const 1))\n(assert_return (invoke \"rem_u\" (i64.const 17) (i64.const 7)) (i64.const 3))\n\n(assert_return (invoke \"and\" (i64.const 1) (i64.const 0)) (i64.const 0))\n(assert_return (invoke \"and\" (i64.const 0) (i64.const 1)) (i64.const 0))\n(assert_return (invoke \"and\" (i64.const 1) (i64.const 1)) (i64.const 1))\n(assert_return (invoke \"and\" (i64.const 0) (i64.const 0)) (i64.const 0))\n(assert_return (invoke \"and\" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i64.const 0))\n(assert_return (invoke \"and\" (i64.const 0x7fffffffffffffff) (i64.const -1)) (i64.const 0x7fffffffffffffff))\n(assert_return (invoke \"and\" (i64.const 0xf0f0ffff) (i64.const 0xfffff0f0)) (i64.const 0xf0f0f0f0))\n(assert_return (invoke \"and\" (i64.const 0xffffffffffffffff) (i64.const 0xffffffffffffffff)) (i64.const 0xffffffffffffffff))\n\n(assert_return (invoke \"or\" (i64.const 1) (i64.const 0)) (i64.const 1))\n(assert_return (invoke \"or\" (i64.const 0) (i64.const 1)) (i64.const 1))\n(assert_return (invoke \"or\" (i64.const 1) (i64.const 1)) (i64.const 1))\n(assert_return (invoke \"or\" (i64.const 0) (i64.const 0)) (i64.const 0))\n(assert_return (invoke \"or\" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i64.const -1))\n(assert_return (invoke \"or\" (i64.const 0x8000000000000000) (i64.const 0)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"or\" (i64.const 0xf0f0ffff) (i64.const 0xfffff0f0)) (i64.const 0xffffffff))\n(assert_return (invoke \"or\" (i64.const 0xffffffffffffffff) (i64.const 0xffffffffffffffff)) (i64.const 0xffffffffffffffff))\n\n(assert_return (invoke \"xor\" (i64.const 1) (i64.const 0)) (i64.const 1))\n(assert_return (invoke \"xor\" (i64.const 0) (i64.const 1)) (i64.const 1))\n(assert_return (invoke \"xor\" (i64.const 1) (i64.const 1)) (i64.const 0))\n(assert_return (invoke \"xor\" (i64.const 0) (i64.const 0)) (i64.const 0))\n(assert_return (invoke \"xor\" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i64.const -1))\n(assert_return (invoke \"xor\" (i64.const 0x8000000000000000) (i64.const 0)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"xor\" (i64.const -1) (i64.const 0x8000000000000000)) (i64.const 0x7fffffffffffffff))\n(assert_return (invoke \"xor\" (i64.const -1) (i64.const 0x7fffffffffffffff)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"xor\" (i64.const 0xf0f0ffff) (i64.const 0xfffff0f0)) (i64.const 0x0f0f0f0f))\n(assert_return (invoke \"xor\" (i64.const 0xffffffffffffffff) (i64.const 0xffffffffffffffff)) (i64.const 0))\n\n(assert_return (invoke \"shl\" (i64.const 1) (i64.const 1)) (i64.const 2))\n(assert_return (invoke \"shl\" (i64.const 1) (i64.const 0)) (i64.const 1))\n(assert_return (invoke \"shl\" (i64.const 0x7fffffffffffffff) (i64.const 1)) (i64.const 0xfffffffffffffffe))\n(assert_return (invoke \"shl\" (i64.const 0xffffffffffffffff) (i64.const 1)) (i64.const 0xfffffffffffffffe))\n(assert_return (invoke \"shl\" (i64.const 0x8000000000000000) (i64.const 1)) (i64.const 0))\n(assert_return (invoke \"shl\" (i64.const 0x4000000000000000) (i64.const 1)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"shl\" (i64.const 1) (i64.const 63)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"shl\" (i64.const 1) (i64.const 64)) (i64.const 1))\n(assert_return (invoke \"shl\" (i64.const 1) (i64.const 65)) (i64.const 2))\n(assert_return (invoke \"shl\" (i64.const 1) (i64.const -1)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"shl\" (i64.const 1) (i64.const 0x7fffffffffffffff)) (i64.const 0x8000000000000000))\n\n(assert_return (invoke \"shr_s\" (i64.const 1) (i64.const 1)) (i64.const 0))\n(assert_return (invoke \"shr_s\" (i64.const 1) (i64.const 0)) (i64.const 1))\n(assert_return (invoke \"shr_s\" (i64.const -1) (i64.const 1)) (i64.const -1))\n(assert_return (invoke \"shr_s\" (i64.const 0x7fffffffffffffff) (i64.const 1)) (i64.const 0x3fffffffffffffff))\n(assert_return (invoke \"shr_s\" (i64.const 0x8000000000000000) (i64.const 1)) (i64.const 0xc000000000000000))\n(assert_return (invoke \"shr_s\" (i64.const 0x4000000000000000) (i64.const 1)) (i64.const 0x2000000000000000))\n(assert_return (invoke \"shr_s\" (i64.const 1) (i64.const 64)) (i64.const 1))\n(assert_return (invoke \"shr_s\" (i64.const 1) (i64.const 65)) (i64.const 0))\n(assert_return (invoke \"shr_s\" (i64.const 1) (i64.const -1)) (i64.const 0))\n(assert_return (invoke \"shr_s\" (i64.const 1) (i64.const 0x7fffffffffffffff)) (i64.const 0))\n(assert_return (invoke \"shr_s\" (i64.const 1) (i64.const 0x8000000000000000)) (i64.const 1))\n(assert_return (invoke \"shr_s\" (i64.const 0x8000000000000000) (i64.const 63)) (i64.const -1))\n(assert_return (invoke \"shr_s\" (i64.const -1) (i64.const 64)) (i64.const -1))\n(assert_return (invoke \"shr_s\" (i64.const -1) (i64.const 65)) (i64.const -1))\n(assert_return (invoke \"shr_s\" (i64.const -1) (i64.const -1)) (i64.const -1))\n(assert_return (invoke \"shr_s\" (i64.const -1) (i64.const 0x7fffffffffffffff)) (i64.const -1))\n(assert_return (invoke \"shr_s\" (i64.const -1) (i64.const 0x8000000000000000)) (i64.const -1))\n\n(assert_return (invoke \"shr_u\" (i64.const 1) (i64.const 1)) (i64.const 0))\n(assert_return (invoke \"shr_u\" (i64.const 1) (i64.const 0)) (i64.const 1))\n(assert_return (invoke \"shr_u\" (i64.const -1) (i64.const 1)) (i64.const 0x7fffffffffffffff))\n(assert_return (invoke \"shr_u\" (i64.const 0x7fffffffffffffff) (i64.const 1)) (i64.const 0x3fffffffffffffff))\n(assert_return (invoke \"shr_u\" (i64.const 0x8000000000000000) (i64.const 1)) (i64.const 0x4000000000000000))\n(assert_return (invoke \"shr_u\" (i64.const 0x4000000000000000) (i64.const 1)) (i64.const 0x2000000000000000))\n(assert_return (invoke \"shr_u\" (i64.const 1) (i64.const 64)) (i64.const 1))\n(assert_return (invoke \"shr_u\" (i64.const 1) (i64.const 65)) (i64.const 0))\n(assert_return (invoke \"shr_u\" (i64.const 1) (i64.const -1)) (i64.const 0))\n(assert_return (invoke \"shr_u\" (i64.const 1) (i64.const 0x7fffffffffffffff)) (i64.const 0))\n(assert_return (invoke \"shr_u\" (i64.const 1) (i64.const 0x8000000000000000)) (i64.const 1))\n(assert_return (invoke \"shr_u\" (i64.const 0x8000000000000000) (i64.const 63)) (i64.const 1))\n(assert_return (invoke \"shr_u\" (i64.const -1) (i64.const 64)) (i64.const -1))\n(assert_return (invoke \"shr_u\" (i64.const -1) (i64.const 65)) (i64.const 0x7fffffffffffffff))\n(assert_return (invoke \"shr_u\" (i64.const -1) (i64.const -1)) (i64.const 1))\n(assert_return (invoke \"shr_u\" (i64.const -1) (i64.const 0x7fffffffffffffff)) (i64.const 1))\n(assert_return (invoke \"shr_u\" (i64.const -1) (i64.const 0x8000000000000000)) (i64.const -1))\n\n(assert_return (invoke \"rotl\" (i64.const 1) (i64.const 1)) (i64.const 2))\n(assert_return (invoke \"rotl\" (i64.const 1) (i64.const 0)) (i64.const 1))\n(assert_return (invoke \"rotl\" (i64.const -1) (i64.const 1)) (i64.const -1))\n(assert_return (invoke \"rotl\" (i64.const 1) (i64.const 64)) (i64.const 1))\n(assert_return (invoke \"rotl\" (i64.const 0xabcd987602468ace) (i64.const 1)) (i64.const 0x579b30ec048d159d))\n(assert_return (invoke \"rotl\" (i64.const 0xfe000000dc000000) (i64.const 4)) (i64.const 0xe000000dc000000f))\n(assert_return (invoke \"rotl\" (i64.const 0xabcd1234ef567809) (i64.const 53)) (i64.const 0x013579a2469deacf))\n(assert_return (invoke \"rotl\" (i64.const 0xabd1234ef567809c) (i64.const 63)) (i64.const 0x55e891a77ab3c04e))\n(assert_return (invoke \"rotl\" (i64.const 0xabcd1234ef567809) (i64.const 0xf5)) (i64.const 0x013579a2469deacf))\n(assert_return (invoke \"rotl\" (i64.const 0xabcd7294ef567809) (i64.const 0xffffffffffffffed)) (i64.const 0xcf013579ae529dea))\n(assert_return (invoke \"rotl\" (i64.const 0xabd1234ef567809c) (i64.const 0x800000000000003f)) (i64.const 0x55e891a77ab3c04e))\n(assert_return (invoke \"rotl\" (i64.const 1) (i64.const 63)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"rotl\" (i64.const 0x8000000000000000) (i64.const 1)) (i64.const 1))\n\n(assert_return (invoke \"rotr\" (i64.const 1) (i64.const 1)) (i64.const 0x8000000000000000))\n(assert_return (invoke \"rotr\" (i64.const 1) (i64.const 0)) (i64.const 1))\n(assert_return (invoke \"rotr\" (i64.const -1) (i64.const 1)) (i64.const -1))\n(assert_return (invoke \"rotr\" (i64.const 1) (i64.const 64)) (i64.const 1))\n(assert_return (invoke \"rotr\" (i64.const 0xabcd987602468ace) (i64.const 1)) (i64.const 0x55e6cc3b01234567))\n(assert_return (invoke \"rotr\" (i64.const 0xfe000000dc000000) (i64.const 4)) (i64.const 0x0fe000000dc00000))\n(assert_return (invoke \"rotr\" (i64.const 0xabcd1234ef567809) (i64.const 53)) (i64.const 0x6891a77ab3c04d5e))\n(assert_return (invoke \"rotr\" (i64.const 0xabd1234ef567809c) (i64.const 63)) (i64.const 0x57a2469deacf0139))\n(assert_return (invoke \"rotr\" (i64.const 0xabcd1234ef567809) (i64.const 0xf5)) (i64.const 0x6891a77ab3c04d5e))\n(assert_return (invoke \"rotr\" (i64.const 0xabcd7294ef567809) (i64.const 0xffffffffffffffed)) (i64.const 0x94a77ab3c04d5e6b))\n(assert_return (invoke \"rotr\" (i64.const 0xabd1234ef567809c) (i64.const 0x800000000000003f)) (i64.const 0x57a2469deacf0139))\n(assert_return (invoke \"rotr\" (i64.const 1) (i64.const 63)) (i64.const 2))\n(assert_return (invoke \"rotr\" (i64.const 0x8000000000000000) (i64.const 63)) (i64.const 1))\n\n(assert_return (invoke \"clz\" (i64.const 0xffffffffffffffff)) (i64.const 0))\n(assert_return (invoke \"clz\" (i64.const 0)) (i64.const 64))\n(assert_return (invoke \"clz\" (i64.const 0x00008000)) (i64.const 48))\n(assert_return (invoke \"clz\" (i64.const 0xff)) (i64.const 56))\n(assert_return (invoke \"clz\" (i64.const 0x8000000000000000)) (i64.const 0))\n(assert_return (invoke \"clz\" (i64.const 1)) (i64.const 63))\n(assert_return (invoke \"clz\" (i64.const 2)) (i64.const 62))\n(assert_return (invoke \"clz\" (i64.const 0x7fffffffffffffff)) (i64.const 1))\n\n(assert_return (invoke \"ctz\" (i64.const -1)) (i64.const 0))\n(assert_return (invoke \"ctz\" (i64.const 0)) (i64.const 64))\n(assert_return (invoke \"ctz\" (i64.const 0x00008000)) (i64.const 15))\n(assert_return (invoke \"ctz\" (i64.const 0x00010000)) (i64.const 16))\n(assert_return (invoke \"ctz\" (i64.const 0x8000000000000000)) (i64.const 63))\n(assert_return (invoke \"ctz\" (i64.const 0x7fffffffffffffff)) (i64.const 0))\n\n(assert_return (invoke \"popcnt\" (i64.const -1)) (i64.const 64))\n(assert_return (invoke \"popcnt\" (i64.const 0)) (i64.const 0))\n(assert_return (invoke \"popcnt\" (i64.const 0x00008000)) (i64.const 1))\n(assert_return (invoke \"popcnt\" (i64.const 0x8000800080008000)) (i64.const 4))\n(assert_return (invoke \"popcnt\" (i64.const 0x7fffffffffffffff)) (i64.const 63))\n(assert_return (invoke \"popcnt\" (i64.const 0xAAAAAAAA55555555)) (i64.const 32))\n(assert_return (invoke \"popcnt\" (i64.const 0x99999999AAAAAAAA)) (i64.const 32))\n(assert_return (invoke \"popcnt\" (i64.const 0xDEADBEEFDEADBEEF)) (i64.const 48))\n\n(assert_return (invoke \"extend8_s\" (i64.const 0)) (i64.const 0))\n(assert_return (invoke \"extend8_s\" (i64.const 0x7f)) (i64.const 127))\n(assert_return (invoke \"extend8_s\" (i64.const 0x80)) (i64.const -128))\n(assert_return (invoke \"extend8_s\" (i64.const 0xff)) (i64.const -1))\n(assert_return (invoke \"extend8_s\" (i64.const 0x01234567_89abcd_00)) (i64.const 0))\n(assert_return (invoke \"extend8_s\" (i64.const 0xfedcba98_765432_80)) (i64.const -0x80))\n(assert_return (invoke \"extend8_s\" (i64.const -1)) (i64.const -1))\n\n(assert_return (invoke \"extend16_s\" (i64.const 0)) (i64.const 0))\n(assert_return (invoke \"extend16_s\" (i64.const 0x7fff)) (i64.const 32767))\n(assert_return (invoke \"extend16_s\" (i64.const 0x8000)) (i64.const -32768))\n(assert_return (invoke \"extend16_s\" (i64.const 0xffff)) (i64.const -1))\n(assert_return (invoke \"extend16_s\" (i64.const 0x12345678_9abc_0000)) (i64.const 0))\n(assert_return (invoke \"extend16_s\" (i64.const 0xfedcba98_7654_8000)) (i64.const -0x8000))\n(assert_return (invoke \"extend16_s\" (i64.const -1)) (i64.const -1))\n\n(assert_return (invoke \"extend32_s\" (i64.const 0)) (i64.const 0))\n(assert_return (invoke \"extend32_s\" (i64.const 0x7fff)) (i64.const 32767))\n(assert_return (invoke \"extend32_s\" (i64.const 0x8000)) (i64.const 32768))\n(assert_return (invoke \"extend32_s\" (i64.const 0xffff)) (i64.const 65535))\n(assert_return (invoke \"extend32_s\" (i64.const 0x7fffffff)) (i64.const 0x7fffffff))\n(assert_return (invoke \"extend32_s\" (i64.const 0x80000000)) (i64.const -0x80000000))\n(assert_return (invoke \"extend32_s\" (i64.const 0xffffffff)) (i64.const -1))\n(assert_return (invoke \"extend32_s\" (i64.const 0x01234567_00000000)) (i64.const 0))\n(assert_return (invoke \"extend32_s\" (i64.const 0xfedcba98_80000000)) (i64.const -0x80000000))\n(assert_return (invoke \"extend32_s\" (i64.const -1)) (i64.const -1))\n\n(assert_return (invoke \"eqz\" (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"eqz\" (i64.const 1)) (i32.const 0))\n(assert_return (invoke \"eqz\" (i64.const 0x8000000000000000)) (i32.const 0))\n(assert_return (invoke \"eqz\" (i64.const 0x7fffffffffffffff)) (i32.const 0))\n(assert_return (invoke \"eqz\" (i64.const 0xffffffffffffffff)) (i32.const 0))\n\n(assert_return (invoke \"eq\" (i64.const 0) (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"eq\" (i64.const 1) (i64.const 1)) (i32.const 1))\n(assert_return (invoke \"eq\" (i64.const -1) (i64.const 1)) (i32.const 0))\n(assert_return (invoke \"eq\" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 1))\n(assert_return (invoke \"eq\" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 1))\n(assert_return (invoke \"eq\" (i64.const -1) (i64.const -1)) (i32.const 1))\n(assert_return (invoke \"eq\" (i64.const 1) (i64.const 0)) (i32.const 0))\n(assert_return (invoke \"eq\" (i64.const 0) (i64.const 1)) (i32.const 0))\n(assert_return (invoke \"eq\" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 0))\n(assert_return (invoke \"eq\" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 0))\n(assert_return (invoke \"eq\" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 0))\n(assert_return (invoke \"eq\" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 0))\n(assert_return (invoke \"eq\" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 0))\n\n(assert_return (invoke \"ne\" (i64.const 0) (i64.const 0)) (i32.const 0))\n(assert_return (invoke \"ne\" (i64.const 1) (i64.const 1)) (i32.const 0))\n(assert_return (invoke \"ne\" (i64.const -1) (i64.const 1)) (i32.const 1))\n(assert_return (invoke \"ne\" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 0))\n(assert_return (invoke \"ne\" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 0))\n(assert_return (invoke \"ne\" (i64.const -1) (i64.const -1)) (i32.const 0))\n(assert_return (invoke \"ne\" (i64.const 1) (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"ne\" (i64.const 0) (i64.const 1)) (i32.const 1))\n(assert_return (invoke \"ne\" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"ne\" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 1))\n(assert_return (invoke \"ne\" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 1))\n(assert_return (invoke \"ne\" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 1))\n(assert_return (invoke \"ne\" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 1))\n\n(assert_return (invoke \"lt_s\" (i64.const 0) (i64.const 0)) (i32.const 0))\n(assert_return (invoke \"lt_s\" (i64.const 1) (i64.const 1)) (i32.const 0))\n(assert_return (invoke \"lt_s\" (i64.const -1) (i64.const 1)) (i32.const 1))\n(assert_return (invoke \"lt_s\" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 0))\n(assert_return (invoke \"lt_s\" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 0))\n(assert_return (invoke \"lt_s\" (i64.const -1) (i64.const -1)) (i32.const 0))\n(assert_return (invoke \"lt_s\" (i64.const 1) (i64.const 0)) (i32.const 0))\n(assert_return (invoke \"lt_s\" (i64.const 0) (i64.const 1)) (i32.const 1))\n(assert_return (invoke \"lt_s\" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"lt_s\" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 0))\n(assert_return (invoke \"lt_s\" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 1))\n(assert_return (invoke \"lt_s\" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 0))\n(assert_return (invoke \"lt_s\" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 1))\n(assert_return (invoke \"lt_s\" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 0))\n\n(assert_return (invoke \"lt_u\" (i64.const 0) (i64.const 0)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i64.const 1) (i64.const 1)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i64.const -1) (i64.const 1)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i64.const -1) (i64.const -1)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i64.const 1) (i64.const 0)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i64.const 0) (i64.const 1)) (i32.const 1))\n(assert_return (invoke \"lt_u\" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 1))\n(assert_return (invoke \"lt_u\" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 1))\n(assert_return (invoke \"lt_u\" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 0))\n(assert_return (invoke \"lt_u\" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 1))\n\n(assert_return (invoke \"le_s\" (i64.const 0) (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i64.const 1) (i64.const 1)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i64.const -1) (i64.const 1)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i64.const -1) (i64.const -1)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i64.const 1) (i64.const 0)) (i32.const 0))\n(assert_return (invoke \"le_s\" (i64.const 0) (i64.const 1)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 0))\n(assert_return (invoke \"le_s\" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 0))\n(assert_return (invoke \"le_s\" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 1))\n(assert_return (invoke \"le_s\" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 0))\n\n(assert_return (invoke \"le_u\" (i64.const 0) (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"le_u\" (i64.const 1) (i64.const 1)) (i32.const 1))\n(assert_return (invoke \"le_u\" (i64.const -1) (i64.const 1)) (i32.const 0))\n(assert_return (invoke \"le_u\" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 1))\n(assert_return (invoke \"le_u\" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 1))\n(assert_return (invoke \"le_u\" (i64.const -1) (i64.const -1)) (i32.const 1))\n(assert_return (invoke \"le_u\" (i64.const 1) (i64.const 0)) (i32.const 0))\n(assert_return (invoke \"le_u\" (i64.const 0) (i64.const 1)) (i32.const 1))\n(assert_return (invoke \"le_u\" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 0))\n(assert_return (invoke \"le_u\" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 1))\n(assert_return (invoke \"le_u\" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 1))\n(assert_return (invoke \"le_u\" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 0))\n(assert_return (invoke \"le_u\" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 0))\n(assert_return (invoke \"le_u\" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 1))\n\n(assert_return (invoke \"gt_s\" (i64.const 0) (i64.const 0)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i64.const 1) (i64.const 1)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i64.const -1) (i64.const 1)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i64.const -1) (i64.const -1)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i64.const 1) (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"gt_s\" (i64.const 0) (i64.const 1)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 1))\n(assert_return (invoke \"gt_s\" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 1))\n(assert_return (invoke \"gt_s\" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 0))\n(assert_return (invoke \"gt_s\" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 1))\n\n(assert_return (invoke \"gt_u\" (i64.const 0) (i64.const 0)) (i32.const 0))\n(assert_return (invoke \"gt_u\" (i64.const 1) (i64.const 1)) (i32.const 0))\n(assert_return (invoke \"gt_u\" (i64.const -1) (i64.const 1)) (i32.const 1))\n(assert_return (invoke \"gt_u\" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 0))\n(assert_return (invoke \"gt_u\" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 0))\n(assert_return (invoke \"gt_u\" (i64.const -1) (i64.const -1)) (i32.const 0))\n(assert_return (invoke \"gt_u\" (i64.const 1) (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"gt_u\" (i64.const 0) (i64.const 1)) (i32.const 0))\n(assert_return (invoke \"gt_u\" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"gt_u\" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 0))\n(assert_return (invoke \"gt_u\" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 0))\n(assert_return (invoke \"gt_u\" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 1))\n(assert_return (invoke \"gt_u\" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 1))\n(assert_return (invoke \"gt_u\" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 0))\n\n(assert_return (invoke \"ge_s\" (i64.const 0) (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"ge_s\" (i64.const 1) (i64.const 1)) (i32.const 1))\n(assert_return (invoke \"ge_s\" (i64.const -1) (i64.const 1)) (i32.const 0))\n(assert_return (invoke \"ge_s\" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 1))\n(assert_return (invoke \"ge_s\" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 1))\n(assert_return (invoke \"ge_s\" (i64.const -1) (i64.const -1)) (i32.const 1))\n(assert_return (invoke \"ge_s\" (i64.const 1) (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"ge_s\" (i64.const 0) (i64.const 1)) (i32.const 0))\n(assert_return (invoke \"ge_s\" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 0))\n(assert_return (invoke \"ge_s\" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 1))\n(assert_return (invoke \"ge_s\" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 0))\n(assert_return (invoke \"ge_s\" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 1))\n(assert_return (invoke \"ge_s\" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 0))\n(assert_return (invoke \"ge_s\" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 1))\n\n(assert_return (invoke \"ge_u\" (i64.const 0) (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i64.const 1) (i64.const 1)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i64.const -1) (i64.const 1)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i64.const -1) (i64.const -1)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i64.const 1) (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i64.const 0) (i64.const 1)) (i32.const 0))\n(assert_return (invoke \"ge_u\" (i64.const 0x8000000000000000) (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i64.const 0) (i64.const 0x8000000000000000)) (i32.const 0))\n(assert_return (invoke \"ge_u\" (i64.const 0x8000000000000000) (i64.const -1)) (i32.const 0))\n(assert_return (invoke \"ge_u\" (i64.const -1) (i64.const 0x8000000000000000)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)) (i32.const 1))\n(assert_return (invoke \"ge_u\" (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)) (i32.const 0))\n\n\n;; Type check\n\n(assert_invalid (module (func (result i64) (i64.add (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.and (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.div_s (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.div_u (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.mul (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.or (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.rem_s (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.rem_u (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.rotl (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.rotr (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.shl (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.shr_s (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.shr_u (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.sub (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.xor (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.eqz (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.clz (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.ctz (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.popcnt (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.eq (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.ge_s (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.ge_u (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.gt_s (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.gt_u (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.le_s (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.le_u (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.lt_s (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.lt_u (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (func (result i64) (i64.ne (i32.const 0) (f32.const 0)))) \"type mismatch\")\n"
  },
  {
    "path": "test/core/if.wast",
    "content": ";; Test `if` operator\n\n(module\n  ;; Auxiliary definition\n  (memory 1)\n\n  (func $dummy)\n\n  (func (export \"empty\") (param i32)\n    (if (local.get 0) (then))\n    (if (local.get 0) (then) (else))\n    (if $l (local.get 0) (then))\n    (if $l (local.get 0) (then) (else))\n  )\n\n  (func (export \"singular\") (param i32) (result i32)\n    (if (local.get 0) (then (nop)))\n    (if (local.get 0) (then (nop)) (else (nop)))\n    (if (result i32) (local.get 0) (then (i32.const 7)) (else (i32.const 8)))\n  )\n\n  (func (export \"multi\") (param i32) (result i32 i32)\n    (if (local.get 0) (then (call $dummy) (call $dummy) (call $dummy)))\n    (if (local.get 0) (then) (else (call $dummy) (call $dummy) (call $dummy)))\n    (if (result i32) (local.get 0)\n      (then (call $dummy) (call $dummy) (i32.const 8) (call $dummy))\n      (else (call $dummy) (call $dummy) (i32.const 9) (call $dummy))\n    )\n    (if (result i32 i64 i32) (local.get 0)\n      (then\n        (call $dummy) (call $dummy) (i32.const 1) (call $dummy)\n        (call $dummy) (call $dummy) (i64.const 2) (call $dummy)\n        (call $dummy) (call $dummy) (i32.const 3) (call $dummy)\n      )\n      (else\n        (call $dummy) (call $dummy) (i32.const -1) (call $dummy)\n        (call $dummy) (call $dummy) (i64.const -2) (call $dummy)\n        (call $dummy) (call $dummy) (i32.const -3) (call $dummy)\n      )\n    )\n    (drop) (drop)\n  )\n\n  (func (export \"nested\") (param i32 i32) (result i32)\n    (if (result i32) (local.get 0)\n      (then\n        (if (local.get 1) (then (call $dummy) (block) (nop)))\n        (if (local.get 1) (then) (else (call $dummy) (block) (nop)))\n        (if (result i32) (local.get 1)\n          (then (call $dummy) (i32.const 9))\n          (else (call $dummy) (i32.const 10))\n        )\n      )\n      (else\n        (if (local.get 1) (then (call $dummy) (block) (nop)))\n        (if (local.get 1) (then) (else (call $dummy) (block) (nop)))\n        (if (result i32) (local.get 1)\n          (then (call $dummy) (i32.const 10))\n          (else (call $dummy) (i32.const 11))\n        )\n      )\n    )\n  )\n\n  (func (export \"as-select-first\") (param i32) (result i32)\n    (select\n      (if (result i32) (local.get 0)\n        (then (call $dummy) (i32.const 1))\n        (else (call $dummy) (i32.const 0))\n      )\n      (i32.const 2) (i32.const 3)\n    )\n  )\n  (func (export \"as-select-mid\") (param i32) (result i32)\n    (select\n      (i32.const 2)\n      (if (result i32) (local.get 0)\n        (then (call $dummy) (i32.const 1))\n        (else (call $dummy) (i32.const 0))\n      )\n      (i32.const 3)\n    )\n  )\n  (func (export \"as-select-last\") (param i32) (result i32)\n    (select\n      (i32.const 2) (i32.const 3)\n      (if (result i32) (local.get 0)\n        (then (call $dummy) (i32.const 1))\n        (else (call $dummy) (i32.const 0))\n      )\n    )\n  )\n\n  (func (export \"as-loop-first\") (param i32) (result i32)\n    (loop (result i32)\n      (if (result i32) (local.get 0)\n        (then (call $dummy) (i32.const 1))\n        (else (call $dummy) (i32.const 0))\n      )\n      (call $dummy) (call $dummy)\n    )\n  )\n  (func (export \"as-loop-mid\") (param i32) (result i32)\n    (loop (result i32)\n      (call $dummy)\n      (if (result i32) (local.get 0)\n        (then (call $dummy) (i32.const 1))\n        (else (call $dummy) (i32.const 0))\n      )\n      (call $dummy)\n    )\n  )\n  (func (export \"as-loop-last\") (param i32) (result i32)\n    (loop (result i32)\n      (call $dummy) (call $dummy)\n      (if (result i32) (local.get 0)\n        (then (call $dummy) (i32.const 1))\n        (else (call $dummy) (i32.const 0))\n      )\n    )\n  )\n\n  (func (export \"as-if-condition\") (param i32) (result i32)\n    (if (result i32)\n      (if (result i32) (local.get 0)\n        (then (i32.const 1)) (else (i32.const 0))\n      )\n      (then (call $dummy) (i32.const 2))\n      (else (call $dummy) (i32.const 3))\n    )\n  )\n\n  (func (export \"as-br_if-first\") (param i32) (result i32)\n    (block (result i32)\n      (br_if 0\n        (if (result i32) (local.get 0)\n          (then (call $dummy) (i32.const 1))\n          (else (call $dummy) (i32.const 0))\n        )\n        (i32.const 2)\n      )\n      (return (i32.const 3))\n    )\n  )\n  (func (export \"as-br_if-last\") (param i32) (result i32)\n    (block (result i32)\n      (br_if 0\n        (i32.const 2)\n        (if (result i32) (local.get 0)\n          (then (call $dummy) (i32.const 1))\n          (else (call $dummy) (i32.const 0))\n        )\n      )\n      (return (i32.const 3))\n    )\n  )\n\n  (func (export \"as-br_table-first\") (param i32) (result i32)\n    (block (result i32)\n      (if (result i32) (local.get 0)\n        (then (call $dummy) (i32.const 1))\n        (else (call $dummy) (i32.const 0))\n      )\n      (i32.const 2)\n      (br_table 0 0)\n    )\n  )\n  (func (export \"as-br_table-last\") (param i32) (result i32)\n    (block (result i32)\n      (i32.const 2)\n      (if (result i32) (local.get 0)\n        (then (call $dummy) (i32.const 1))\n        (else (call $dummy) (i32.const 0))\n      )\n      (br_table 0 0)\n    )\n  )\n\n  (func $func (param i32 i32) (result i32) (local.get 0))\n  (type $check (func (param i32 i32) (result i32)))\n  (table funcref (elem $func))\n  (func (export \"as-call_indirect-first\") (param i32) (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (if (result i32) (local.get 0)\n          (then (call $dummy) (i32.const 1))\n          (else (call $dummy) (i32.const 0))\n        )\n        (i32.const 2) (i32.const 0)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-mid\") (param i32) (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (i32.const 2)\n        (if (result i32) (local.get 0)\n          (then (call $dummy) (i32.const 1))\n          (else (call $dummy) (i32.const 0))\n        )\n        (i32.const 0)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-last\") (param i32) (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (i32.const 2) (i32.const 0)\n        (if (result i32) (local.get 0)\n          (then (call $dummy) (i32.const 1))\n          (else (call $dummy) (i32.const 0))\n        )\n      )\n    )\n  )\n\n  (func (export \"as-store-first\") (param i32)\n    (if (result i32) (local.get 0)\n      (then (call $dummy) (i32.const 1))\n      (else (call $dummy) (i32.const 0))\n    )\n    (i32.const 2)\n    (i32.store)\n  )\n  (func (export \"as-store-last\") (param i32)\n    (i32.const 2)\n    (if (result i32) (local.get 0)\n      (then (call $dummy) (i32.const 1))\n      (else (call $dummy) (i32.const 0))\n    )\n    (i32.store)\n  )\n\n  (func (export \"as-memory.grow-value\") (param i32) (result i32)\n    (memory.grow\n      (if (result i32) (local.get 0)\n        (then (i32.const 1))\n        (else (i32.const 0))\n      )\n    )\n  )\n\n  (func $f (param i32) (result i32) (local.get 0))\n\n  (func (export \"as-call-value\") (param i32) (result i32)\n    (call $f\n      (if (result i32) (local.get 0)\n        (then (i32.const 1))\n        (else (i32.const 0))\n      )\n    )\n  )\n  (func (export \"as-return-value\") (param i32) (result i32)\n    (if (result i32) (local.get 0)\n      (then (i32.const 1))\n      (else (i32.const 0)))\n    (return)\n  )\n  (func (export \"as-drop-operand\") (param i32)\n    (drop\n      (if (result i32) (local.get 0)\n        (then (i32.const 1))\n        (else (i32.const 0))\n      )\n    )\n  )\n  (func (export \"as-br-value\") (param i32) (result i32)\n    (block (result i32)\n      (br 0\n        (if (result i32) (local.get 0)\n          (then (i32.const 1))\n          (else (i32.const 0))\n        )\n      )\n    )\n  )\n  (func (export \"as-local.set-value\") (param i32) (result i32)\n    (local i32)\n    (local.set 0\n      (if (result i32) (local.get 0)\n        (then (i32.const 1))\n        (else (i32.const 0))\n      )\n    )\n    (local.get 0)\n  )\n  (func (export \"as-local.tee-value\") (param i32) (result i32)\n    (local.tee 0\n      (if (result i32) (local.get 0)\n        (then (i32.const 1))\n        (else (i32.const 0))\n      )\n    )\n  )\n  (global $a (mut i32) (i32.const 10))\n  (func (export \"as-global.set-value\") (param i32) (result i32)\n    (global.set $a\n      (if (result i32) (local.get 0)\n        (then (i32.const 1))\n        (else (i32.const 0))\n      )\n    ) (global.get $a)\n  )\n  (func (export \"as-load-operand\") (param i32) (result i32)\n    (i32.load\n      (if (result i32) (local.get 0)\n        (then (i32.const 11))\n        (else (i32.const 10))\n      )\n    )\n  )\n\n  (func (export \"as-unary-operand\") (param i32) (result i32)\n    (i32.ctz\n      (if (result i32) (local.get 0)\n        (then (call $dummy) (i32.const 13))\n        (else (call $dummy) (i32.const -13))\n      )\n    )\n  )\n  (func (export \"as-binary-operand\") (param i32 i32) (result i32)\n    (i32.mul\n      (if (result i32) (local.get 0)\n        (then (call $dummy) (i32.const 3))\n        (else (call $dummy) (i32.const -3))\n      )\n      (if (result i32) (local.get 1)\n        (then (call $dummy) (i32.const 4))\n        (else (call $dummy) (i32.const -5))\n      )\n    )\n  )\n  (func (export \"as-test-operand\") (param i32) (result i32)\n    (i32.eqz\n      (if (result i32) (local.get 0)\n        (then (call $dummy) (i32.const 13))\n        (else (call $dummy) (i32.const 0))\n      )\n    )\n  )\n  (func (export \"as-compare-operand\") (param i32 i32) (result i32)\n    (f32.gt\n      (if (result f32) (local.get 0)\n        (then (call $dummy) (f32.const 3))\n        (else (call $dummy) (f32.const -3))\n      )\n      (if (result f32) (local.get 1)\n        (then (call $dummy) (f32.const 4))\n        (else (call $dummy) (f32.const -4))\n      )\n    )\n  )\n  (func (export \"as-binary-operands\") (param i32) (result i32)\n    (i32.mul\n      (if (result i32 i32) (local.get 0)\n        (then (call $dummy) (i32.const 3) (call $dummy) (i32.const 4))\n        (else (call $dummy) (i32.const 3) (call $dummy) (i32.const -4))\n      )\n    )\n  )\n  (func (export \"as-compare-operands\") (param i32) (result i32)\n    (f32.gt\n      (if (result f32 f32) (local.get 0)\n        (then (call $dummy) (f32.const 3) (call $dummy) (f32.const 3))\n        (else (call $dummy) (f32.const -2) (call $dummy) (f32.const -3))\n      )\n    )\n  )\n  (func (export \"as-mixed-operands\") (param i32) (result i32)\n    (if (result i32 i32) (local.get 0)\n      (then (call $dummy) (i32.const 3) (call $dummy) (i32.const 4))\n      (else (call $dummy) (i32.const -3) (call $dummy) (i32.const -4))\n    )\n    (i32.const 5)\n    (i32.add)\n    (i32.mul)\n  )\n\n  (func (export \"break-bare\") (result i32)\n    (if (i32.const 1) (then (br 0) (unreachable)))\n    (if (i32.const 1) (then (br 0) (unreachable)) (else (unreachable)))\n    (if (i32.const 0) (then (unreachable)) (else (br 0) (unreachable)))\n    (if (i32.const 1) (then (br_if 0 (i32.const 1)) (unreachable)))\n    (if (i32.const 1) (then (br_if 0 (i32.const 1)) (unreachable)) (else (unreachable)))\n    (if (i32.const 0) (then (unreachable)) (else (br_if 0 (i32.const 1)) (unreachable)))\n    (if (i32.const 1) (then (br_table 0 (i32.const 0)) (unreachable)))\n    (if (i32.const 1) (then (br_table 0 (i32.const 0)) (unreachable)) (else (unreachable)))\n    (if (i32.const 0) (then (unreachable)) (else (br_table 0 (i32.const 0)) (unreachable)))\n    (i32.const 19)\n  )\n\n  (func (export \"break-value\") (param i32) (result i32)\n    (if (result i32) (local.get 0)\n      (then (br 0 (i32.const 18)) (i32.const 19))\n      (else (br 0 (i32.const 21)) (i32.const 20))\n    )\n  )\n  (func (export \"break-multi-value\") (param i32) (result i32 i32 i64)\n    (if (result i32 i32 i64) (local.get 0)\n      (then\n        (br 0 (i32.const 18) (i32.const -18) (i64.const 18))\n        (i32.const 19) (i32.const -19) (i64.const 19)\n      )\n      (else\n        (br 0 (i32.const -18) (i32.const 18) (i64.const -18))\n        (i32.const -19) (i32.const 19) (i64.const -19)\n      )\n    )\n  )\n\n  (func (export \"param\") (param i32) (result i32)\n    (i32.const 1)\n    (if (param i32) (result i32) (local.get 0)\n      (then (i32.const 2) (i32.add))\n      (else (i32.const -2) (i32.add))\n    )\n  )\n  (func (export \"params\") (param i32) (result i32)\n    (i32.const 1)\n    (i32.const 2)\n    (if (param i32 i32) (result i32) (local.get 0)\n      (then (i32.add))\n      (else (i32.sub))\n    )\n  )\n  (func (export \"params-id\") (param i32) (result i32)\n    (i32.const 1)\n    (i32.const 2)\n    (if (param i32 i32) (result i32 i32) (local.get 0) (then))\n    (i32.add)\n  )\n  (func (export \"param-break\") (param i32) (result i32)\n    (i32.const 1)\n    (if (param i32) (result i32) (local.get 0)\n      (then (i32.const 2) (i32.add) (br 0))\n      (else (i32.const -2) (i32.add) (br 0))\n    )\n  )\n  (func (export \"params-break\") (param i32) (result i32)\n    (i32.const 1)\n    (i32.const 2)\n    (if (param i32 i32) (result i32) (local.get 0)\n      (then (i32.add) (br 0))\n      (else (i32.sub) (br 0))\n    )\n  )\n  (func (export \"params-id-break\") (param i32) (result i32)\n    (i32.const 1)\n    (i32.const 2)\n    (if (param i32 i32) (result i32 i32) (local.get 0) (then (br 0)))\n    (i32.add)\n  )\n\n  (func (export \"effects\") (param i32) (result i32)\n    (local i32)\n    (if\n      (block (result i32) (local.set 1 (i32.const 1)) (local.get 0))\n      (then\n        (local.set 1 (i32.mul (local.get 1) (i32.const 3)))\n        (local.set 1 (i32.sub (local.get 1) (i32.const 5)))\n        (local.set 1 (i32.mul (local.get 1) (i32.const 7)))\n        (br 0)\n        (local.set 1 (i32.mul (local.get 1) (i32.const 100)))\n      )\n      (else\n        (local.set 1 (i32.mul (local.get 1) (i32.const 5)))\n        (local.set 1 (i32.sub (local.get 1) (i32.const 7)))\n        (local.set 1 (i32.mul (local.get 1) (i32.const 3)))\n        (br 0)\n        (local.set 1 (i32.mul (local.get 1) (i32.const 1000)))\n      )\n    )\n    (local.get 1)\n  )\n\n  ;; Examples\n\n  (func $add64_u_with_carry (export \"add64_u_with_carry\")\n    (param $i i64) (param $j i64) (param $c i32) (result i64 i32)\n    (local $k i64)\n    (local.set $k\n      (i64.add\n        (i64.add (local.get $i) (local.get $j))\n        (i64.extend_i32_u (local.get $c))\n      )\n    )\n    (return (local.get $k) (i64.lt_u (local.get $k) (local.get $i)))\n  )\n\n  (func $add64_u_saturated (export \"add64_u_saturated\")\n    (param i64 i64) (result i64)\n    (call $add64_u_with_carry (local.get 0) (local.get 1) (i32.const 0))\n    (if (param i64) (result i64)\n      (then (drop) (i64.const -1))\n    )\n  )\n\n  ;; Block signature syntax\n\n  (type $block-sig-1 (func))\n  (type $block-sig-2 (func (result i32)))\n  (type $block-sig-3 (func (param $x i32)))\n  (type $block-sig-4 (func (param i32 f64 i32) (result i32 f64 i32)))\n\n  (func (export \"type-use\")\n    (if (type $block-sig-1) (i32.const 1) (then))\n    (if (type $block-sig-2) (i32.const 1)\n      (then (i32.const 0)) (else (i32.const 2))\n    )\n    (if (type $block-sig-3) (i32.const 1) (then (drop)) (else (drop)))\n    (i32.const 0) (f64.const 0) (i32.const 0)\n    (if (type $block-sig-4) (i32.const 1) (then))\n    (drop) (drop) (drop)\n    (if (type $block-sig-2) (result i32) (i32.const 1)\n      (then (i32.const 0)) (else (i32.const 2))\n    )\n    (if (type $block-sig-3) (param i32) (i32.const 1)\n      (then (drop)) (else (drop))\n    )\n    (i32.const 0) (f64.const 0) (i32.const 0)\n    (if (type $block-sig-4)\n      (param i32) (param f64 i32) (result i32 f64) (result i32)\n      (i32.const 1) (then)\n    )\n    (drop) (drop) (drop)\n  )\n)\n\n(assert_return (invoke \"empty\" (i32.const 0)))\n(assert_return (invoke \"empty\" (i32.const 1)))\n(assert_return (invoke \"empty\" (i32.const 100)))\n(assert_return (invoke \"empty\" (i32.const -2)))\n\n(assert_return (invoke \"singular\" (i32.const 0)) (i32.const 8))\n(assert_return (invoke \"singular\" (i32.const 1)) (i32.const 7))\n(assert_return (invoke \"singular\" (i32.const 10)) (i32.const 7))\n(assert_return (invoke \"singular\" (i32.const -10)) (i32.const 7))\n\n(assert_return (invoke \"multi\" (i32.const 0)) (i32.const 9) (i32.const -1))\n(assert_return (invoke \"multi\" (i32.const 1)) (i32.const 8) (i32.const 1))\n(assert_return (invoke \"multi\" (i32.const 13)) (i32.const 8) (i32.const 1))\n(assert_return (invoke \"multi\" (i32.const -5)) (i32.const 8) (i32.const 1))\n\n(assert_return (invoke \"nested\" (i32.const 0) (i32.const 0)) (i32.const 11))\n(assert_return (invoke \"nested\" (i32.const 1) (i32.const 0)) (i32.const 10))\n(assert_return (invoke \"nested\" (i32.const 0) (i32.const 1)) (i32.const 10))\n(assert_return (invoke \"nested\" (i32.const 3) (i32.const 2)) (i32.const 9))\n(assert_return (invoke \"nested\" (i32.const 0) (i32.const -100)) (i32.const 10))\n(assert_return (invoke \"nested\" (i32.const 10) (i32.const 10)) (i32.const 9))\n(assert_return (invoke \"nested\" (i32.const 0) (i32.const -1)) (i32.const 10))\n(assert_return (invoke \"nested\" (i32.const -111) (i32.const -2)) (i32.const 9))\n\n(assert_return (invoke \"as-select-first\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-select-first\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-select-mid\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-select-mid\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"as-select-last\" (i32.const 0)) (i32.const 3))\n(assert_return (invoke \"as-select-last\" (i32.const 1)) (i32.const 2))\n\n(assert_return (invoke \"as-loop-first\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-loop-first\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-loop-mid\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-loop-mid\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-loop-last\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-loop-last\" (i32.const 1)) (i32.const 1))\n\n(assert_return (invoke \"as-if-condition\" (i32.const 0)) (i32.const 3))\n(assert_return (invoke \"as-if-condition\" (i32.const 1)) (i32.const 2))\n\n(assert_return (invoke \"as-br_if-first\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-br_if-first\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-br_if-last\" (i32.const 0)) (i32.const 3))\n(assert_return (invoke \"as-br_if-last\" (i32.const 1)) (i32.const 2))\n\n(assert_return (invoke \"as-br_table-first\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-br_table-first\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-br_table-last\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-br_table-last\" (i32.const 1)) (i32.const 2))\n\n(assert_return (invoke \"as-call_indirect-first\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-call_indirect-first\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-call_indirect-mid\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-call_indirect-mid\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"as-call_indirect-last\" (i32.const 0)) (i32.const 2))\n(assert_trap (invoke \"as-call_indirect-last\" (i32.const 1)) \"undefined element\")\n\n(assert_return (invoke \"as-store-first\" (i32.const 0)))\n(assert_return (invoke \"as-store-first\" (i32.const 1)))\n(assert_return (invoke \"as-store-last\" (i32.const 0)))\n(assert_return (invoke \"as-store-last\" (i32.const 1)))\n\n(assert_return (invoke \"as-memory.grow-value\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-memory.grow-value\" (i32.const 1)) (i32.const 1))\n\n(assert_return (invoke \"as-call-value\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-call-value\" (i32.const 1)) (i32.const 1))\n\n(assert_return (invoke \"as-return-value\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-return-value\" (i32.const 1)) (i32.const 1))\n\n(assert_return (invoke \"as-drop-operand\" (i32.const 0)))\n(assert_return (invoke \"as-drop-operand\" (i32.const 1)))\n\n(assert_return (invoke \"as-br-value\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-br-value\" (i32.const 1)) (i32.const 1))\n\n(assert_return (invoke \"as-local.set-value\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-local.set-value\" (i32.const 1)) (i32.const 1))\n\n(assert_return (invoke \"as-local.tee-value\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-local.tee-value\" (i32.const 1)) (i32.const 1))\n\n(assert_return (invoke \"as-global.set-value\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-global.set-value\" (i32.const 1)) (i32.const 1))\n\n(assert_return (invoke \"as-load-operand\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-load-operand\" (i32.const 1)) (i32.const 0))\n\n(assert_return (invoke \"as-unary-operand\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-unary-operand\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"as-unary-operand\" (i32.const -1)) (i32.const 0))\n\n(assert_return (invoke \"as-binary-operand\" (i32.const 0) (i32.const 0)) (i32.const 15))\n(assert_return (invoke \"as-binary-operand\" (i32.const 0) (i32.const 1)) (i32.const -12))\n(assert_return (invoke \"as-binary-operand\" (i32.const 1) (i32.const 0)) (i32.const -15))\n(assert_return (invoke \"as-binary-operand\" (i32.const 1) (i32.const 1)) (i32.const 12))\n\n(assert_return (invoke \"as-test-operand\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-test-operand\" (i32.const 1)) (i32.const 0))\n\n(assert_return (invoke \"as-compare-operand\" (i32.const 0) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-compare-operand\" (i32.const 0) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"as-compare-operand\" (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-compare-operand\" (i32.const 1) (i32.const 1)) (i32.const 0))\n\n(assert_return (invoke \"as-binary-operands\" (i32.const 0)) (i32.const -12))\n(assert_return (invoke \"as-binary-operands\" (i32.const 1)) (i32.const 12))\n\n(assert_return (invoke \"as-compare-operands\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-compare-operands\" (i32.const 1)) (i32.const 0))\n\n(assert_return (invoke \"as-mixed-operands\" (i32.const 0)) (i32.const -3))\n(assert_return (invoke \"as-mixed-operands\" (i32.const 1)) (i32.const 27))\n\n(assert_return (invoke \"break-bare\") (i32.const 19))\n(assert_return (invoke \"break-value\" (i32.const 1)) (i32.const 18))\n(assert_return (invoke \"break-value\" (i32.const 0)) (i32.const 21))\n(assert_return (invoke \"break-multi-value\" (i32.const 0))\n  (i32.const -18) (i32.const 18) (i64.const -18)\n)\n(assert_return (invoke \"break-multi-value\" (i32.const 1))\n  (i32.const 18) (i32.const -18) (i64.const 18)\n)\n\n(assert_return (invoke \"param\" (i32.const 0)) (i32.const -1))\n(assert_return (invoke \"param\" (i32.const 1)) (i32.const 3))\n(assert_return (invoke \"params\" (i32.const 0)) (i32.const -1))\n(assert_return (invoke \"params\" (i32.const 1)) (i32.const 3))\n(assert_return (invoke \"params-id\" (i32.const 0)) (i32.const 3))\n(assert_return (invoke \"params-id\" (i32.const 1)) (i32.const 3))\n(assert_return (invoke \"param-break\" (i32.const 0)) (i32.const -1))\n(assert_return (invoke \"param-break\" (i32.const 1)) (i32.const 3))\n(assert_return (invoke \"params-break\" (i32.const 0)) (i32.const -1))\n(assert_return (invoke \"params-break\" (i32.const 1)) (i32.const 3))\n(assert_return (invoke \"params-id-break\" (i32.const 0)) (i32.const 3))\n(assert_return (invoke \"params-id-break\" (i32.const 1)) (i32.const 3))\n\n(assert_return (invoke \"effects\" (i32.const 1)) (i32.const -14))\n(assert_return (invoke \"effects\" (i32.const 0)) (i32.const -6))\n\n(assert_return\n  (invoke \"add64_u_with_carry\" (i64.const 0) (i64.const 0) (i32.const 0))\n  (i64.const 0) (i32.const 0)\n)\n(assert_return\n  (invoke \"add64_u_with_carry\" (i64.const 100) (i64.const 124) (i32.const 0))\n  (i64.const 224) (i32.const 0)\n)\n(assert_return\n  (invoke \"add64_u_with_carry\" (i64.const -1) (i64.const 0) (i32.const 0))\n  (i64.const -1) (i32.const 0)\n)\n(assert_return\n  (invoke \"add64_u_with_carry\" (i64.const -1) (i64.const 1) (i32.const 0))\n  (i64.const 0) (i32.const 1)\n)\n(assert_return\n  (invoke \"add64_u_with_carry\" (i64.const -1) (i64.const -1) (i32.const 0))\n  (i64.const -2) (i32.const 1)\n)\n(assert_return\n  (invoke \"add64_u_with_carry\" (i64.const -1) (i64.const 0) (i32.const 1))\n  (i64.const 0) (i32.const 1)\n)\n(assert_return\n  (invoke \"add64_u_with_carry\" (i64.const -1) (i64.const 1) (i32.const 1))\n  (i64.const 1) (i32.const 1)\n)\n(assert_return\n  (invoke \"add64_u_with_carry\" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000) (i32.const 0))\n  (i64.const 0) (i32.const 1)\n)\n\n(assert_return\n  (invoke \"add64_u_saturated\" (i64.const 0) (i64.const 0)) (i64.const 0)\n)\n(assert_return\n  (invoke \"add64_u_saturated\" (i64.const 1230) (i64.const 23)) (i64.const 1253)\n)\n(assert_return\n  (invoke \"add64_u_saturated\" (i64.const -1) (i64.const 0)) (i64.const -1)\n)\n(assert_return\n  (invoke \"add64_u_saturated\" (i64.const -1) (i64.const 1)) (i64.const -1)\n)\n(assert_return\n  (invoke \"add64_u_saturated\" (i64.const -1) (i64.const -1)) (i64.const -1)\n)\n(assert_return\n  (invoke \"add64_u_saturated\" (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)) (i64.const -1)\n)\n\n(assert_return (invoke \"type-use\"))\n\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0)\"\n    \"  (if (type $sig) (result i32) (param i32) (i32.const 1) (then))\"\n    \")\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0)\"\n    \"  (if (param i32) (type $sig) (result i32) (i32.const 1) (then))\"\n    \")\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0)\"\n    \"  (if (param i32) (result i32) (type $sig) (i32.const 1) (then))\"\n    \")\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0)\"\n    \"  (if (result i32) (type $sig) (param i32) (i32.const 1) (then))\"\n    \")\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0)\"\n    \"  (if (result i32) (param i32) (type $sig) (i32.const 1) (then))\"\n    \")\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(func (i32.const 0) (if (result i32) (param i32) (i32.const 1) (then)))\"\n  )\n  \"unexpected token\"\n)\n\n(assert_malformed\n  (module quote\n    \"(func (i32.const 0) (i32.const 1)\"\n    \"  (if (param $x i32) (then (drop)) (else (drop)))\"\n    \")\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func))\"\n    \"(func (i32.const 1)\"\n    \"  (if (type $sig) (result i32) (then (i32.const 0)) (else (i32.const 2)))\"\n    \"  (unreachable)\"\n    \")\"\n  )\n  \"inline function type\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 1)\"\n    \"  (if (type $sig) (result i32) (then (i32.const 0)) (else (i32.const 2)))\"\n    \"  (unreachable)\"\n    \")\"\n  )\n  \"inline function type\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0) (i32.const 1)\"\n    \"  (if (type $sig) (param i32) (then (drop)) (else (drop)))\"\n    \"  (unreachable)\"\n    \")\"\n  )\n  \"inline function type\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32 i32) (result i32)))\"\n    \"(func (i32.const 0) (i32.const 1)\"\n    \"  (if (type $sig) (param i32) (result i32) (then)) (unreachable)\"\n    \")\"\n  )\n  \"inline function type\"\n)\n\n(assert_invalid\n  (module\n    (type $sig (func))\n    (func (i32.const 1) (if (type $sig) (i32.const 0) (then)))\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-empty-i32 (result i32) (if (i32.const 0) (then))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-i64 (result i64) (if (i32.const 0) (then))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-f32 (result f32) (if (i32.const 0) (then))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-f64 (result f64) (if (i32.const 0) (then))))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-empty-i32 (result i32) (if (i32.const 0) (then) (else))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-i64 (result i64) (if (i32.const 0) (then) (else))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-f32 (result f32) (if (i32.const 0) (then) (else))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-f64 (result f64) (if (i32.const 0) (then) (else))))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-then-value-num-vs-void\n    (if (i32.const 1) (then (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-then-value-num-vs-void-else\n    (if (i32.const 1) (then (i32.const 1)) (else))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-value-num-vs-void\n    (if (i32.const 1) (then) (else (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-both-value-num-vs-void\n    (if (i32.const 1) (then (i32.const 1)) (else (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-then-value-nums-vs-void\n    (if (i32.const 1) (then (i32.const 1) (i32.const 2)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-then-value-nums-vs-void-else\n    (if (i32.const 1) (then (i32.const 1) (i32.const 2)) (else))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-value-nums-vs-void\n    (if (i32.const 1) (then) (else (i32.const 1) (i32.const 2)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-both-value-nums-vs-void\n    (if (i32.const 1) (then (i32.const 1) (i32.const 2)) (else (i32.const 2) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-then-value-empty-vs-num (result i32)\n    (if (result i32) (i32.const 1) (then) (else (i32.const 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-value-empty-vs-num (result i32)\n    (if (result i32) (i32.const 1) (then (i32.const 0)) (else))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-both-value-empty-vs-num (result i32)\n    (if (result i32) (i32.const 1) (then) (else))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-then-value-empty-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1) (then) (else (i32.const 0) (i32.const 2)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-value-empty-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1) (then (i32.const 0) (i32.const 1)) (else))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-both-value-empty-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1) (then) (else))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-no-else-vs-num (result i32)\n    (if (result i32) (i32.const 1) (then (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-no-else-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-then-value-void-vs-num (result i32)\n    (if (result i32) (i32.const 1) (then (nop)) (else (i32.const 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-value-void-vs-num (result i32)\n    (if (result i32) (i32.const 1) (then (i32.const 0)) (else (nop)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-both-value-void-vs-num (result i32)\n    (if (result i32) (i32.const 1) (then (nop)) (else (nop)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-then-value-void-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1) (then (nop)) (else (i32.const 0) (i32.const 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-value-void-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1) (then (i32.const 0) (i32.const 0)) (else (nop)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-both-value-void-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1) (then (nop)) (else (nop)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-then-value-num-vs-num (result i32)\n    (if (result i32) (i32.const 1) (then (i64.const 1)) (else (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-value-num-vs-num (result i32)\n    (if (result i32) (i32.const 1) (then (i32.const 1)) (else (i64.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-both-value-num-vs-num (result i32)\n    (if (result i32) (i32.const 1) (then (i64.const 1)) (else (i64.const 1)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-then-value-num-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-value-num-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-both-value-num-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-then-value-partial-vs-nums (result i32 i32)\n    (i32.const 0)\n    (if (result i32 i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-value-partial-vs-nums (result i32 i32)\n    (i32.const 0)\n    (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-both-value-partial-vs-nums (result i32 i32)\n    (i32.const 0)\n    (if (result i32 i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-then-value-nums-vs-num (result i32)\n    (if (result i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-value-nums-vs-num (result i32)\n    (if (result i32) (i32.const 1) (then (i32.const 1)) (else (i32.const 1) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-both-value-nums-vs-num (result i32)\n    (if (result i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (i32.const 1) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-both-different-value-num-vs-num (result i32)\n    (if (result i32) (i32.const 1) (then (i64.const 1)) (else (f64.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-both-different-value-nums-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1) (i32.const 1)) (else (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-then-value-unreached-select (result i32)\n    (if (result i64)\n      (i32.const 0)\n      (then (select (unreachable) (unreachable) (unreachable)))\n      (else (i64.const 0))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-value-unreached-select (result i32)\n    (if (result i64)\n      (i32.const 1)\n      (then (i64.const 0))\n      (else (select (unreachable) (unreachable) (unreachable)))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-value-unreached-select (result i32)\n    (if (result i64)\n      (i32.const 1)\n      (then (select (unreachable) (unreachable) (unreachable)))\n      (else (select (unreachable) (unreachable) (unreachable)))\n    )\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-then-break-last-void-vs-num (result i32)\n    (if (result i32) (i32.const 1) (then (br 0)) (else (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-break-last-void-vs-num (result i32)\n    (if (result i32) (i32.const 1) (then (i32.const 1)) (else (br 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-then-break-last-void-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1) (then (br 0)) (else (i32.const 1) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-break-last-void-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1) (then (i32.const 1) (i32.const 1)) (else (br 0)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-then-break-empty-vs-num (result i32)\n    (if (result i32) (i32.const 1)\n      (then (br 0) (i32.const 1))\n      (else (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-break-empty-vs-num (result i32)\n    (if (result i32) (i32.const 1)\n      (then (i32.const 1))\n      (else (br 0) (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-then-break-empty-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1)\n      (then (br 0) (i32.const 1) (i32.const 1))\n      (else (i32.const 1) (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-break-empty-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1)\n      (then (i32.const 1) (i32.const 1))\n      (else (br 0) (i32.const 1) (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-then-break-void-vs-num (result i32)\n    (if (result i32) (i32.const 1)\n      (then (br 0 (nop)) (i32.const 1))\n      (else (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-break-void-vs-num (result i32)\n    (if (result i32) (i32.const 1)\n      (then (i32.const 1))\n      (else (br 0 (nop)) (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-then-break-void-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1)\n      (then (br 0 (nop)) (i32.const 1) (i32.const 1))\n      (else (i32.const 1) (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-break-void-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1)\n      (then (i32.const 1) (i32.const 1))\n      (else (br 0 (nop)) (i32.const 1) (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-then-break-num-vs-num (result i32)\n    (if (result i32) (i32.const 1)\n      (then (br 0 (i64.const 1)) (i32.const 1))\n      (else (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-break-num-vs-num (result i32)\n    (if (result i32) (i32.const 1)\n      (then (i32.const 1))\n      (else (br 0 (i64.const 1)) (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-then-break-num-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1)\n      (then (br 0 (i64.const 1)) (i32.const 1) (i32.const 1))\n      (else (i32.const 1) (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-break-num-vs-nums (result i32 i32)\n    (if (result i32 i32) (i32.const 1)\n      (then (i32.const 1) (i32.const 1))\n      (else (br 0 (i64.const 1)) (i32.const 1) (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-then-break-partial-vs-nums (result i32 i32)\n    (i32.const 1)\n    (if (result i32 i32) (i32.const 1)\n      (then (br 0 (i64.const 1)) (i32.const 1))\n      (else (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-else-break-partial-vs-nums (result i32 i32)\n    (i32.const 1)\n    (if (result i32 i32) (i32.const 1)\n      (then (i32.const 1))\n      (else (br 0 (i64.const 1)) (i32.const 1))\n    )\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (func $type-condition-empty\n      (if (then))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-condition-empty-in-block\n      (i32.const 0)\n      (block (if (then)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-condition-empty-in-loop\n      (i32.const 0)\n      (loop (if (then)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-condition-empty-in-then\n      (i32.const 0) (i32.const 0)\n      (if (then (if (then))))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-condition-empty-in-else\n      (i32.const 0) (i32.const 0)\n      (if (result i32) (then (i32.const 0)) (else (if (then)) (i32.const 0)))\n      (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-condition-empty-in-br\n      (i32.const 0)\n      (block (br 0 (if(then))) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-condition-empty-in-br_if\n      (i32.const 0)\n      (block (br_if 0 (if(then)) (i32.const 1)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-condition-empty-in-br_table\n      (i32.const 0)\n      (block (br_table 0 (if(then))) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-condition-empty-in-return\n      (return (if(then))) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-condition-empty-in-select\n      (select (if(then)) (i32.const 1) (i32.const 2)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-condition-empty-in-call\n      (call 1 (if(then))) (drop)\n    )\n    (func (param i32) (result i32) (local.get 0))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $f (param i32) (result i32) (local.get 0))\n    (type $sig (func (param i32) (result i32)))\n    (table funcref (elem $f))\n    (func $type-condition-empty-in-call_indirect\n      (block (result i32)\n        (call_indirect (type $sig)\n          (if(then)) (i32.const 0)\n        )\n        (drop)\n      )\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-condition-empty-in-local.set\n      (local i32)\n      (local.set 0 (if(then))) (local.get 0) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-condition-empty-in-local.tee\n      (local i32)\n      (local.tee 0 (if(then))) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-condition-empty-in-global.set\n      (global.set $x (if(then))) (global.get $x) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-condition-empty-in-memory.grow\n      (memory.grow (if(then))) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-condition-empty-in-load\n      (i32.load (if(then))) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-condition-empty-in-store\n      (i32.store (if(then)) (i32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-param-void-vs-num\n    (if (param i32) (i32.const 1) (then (drop)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-void-vs-nums\n    (if (param i32 f64) (i32.const 1) (then (drop) (drop)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-num\n    (f32.const 0) (if (param i32) (i32.const 1) (then (drop)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-nums\n    (f32.const 0) (if (param f32 i32) (i32.const 1) (then (drop) (drop)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-nested-void-vs-num\n    (block (if (param i32) (i32.const 1) (then (drop))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-void-vs-nums\n    (block (if (param i32 f64) (i32.const 1) (then (drop) (drop))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-num\n    (block (f32.const 0) (if (param i32) (i32.const 1) (then (drop))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-nums\n    (block (f32.const 0) (if (param f32 i32) (i32.const 1) (then (drop) (drop))))\n  ))\n  \"type mismatch\"\n)\n\n(assert_malformed\n  (module quote \"(func (param i32) (result i32) if (param $x i32) end)\")\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote \"(func (param i32) (result i32) (if (param $x i32) (then)))\")\n  \"unexpected token\"\n)\n\n(assert_malformed\n  (module quote \"(func i32.const 0 if end $l)\")\n  \"mismatching label\"\n)\n(assert_malformed\n  (module quote \"(func i32.const 0 if $a end $l)\")\n  \"mismatching label\"\n)\n(assert_malformed\n  (module quote \"(func i32.const 0 if else $l end)\")\n  \"mismatching label\"\n)\n(assert_malformed\n  (module quote \"(func i32.const 0 if $a else $l end)\")\n  \"mismatching label\"\n)\n(assert_malformed\n  (module quote \"(func i32.const 0 if else end $l)\")\n  \"mismatching label\"\n)\n(assert_malformed\n  (module quote \"(func i32.const 0 if else $l end $l)\")\n  \"mismatching label\"\n)\n(assert_malformed\n  (module quote \"(func i32.const 0 if else $l1 end $l2)\")\n  \"mismatching label\"\n)\n(assert_malformed\n  (module quote \"(func i32.const 0 if $a else end $l)\")\n  \"mismatching label\"\n)\n(assert_malformed\n  (module quote \"(func i32.const 0 if $a else $a end $l)\")\n  \"mismatching label\"\n)\n(assert_malformed\n  (module quote \"(func i32.const 0 if $a else $l end $l)\")\n  \"mismatching label\"\n)"
  },
  {
    "path": "test/core/imports.wast",
    "content": ";; Auxiliary module to import from\n\n(module\n  (func (export \"func\"))\n  (func (export \"func-i32\") (param i32))\n  (func (export \"func-f32\") (param f32))\n  (func (export \"func->i32\") (result i32) (i32.const 22))\n  (func (export \"func->f32\") (result f32) (f32.const 11))\n  (func (export \"func-i32->i32\") (param i32) (result i32) (local.get 0))\n  (func (export \"func-i64->i64\") (param i64) (result i64) (local.get 0))\n  (global (export \"global-i32\") i32 (i32.const 55))\n  (global (export \"global-f32\") f32 (f32.const 44))\n  (global (export \"global-mut-i64\") (mut i64) (i64.const 66))\n  (table (export \"table-10-inf\") 10 funcref)\n  (table (export \"table-10-20\") 10 20 funcref)\n  (memory (export \"memory-2-inf\") 2)\n  ;; Multiple memories are not yet supported\n  ;; (memory (export \"memory-2-4\") 2 4)\n)\n\n(register \"test\")\n\n\n;; Functions\n\n(module\n  (type $func_i32 (func (param i32)))\n  (type $func_i64 (func (param i64)))\n  (type $func_f32 (func (param f32)))\n  (type $func_f64 (func (param f64)))\n\n  (import \"spectest\" \"print_i32\" (func (param i32)))\n  ;; JavaScript can't handle i64 yet.\n  ;; (func (import \"spectest\" \"print_i64\") (param i64))\n  (import \"spectest\" \"print_i32\" (func $print_i32 (param i32)))\n  ;; JavaScript can't handle i64 yet.\n  ;; (import \"spectest\" \"print_i64\" (func $print_i64 (param i64)))\n  (import \"spectest\" \"print_f32\" (func $print_f32 (param f32)))\n  (import \"spectest\" \"print_f64\" (func $print_f64 (param f64)))\n  (import \"spectest\" \"print_i32_f32\" (func $print_i32_f32 (param i32 f32)))\n  (import \"spectest\" \"print_f64_f64\" (func $print_f64_f64 (param f64 f64)))\n  (func $print_i32-2 (import \"spectest\" \"print_i32\") (param i32))\n  (func $print_f64-2 (import \"spectest\" \"print_f64\") (param f64))\n  (import \"test\" \"func-i64->i64\" (func $i64->i64 (param i64) (result i64)))\n\n  (func (export \"p1\") (import \"spectest\" \"print_i32\") (param i32))\n  (func $p (export \"p2\") (import \"spectest\" \"print_i32\") (param i32))\n  (func (export \"p3\") (export \"p4\") (import \"spectest\" \"print_i32\") (param i32))\n  (func (export \"p5\") (import \"spectest\" \"print_i32\") (type 0))\n  (func (export \"p6\") (import \"spectest\" \"print_i32\") (type 0) (param i32) (result))\n\n  (import \"spectest\" \"print_i32\" (func (type $forward)))\n  (func (import \"spectest\" \"print_i32\") (type $forward))\n  (type $forward (func (param i32)))\n\n  (table funcref (elem $print_i32 $print_f64))\n\n  (func (export \"print32\") (param $i i32)\n    (local $x f32)\n    (local.set $x (f32.convert_i32_s (local.get $i)))\n    (call 0 (local.get $i))\n    (call $print_i32_f32\n      (i32.add (local.get $i) (i32.const 1))\n      (f32.const 42)\n    )\n    (call $print_i32 (local.get $i))\n    (call $print_i32-2 (local.get $i))\n    (call $print_f32 (local.get $x))\n    (call_indirect (type $func_i32) (local.get $i) (i32.const 0))\n  )\n\n  (func (export \"print64\") (param $i i64)\n    (local $x f64)\n    (local.set $x (f64.convert_i64_s (call $i64->i64 (local.get $i))))\n    ;; JavaScript can't handle i64 yet.\n    ;; (call 1 (local.get $i))\n    (call $print_f64_f64\n      (f64.add (local.get $x) (f64.const 1))\n      (f64.const 53)\n    )\n    ;; JavaScript can't handle i64 yet.\n    ;; (call $print_i64 (local.get $i))\n    (call $print_f64 (local.get $x))\n    (call $print_f64-2 (local.get $x))\n    (call_indirect (type $func_f64) (local.get $x) (i32.const 1))\n  )\n)\n\n(assert_return (invoke \"print32\" (i32.const 13)))\n(assert_return (invoke \"print64\" (i64.const 24)))\n\n(assert_invalid\n  (module \n    (type (func (result i32)))\n    (import \"test\" \"func\" (func (type 1)))\n  )\n  \"unknown type\"\n)\n\n;; Export sharing name with import\n(module\n  (import \"spectest\" \"print_i32\" (func $imported_print (param i32)))\n  (func (export \"print_i32\") (param $i i32)\n    (call $imported_print (local.get $i))\n  )\n)\n\n(assert_return (invoke \"print_i32\" (i32.const 13)))\n\n;; Export sharing name with import\n(module\n  (import \"spectest\" \"print_i32\" (func $imported_print (param i32)))\n  (func (export \"print_i32\") (param $i i32) (param $j i32) (result i32)\n    (i32.add (local.get $i) (local.get $j))\n  )\n)\n\n(assert_return (invoke \"print_i32\" (i32.const 5) (i32.const 11)) (i32.const 16))\n\n(module (import \"test\" \"func\" (func)))\n(module (import \"test\" \"func-i32\" (func (param i32))))\n(module (import \"test\" \"func-f32\" (func (param f32))))\n(module (import \"test\" \"func->i32\" (func (result i32))))\n(module (import \"test\" \"func->f32\" (func (result f32))))\n(module (import \"test\" \"func-i32->i32\" (func (param i32) (result i32))))\n(module (import \"test\" \"func-i64->i64\" (func (param i64) (result i64))))\n\n(assert_unlinkable\n  (module (import \"test\" \"unknown\" (func)))\n  \"unknown import\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"unknown\" (func)))\n  \"unknown import\"\n)\n\n(assert_unlinkable\n  (module (import \"test\" \"func\" (func (param i32))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"func\" (func (result i32))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"func\" (func (param i32) (result i32))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"func-i32\" (func)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"func-i32\" (func (result i32))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"func-i32\" (func (param f32))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"func-i32\" (func (param i64))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"func-i32\" (func (param i32) (result i32))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"func->i32\" (func)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"func->i32\" (func (param i32))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"func->i32\" (func (result f32))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"func->i32\" (func (result i64))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"func->i32\" (func (param i32) (result i32))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"func-i32->i32\" (func)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"func-i32->i32\" (func (param i32))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"func-i32->i32\" (func (result i32))))\n  \"incompatible import type\"\n)\n\n(assert_unlinkable\n  (module (import \"test\" \"global-i32\" (func (result i32))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"table-10-inf\" (func)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"memory-2-inf\" (func)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"global_i32\" (func)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"table\" (func)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"memory\" (func)))\n  \"incompatible import type\"\n)\n\n\n;; Globals\n\n(module\n  (import \"spectest\" \"global_i32\" (global i32))\n  (global (import \"spectest\" \"global_i32\") i32)\n\n  (import \"spectest\" \"global_i32\" (global $x i32))\n  (global $y (import \"spectest\" \"global_i32\") i32)\n\n  ;; JavaScript can't handle i64 yet.\n  ;; (import \"spectest\" \"global_i64\" (global i64))\n  (import \"spectest\" \"global_f32\" (global f32))\n  (import \"spectest\" \"global_f64\" (global f64))\n\n  (func (export \"get-0\") (result i32) (global.get 0))\n  (func (export \"get-1\") (result i32) (global.get 1))\n  (func (export \"get-x\") (result i32) (global.get $x))\n  (func (export \"get-y\") (result i32) (global.get $y))\n)\n\n(assert_return (invoke \"get-0\") (i32.const 666))\n(assert_return (invoke \"get-1\") (i32.const 666))\n(assert_return (invoke \"get-x\") (i32.const 666))\n(assert_return (invoke \"get-y\") (i32.const 666))\n\n(module (import \"test\" \"global-i32\" (global i32)))\n(module (import \"test\" \"global-f32\" (global f32)))\n(module (import \"test\" \"global-mut-i64\" (global (mut i64))))\n\n(assert_unlinkable\n  (module (import \"test\" \"unknown\" (global i32)))\n  \"unknown import\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"unknown\" (global i32)))\n  \"unknown import\"\n)\n\n(assert_unlinkable\n  (module (import \"test\" \"global-i32\" (global i64)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"global-i32\" (global f32)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"global-i32\" (global f64)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"global-i32\" (global (mut i32))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"global-f32\" (global i32)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"global-f32\" (global i64)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"global-f32\" (global f64)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"global-f32\" (global (mut f32))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"global-mut-i64\" (global (mut i32))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"global-mut-i64\" (global (mut f32))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"global-mut-i64\" (global (mut f64))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"global-mut-i64\" (global i64)))\n  \"incompatible import type\"\n)\n\n(assert_unlinkable\n  (module (import \"test\" \"func\" (global i32)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"table-10-inf\" (global i32)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"memory-2-inf\" (global i32)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"print_i32\" (global i32)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"table\" (global i32)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"memory\" (global i32)))\n  \"incompatible import type\"\n)\n\n\n;; Tables\n\n(module\n  (type (func (result i32)))\n  (import \"spectest\" \"table\" (table $tab 10 20 funcref))\n  (elem (table $tab) (i32.const 1) func $f $g)\n\n  (func (export \"call\") (param i32) (result i32)\n    (call_indirect $tab (type 0) (local.get 0))\n  )\n  (func $f (result i32) (i32.const 11))\n  (func $g (result i32) (i32.const 22))\n)\n\n(assert_trap (invoke \"call\" (i32.const 0)) \"uninitialized element\")\n(assert_return (invoke \"call\" (i32.const 1)) (i32.const 11))\n(assert_return (invoke \"call\" (i32.const 2)) (i32.const 22))\n(assert_trap (invoke \"call\" (i32.const 3)) \"uninitialized element\")\n(assert_trap (invoke \"call\" (i32.const 100)) \"undefined element\")\n\n\n(module\n  (type (func (result i32)))\n  (table $tab (import \"spectest\" \"table\") 10 20 funcref)\n  (elem (table $tab) (i32.const 1) func $f $g)\n\n  (func (export \"call\") (param i32) (result i32)\n    (call_indirect $tab (type 0) (local.get 0))\n  )\n  (func $f (result i32) (i32.const 11))\n  (func $g (result i32) (i32.const 22))\n)\n\n(assert_trap (invoke \"call\" (i32.const 0)) \"uninitialized element\")\n(assert_return (invoke \"call\" (i32.const 1)) (i32.const 11))\n(assert_return (invoke \"call\" (i32.const 2)) (i32.const 22))\n(assert_trap (invoke \"call\" (i32.const 3)) \"uninitialized element\")\n(assert_trap (invoke \"call\" (i32.const 100)) \"undefined element\")\n\n\n(module\n  (import \"spectest\" \"table\" (table 0 funcref))\n  (import \"spectest\" \"table\" (table 0 funcref))\n  (table 10 funcref)\n  (table 10 funcref)\n)\n\n(module (import \"test\" \"table-10-inf\" (table 10 funcref)))\n(module (import \"test\" \"table-10-inf\" (table 5 funcref)))\n(module (import \"test\" \"table-10-inf\" (table 0 funcref)))\n(module (import \"test\" \"table-10-20\" (table 10 funcref)))\n(module (import \"test\" \"table-10-20\" (table 5 funcref)))\n(module (import \"test\" \"table-10-20\" (table 0 funcref)))\n(module (import \"test\" \"table-10-20\" (table 10 20 funcref)))\n(module (import \"test\" \"table-10-20\" (table 5 20 funcref)))\n(module (import \"test\" \"table-10-20\" (table 0 20 funcref)))\n(module (import \"test\" \"table-10-20\" (table 10 25 funcref)))\n(module (import \"test\" \"table-10-20\" (table 5 25 funcref)))\n(module (import \"test\" \"table-10-20\" (table 0 25 funcref)))\n(module (import \"spectest\" \"table\" (table 10 funcref)))\n(module (import \"spectest\" \"table\" (table 5 funcref)))\n(module (import \"spectest\" \"table\" (table 0 funcref)))\n(module (import \"spectest\" \"table\" (table 10 20 funcref)))\n(module (import \"spectest\" \"table\" (table 5 20 funcref)))\n(module (import \"spectest\" \"table\" (table 0 20 funcref)))\n(module (import \"spectest\" \"table\" (table 10 25 funcref)))\n(module (import \"spectest\" \"table\" (table 5 25 funcref)))\n\n(assert_unlinkable\n  (module (import \"test\" \"unknown\" (table 10 funcref)))\n  \"unknown import\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"unknown\" (table 10 funcref)))\n  \"unknown import\"\n)\n\n(assert_unlinkable\n  (module (import \"test\" \"table-10-inf\" (table 12 funcref)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"table-10-inf\" (table 10 20 funcref)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"table-10-20\" (table 12 20 funcref)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"table-10-20\" (table 10 18 funcref)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"table\" (table 12 funcref)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"table\" (table 10 15 funcref)))\n  \"incompatible import type\"\n)\n\n(assert_unlinkable\n  (module (import \"test\" \"func\" (table 10 funcref)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"global-i32\" (table 10 funcref)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"memory-2-inf\" (table 10 funcref)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"print_i32\" (table 10 funcref)))\n  \"incompatible import type\"\n)\n\n\n\n;; Memories\n\n(module\n  (import \"spectest\" \"memory\" (memory 1 2))\n  (data (memory 0) (i32.const 10) \"\\10\")\n\n  (func (export \"load\") (param i32) (result i32) (i32.load (local.get 0)))\n)\n\n(assert_return (invoke \"load\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load\" (i32.const 10)) (i32.const 16))\n(assert_return (invoke \"load\" (i32.const 8)) (i32.const 0x100000))\n(assert_trap (invoke \"load\" (i32.const 1000000)) \"out of bounds memory access\")\n\n(module\n  (memory (import \"spectest\" \"memory\") 1 2)\n  (data (memory 0) (i32.const 10) \"\\10\")\n\n  (func (export \"load\") (param i32) (result i32) (i32.load (local.get 0)))\n)\n(assert_return (invoke \"load\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load\" (i32.const 10)) (i32.const 16))\n(assert_return (invoke \"load\" (i32.const 8)) (i32.const 0x100000))\n(assert_trap (invoke \"load\" (i32.const 1000000)) \"out of bounds memory access\")\n\n(assert_invalid\n  (module (import \"\" \"\" (memory 1)) (import \"\" \"\" (memory 1)))\n  \"multiple memories\"\n)\n(assert_invalid\n  (module (import \"\" \"\" (memory 1)) (memory 0))\n  \"multiple memories\"\n)\n(assert_invalid\n  (module (memory 0) (memory 0))\n  \"multiple memories\"\n)\n\n(module (import \"test\" \"memory-2-inf\" (memory 2)))\n(module (import \"test\" \"memory-2-inf\" (memory 1)))\n(module (import \"test\" \"memory-2-inf\" (memory 0)))\n(module (import \"spectest\" \"memory\" (memory 1)))\n(module (import \"spectest\" \"memory\" (memory 0)))\n(module (import \"spectest\" \"memory\" (memory 1 2)))\n(module (import \"spectest\" \"memory\" (memory 0 2)))\n(module (import \"spectest\" \"memory\" (memory 1 3)))\n(module (import \"spectest\" \"memory\" (memory 0 3)))\n\n(assert_unlinkable\n  (module (import \"test\" \"unknown\" (memory 1)))\n  \"unknown import\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"unknown\" (memory 1)))\n  \"unknown import\"\n)\n\n(assert_unlinkable\n  (module (import \"test\" \"memory-2-inf\" (memory 3)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"memory-2-inf\" (memory 2 3)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"memory\" (memory 2)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"memory\" (memory 1 1)))\n  \"incompatible import type\"\n)\n\n(assert_unlinkable\n  (module (import \"test\" \"func-i32\" (memory 1)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"global-i32\" (memory 1)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"test\" \"table-10-inf\" (memory 1)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"print_i32\" (memory 1)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"global_i32\" (memory 1)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"table\" (memory 1)))\n  \"incompatible import type\"\n)\n\n(assert_unlinkable\n  (module (import \"spectest\" \"memory\" (memory 2)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"spectest\" \"memory\" (memory 1 1)))\n  \"incompatible import type\"\n)\n\n(module\n  (import \"spectest\" \"memory\" (memory 0 3))  ;; actual has max size 2\n  (func (export \"grow\") (param i32) (result i32) (memory.grow (local.get 0)))\n)\n(assert_return (invoke \"grow\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"grow\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const -1))\n(assert_return (invoke \"grow\" (i32.const 0)) (i32.const 2))\n\n\n;; Syntax errors\n\n(assert_malformed\n  (module quote \"(func) (import \\\"\\\" \\\"\\\" (func))\")\n  \"import after function\"\n)\n(assert_malformed\n  (module quote \"(func) (import \\\"\\\" \\\"\\\" (global i64))\")\n  \"import after function\"\n)\n(assert_malformed\n  (module quote \"(func) (import \\\"\\\" \\\"\\\" (table 0 funcref))\")\n  \"import after function\"\n)\n(assert_malformed\n  (module quote \"(func) (import \\\"\\\" \\\"\\\" (memory 0))\")\n  \"import after function\"\n)\n\n(assert_malformed\n  (module quote \"(global i64 (i64.const 0)) (import \\\"\\\" \\\"\\\" (func))\")\n  \"import after global\"\n)\n(assert_malformed\n  (module quote \"(global i64 (i64.const 0)) (import \\\"\\\" \\\"\\\" (global f32))\")\n  \"import after global\"\n)\n(assert_malformed\n  (module quote \"(global i64 (i64.const 0)) (import \\\"\\\" \\\"\\\" (table 0 funcref))\")\n  \"import after global\"\n)\n(assert_malformed\n  (module quote \"(global i64 (i64.const 0)) (import \\\"\\\" \\\"\\\" (memory 0))\")\n  \"import after global\"\n)\n\n(assert_malformed\n  (module quote \"(table 0 funcref) (import \\\"\\\" \\\"\\\" (func))\")\n  \"import after table\"\n)\n(assert_malformed\n  (module quote \"(table 0 funcref) (import \\\"\\\" \\\"\\\" (global i32))\")\n  \"import after table\"\n)\n(assert_malformed\n  (module quote \"(table 0 funcref) (import \\\"\\\" \\\"\\\" (table 0 funcref))\")\n  \"import after table\"\n)\n(assert_malformed\n  (module quote \"(table 0 funcref) (import \\\"\\\" \\\"\\\" (memory 0))\")\n  \"import after table\"\n)\n\n(assert_malformed\n  (module quote \"(memory 0) (import \\\"\\\" \\\"\\\" (func))\")\n  \"import after memory\"\n)\n(assert_malformed\n  (module quote \"(memory 0) (import \\\"\\\" \\\"\\\" (global i32))\")\n  \"import after memory\"\n)\n(assert_malformed\n  (module quote \"(memory 0) (import \\\"\\\" \\\"\\\" (table 1 3 funcref))\")\n  \"import after memory\"\n)\n(assert_malformed\n  (module quote \"(memory 0) (import \\\"\\\" \\\"\\\" (memory 1 2))\")\n  \"import after memory\"\n)\n\n;; This module is required to validate, regardless of whether it can be\n;; linked. Overloading is not possible in wasm itself, but it is possible\n;; in modules from which wasm can import.\n(module)\n(register \"not wasm\")\n(assert_unlinkable\n  (module\n    (import \"not wasm\" \"overloaded\" (func))\n    (import \"not wasm\" \"overloaded\" (func (param i32)))\n    (import \"not wasm\" \"overloaded\" (func (param i32 i32)))\n    (import \"not wasm\" \"overloaded\" (func (param i64)))\n    (import \"not wasm\" \"overloaded\" (func (param f32)))\n    (import \"not wasm\" \"overloaded\" (func (param f64)))\n    (import \"not wasm\" \"overloaded\" (func (result i32)))\n    (import \"not wasm\" \"overloaded\" (func (result i64)))\n    (import \"not wasm\" \"overloaded\" (func (result f32)))\n    (import \"not wasm\" \"overloaded\" (func (result f64)))\n    (import \"not wasm\" \"overloaded\" (global i32))\n    (import \"not wasm\" \"overloaded\" (global i64))\n    (import \"not wasm\" \"overloaded\" (global f32))\n    (import \"not wasm\" \"overloaded\" (global f64))\n    (import \"not wasm\" \"overloaded\" (table 0 funcref))\n    (import \"not wasm\" \"overloaded\" (memory 0))\n  )\n  \"unknown import\"\n)\n"
  },
  {
    "path": "test/core/inline-module.wast",
    "content": "(func) (memory 0) (func (export \"f\"))\n"
  },
  {
    "path": "test/core/int_exprs.wast",
    "content": ";; Test interesting integer \"expressions\". These tests contain code\n;; patterns which tempt common value-changing optimizations.\n\n;; Test that x+1<y+1 is not folded to x<y.\n\n(module\n  (func (export \"i32.no_fold_cmp_s_offset\") (param $x i32) (param $y i32) (result i32)\n    (i32.lt_s (i32.add (local.get $x) (i32.const 1)) (i32.add (local.get $y) (i32.const 1))))\n  (func (export \"i32.no_fold_cmp_u_offset\") (param $x i32) (param $y i32) (result i32)\n    (i32.lt_u (i32.add (local.get $x) (i32.const 1)) (i32.add (local.get $y) (i32.const 1))))\n\n  (func (export \"i64.no_fold_cmp_s_offset\") (param $x i64) (param $y i64) (result i32)\n    (i64.lt_s (i64.add (local.get $x) (i64.const 1)) (i64.add (local.get $y) (i64.const 1))))\n  (func (export \"i64.no_fold_cmp_u_offset\") (param $x i64) (param $y i64) (result i32)\n    (i64.lt_u (i64.add (local.get $x) (i64.const 1)) (i64.add (local.get $y) (i64.const 1))))\n)\n\n(assert_return (invoke \"i32.no_fold_cmp_s_offset\" (i32.const 0x7fffffff) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"i32.no_fold_cmp_u_offset\" (i32.const 0xffffffff) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"i64.no_fold_cmp_s_offset\" (i64.const 0x7fffffffffffffff) (i64.const 0)) (i32.const 1))\n(assert_return (invoke \"i64.no_fold_cmp_u_offset\" (i64.const 0xffffffffffffffff) (i64.const 0)) (i32.const 1))\n\n;; Test that wrap(extend_s(x)) is not folded to x.\n\n(module\n  (func (export \"i64.no_fold_wrap_extend_s\") (param $x i64) (result i64)\n    (i64.extend_i32_s (i32.wrap_i64 (local.get $x))))\n)\n\n(assert_return (invoke \"i64.no_fold_wrap_extend_s\" (i64.const 0x0010203040506070)) (i64.const 0x0000000040506070))\n(assert_return (invoke \"i64.no_fold_wrap_extend_s\" (i64.const 0x00a0b0c0d0e0f0a0)) (i64.const 0xffffffffd0e0f0a0))\n\n;; Test that wrap(extend_u(x)) is not folded to x.\n\n(module\n  (func (export \"i64.no_fold_wrap_extend_u\") (param $x i64) (result i64)\n    (i64.extend_i32_u (i32.wrap_i64 (local.get $x))))\n)\n\n(assert_return (invoke \"i64.no_fold_wrap_extend_u\" (i64.const 0x0010203040506070)) (i64.const 0x0000000040506070))\n\n;; Test that x<<n>>n is not folded to x.\n\n(module\n  (func (export \"i32.no_fold_shl_shr_s\") (param $x i32) (result i32)\n    (i32.shr_s (i32.shl (local.get $x) (i32.const 1)) (i32.const 1)))\n  (func (export \"i32.no_fold_shl_shr_u\") (param $x i32) (result i32)\n    (i32.shr_u (i32.shl (local.get $x) (i32.const 1)) (i32.const 1)))\n\n  (func (export \"i64.no_fold_shl_shr_s\") (param $x i64) (result i64)\n    (i64.shr_s (i64.shl (local.get $x) (i64.const 1)) (i64.const 1)))\n  (func (export \"i64.no_fold_shl_shr_u\") (param $x i64) (result i64)\n    (i64.shr_u (i64.shl (local.get $x) (i64.const 1)) (i64.const 1)))\n)\n\n(assert_return (invoke \"i32.no_fold_shl_shr_s\" (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"i32.no_fold_shl_shr_u\" (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"i64.no_fold_shl_shr_s\" (i64.const 0x8000000000000000)) (i64.const 0))\n(assert_return (invoke \"i64.no_fold_shl_shr_u\" (i64.const 0x8000000000000000)) (i64.const 0))\n\n;; Test that x>>n<<n is not folded to x.\n\n(module\n  (func (export \"i32.no_fold_shr_s_shl\") (param $x i32) (result i32)\n    (i32.shl (i32.shr_s (local.get $x) (i32.const 1)) (i32.const 1)))\n  (func (export \"i32.no_fold_shr_u_shl\") (param $x i32) (result i32)\n    (i32.shl (i32.shr_u (local.get $x) (i32.const 1)) (i32.const 1)))\n\n  (func (export \"i64.no_fold_shr_s_shl\") (param $x i64) (result i64)\n    (i64.shl (i64.shr_s (local.get $x) (i64.const 1)) (i64.const 1)))\n  (func (export \"i64.no_fold_shr_u_shl\") (param $x i64) (result i64)\n    (i64.shl (i64.shr_u (local.get $x) (i64.const 1)) (i64.const 1)))\n)\n\n(assert_return (invoke \"i32.no_fold_shr_s_shl\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"i32.no_fold_shr_u_shl\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"i64.no_fold_shr_s_shl\" (i64.const 1)) (i64.const 0))\n(assert_return (invoke \"i64.no_fold_shr_u_shl\" (i64.const 1)) (i64.const 0))\n\n;; Test that x/n*n is not folded to x.\n\n(module\n  (func (export \"i32.no_fold_div_s_mul\") (param $x i32) (result i32)\n    (i32.mul (i32.div_s (local.get $x) (i32.const 6)) (i32.const 6)))\n  (func (export \"i32.no_fold_div_u_mul\") (param $x i32) (result i32)\n    (i32.mul (i32.div_u (local.get $x) (i32.const 6)) (i32.const 6)))\n\n  (func (export \"i64.no_fold_div_s_mul\") (param $x i64) (result i64)\n    (i64.mul (i64.div_s (local.get $x) (i64.const 6)) (i64.const 6)))\n  (func (export \"i64.no_fold_div_u_mul\") (param $x i64) (result i64)\n    (i64.mul (i64.div_u (local.get $x) (i64.const 6)) (i64.const 6)))\n)\n\n(assert_return (invoke \"i32.no_fold_div_s_mul\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"i32.no_fold_div_u_mul\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"i64.no_fold_div_s_mul\" (i64.const 1)) (i64.const 0))\n(assert_return (invoke \"i64.no_fold_div_u_mul\" (i64.const 1)) (i64.const 0))\n\n;; Test that x/x is not folded to 1.\n\n(module\n  (func (export \"i32.no_fold_div_s_self\") (param $x i32) (result i32)\n    (i32.div_s (local.get $x) (local.get $x)))\n  (func (export \"i32.no_fold_div_u_self\") (param $x i32) (result i32)\n    (i32.div_u (local.get $x) (local.get $x)))\n\n  (func (export \"i64.no_fold_div_s_self\") (param $x i64) (result i64)\n    (i64.div_s (local.get $x) (local.get $x)))\n  (func (export \"i64.no_fold_div_u_self\") (param $x i64) (result i64)\n    (i64.div_u (local.get $x) (local.get $x)))\n)\n\n(assert_trap (invoke \"i32.no_fold_div_s_self\" (i32.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"i32.no_fold_div_u_self\" (i32.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"i64.no_fold_div_s_self\" (i64.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"i64.no_fold_div_u_self\" (i64.const 0)) \"integer divide by zero\")\n\n;; Test that x%x is not folded to 0.\n\n(module\n  (func (export \"i32.no_fold_rem_s_self\") (param $x i32) (result i32)\n    (i32.rem_s (local.get $x) (local.get $x)))\n  (func (export \"i32.no_fold_rem_u_self\") (param $x i32) (result i32)\n    (i32.rem_u (local.get $x) (local.get $x)))\n\n  (func (export \"i64.no_fold_rem_s_self\") (param $x i64) (result i64)\n    (i64.rem_s (local.get $x) (local.get $x)))\n  (func (export \"i64.no_fold_rem_u_self\") (param $x i64) (result i64)\n    (i64.rem_u (local.get $x) (local.get $x)))\n)\n\n(assert_trap (invoke \"i32.no_fold_rem_s_self\" (i32.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"i32.no_fold_rem_u_self\" (i32.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"i64.no_fold_rem_s_self\" (i64.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"i64.no_fold_rem_u_self\" (i64.const 0)) \"integer divide by zero\")\n\n;; Test that x*n/n is not folded to x.\n\n(module\n  (func (export \"i32.no_fold_mul_div_s\") (param $x i32) (result i32)\n    (i32.div_s (i32.mul (local.get $x) (i32.const 6)) (i32.const 6)))\n  (func (export \"i32.no_fold_mul_div_u\") (param $x i32) (result i32)\n    (i32.div_u (i32.mul (local.get $x) (i32.const 6)) (i32.const 6)))\n\n  (func (export \"i64.no_fold_mul_div_s\") (param $x i64) (result i64)\n    (i64.div_s (i64.mul (local.get $x) (i64.const 6)) (i64.const 6)))\n  (func (export \"i64.no_fold_mul_div_u\") (param $x i64) (result i64)\n    (i64.div_u (i64.mul (local.get $x) (i64.const 6)) (i64.const 6)))\n)\n\n(assert_return (invoke \"i32.no_fold_mul_div_s\" (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"i32.no_fold_mul_div_u\" (i32.const 0x80000000)) (i32.const 0))\n(assert_return (invoke \"i64.no_fold_mul_div_s\" (i64.const 0x8000000000000000)) (i64.const 0))\n(assert_return (invoke \"i64.no_fold_mul_div_u\" (i64.const 0x8000000000000000)) (i64.const 0))\n\n;; Test that x/n where n is a known power of 2 is not folded to shr_s.\n\n(module\n  (func (export \"i32.no_fold_div_s_2\") (param $x i32) (result i32)\n    (i32.div_s (local.get $x) (i32.const 2)))\n\n  (func (export \"i64.no_fold_div_s_2\") (param $x i64) (result i64)\n    (i64.div_s (local.get $x) (i64.const 2)))\n)\n\n(assert_return (invoke \"i32.no_fold_div_s_2\" (i32.const -11)) (i32.const -5))\n(assert_return (invoke \"i64.no_fold_div_s_2\" (i64.const -11)) (i64.const -5))\n\n;; Test that x%n where n is a known power of 2 is not folded to and.\n\n(module\n  (func (export \"i32.no_fold_rem_s_2\") (param $x i32) (result i32)\n    (i32.rem_s (local.get $x) (i32.const 2)))\n\n  (func (export \"i64.no_fold_rem_s_2\") (param $x i64) (result i64)\n    (i64.rem_s (local.get $x) (i64.const 2)))\n)\n\n(assert_return (invoke \"i32.no_fold_rem_s_2\" (i32.const -11)) (i32.const -1))\n(assert_return (invoke \"i64.no_fold_rem_s_2\" (i64.const -11)) (i64.const -1))\n\n;; Test that x/0 works.\n\n(module\n  (func (export \"i32.div_s_0\") (param $x i32) (result i32)\n    (i32.div_s (local.get $x) (i32.const 0)))\n  (func (export \"i32.div_u_0\") (param $x i32) (result i32)\n    (i32.div_u (local.get $x) (i32.const 0)))\n\n  (func (export \"i64.div_s_0\") (param $x i64) (result i64)\n    (i64.div_s (local.get $x) (i64.const 0)))\n  (func (export \"i64.div_u_0\") (param $x i64) (result i64)\n    (i64.div_u (local.get $x) (i64.const 0)))\n)\n\n(assert_trap (invoke \"i32.div_s_0\" (i32.const 71)) \"integer divide by zero\")\n(assert_trap (invoke \"i32.div_u_0\" (i32.const 71)) \"integer divide by zero\")\n(assert_trap (invoke \"i64.div_s_0\" (i64.const 71)) \"integer divide by zero\")\n(assert_trap (invoke \"i64.div_u_0\" (i64.const 71)) \"integer divide by zero\")\n\n;; Test that x/3 works.\n\n(module\n  (func (export \"i32.div_s_3\") (param $x i32) (result i32)\n    (i32.div_s (local.get $x) (i32.const 3)))\n  (func (export \"i32.div_u_3\") (param $x i32) (result i32)\n    (i32.div_u (local.get $x) (i32.const 3)))\n\n  (func (export \"i64.div_s_3\") (param $x i64) (result i64)\n    (i64.div_s (local.get $x) (i64.const 3)))\n  (func (export \"i64.div_u_3\") (param $x i64) (result i64)\n    (i64.div_u (local.get $x) (i64.const 3)))\n)\n\n(assert_return (invoke \"i32.div_s_3\" (i32.const 71)) (i32.const 23))\n(assert_return (invoke \"i32.div_s_3\" (i32.const 0x60000000)) (i32.const 0x20000000))\n(assert_return (invoke \"i32.div_u_3\" (i32.const 71)) (i32.const 23))\n(assert_return (invoke \"i32.div_u_3\" (i32.const 0xc0000000)) (i32.const 0x40000000))\n(assert_return (invoke \"i64.div_s_3\" (i64.const 71)) (i64.const 23))\n(assert_return (invoke \"i64.div_s_3\" (i64.const 0x3000000000000000)) (i64.const 0x1000000000000000))\n(assert_return (invoke \"i64.div_u_3\" (i64.const 71)) (i64.const 23))\n(assert_return (invoke \"i64.div_u_3\" (i64.const 0xc000000000000000)) (i64.const 0x4000000000000000))\n\n;; Test that x/5 works.\n\n(module\n  (func (export \"i32.div_s_5\") (param $x i32) (result i32)\n    (i32.div_s (local.get $x) (i32.const 5)))\n  (func (export \"i32.div_u_5\") (param $x i32) (result i32)\n    (i32.div_u (local.get $x) (i32.const 5)))\n\n  (func (export \"i64.div_s_5\") (param $x i64) (result i64)\n    (i64.div_s (local.get $x) (i64.const 5)))\n  (func (export \"i64.div_u_5\") (param $x i64) (result i64)\n    (i64.div_u (local.get $x) (i64.const 5)))\n)\n\n(assert_return (invoke \"i32.div_s_5\" (i32.const 71)) (i32.const 14))\n(assert_return (invoke \"i32.div_s_5\" (i32.const 0x50000000)) (i32.const 0x10000000))\n(assert_return (invoke \"i32.div_u_5\" (i32.const 71)) (i32.const 14))\n(assert_return (invoke \"i32.div_u_5\" (i32.const 0xa0000000)) (i32.const 0x20000000))\n(assert_return (invoke \"i64.div_s_5\" (i64.const 71)) (i64.const 14))\n(assert_return (invoke \"i64.div_s_5\" (i64.const 0x5000000000000000)) (i64.const 0x1000000000000000))\n(assert_return (invoke \"i64.div_u_5\" (i64.const 71)) (i64.const 14))\n(assert_return (invoke \"i64.div_u_5\" (i64.const 0xa000000000000000)) (i64.const 0x2000000000000000))\n\n;; Test that x/7 works.\n\n(module\n  (func (export \"i32.div_s_7\") (param $x i32) (result i32)\n    (i32.div_s (local.get $x) (i32.const 7)))\n  (func (export \"i32.div_u_7\") (param $x i32) (result i32)\n    (i32.div_u (local.get $x) (i32.const 7)))\n\n  (func (export \"i64.div_s_7\") (param $x i64) (result i64)\n    (i64.div_s (local.get $x) (i64.const 7)))\n  (func (export \"i64.div_u_7\") (param $x i64) (result i64)\n    (i64.div_u (local.get $x) (i64.const 7)))\n)\n\n(assert_return (invoke \"i32.div_s_7\" (i32.const 71)) (i32.const 10))\n(assert_return (invoke \"i32.div_s_7\" (i32.const 0x70000000)) (i32.const 0x10000000))\n(assert_return (invoke \"i32.div_u_7\" (i32.const 71)) (i32.const 10))\n(assert_return (invoke \"i32.div_u_7\" (i32.const 0xe0000000)) (i32.const 0x20000000))\n(assert_return (invoke \"i64.div_s_7\" (i64.const 71)) (i64.const 10))\n(assert_return (invoke \"i64.div_s_7\" (i64.const 0x7000000000000000)) (i64.const 0x1000000000000000))\n(assert_return (invoke \"i64.div_u_7\" (i64.const 71)) (i64.const 10))\n(assert_return (invoke \"i64.div_u_7\" (i64.const 0xe000000000000000)) (i64.const 0x2000000000000000))\n\n;; Test that x%3 works.\n\n(module\n  (func (export \"i32.rem_s_3\") (param $x i32) (result i32)\n    (i32.rem_s (local.get $x) (i32.const 3)))\n  (func (export \"i32.rem_u_3\") (param $x i32) (result i32)\n    (i32.rem_u (local.get $x) (i32.const 3)))\n\n  (func (export \"i64.rem_s_3\") (param $x i64) (result i64)\n    (i64.rem_s (local.get $x) (i64.const 3)))\n  (func (export \"i64.rem_u_3\") (param $x i64) (result i64)\n    (i64.rem_u (local.get $x) (i64.const 3)))\n)\n\n(assert_return (invoke \"i32.rem_s_3\" (i32.const 71)) (i32.const 2))\n(assert_return (invoke \"i32.rem_s_3\" (i32.const 0x60000000)) (i32.const 0))\n(assert_return (invoke \"i32.rem_u_3\" (i32.const 71)) (i32.const 2))\n(assert_return (invoke \"i32.rem_u_3\" (i32.const 0xc0000000)) (i32.const 0))\n(assert_return (invoke \"i64.rem_s_3\" (i64.const 71)) (i64.const 2))\n(assert_return (invoke \"i64.rem_s_3\" (i64.const 0x3000000000000000)) (i64.const 0))\n(assert_return (invoke \"i64.rem_u_3\" (i64.const 71)) (i64.const 2))\n(assert_return (invoke \"i64.rem_u_3\" (i64.const 0xc000000000000000)) (i64.const 0))\n\n;; Test that x%5 works.\n\n(module\n  (func (export \"i32.rem_s_5\") (param $x i32) (result i32)\n    (i32.rem_s (local.get $x) (i32.const 5)))\n  (func (export \"i32.rem_u_5\") (param $x i32) (result i32)\n    (i32.rem_u (local.get $x) (i32.const 5)))\n\n  (func (export \"i64.rem_s_5\") (param $x i64) (result i64)\n    (i64.rem_s (local.get $x) (i64.const 5)))\n  (func (export \"i64.rem_u_5\") (param $x i64) (result i64)\n    (i64.rem_u (local.get $x) (i64.const 5)))\n)\n\n(assert_return (invoke \"i32.rem_s_5\" (i32.const 71)) (i32.const 1))\n(assert_return (invoke \"i32.rem_s_5\" (i32.const 0x50000000)) (i32.const 0))\n(assert_return (invoke \"i32.rem_u_5\" (i32.const 71)) (i32.const 1))\n(assert_return (invoke \"i32.rem_u_5\" (i32.const 0xa0000000)) (i32.const 0))\n(assert_return (invoke \"i64.rem_s_5\" (i64.const 71)) (i64.const 1))\n(assert_return (invoke \"i64.rem_s_5\" (i64.const 0x5000000000000000)) (i64.const 0))\n(assert_return (invoke \"i64.rem_u_5\" (i64.const 71)) (i64.const 1))\n(assert_return (invoke \"i64.rem_u_5\" (i64.const 0xa000000000000000)) (i64.const 0))\n\n;; Test that x%7 works.\n\n(module\n  (func (export \"i32.rem_s_7\") (param $x i32) (result i32)\n    (i32.rem_s (local.get $x) (i32.const 7)))\n  (func (export \"i32.rem_u_7\") (param $x i32) (result i32)\n    (i32.rem_u (local.get $x) (i32.const 7)))\n\n  (func (export \"i64.rem_s_7\") (param $x i64) (result i64)\n    (i64.rem_s (local.get $x) (i64.const 7)))\n  (func (export \"i64.rem_u_7\") (param $x i64) (result i64)\n    (i64.rem_u (local.get $x) (i64.const 7)))\n)\n\n(assert_return (invoke \"i32.rem_s_7\" (i32.const 71)) (i32.const 1))\n(assert_return (invoke \"i32.rem_s_7\" (i32.const 0x70000000)) (i32.const 0))\n(assert_return (invoke \"i32.rem_u_7\" (i32.const 71)) (i32.const 1))\n(assert_return (invoke \"i32.rem_u_7\" (i32.const 0xe0000000)) (i32.const 0))\n(assert_return (invoke \"i64.rem_s_7\" (i64.const 71)) (i64.const 1))\n(assert_return (invoke \"i64.rem_s_7\" (i64.const 0x7000000000000000)) (i64.const 0))\n(assert_return (invoke \"i64.rem_u_7\" (i64.const 71)) (i64.const 1))\n(assert_return (invoke \"i64.rem_u_7\" (i64.const 0xe000000000000000)) (i64.const 0))\n\n;; Test that x/-1 is not folded to -x.\n\n(module\n  (func (export \"i32.no_fold_div_neg1\") (param $x i32) (result i32)\n    (i32.div_s (local.get $x) (i32.const -1)))\n\n  (func (export \"i64.no_fold_div_neg1\") (param $x i64) (result i64)\n    (i64.div_s (local.get $x) (i64.const -1)))\n)\n\n(assert_trap (invoke \"i32.no_fold_div_neg1\" (i32.const 0x80000000)) \"integer overflow\")\n(assert_trap (invoke \"i64.no_fold_div_neg1\" (i64.const 0x8000000000000000)) \"integer overflow\")\n"
  },
  {
    "path": "test/core/int_literals.wast",
    "content": "(module\n  (func (export \"i32.test\") (result i32) (return (i32.const 0x0bAdD00D)))\n  (func (export \"i32.umax\") (result i32) (return (i32.const 0xffffffff)))\n  (func (export \"i32.smax\") (result i32) (return (i32.const 0x7fffffff)))\n  (func (export \"i32.neg_smax\") (result i32) (return (i32.const -0x7fffffff)))\n  (func (export \"i32.smin\") (result i32) (return (i32.const -0x80000000)))\n  (func (export \"i32.alt_smin\") (result i32) (return (i32.const 0x80000000)))\n  (func (export \"i32.inc_smin\") (result i32) (return (i32.add (i32.const -0x80000000) (i32.const 1))))\n  (func (export \"i32.neg_zero\") (result i32) (return (i32.const -0x0)))\n  (func (export \"i32.not_octal\") (result i32) (return (i32.const 010)))\n  (func (export \"i32.unsigned_decimal\") (result i32) (return (i32.const 4294967295)))\n  (func (export \"i32.plus_sign\") (result i32) (return (i32.const +42)))\n\n  (func (export \"i64.test\") (result i64) (return (i64.const 0x0CABBA6E0ba66a6e)))\n  (func (export \"i64.umax\") (result i64) (return (i64.const 0xffffffffffffffff)))\n  (func (export \"i64.smax\") (result i64) (return (i64.const 0x7fffffffffffffff)))\n  (func (export \"i64.neg_smax\") (result i64) (return (i64.const -0x7fffffffffffffff)))\n  (func (export \"i64.smin\") (result i64) (return (i64.const -0x8000000000000000)))\n  (func (export \"i64.alt_smin\") (result i64) (return (i64.const 0x8000000000000000)))\n  (func (export \"i64.inc_smin\") (result i64) (return (i64.add (i64.const -0x8000000000000000) (i64.const 1))))\n  (func (export \"i64.neg_zero\") (result i64) (return (i64.const -0x0)))\n  (func (export \"i64.not_octal\") (result i64) (return (i64.const 010)))\n  (func (export \"i64.unsigned_decimal\") (result i64) (return (i64.const 18446744073709551615)))\n  (func (export \"i64.plus_sign\") (result i64) (return (i64.const +42)))\n\n  (func (export \"i32-dec-sep1\") (result i32) (i32.const 1_000_000))\n  (func (export \"i32-dec-sep2\") (result i32) (i32.const 1_0_0_0))\n  (func (export \"i32-hex-sep1\") (result i32) (i32.const 0xa_0f_00_99))\n  (func (export \"i32-hex-sep2\") (result i32) (i32.const 0x1_a_A_0_f))\n\n  (func (export \"i64-dec-sep1\") (result i64) (i64.const 1_000_000))\n  (func (export \"i64-dec-sep2\") (result i64) (i64.const 1_0_0_0))\n  (func (export \"i64-hex-sep1\") (result i64) (i64.const 0xa_f00f_0000_9999))\n  (func (export \"i64-hex-sep2\") (result i64) (i64.const 0x1_a_A_0_f))\n)\n\n(assert_return (invoke \"i32.test\") (i32.const 195940365))\n(assert_return (invoke \"i32.umax\") (i32.const -1))\n(assert_return (invoke \"i32.smax\") (i32.const 2147483647))\n(assert_return (invoke \"i32.neg_smax\") (i32.const -2147483647))\n(assert_return (invoke \"i32.smin\") (i32.const -2147483648))\n(assert_return (invoke \"i32.alt_smin\") (i32.const -2147483648))\n(assert_return (invoke \"i32.inc_smin\") (i32.const -2147483647))\n(assert_return (invoke \"i32.neg_zero\") (i32.const 0))\n(assert_return (invoke \"i32.not_octal\") (i32.const 10))\n(assert_return (invoke \"i32.unsigned_decimal\") (i32.const -1))\n(assert_return (invoke \"i32.plus_sign\") (i32.const 42))\n\n(assert_return (invoke \"i64.test\") (i64.const 913028331277281902))\n(assert_return (invoke \"i64.umax\") (i64.const -1))\n(assert_return (invoke \"i64.smax\") (i64.const 9223372036854775807))\n(assert_return (invoke \"i64.neg_smax\") (i64.const -9223372036854775807))\n(assert_return (invoke \"i64.smin\") (i64.const -9223372036854775808))\n(assert_return (invoke \"i64.alt_smin\") (i64.const -9223372036854775808))\n(assert_return (invoke \"i64.inc_smin\") (i64.const -9223372036854775807))\n(assert_return (invoke \"i64.neg_zero\") (i64.const 0))\n(assert_return (invoke \"i64.not_octal\") (i64.const 10))\n(assert_return (invoke \"i64.unsigned_decimal\") (i64.const -1))\n(assert_return (invoke \"i64.plus_sign\") (i64.const 42))\n\n(assert_return (invoke \"i32-dec-sep1\") (i32.const 1000000))\n(assert_return (invoke \"i32-dec-sep2\") (i32.const 1000))\n(assert_return (invoke \"i32-hex-sep1\") (i32.const 0xa0f0099))\n(assert_return (invoke \"i32-hex-sep2\") (i32.const 0x1aa0f))\n\n(assert_return (invoke \"i64-dec-sep1\") (i64.const 1000000))\n(assert_return (invoke \"i64-dec-sep2\") (i64.const 1000))\n(assert_return (invoke \"i64-hex-sep1\") (i64.const 0xaf00f00009999))\n(assert_return (invoke \"i64-hex-sep2\") (i64.const 0x1aa0f))\n\n(assert_malformed\n  (module quote \"(global i32 (i32.const _100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i32 (i32.const +_100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i32 (i32.const -_100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i32 (i32.const 99_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i32 (i32.const 1__000))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i32 (i32.const _0x100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i32 (i32.const 0_x100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i32 (i32.const 0x_100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i32 (i32.const 0x00_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i32 (i32.const 0xff__ffff))\")\n  \"unknown operator\"\n)\n\n(assert_malformed\n  (module quote \"(global i64 (i64.const _100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i64 (i64.const +_100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i64 (i64.const -_100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i64 (i64.const 99_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i64 (i64.const 1__000))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i64 (i64.const _0x100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i64 (i64.const 0_x100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i64 (i64.const 0x_100))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i64 (i64.const 0x00_))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(global i64 (i64.const 0xff__ffff))\")\n  \"unknown operator\"\n)\n"
  },
  {
    "path": "test/core/labels.wast",
    "content": "(module\n  (func (export \"block\") (result i32)\n    (block $exit (result i32)\n      (br $exit (i32.const 1))\n      (i32.const 0)\n    )\n  )\n\n  (func (export \"loop1\") (result i32)\n    (local $i i32)\n    (local.set $i (i32.const 0))\n    (block $exit (result i32)\n      (loop $cont (result i32)\n        (local.set $i (i32.add (local.get $i) (i32.const 1)))\n        (if (i32.eq (local.get $i) (i32.const 5))\n          (then (br $exit (local.get $i)))\n        )\n        (br $cont)\n      )\n    )\n  )\n\n  (func (export \"loop2\") (result i32)\n    (local $i i32)\n    (local.set $i (i32.const 0))\n    (block $exit (result i32)\n      (loop $cont (result i32)\n        (local.set $i (i32.add (local.get $i) (i32.const 1)))\n        (if (i32.eq (local.get $i) (i32.const 5))\n          (then (br $cont))\n        )\n        (if (i32.eq (local.get $i) (i32.const 8))\n          (then (br $exit (local.get $i)))\n        )\n        (local.set $i (i32.add (local.get $i) (i32.const 1)))\n        (br $cont)\n      )\n    )\n  )\n\n  (func (export \"loop3\") (result i32)\n    (local $i i32)\n    (local.set $i (i32.const 0))\n    (block $exit (result i32)\n      (loop $cont (result i32)\n        (local.set $i (i32.add (local.get $i) (i32.const 1)))\n        (if (i32.eq (local.get $i) (i32.const 5))\n          (then (br $exit (local.get $i)))\n        )\n        (local.get $i)\n      )\n    )\n  )\n\n  (func (export \"loop4\") (param $max i32) (result i32)\n    (local $i i32)\n    (local.set $i (i32.const 1))\n    (block $exit (result i32)\n      (loop $cont (result i32)\n        (local.set $i (i32.add (local.get $i) (local.get $i)))\n        (if (i32.gt_u (local.get $i) (local.get $max))\n          (then (br $exit (local.get $i)))\n        )\n        (br $cont)\n      )\n    )\n  )\n\n  (func (export \"loop5\") (result i32)\n    (i32.add\n      (loop $l (result i32) (i32.const 1))\n      (i32.const 1)\n    )\n  )\n\n  (func (export \"loop6\") (result i32)\n    (loop (result i32)\n      (br_if 0 (i32.const 0))\n      (i32.const 3)\n    )\n  )\n\n  (func (export \"if\") (result i32)\n    (local $i i32)\n    (local.set $i (i32.const 0))\n    (block\n      (if $l\n        (i32.const 1)\n        (then (br $l) (local.set $i (i32.const 666)))\n      )\n      (local.set $i (i32.add (local.get $i) (i32.const 1)))\n      (if $l\n        (i32.const 1)\n        (then (br $l) (local.set $i (i32.const 666)))\n        (else (local.set $i (i32.const 888)))\n      )\n      (local.set $i (i32.add (local.get $i) (i32.const 1)))\n      (if $l\n        (i32.const 1)\n        (then (br $l) (local.set $i (i32.const 666)))\n        (else (local.set $i (i32.const 888)))\n      )\n      (local.set $i (i32.add (local.get $i) (i32.const 1)))\n      (if $l\n        (i32.const 0)\n        (then (local.set $i (i32.const 888)))\n        (else (br $l) (local.set $i (i32.const 666)))\n      )\n      (local.set $i (i32.add (local.get $i) (i32.const 1)))\n      (if $l\n        (i32.const 0)\n        (then (local.set $i (i32.const 888)))\n        (else (br $l) (local.set $i (i32.const 666)))\n      )\n      (local.set $i (i32.add (local.get $i) (i32.const 1)))\n    )\n    (local.get $i)\n  )\n\n  (func (export \"if2\") (result i32)\n    (local $i i32)\n    (local.set $i (i32.const 0))\n    (block\n      (if\n        (i32.const 1)\n        (then (br 0) (local.set $i (i32.const 666)))\n      )\n      (local.set $i (i32.add (local.get $i) (i32.const 1)))\n      (if\n        (i32.const 1)\n        (then (br 0) (local.set $i (i32.const 666)))\n        (else (local.set $i (i32.const 888)))\n      )\n      (local.set $i (i32.add (local.get $i) (i32.const 1)))\n      (if\n        (i32.const 1)\n        (then (br 0) (local.set $i (i32.const 666)))\n        (else (local.set $i (i32.const 888)))\n      )\n      (local.set $i (i32.add (local.get $i) (i32.const 1)))\n      (if\n        (i32.const 0)\n        (then (local.set $i (i32.const 888)))\n        (else (br 0) (local.set $i (i32.const 666)))\n      )\n      (local.set $i (i32.add (local.get $i) (i32.const 1)))\n      (if\n        (i32.const 0)\n        (then (local.set $i (i32.const 888)))\n        (else (br 0) (local.set $i (i32.const 666)))\n      )\n      (local.set $i (i32.add (local.get $i) (i32.const 1)))\n    )\n    (local.get $i)\n  )\n\n  (func (export \"switch\") (param i32) (result i32)\n    (block $ret (result i32)\n      (i32.mul (i32.const 10)\n        (block $exit (result i32)\n          (block $0\n            (block $default\n              (block $3\n                (block $2\n                  (block $1\n                    (br_table $0 $1 $2 $3 $default (local.get 0))\n                  ) ;; 1\n                ) ;; 2\n                (br $exit (i32.const 2))\n              ) ;; 3\n              (br $ret (i32.const 3))\n            ) ;; default\n          ) ;; 0\n          (i32.const 5)\n        )\n      )\n    )\n  )\n\n  (func (export \"return\") (param i32) (result i32)\n    (block $default\n      (block $1\n        (block $0\n          (br_table $0 $1 (local.get 0))\n          (br $default)\n        ) ;; 0\n        (return (i32.const 0))\n      ) ;; 1\n    ) ;; default\n    (i32.const 2)\n  )\n\n  (func (export \"br_if0\") (result i32)\n    (local $i i32)\n    (local.set $i (i32.const 0))\n    (block $outer (result i32)\n      (block $inner\n        (br_if $inner (i32.const 0))\n        (local.set $i (i32.or (local.get $i) (i32.const 0x1)))\n        (br_if $inner (i32.const 1))\n        (local.set $i (i32.or (local.get $i) (i32.const 0x2)))\n      )\n      (drop (br_if $outer\n        (block (result i32)\n          (local.set $i (i32.or (local.get $i) (i32.const 0x4)))\n          (local.get $i)\n        )\n        (i32.const 0)\n      ))\n      (local.set $i (i32.or (local.get $i) (i32.const 0x8)))\n      (drop (br_if $outer\n        (block (result i32)\n          (local.set $i (i32.or (local.get $i) (i32.const 0x10)))\n          (local.get $i)\n        )\n        (i32.const 1)\n      ))\n      (local.set $i (i32.or (local.get $i) (i32.const 0x20))) (local.get $i)\n    )\n  )\n\n  (func (export \"br_if1\") (result i32)\n    (block $l0 (result i32)\n      (drop\n        (br_if $l0\n          (block $l1 (result i32) (br $l1 (i32.const 1)))\n          (i32.const 1)\n        )\n      )\n      (i32.const 0)\n    )\n  )\n\n  (func (export \"br_if2\") (result i32)\n    (block $l0 (result i32)\n      (if (i32.const 1)\n        (then\n          (drop\n            (br_if $l0\n              (block $l1 (result i32) (br $l1 (i32.const 1)))\n              (i32.const 1)\n            )\n          )\n        )\n      )\n      (i32.const 0)\n    )\n  )\n\n  (func (export \"br_if3\") (result i32)\n    (local $i1 i32)\n    (drop\n      (i32.add\n        (block $l0 (result i32)\n          (drop (br_if $l0\n            (block (result i32) (local.set $i1 (i32.const 1)) (local.get $i1))\n            (block (result i32) (local.set $i1 (i32.const 2)) (local.get $i1))\n          ))\n          (i32.const 0)\n        )\n        (i32.const 0)\n      )\n    )\n    (local.get $i1)\n  )\n\n  (func (export \"br\") (result i32)\n    (block $l0 (result i32)\n      (if (i32.const 1)\n        (then (br $l0 (block $l1 (result i32) (br $l1 (i32.const 1)))))\n        (else (block (drop (block $l1 (result i32) (br $l1 (i32.const 1))))))\n      )\n      (i32.const 1)\n    )\n  )\n\n  (func (export \"shadowing\") (result i32)\n    (block $l1 (result i32) (i32.xor (br $l1 (i32.const 1)) (i32.const 2)))\n  )\n\n  (func (export \"redefinition\") (result i32)\n    (block $l1 (result i32)\n      (i32.add\n        (block $l1 (result i32) (i32.const 2))\n        (block $l1 (result i32) (br $l1 (i32.const 3)))\n      )\n    )\n  )\n)\n\n(assert_return (invoke \"block\") (i32.const 1))\n(assert_return (invoke \"loop1\") (i32.const 5))\n(assert_return (invoke \"loop2\") (i32.const 8))\n(assert_return (invoke \"loop3\") (i32.const 1))\n(assert_return (invoke \"loop4\" (i32.const 8)) (i32.const 16))\n(assert_return (invoke \"loop5\") (i32.const 2))\n(assert_return (invoke \"loop6\") (i32.const 3))\n(assert_return (invoke \"if\") (i32.const 5))\n(assert_return (invoke \"if2\") (i32.const 5))\n(assert_return (invoke \"switch\" (i32.const 0)) (i32.const 50))\n(assert_return (invoke \"switch\" (i32.const 1)) (i32.const 20))\n(assert_return (invoke \"switch\" (i32.const 2)) (i32.const 20))\n(assert_return (invoke \"switch\" (i32.const 3)) (i32.const 3))\n(assert_return (invoke \"switch\" (i32.const 4)) (i32.const 50))\n(assert_return (invoke \"switch\" (i32.const 5)) (i32.const 50))\n(assert_return (invoke \"return\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"return\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"return\" (i32.const 2)) (i32.const 2))\n(assert_return (invoke \"br_if0\") (i32.const 0x1d))\n(assert_return (invoke \"br_if1\") (i32.const 1))\n(assert_return (invoke \"br_if2\") (i32.const 1))\n(assert_return (invoke \"br_if3\") (i32.const 2))\n(assert_return (invoke \"br\") (i32.const 1))\n(assert_return (invoke \"shadowing\") (i32.const 1))\n(assert_return (invoke \"redefinition\") (i32.const 5))\n\n(assert_invalid\n  (module (func (block $l (f32.neg (br_if $l (i32.const 1))) (nop))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func (block $l (br_if $l (f32.const 0) (i32.const 1)))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func (block $l (br_if $l (f32.const 0) (i32.const 1)))))\n  \"type mismatch\"\n)\n"
  },
  {
    "path": "test/core/left-to-right.wast",
    "content": "(module\n  (memory 1)\n\n  (type $i32_T (func (param i32 i32) (result i32)))\n  (type $i64_T (func (param i64 i64) (result i32)))\n  (type $f32_T (func (param f32 f32) (result i32)))\n  (type $f64_T (func (param f64 f64) (result i32)))\n  (table funcref\n    (elem $i32_t0 $i32_t1 $i64_t0 $i64_t1 $f32_t0 $f32_t1 $f64_t0 $f64_t1)\n  )\n\n  (func $i32_t0 (type $i32_T) (i32.const -1))\n  (func $i32_t1 (type $i32_T) (i32.const -2))\n  (func $i64_t0 (type $i64_T) (i32.const -1))\n  (func $i64_t1 (type $i64_T) (i32.const -2))\n  (func $f32_t0 (type $f32_T) (i32.const -1))\n  (func $f32_t1 (type $f32_T) (i32.const -2))\n  (func $f64_t0 (type $f64_T) (i32.const -1))\n  (func $f64_t1 (type $f64_T) (i32.const -2))\n\n  ;; The idea is: We reset the memory, then the instruction call $*_left,\n  ;; $*_right, $*_another, $*_callee (for indirect calls), and $*_bool (when a\n  ;; boolean value is needed). These functions all call bump, which shifts the\n  ;; memory starting at address 8 up a byte, and then store a unique value at\n  ;; address 8. Then we read the 4-byte value at address 8. It should contain\n  ;; the correct sequence of unique values if the calls were evaluated in the\n  ;; correct order.\n\n  (func $reset (i32.store (i32.const 8) (i32.const 0)))\n\n  (func $bump\n    (i32.store8 (i32.const 11) (i32.load8_u (i32.const 10)))\n    (i32.store8 (i32.const 10) (i32.load8_u (i32.const 9)))\n    (i32.store8 (i32.const 9) (i32.load8_u (i32.const 8)))\n    (i32.store8 (i32.const 8) (i32.const -3)))\n\n  (func $get (result i32) (i32.load (i32.const 8)))\n\n  (func $i32_left (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 1)) (i32.const 0))\n  (func $i32_right (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 2)) (i32.const 1))\n  (func $i32_another (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 3)) (i32.const 1))\n  (func $i32_callee (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 4)) (i32.const 0))\n  (func $i32_bool (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 5)) (i32.const 0))\n  (func $i64_left (result i64) (call $bump) (i32.store8 (i32.const 8) (i32.const 1)) (i64.const 0))\n  (func $i64_right (result i64) (call $bump) (i32.store8 (i32.const 8) (i32.const 2)) (i64.const 1))\n  (func $i64_another (result i64) (call $bump) (i32.store8 (i32.const 8) (i32.const 3)) (i64.const 1))\n  (func $i64_callee (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 4)) (i32.const 2))\n  (func $i64_bool (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 5)) (i32.const 0))\n  (func $f32_left (result f32) (call $bump) (i32.store8 (i32.const 8) (i32.const 1)) (f32.const 0))\n  (func $f32_right (result f32) (call $bump) (i32.store8 (i32.const 8) (i32.const 2)) (f32.const 1))\n  (func $f32_another (result f32) (call $bump) (i32.store8 (i32.const 8) (i32.const 3)) (f32.const 1))\n  (func $f32_callee (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 4)) (i32.const 4))\n  (func $f32_bool (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 5)) (i32.const 0))\n  (func $f64_left (result f64) (call $bump) (i32.store8 (i32.const 8) (i32.const 1)) (f64.const 0))\n  (func $f64_right (result f64) (call $bump) (i32.store8 (i32.const 8) (i32.const 2)) (f64.const 1))\n  (func $f64_another (result f64) (call $bump) (i32.store8 (i32.const 8) (i32.const 3)) (f64.const 1))\n  (func $f64_callee (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 4)) (i32.const 6))\n  (func $f64_bool (result i32) (call $bump) (i32.store8 (i32.const 8) (i32.const 5)) (i32.const 0))\n  (func $i32_dummy (param i32 i32))\n  (func $i64_dummy (param i64 i64))\n  (func $f32_dummy (param f32 f32))\n  (func $f64_dummy (param f64 f64))\n\n  (func (export \"i32_add\") (result i32) (call $reset) (drop (i32.add (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_sub\") (result i32) (call $reset) (drop (i32.sub (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_mul\") (result i32) (call $reset) (drop (i32.mul (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_div_s\") (result i32) (call $reset) (drop (i32.div_s (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_div_u\") (result i32) (call $reset) (drop (i32.div_u (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_rem_s\") (result i32) (call $reset) (drop (i32.rem_s (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_rem_u\") (result i32) (call $reset) (drop (i32.rem_u (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_and\") (result i32) (call $reset) (drop (i32.and (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_or\") (result i32) (call $reset) (drop (i32.or (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_xor\") (result i32) (call $reset) (drop (i32.xor (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_shl\") (result i32) (call $reset) (drop (i32.shl (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_shr_u\") (result i32) (call $reset) (drop (i32.shr_u (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_shr_s\") (result i32) (call $reset) (drop (i32.shr_s (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_eq\") (result i32) (call $reset) (drop (i32.eq (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_ne\") (result i32) (call $reset) (drop (i32.ne (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_lt_s\") (result i32) (call $reset) (drop (i32.lt_s (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_le_s\") (result i32) (call $reset) (drop (i32.le_s (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_lt_u\") (result i32) (call $reset) (drop (i32.lt_u (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_le_u\") (result i32) (call $reset) (drop (i32.le_u (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_gt_s\") (result i32) (call $reset) (drop (i32.gt_s (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_ge_s\") (result i32) (call $reset) (drop (i32.ge_s (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_gt_u\") (result i32) (call $reset) (drop (i32.gt_u (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_ge_u\") (result i32) (call $reset) (drop (i32.ge_u (call $i32_left) (call $i32_right))) (call $get))\n  (func (export \"i32_store\") (result i32) (call $reset) (i32.store (call $i32_left) (call $i32_right)) (call $get))\n  (func (export \"i32_store8\") (result i32) (call $reset) (i32.store8 (call $i32_left) (call $i32_right)) (call $get))\n  (func (export \"i32_store16\") (result i32) (call $reset) (i32.store16 (call $i32_left) (call $i32_right)) (call $get))\n  (func (export \"i32_call\") (result i32) (call $reset) (call $i32_dummy (call $i32_left) (call $i32_right)) (call $get))\n  (func (export \"i32_call_indirect\") (result i32) (call $reset) (drop (call_indirect (type $i32_T) (call $i32_left) (call $i32_right) (call $i32_callee))) (call $get))\n  (func (export \"i32_select\") (result i32) (call $reset) (drop (select (call $i32_left) (call $i32_right) (call $i32_bool))) (call $get))\n\n  (func (export \"i64_add\") (result i32) (call $reset) (drop (i64.add (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_sub\") (result i32) (call $reset) (drop (i64.sub (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_mul\") (result i32) (call $reset) (drop (i64.mul (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_div_s\") (result i32) (call $reset) (drop (i64.div_s (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_div_u\") (result i32) (call $reset) (drop (i64.div_u (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_rem_s\") (result i32) (call $reset) (drop (i64.rem_s (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_rem_u\") (result i32) (call $reset) (drop (i64.rem_u (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_and\") (result i32) (call $reset) (drop (i64.and (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_or\") (result i32) (call $reset) (drop (i64.or (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_xor\") (result i32) (call $reset) (drop (i64.xor (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_shl\") (result i32) (call $reset) (drop (i64.shl (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_shr_u\") (result i32) (call $reset) (drop (i64.shr_u (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_shr_s\") (result i32) (call $reset) (drop (i64.shr_s (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_eq\") (result i32) (call $reset) (drop (i64.eq (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_ne\") (result i32) (call $reset) (drop (i64.ne (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_lt_s\") (result i32) (call $reset) (drop (i64.lt_s (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_le_s\") (result i32) (call $reset) (drop (i64.le_s (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_lt_u\") (result i32) (call $reset) (drop (i64.lt_u (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_le_u\") (result i32) (call $reset) (drop (i64.le_u (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_gt_s\") (result i32) (call $reset) (drop (i64.gt_s (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_ge_s\") (result i32) (call $reset) (drop (i64.ge_s (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_gt_u\") (result i32) (call $reset) (drop (i64.gt_u (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_ge_u\") (result i32) (call $reset) (drop (i64.ge_u (call $i64_left) (call $i64_right))) (call $get))\n  (func (export \"i64_store\") (result i32) (call $reset) (i64.store (call $i32_left) (call $i64_right)) (call $get))\n  (func (export \"i64_store8\") (result i32) (call $reset) (i64.store8 (call $i32_left) (call $i64_right)) (call $get))\n  (func (export \"i64_store16\") (result i32) (call $reset) (i64.store16 (call $i32_left) (call $i64_right)) (call $get))\n  (func (export \"i64_store32\") (result i32) (call $reset) (i64.store32 (call $i32_left) (call $i64_right)) (call $get))\n  (func (export \"i64_call\") (result i32) (call $reset) (call $i64_dummy (call $i64_left) (call $i64_right)) (call $get))\n  (func (export \"i64_call_indirect\") (result i32) (call $reset) (drop (call_indirect (type $i64_T) (call $i64_left) (call $i64_right) (call $i64_callee))) (call $get))\n  (func (export \"i64_select\") (result i32) (call $reset) (drop (select (call $i64_left) (call $i64_right) (call $i64_bool))) (call $get))\n\n  (func (export \"f32_add\") (result i32) (call $reset) (drop (f32.add (call $f32_left) (call $f32_right))) (call $get))\n  (func (export \"f32_sub\") (result i32) (call $reset) (drop (f32.sub (call $f32_left) (call $f32_right))) (call $get))\n  (func (export \"f32_mul\") (result i32) (call $reset) (drop (f32.mul (call $f32_left) (call $f32_right))) (call $get))\n  (func (export \"f32_div\") (result i32) (call $reset) (drop (f32.div (call $f32_left) (call $f32_right))) (call $get))\n  (func (export \"f32_copysign\") (result i32) (call $reset) (drop (f32.copysign (call $f32_left) (call $f32_right))) (call $get))\n  (func (export \"f32_eq\") (result i32) (call $reset) (drop (f32.eq (call $f32_left) (call $f32_right))) (call $get))\n  (func (export \"f32_ne\") (result i32) (call $reset) (drop (f32.ne (call $f32_left) (call $f32_right))) (call $get))\n  (func (export \"f32_lt\") (result i32) (call $reset) (drop (f32.lt (call $f32_left) (call $f32_right))) (call $get))\n  (func (export \"f32_le\") (result i32) (call $reset) (drop (f32.le (call $f32_left) (call $f32_right))) (call $get))\n  (func (export \"f32_gt\") (result i32) (call $reset) (drop (f32.gt (call $f32_left) (call $f32_right))) (call $get))\n  (func (export \"f32_ge\") (result i32) (call $reset) (drop (f32.ge (call $f32_left) (call $f32_right))) (call $get))\n  (func (export \"f32_min\") (result i32) (call $reset) (drop (f32.min (call $f32_left) (call $f32_right))) (call $get))\n  (func (export \"f32_max\") (result i32) (call $reset) (drop (f32.max (call $f32_left) (call $f32_right))) (call $get))\n  (func (export \"f32_store\") (result i32) (call $reset) (f32.store (call $i32_left) (call $f32_right)) (call $get))\n  (func (export \"f32_call\") (result i32) (call $reset) (call $f32_dummy (call $f32_left) (call $f32_right)) (call $get))\n  (func (export \"f32_call_indirect\") (result i32) (call $reset) (drop (call_indirect (type $f32_T) (call $f32_left) (call $f32_right) (call $f32_callee))) (call $get))\n  (func (export \"f32_select\") (result i32) (call $reset) (drop (select (call $f32_left) (call $f32_right) (call $f32_bool))) (call $get))\n\n  (func (export \"f64_add\") (result i32) (call $reset) (drop (f64.add (call $f64_left) (call $f64_right))) (call $get))\n  (func (export \"f64_sub\") (result i32) (call $reset) (drop (f64.sub (call $f64_left) (call $f64_right))) (call $get))\n  (func (export \"f64_mul\") (result i32) (call $reset) (drop (f64.mul (call $f64_left) (call $f64_right))) (call $get))\n  (func (export \"f64_div\") (result i32) (call $reset) (drop (f64.div (call $f64_left) (call $f64_right))) (call $get))\n  (func (export \"f64_copysign\") (result i32) (call $reset) (drop (f64.copysign (call $f64_left) (call $f64_right))) (call $get))\n  (func (export \"f64_eq\") (result i32) (call $reset) (drop (f64.eq (call $f64_left) (call $f64_right))) (call $get))\n  (func (export \"f64_ne\") (result i32) (call $reset) (drop (f64.ne (call $f64_left) (call $f64_right))) (call $get))\n  (func (export \"f64_lt\") (result i32) (call $reset) (drop (f64.lt (call $f64_left) (call $f64_right))) (call $get))\n  (func (export \"f64_le\") (result i32) (call $reset) (drop (f64.le (call $f64_left) (call $f64_right))) (call $get))\n  (func (export \"f64_gt\") (result i32) (call $reset) (drop (f64.gt (call $f64_left) (call $f64_right))) (call $get))\n  (func (export \"f64_ge\") (result i32) (call $reset) (drop (f64.ge (call $f64_left) (call $f64_right))) (call $get))\n  (func (export \"f64_min\") (result i32) (call $reset) (drop (f64.min (call $f64_left) (call $f64_right))) (call $get))\n  (func (export \"f64_max\") (result i32) (call $reset) (drop (f64.max (call $f64_left) (call $f64_right))) (call $get))\n  (func (export \"f64_store\") (result i32) (call $reset) (f64.store (call $i32_left) (call $f64_right)) (call $get))\n  (func (export \"f64_call\") (result i32) (call $reset) (call $f64_dummy (call $f64_left) (call $f64_right)) (call $get))\n  (func (export \"f64_call_indirect\") (result i32) (call $reset) (drop (call_indirect (type $f64_T) (call $f64_left) (call $f64_right) (call $f64_callee))) (call $get))\n  (func (export \"f64_select\") (result i32) (call $reset) (drop (select (call $f64_left) (call $f64_right) (call $f64_bool))) (call $get))\n\n  (func (export \"br_if\") (result i32)\n    (block (result i32)\n      (call $reset)\n      (drop (br_if 0 (call $i32_left) (i32.and (call $i32_right) (i32.const 0))))\n      (call $get)\n    )\n  )\n  (func (export \"br_table\") (result i32)\n    (block $a (result i32)\n      (call $reset)\n      (drop\n        (block $b (result i32)\n          (br_table $a $b (call $i32_left) (call $i32_right))\n        )\n      )\n      (call $get)\n    )\n  )\n)\n\n(assert_return (invoke \"i32_add\") (i32.const 0x0102))     (assert_return (invoke \"i64_add\") (i32.const 0x0102))\n(assert_return (invoke \"i32_sub\") (i32.const 0x0102))     (assert_return (invoke \"i64_sub\") (i32.const 0x0102))\n(assert_return (invoke \"i32_mul\") (i32.const 0x0102))     (assert_return (invoke \"i64_mul\") (i32.const 0x0102))\n(assert_return (invoke \"i32_div_s\") (i32.const 0x0102))   (assert_return (invoke \"i64_div_s\") (i32.const 0x0102))\n(assert_return (invoke \"i32_div_u\") (i32.const 0x0102))   (assert_return (invoke \"i64_div_u\") (i32.const 0x0102))\n(assert_return (invoke \"i32_rem_s\") (i32.const 0x0102))   (assert_return (invoke \"i64_rem_s\") (i32.const 0x0102))\n(assert_return (invoke \"i32_rem_u\") (i32.const 0x0102))   (assert_return (invoke \"i64_rem_u\") (i32.const 0x0102))\n(assert_return (invoke \"i32_and\") (i32.const 0x0102))     (assert_return (invoke \"i64_and\") (i32.const 0x0102))\n(assert_return (invoke \"i32_or\") (i32.const 0x0102))      (assert_return (invoke \"i64_or\") (i32.const 0x0102))\n(assert_return (invoke \"i32_xor\") (i32.const 0x0102))     (assert_return (invoke \"i64_xor\") (i32.const 0x0102))\n(assert_return (invoke \"i32_shl\") (i32.const 0x0102))     (assert_return (invoke \"i64_shl\") (i32.const 0x0102))\n(assert_return (invoke \"i32_shr_u\") (i32.const 0x0102))   (assert_return (invoke \"i64_shr_u\") (i32.const 0x0102))\n(assert_return (invoke \"i32_shr_s\") (i32.const 0x0102))   (assert_return (invoke \"i64_shr_s\") (i32.const 0x0102))\n(assert_return (invoke \"i32_eq\") (i32.const 0x0102))      (assert_return (invoke \"i64_eq\") (i32.const 0x0102))\n(assert_return (invoke \"i32_ne\") (i32.const 0x0102))      (assert_return (invoke \"i64_ne\") (i32.const 0x0102))\n(assert_return (invoke \"i32_lt_s\") (i32.const 0x0102))    (assert_return (invoke \"i64_lt_s\") (i32.const 0x0102))\n(assert_return (invoke \"i32_le_s\") (i32.const 0x0102))    (assert_return (invoke \"i64_le_s\") (i32.const 0x0102))\n(assert_return (invoke \"i32_lt_u\") (i32.const 0x0102))    (assert_return (invoke \"i64_lt_u\") (i32.const 0x0102))\n(assert_return (invoke \"i32_le_u\") (i32.const 0x0102))    (assert_return (invoke \"i64_le_u\") (i32.const 0x0102))\n(assert_return (invoke \"i32_gt_s\") (i32.const 0x0102))    (assert_return (invoke \"i64_gt_s\") (i32.const 0x0102))\n(assert_return (invoke \"i32_ge_s\") (i32.const 0x0102))    (assert_return (invoke \"i64_ge_s\") (i32.const 0x0102))\n(assert_return (invoke \"i32_gt_u\") (i32.const 0x0102))    (assert_return (invoke \"i64_gt_u\") (i32.const 0x0102))\n(assert_return (invoke \"i32_ge_u\") (i32.const 0x0102))    (assert_return (invoke \"i64_ge_u\") (i32.const 0x0102))\n(assert_return (invoke \"i32_store\") (i32.const 0x0102))   (assert_return (invoke \"i64_store\") (i32.const 0x0102))\n(assert_return (invoke \"i32_store8\") (i32.const 0x0102))  (assert_return (invoke \"i64_store8\") (i32.const 0x0102))\n(assert_return (invoke \"i32_store16\") (i32.const 0x0102)) (assert_return (invoke \"i64_store16\") (i32.const 0x0102))\n(assert_return (invoke \"i64_store32\") (i32.const 0x0102))\n(assert_return (invoke \"i32_call\") (i32.const 0x0102))    (assert_return (invoke \"i64_call\") (i32.const 0x0102))\n(assert_return (invoke \"i32_call_indirect\") (i32.const 0x010204))\n(assert_return (invoke \"i64_call_indirect\") (i32.const 0x010204))\n(assert_return (invoke \"i32_select\") (i32.const 0x010205))  (assert_return (invoke \"i64_select\") (i32.const 0x010205))\n\n(assert_return (invoke \"f32_add\") (i32.const 0x0102))     (assert_return (invoke \"f64_add\") (i32.const 0x0102))\n(assert_return (invoke \"f32_sub\") (i32.const 0x0102))     (assert_return (invoke \"f64_sub\") (i32.const 0x0102))\n(assert_return (invoke \"f32_mul\") (i32.const 0x0102))     (assert_return (invoke \"f64_mul\") (i32.const 0x0102))\n(assert_return (invoke \"f32_div\") (i32.const 0x0102))     (assert_return (invoke \"f64_div\") (i32.const 0x0102))\n(assert_return (invoke \"f32_copysign\") (i32.const 0x0102))(assert_return (invoke \"f64_copysign\") (i32.const 0x0102))\n(assert_return (invoke \"f32_eq\") (i32.const 0x0102))      (assert_return (invoke \"f64_eq\") (i32.const 0x0102))\n(assert_return (invoke \"f32_ne\") (i32.const 0x0102))      (assert_return (invoke \"f64_ne\") (i32.const 0x0102))\n(assert_return (invoke \"f32_lt\") (i32.const 0x0102))      (assert_return (invoke \"f64_lt\") (i32.const 0x0102))\n(assert_return (invoke \"f32_le\") (i32.const 0x0102))      (assert_return (invoke \"f64_le\") (i32.const 0x0102))\n(assert_return (invoke \"f32_gt\") (i32.const 0x0102))      (assert_return (invoke \"f64_gt\") (i32.const 0x0102))\n(assert_return (invoke \"f32_ge\") (i32.const 0x0102))      (assert_return (invoke \"f64_ge\") (i32.const 0x0102))\n(assert_return (invoke \"f32_min\") (i32.const 0x0102))     (assert_return (invoke \"f64_min\") (i32.const 0x0102))\n(assert_return (invoke \"f32_max\") (i32.const 0x0102))     (assert_return (invoke \"f64_max\") (i32.const 0x0102))\n(assert_return (invoke \"f32_store\") (i32.const 0x0102))   (assert_return (invoke \"f64_store\") (i32.const 0x0102))\n(assert_return (invoke \"f32_call\") (i32.const 0x0102))    (assert_return (invoke \"f64_call\") (i32.const 0x0102))\n(assert_return (invoke \"f32_call_indirect\") (i32.const 0x010204))\n(assert_return (invoke \"f64_call_indirect\") (i32.const 0x010204))\n(assert_return (invoke \"f32_select\") (i32.const 0x010205))  (assert_return (invoke \"f64_select\") (i32.const 0x010205))\n\n(assert_return (invoke \"br_if\") (i32.const 0x0102))\n(assert_return (invoke \"br_table\") (i32.const 0x0102))\n"
  },
  {
    "path": "test/core/linking.wast",
    "content": ";; Functions\n\n(module $Mf\n  (func (export \"call\") (result i32) (call $g))\n  (func $g (result i32) (i32.const 2))\n)\n(register \"Mf\" $Mf)\n\n(module $Nf\n  (func $f (import \"Mf\" \"call\") (result i32))\n  (export \"Mf.call\" (func $f))\n  (func (export \"call Mf.call\") (result i32) (call $f))\n  (func (export \"call\") (result i32) (call $g))\n  (func $g (result i32) (i32.const 3))\n)\n\n(assert_return (invoke $Mf \"call\") (i32.const 2))\n(assert_return (invoke $Nf \"Mf.call\") (i32.const 2))\n(assert_return (invoke $Nf \"call\") (i32.const 3))\n(assert_return (invoke $Nf \"call Mf.call\") (i32.const 2))\n\n(module\n  (import \"spectest\" \"print_i32\" (func $f (param i32)))\n  (export \"print\" (func $f))\n)\n(register \"reexport_f\")\n(assert_unlinkable\n  (module (import \"reexport_f\" \"print\" (func (param i64))))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"reexport_f\" \"print\" (func (param i32) (result i32))))\n  \"incompatible import type\"\n)\n\n\n;; Globals\n\n(module $Mg\n  (global $glob (export \"glob\") i32 (i32.const 42))\n  (func (export \"get\") (result i32) (global.get $glob))\n\n  ;; export mutable globals\n  (global $mut_glob (export \"mut_glob\") (mut i32) (i32.const 142))\n  (func (export \"get_mut\") (result i32) (global.get $mut_glob))\n  (func (export \"set_mut\") (param i32) (global.set $mut_glob (local.get 0)))\n)\n(register \"Mg\" $Mg)\n\n(module $Ng\n  (global $x (import \"Mg\" \"glob\") i32)\n  (global $mut_glob (import \"Mg\" \"mut_glob\") (mut i32))\n  (func $f (import \"Mg\" \"get\") (result i32))\n  (func $get_mut (import \"Mg\" \"get_mut\") (result i32))\n  (func $set_mut (import \"Mg\" \"set_mut\") (param i32))\n\n  (export \"Mg.glob\" (global $x))\n  (export \"Mg.get\" (func $f))\n  (global $glob (export \"glob\") i32 (i32.const 43))\n  (func (export \"get\") (result i32) (global.get $glob))\n\n  (export \"Mg.mut_glob\" (global $mut_glob))\n  (export \"Mg.get_mut\" (func $get_mut))\n  (export \"Mg.set_mut\" (func $set_mut))\n)\n\n(assert_return (get $Mg \"glob\") (i32.const 42))\n(assert_return (get $Ng \"Mg.glob\") (i32.const 42))\n(assert_return (get $Ng \"glob\") (i32.const 43))\n(assert_return (invoke $Mg \"get\") (i32.const 42))\n(assert_return (invoke $Ng \"Mg.get\") (i32.const 42))\n(assert_return (invoke $Ng \"get\") (i32.const 43))\n\n(assert_return (get $Mg \"mut_glob\") (i32.const 142))\n(assert_return (get $Ng \"Mg.mut_glob\") (i32.const 142))\n(assert_return (invoke $Mg \"get_mut\") (i32.const 142))\n(assert_return (invoke $Ng \"Mg.get_mut\") (i32.const 142))\n\n(assert_return (invoke $Mg \"set_mut\" (i32.const 241)))\n(assert_return (get $Mg \"mut_glob\") (i32.const 241))\n(assert_return (get $Ng \"Mg.mut_glob\") (i32.const 241))\n(assert_return (invoke $Mg \"get_mut\") (i32.const 241))\n(assert_return (invoke $Ng \"Mg.get_mut\") (i32.const 241))\n\n\n(assert_unlinkable\n  (module (import \"Mg\" \"mut_glob\" (global i32)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (import \"Mg\" \"glob\" (global (mut i32))))\n  \"incompatible import type\"\n)\n\n\n(module $Mref_ex\n  (global (export \"g-const-func\") funcref (ref.null func))\n  (global (export \"g-var-func\") (mut funcref) (ref.null func))\n  (global (export \"g-const-extern\") externref (ref.null extern))\n  (global (export \"g-var-extern\") (mut externref) (ref.null extern))\n)\n(register \"Mref_ex\" $Mref_ex)\n\n(module $Mref_im\n  (global (import \"Mref_ex\" \"g-const-func\") funcref)\n  (global (import \"Mref_ex\" \"g-const-extern\") externref)\n\n  (global (import \"Mref_ex\" \"g-var-func\") (mut funcref))\n  (global (import \"Mref_ex\" \"g-var-extern\") (mut externref))\n)\n\n(assert_unlinkable\n  (module (global (import \"Mref_ex\" \"g-const-extern\") funcref))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (global (import \"Mref_ex\" \"g-const-func\") externref))\n  \"incompatible import type\"\n)\n\n\n(assert_unlinkable\n  (module (global (import \"Mref_ex\" \"g-var-func\") (mut externref)))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (global (import \"Mref_ex\" \"g-var-extern\") (mut funcref)))\n  \"incompatible import type\"\n)\n\n\n;; Tables\n\n(module $Mt\n  (type (func (result i32)))\n  (type (func))\n\n  (table (export \"tab\") 10 funcref)\n  (elem (i32.const 2) $g $g $g $g)\n  (func $g (result i32) (i32.const 4))\n  (func (export \"h\") (result i32) (i32.const -4))\n\n  (func (export \"call\") (param i32) (result i32)\n    (call_indirect (type 0) (local.get 0))\n  )\n)\n(register \"Mt\" $Mt)\n\n(module $Nt\n  (type (func))\n  (type (func (result i32)))\n\n  (func $f (import \"Mt\" \"call\") (param i32) (result i32))\n  (func $h (import \"Mt\" \"h\") (result i32))\n\n  (table funcref (elem $g $g $g $h $f))\n  (func $g (result i32) (i32.const 5))\n\n  (export \"Mt.call\" (func $f))\n  (func (export \"call Mt.call\") (param i32) (result i32)\n    (call $f (local.get 0))\n  )\n  (func (export \"call\") (param i32) (result i32)\n    (call_indirect (type 1) (local.get 0))\n  )\n)\n\n(assert_return (invoke $Mt \"call\" (i32.const 2)) (i32.const 4))\n(assert_return (invoke $Nt \"Mt.call\" (i32.const 2)) (i32.const 4))\n(assert_return (invoke $Nt \"call\" (i32.const 2)) (i32.const 5))\n(assert_return (invoke $Nt \"call Mt.call\" (i32.const 2)) (i32.const 4))\n\n(assert_trap (invoke $Mt \"call\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke $Nt \"Mt.call\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke $Nt \"call\" (i32.const 1)) (i32.const 5))\n(assert_trap (invoke $Nt \"call Mt.call\" (i32.const 1)) \"uninitialized element\")\n\n(assert_trap (invoke $Mt \"call\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke $Nt \"Mt.call\" (i32.const 0)) \"uninitialized element\")\n(assert_return (invoke $Nt \"call\" (i32.const 0)) (i32.const 5))\n(assert_trap (invoke $Nt \"call Mt.call\" (i32.const 0)) \"uninitialized element\")\n\n(assert_trap (invoke $Mt \"call\" (i32.const 20)) \"undefined element\")\n(assert_trap (invoke $Nt \"Mt.call\" (i32.const 20)) \"undefined element\")\n(assert_trap (invoke $Nt \"call\" (i32.const 7)) \"undefined element\")\n(assert_trap (invoke $Nt \"call Mt.call\" (i32.const 20)) \"undefined element\")\n\n(assert_return (invoke $Nt \"call\" (i32.const 3)) (i32.const -4))\n(assert_trap (invoke $Nt \"call\" (i32.const 4)) \"indirect call type mismatch\")\n\n(module $Ot\n  (type (func (result i32)))\n\n  (func $h (import \"Mt\" \"h\") (result i32))\n  (table (import \"Mt\" \"tab\") 5 funcref)\n  (elem (i32.const 1) $i $h)\n  (func $i (result i32) (i32.const 6))\n\n  (func (export \"call\") (param i32) (result i32)\n    (call_indirect (type 0) (local.get 0))\n  )\n)\n\n(assert_return (invoke $Mt \"call\" (i32.const 3)) (i32.const 4))\n(assert_return (invoke $Nt \"Mt.call\" (i32.const 3)) (i32.const 4))\n(assert_return (invoke $Nt \"call Mt.call\" (i32.const 3)) (i32.const 4))\n(assert_return (invoke $Ot \"call\" (i32.const 3)) (i32.const 4))\n\n(assert_return (invoke $Mt \"call\" (i32.const 2)) (i32.const -4))\n(assert_return (invoke $Nt \"Mt.call\" (i32.const 2)) (i32.const -4))\n(assert_return (invoke $Nt \"call\" (i32.const 2)) (i32.const 5))\n(assert_return (invoke $Nt \"call Mt.call\" (i32.const 2)) (i32.const -4))\n(assert_return (invoke $Ot \"call\" (i32.const 2)) (i32.const -4))\n\n(assert_return (invoke $Mt \"call\" (i32.const 1)) (i32.const 6))\n(assert_return (invoke $Nt \"Mt.call\" (i32.const 1)) (i32.const 6))\n(assert_return (invoke $Nt \"call\" (i32.const 1)) (i32.const 5))\n(assert_return (invoke $Nt \"call Mt.call\" (i32.const 1)) (i32.const 6))\n(assert_return (invoke $Ot \"call\" (i32.const 1)) (i32.const 6))\n\n(assert_trap (invoke $Mt \"call\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke $Nt \"Mt.call\" (i32.const 0)) \"uninitialized element\")\n(assert_return (invoke $Nt \"call\" (i32.const 0)) (i32.const 5))\n(assert_trap (invoke $Nt \"call Mt.call\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke $Ot \"call\" (i32.const 0)) \"uninitialized element\")\n\n(assert_trap (invoke $Ot \"call\" (i32.const 20)) \"undefined element\")\n\n(module\n  (table (import \"Mt\" \"tab\") 0 funcref)\n  (elem (i32.const 9) $f)\n  (func $f)\n)\n\n(module $G1 (global (export \"g\") i32 (i32.const 5)))\n(register \"G1\" $G1)\n(module $G2\n  (global (import \"G1\" \"g\") i32)\n  (global (export \"g\") i32 (global.get 0))\n)\n(assert_return (get $G2 \"g\") (i32.const 5))\n\n(assert_trap\n  (module\n    (table (import \"Mt\" \"tab\") 0 funcref)\n    (elem (i32.const 10) $f)\n    (func $f)\n  )\n  \"out of bounds table access\"\n)\n\n(assert_unlinkable\n  (module\n    (table (import \"Mt\" \"tab\") 10 funcref)\n    (memory (import \"Mt\" \"mem\") 1)  ;; does not exist\n    (func $f (result i32) (i32.const 0))\n    (elem (i32.const 7) $f)\n    (elem (i32.const 9) $f)\n  )\n  \"unknown import\"\n)\n(assert_trap (invoke $Mt \"call\" (i32.const 7)) \"uninitialized element\")\n\n;; Unlike in the v1 spec, active element segments stored before an\n;; out-of-bounds access persist after the instantiation failure.\n(assert_trap\n  (module\n    (table (import \"Mt\" \"tab\") 10 funcref)\n    (func $f (result i32) (i32.const 0))\n    (elem (i32.const 7) $f)\n    (elem (i32.const 8) $f $f $f $f $f)  ;; (partially) out of bounds\n  )\n  \"out of bounds table access\"\n)\n(assert_return (invoke $Mt \"call\" (i32.const 7)) (i32.const 0))\n(assert_trap (invoke $Mt \"call\" (i32.const 8)) \"uninitialized element\")\n\n(assert_trap\n  (module\n    (table (import \"Mt\" \"tab\") 10 funcref)\n    (func $f (result i32) (i32.const 0))\n    (elem (i32.const 7) $f)\n    (memory 1)\n    (data (i32.const 0x10000) \"d\")  ;; out of bounds\n  )\n  \"out of bounds memory access\"\n)\n(assert_return (invoke $Mt \"call\" (i32.const 7)) (i32.const 0))\n\n\n(module $Mtable_ex\n  (table $t1 (export \"t-func\") 1 funcref)\n  (table $t2 (export \"t-extern\") 1 externref)\n)\n(register \"Mtable_ex\" $Mtable_ex)\n\n(module\n  (table (import \"Mtable_ex\" \"t-func\") 1 funcref)\n  (table (import \"Mtable_ex\" \"t-extern\") 1 externref)\n)\n\n(assert_unlinkable\n  (module (table (import \"Mtable_ex\" \"t-func\") 1 externref))\n  \"incompatible import type\"\n)\n(assert_unlinkable\n  (module (table (import \"Mtable_ex\" \"t-extern\") 1 funcref))\n  \"incompatible import type\"\n)\n\n\n;; Memories\n\n(module $Mm\n  (memory (export \"mem\") 1 5)\n  (data (i32.const 10) \"\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\")\n\n  (func (export \"load\") (param $a i32) (result i32)\n    (i32.load8_u (local.get 0))\n  )\n)\n(register \"Mm\" $Mm)\n\n(module $Nm\n  (func $loadM (import \"Mm\" \"load\") (param i32) (result i32))\n\n  (memory 1)\n  (data (i32.const 10) \"\\f0\\f1\\f2\\f3\\f4\\f5\")\n\n  (export \"Mm.load\" (func $loadM))\n  (func (export \"load\") (param $a i32) (result i32)\n    (i32.load8_u (local.get 0))\n  )\n)\n\n(assert_return (invoke $Mm \"load\" (i32.const 12)) (i32.const 2))\n(assert_return (invoke $Nm \"Mm.load\" (i32.const 12)) (i32.const 2))\n(assert_return (invoke $Nm \"load\" (i32.const 12)) (i32.const 0xf2))\n\n(module $Om\n  (memory (import \"Mm\" \"mem\") 1)\n  (data (i32.const 5) \"\\a0\\a1\\a2\\a3\\a4\\a5\\a6\\a7\")\n\n  (func (export \"load\") (param $a i32) (result i32)\n    (i32.load8_u (local.get 0))\n  )\n)\n\n(assert_return (invoke $Mm \"load\" (i32.const 12)) (i32.const 0xa7))\n(assert_return (invoke $Nm \"Mm.load\" (i32.const 12)) (i32.const 0xa7))\n(assert_return (invoke $Nm \"load\" (i32.const 12)) (i32.const 0xf2))\n(assert_return (invoke $Om \"load\" (i32.const 12)) (i32.const 0xa7))\n\n(module\n  (memory (import \"Mm\" \"mem\") 0)\n  (data (i32.const 0xffff) \"a\")\n)\n\n(assert_trap\n  (module\n    (memory (import \"Mm\" \"mem\") 0)\n    (data (i32.const 0x10000) \"a\")\n  )\n  \"out of bounds memory access\"\n)\n\n(module $Pm\n  (memory (import \"Mm\" \"mem\") 1 8)\n\n  (func (export \"grow\") (param $a i32) (result i32)\n    (memory.grow (local.get 0))\n  )\n)\n\n(assert_return (invoke $Pm \"grow\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke $Pm \"grow\" (i32.const 2)) (i32.const 1))\n(assert_return (invoke $Pm \"grow\" (i32.const 0)) (i32.const 3))\n(assert_return (invoke $Pm \"grow\" (i32.const 1)) (i32.const 3))\n(assert_return (invoke $Pm \"grow\" (i32.const 1)) (i32.const 4))\n(assert_return (invoke $Pm \"grow\" (i32.const 0)) (i32.const 5))\n(assert_return (invoke $Pm \"grow\" (i32.const 1)) (i32.const -1))\n(assert_return (invoke $Pm \"grow\" (i32.const 0)) (i32.const 5))\n\n(assert_unlinkable\n  (module\n    (func $host (import \"spectest\" \"print\"))\n    (memory (import \"Mm\" \"mem\") 1)\n    (table (import \"Mm\" \"tab\") 0 funcref)  ;; does not exist\n    (data (i32.const 0) \"abc\")\n  )\n  \"unknown import\"\n)\n(assert_return (invoke $Mm \"load\" (i32.const 0)) (i32.const 0))\n\n;; Unlike in v1 spec, active data segments written before an\n;; out-of-bounds access persist after the instantiation failure.\n(assert_trap\n  (module\n    ;; Note: the memory is 5 pages large by the time we get here.\n    (memory (import \"Mm\" \"mem\") 1)\n    (data (i32.const 0) \"abc\")\n    (data (i32.const 327670) \"zzzzzzzzzzzzzzzzzz\") ;; (partially) out of bounds\n  )\n  \"out of bounds memory access\"\n)\n(assert_return (invoke $Mm \"load\" (i32.const 0)) (i32.const 97))\n(assert_return (invoke $Mm \"load\" (i32.const 327670)) (i32.const 0))\n\n(assert_trap\n  (module\n    (memory (import \"Mm\" \"mem\") 1)\n    (data (i32.const 0) \"abc\")\n    (table 0 funcref)\n    (func)\n    (elem (i32.const 0) 0)  ;; out of bounds\n  )\n  \"out of bounds table access\"\n)\n(assert_return (invoke $Mm \"load\" (i32.const 0)) (i32.const 97))\n\n;; Store is modified if the start function traps.\n(module $Ms\n  (type $t (func (result i32)))\n  (memory (export \"memory\") 1)\n  (table (export \"table\") 1 funcref)\n  (func (export \"get memory[0]\") (type $t)\n    (i32.load8_u (i32.const 0))\n  )\n  (func (export \"get table[0]\") (type $t)\n    (call_indirect (type $t) (i32.const 0))\n  )\n)\n(register \"Ms\" $Ms)\n\n(assert_trap\n  (module\n    (import \"Ms\" \"memory\" (memory 1))\n    (import \"Ms\" \"table\" (table 1 funcref))\n    (data (i32.const 0) \"hello\")\n    (elem (i32.const 0) $f)\n    (func $f (result i32)\n      (i32.const 0xdead)\n    )\n    (func $main\n      (unreachable)\n    )\n    (start $main)\n  )\n  \"unreachable\"\n)\n\n(assert_return (invoke $Ms \"get memory[0]\") (i32.const 104))  ;; 'h'\n(assert_return (invoke $Ms \"get table[0]\") (i32.const 0xdead))\n"
  },
  {
    "path": "test/core/load.wast",
    "content": ";; Load operator as the argument of control constructs and instructions\n\n(module\n  (memory 1)\n\n  (func (export \"as-br-value\") (result i32)\n    (block (result i32) (br 0 (i32.load (i32.const 0))))\n  )\n\n  (func (export \"as-br_if-cond\")\n    (block (br_if 0 (i32.load (i32.const 0))))\n  )\n  (func (export \"as-br_if-value\") (result i32)\n    (block (result i32)\n      (drop (br_if 0 (i32.load (i32.const 0)) (i32.const 1))) (i32.const 7)\n    )\n  )\n  (func (export \"as-br_if-value-cond\") (result i32)\n    (block (result i32)\n      (drop (br_if 0 (i32.const 6) (i32.load (i32.const 0)))) (i32.const 7)\n    )\n  )\n\n  (func (export \"as-br_table-index\")\n    (block (br_table 0 0 0 (i32.load (i32.const 0))))\n  )\n  (func (export \"as-br_table-value\") (result i32)\n    (block (result i32)\n      (br_table 0 0 0 (i32.load (i32.const 0)) (i32.const 1)) (i32.const 7)\n    )\n  )\n  (func (export \"as-br_table-value-index\") (result i32)\n    (block (result i32)\n      (br_table 0 0 (i32.const 6) (i32.load (i32.const 0))) (i32.const 7)\n    )\n  )\n\n  (func (export \"as-return-value\") (result i32)\n    (return (i32.load (i32.const 0)))\n  )\n\n  (func (export \"as-if-cond\") (result i32)\n    (if (result i32) (i32.load (i32.const 0))\n      (then (i32.const 0)) (else (i32.const 1))\n    )\n  )\n  (func (export \"as-if-then\") (result i32)\n    (if (result i32) (i32.const 1)\n      (then (i32.load (i32.const 0))) (else (i32.const 0))\n    )\n  )\n  (func (export \"as-if-else\") (result i32)\n    (if (result i32) (i32.const 0)\n      (then (i32.const 0)) (else (i32.load (i32.const 0)))\n    )\n  )\n\n  (func (export \"as-select-first\") (param i32 i32) (result i32)\n    (select (i32.load (i32.const 0)) (local.get 0) (local.get 1))\n  )\n  (func (export \"as-select-second\") (param i32 i32) (result i32)\n    (select (local.get 0) (i32.load (i32.const 0)) (local.get 1))\n  )\n  (func (export \"as-select-cond\") (result i32)\n    (select (i32.const 0) (i32.const 1) (i32.load (i32.const 0)))\n  )\n\n  (func $f (param i32 i32 i32) (result i32) (i32.const -1))\n  (func (export \"as-call-first\") (result i32)\n    (call $f (i32.load (i32.const 0)) (i32.const 2) (i32.const 3))\n  )\n  (func (export \"as-call-mid\") (result i32)\n    (call $f (i32.const 1) (i32.load (i32.const 0)) (i32.const 3))\n  )\n  (func (export \"as-call-last\") (result i32)\n    (call $f (i32.const 1) (i32.const 2) (i32.load (i32.const 0)))\n  )\n\n  (type $sig (func (param i32 i32 i32) (result i32)))\n  (table funcref (elem $f))\n  (func (export \"as-call_indirect-first\") (result i32)\n    (call_indirect (type $sig)\n      (i32.load (i32.const 0)) (i32.const 2) (i32.const 3) (i32.const 0)\n    )\n  )\n  (func (export \"as-call_indirect-mid\") (result i32)\n    (call_indirect (type $sig)\n      (i32.const 1) (i32.load (i32.const 0)) (i32.const 3) (i32.const 0)\n    )\n  )\n  (func (export \"as-call_indirect-last\") (result i32)\n    (call_indirect (type $sig)\n      (i32.const 1) (i32.const 2) (i32.load (i32.const 0)) (i32.const 0)\n    )\n  )\n  (func (export \"as-call_indirect-index\") (result i32)\n    (call_indirect (type $sig)\n      (i32.const 1) (i32.const 2) (i32.const 3) (i32.load (i32.const 0))\n    )\n  )\n\n  (func (export \"as-local.set-value\") (local i32)\n    (local.set 0 (i32.load (i32.const 0)))\n  )\n  (func (export \"as-local.tee-value\") (result i32) (local i32)\n    (local.tee 0 (i32.load (i32.const 0)))\n  )\n  (global $g (mut i32) (i32.const 0))\n  (func (export \"as-global.set-value\") (local i32)\n    (global.set $g (i32.load (i32.const 0)))\n  )\n\n  (func (export \"as-load-address\") (result i32)\n    (i32.load (i32.load (i32.const 0)))\n  )\n  (func (export \"as-loadN-address\") (result i32)\n    (i32.load8_s (i32.load (i32.const 0)))\n  )\n\n  (func (export \"as-store-address\")\n    (i32.store (i32.load (i32.const 0)) (i32.const 7))\n  )\n  (func (export \"as-store-value\")\n    (i32.store (i32.const 2) (i32.load (i32.const 0)))\n  )\n\n  (func (export \"as-storeN-address\")\n    (i32.store8 (i32.load8_s (i32.const 0)) (i32.const 7))\n  )\n  (func (export \"as-storeN-value\")\n    (i32.store16 (i32.const 2) (i32.load (i32.const 0)))\n  )\n\n  (func (export \"as-unary-operand\") (result i32)\n    (i32.clz (i32.load (i32.const 100)))\n  )\n\n  (func (export \"as-binary-left\") (result i32)\n    (i32.add (i32.load (i32.const 100)) (i32.const 10))\n  )\n  (func (export \"as-binary-right\") (result i32)\n    (i32.sub (i32.const 10) (i32.load (i32.const 100)))\n  )\n\n  (func (export \"as-test-operand\") (result i32)\n    (i32.eqz (i32.load (i32.const 100)))\n  )\n\n  (func (export \"as-compare-left\") (result i32)\n    (i32.le_s (i32.load (i32.const 100)) (i32.const 10))\n  )\n  (func (export \"as-compare-right\") (result i32)\n    (i32.ne (i32.const 10) (i32.load (i32.const 100)))\n  )\n\n  (func (export \"as-memory.grow-size\") (result i32)\n    (memory.grow (i32.load (i32.const 100)))\n  )\n)\n\n(assert_return (invoke \"as-br-value\") (i32.const 0))\n\n(assert_return (invoke \"as-br_if-cond\"))\n(assert_return (invoke \"as-br_if-value\") (i32.const 0))\n(assert_return (invoke \"as-br_if-value-cond\") (i32.const 7))\n\n(assert_return (invoke \"as-br_table-index\"))\n(assert_return (invoke \"as-br_table-value\") (i32.const 0))\n(assert_return (invoke \"as-br_table-value-index\") (i32.const 6))\n\n(assert_return (invoke \"as-return-value\") (i32.const 0))\n\n(assert_return (invoke \"as-if-cond\") (i32.const 1))\n(assert_return (invoke \"as-if-then\") (i32.const 0))\n(assert_return (invoke \"as-if-else\") (i32.const 0))\n\n(assert_return (invoke \"as-select-first\" (i32.const 0) (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"as-select-second\" (i32.const 0) (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-select-cond\") (i32.const 1))\n\n(assert_return (invoke \"as-call-first\") (i32.const -1))\n(assert_return (invoke \"as-call-mid\") (i32.const -1))\n(assert_return (invoke \"as-call-last\") (i32.const -1))\n\n(assert_return (invoke \"as-call_indirect-first\") (i32.const -1))\n(assert_return (invoke \"as-call_indirect-mid\") (i32.const -1))\n(assert_return (invoke \"as-call_indirect-last\") (i32.const -1))\n(assert_return (invoke \"as-call_indirect-index\") (i32.const -1))\n\n(assert_return (invoke \"as-local.set-value\"))\n(assert_return (invoke \"as-local.tee-value\") (i32.const 0))\n(assert_return (invoke \"as-global.set-value\"))\n\n(assert_return (invoke \"as-load-address\") (i32.const 0))\n(assert_return (invoke \"as-loadN-address\") (i32.const 0))\n(assert_return (invoke \"as-store-address\"))\n(assert_return (invoke \"as-store-value\"))\n(assert_return (invoke \"as-storeN-address\"))\n(assert_return (invoke \"as-storeN-value\"))\n\n(assert_return (invoke \"as-unary-operand\") (i32.const 32))\n\n(assert_return (invoke \"as-binary-left\") (i32.const 10))\n(assert_return (invoke \"as-binary-right\") (i32.const 10))\n\n(assert_return (invoke \"as-test-operand\") (i32.const 1))\n\n(assert_return (invoke \"as-compare-left\") (i32.const 1))\n(assert_return (invoke \"as-compare-right\") (i32.const 1))\n\n(assert_return (invoke \"as-memory.grow-size\") (i32.const 1))\n\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (result i32) (i32.load32 (local.get 0)))\"\n  )\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (result i32) (i32.load32_u (local.get 0)))\"\n  )\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (result i32) (i32.load32_s (local.get 0)))\"\n  )\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (result i32) (i32.load64 (local.get 0)))\"\n  )\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (result i32) (i32.load64_u (local.get 0)))\"\n  )\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (result i32) (i32.load64_s (local.get 0)))\"\n  )\n  \"unknown operator\"\n)\n\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (result i64) (i64.load64 (local.get 0)))\"\n  )\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (result i64) (i64.load64_u (local.get 0)))\"\n  )\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (result i64) (i64.load64_s (local.get 0)))\"\n  )\n  \"unknown operator\"\n)\n\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (result f32) (f32.load32 (local.get 0)))\"\n  )\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (result f32) (f32.load64 (local.get 0)))\"\n  )\n  \"unknown operator\"\n)\n\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (result f64) (f64.load32 (local.get 0)))\"\n  )\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (result f64) (f64.load64 (local.get 0)))\"\n  )\n  \"unknown operator\"\n)\n\n\n;; load should have retval\n\n(assert_invalid\n  (module (memory 1) (func $load_i32 (i32.load (i32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func $load8_s_i32 (i32.load8_s (i32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func $load8_u_i32 (i32.load8_u (i32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func $load16_s_i32 (i32.load16_s (i32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func $load16_u_i32 (i32.load16_u (i32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func $load_i64 (i64.load (i32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func $load8_s_i64 (i64.load8_s (i32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func $load8_u_i64 (i64.load8_u (i32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func $load16_s_i64 (i64.load16_s (i32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func $load16_u_i64 (i64.load16_u (i32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func $load32_s_i64 (i64.load32_s (i32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func $load32_u_i64 (i64.load32_u (i32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func $load_f32 (f32.load (i32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func $load_f64 (f64.load (i32.const 0))))\n  \"type mismatch\"\n)\n\n\n;; Type check\n\n(assert_invalid (module (memory 1) (func (result i32) (i32.load (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (result i32) (i32.load8_s (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (result i32) (i32.load8_u (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (result i32) (i32.load16_s (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (result i32) (i32.load16_u (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (result i64) (i64.load (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (result i64) (i64.load8_s (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (result i64) (i64.load8_u (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (result i64) (i64.load16_s (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (result i64) (i64.load16_u (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (result i64) (i64.load32_s (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (result i64) (i64.load32_u (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (result f32) (f32.load (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (result f64) (f64.load (f32.const 0)))) \"type mismatch\")\n\n\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-address-empty\n      (i32.load) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-address-empty-in-block\n      (i32.const 0)\n      (block (i32.load) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-address-empty-in-loop\n      (i32.const 0)\n      (loop (i32.load) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-address-empty-in-then\n      (i32.const 0) (i32.const 0)\n      (if (then (i32.load) (drop)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-address-empty-in-else\n      (i32.const 0) (i32.const 0)\n      (if (result i32) (then (i32.const 0)) (else (i32.load))) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-address-empty-in-br\n      (i32.const 0)\n      (block (br 0 (i32.load)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-address-empty-in-br_if\n      (i32.const 0)\n      (block (br_if 0 (i32.load) (i32.const 1)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-address-empty-in-br_table\n      (i32.const 0)\n      (block (br_table 0 (i32.load)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-address-empty-in-return\n      (return (i32.load)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-address-empty-in-select\n      (select (i32.load) (i32.const 1) (i32.const 2)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-address-empty-in-call\n      (call 1 (i32.load)) (drop)\n    )\n    (func (param i32) (result i32) (local.get 0))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $f (param i32) (result i32) (local.get 0))\n    (type $sig (func (param i32) (result i32)))\n    (table funcref (elem $f))\n    (func $type-address-empty-in-call_indirect\n      (block (result i32)\n        (call_indirect (type $sig)\n          (i32.load) (i32.const 0)\n        )\n        (drop)\n      )\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-address-empty-in-local.set\n      (local i32)\n      (local.set 0 (i32.load)) (local.get 0) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-address-empty-in-local.tee\n      (local i32)\n      (local.tee 0 (i32.load)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (global $x (mut i32) (i32.const 0))\n    (func $type-address-empty-in-global.set\n      (global.set $x (i32.load)) (global.get $x) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-address-empty-in-memory.grow\n      (memory.grow (i32.load)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-address-empty-in-load\n      (i32.load (i32.load)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-address-empty-in-store\n      (i32.store (i32.load) (i32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n"
  },
  {
    "path": "test/core/local_get.wast",
    "content": ";; Test `local.get` operator\n\n(module\n  ;; Typing\n\n  (func (export \"type-local-i32\") (result i32) (local i32) (local.get 0))\n  (func (export \"type-local-i64\") (result i64) (local i64) (local.get 0))\n  (func (export \"type-local-f32\") (result f32) (local f32) (local.get 0))\n  (func (export \"type-local-f64\") (result f64) (local f64) (local.get 0))\n\n  (func (export \"type-param-i32\") (param i32) (result i32) (local.get 0))\n  (func (export \"type-param-i64\") (param i64) (result i64) (local.get 0))\n  (func (export \"type-param-f32\") (param f32) (result f32) (local.get 0))\n  (func (export \"type-param-f64\") (param f64) (result f64) (local.get 0))\n\n  (func (export \"type-mixed\") (param i64 f32 f64 i32 i32)\n    (local f32 i64 i64 f64)\n    (drop (i64.eqz (local.get 0)))\n    (drop (f32.neg (local.get 1)))\n    (drop (f64.neg (local.get 2)))\n    (drop (i32.eqz (local.get 3)))\n    (drop (i32.eqz (local.get 4)))\n    (drop (f32.neg (local.get 5)))\n    (drop (i64.eqz (local.get 6)))\n    (drop (i64.eqz (local.get 7)))\n    (drop (f64.neg (local.get 8)))\n  )\n\n  ;; Reading\n\n  (func (export \"read\") (param i64 f32 f64 i32 i32) (result f64)\n    (local f32 i64 i64 f64)\n    (local.set 5 (f32.const 5.5))\n    (local.set 6 (i64.const 6))\n    (local.set 8 (f64.const 8))\n    (f64.add\n      (f64.convert_i64_u (local.get 0))\n      (f64.add\n        (f64.promote_f32 (local.get 1))\n        (f64.add\n          (local.get 2)\n          (f64.add\n            (f64.convert_i32_u (local.get 3))\n            (f64.add\n              (f64.convert_i32_s (local.get 4))\n              (f64.add\n                (f64.promote_f32 (local.get 5))\n                (f64.add\n                  (f64.convert_i64_u (local.get 6))\n                  (f64.add\n                    (f64.convert_i64_u (local.get 7))\n                    (local.get 8)\n                  )\n                )\n              )\n            )\n          )\n        )\n      )\n    )\n  )\n\n  ;; As parameter of control constructs and instructions\n\n  (func (export \"as-block-value\") (param i32) (result i32)\n    (block (result i32) (local.get 0))\n  )\n  (func (export \"as-loop-value\") (param i32) (result i32)\n    (loop (result i32) (local.get 0))\n  )\n  (func (export \"as-br-value\") (param i32) (result i32)\n    (block (result i32) (br 0 (local.get 0)))\n  )\n  (func (export \"as-br_if-value\") (param i32) (result i32)\n    (block $l0 (result i32) (br_if $l0 (local.get 0) (i32.const 1)))\n  )\n\n  (func (export \"as-br_if-value-cond\") (param i32) (result i32)\n    (block (result i32)\n      (br_if 0 (local.get 0) (local.get 0))\n    )\n  )\n  (func (export \"as-br_table-value\") (param i32) (result i32)\n    (block\n      (block\n        (block\n          (br_table 0 1 2 (local.get 0))\n          (return (i32.const 0))\n        )\n        (return (i32.const 1))\n      )\n      (return (i32.const 2))\n    )\n    (i32.const 3)\n  )\n\n  (func (export \"as-return-value\") (param i32) (result i32)\n    (return (local.get 0))\n  )\n\n  (func (export \"as-if-then\") (param i32) (result i32)\n    (if (result i32) (local.get 0) (then (local.get 0)) (else (i32.const 0)))\n  )\n  (func (export \"as-if-else\") (param i32) (result i32)\n    (if (result i32) (local.get 0) (then (i32.const 1)) (else (local.get 0)))\n  )\n)\n\n(assert_return (invoke \"type-local-i32\") (i32.const 0))\n(assert_return (invoke \"type-local-i64\") (i64.const 0))\n(assert_return (invoke \"type-local-f32\") (f32.const 0))\n(assert_return (invoke \"type-local-f64\") (f64.const 0))\n\n(assert_return (invoke \"type-param-i32\" (i32.const 2)) (i32.const 2))\n(assert_return (invoke \"type-param-i64\" (i64.const 3)) (i64.const 3))\n(assert_return (invoke \"type-param-f32\" (f32.const 4.4)) (f32.const 4.4))\n(assert_return (invoke \"type-param-f64\" (f64.const 5.5)) (f64.const 5.5))\n\n(assert_return (invoke \"as-block-value\" (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"as-loop-value\" (i32.const 7)) (i32.const 7))\n\n(assert_return (invoke \"as-br-value\" (i32.const 8)) (i32.const 8))\n(assert_return (invoke \"as-br_if-value\" (i32.const 9)) (i32.const 9))\n(assert_return (invoke \"as-br_if-value-cond\" (i32.const 10)) (i32.const 10))\n(assert_return (invoke \"as-br_table-value\" (i32.const 1)) (i32.const 2))\n\n(assert_return (invoke \"as-return-value\" (i32.const 0)) (i32.const 0))\n\n(assert_return (invoke \"as-if-then\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-if-else\" (i32.const 0)) (i32.const 0))\n\n(assert_return\n  (invoke \"type-mixed\"\n    (i64.const 1) (f32.const 2.2) (f64.const 3.3) (i32.const 4) (i32.const 5)\n  )\n)\n\n(assert_return\n  (invoke \"read\"\n    (i64.const 1) (f32.const 2) (f64.const 3.3) (i32.const 4) (i32.const 5)\n  )\n  (f64.const 34.8)\n)\n\n\n;; Invalid typing of access to locals\n\n(assert_invalid\n  (module (func $type-local-num-vs-num (result i64) (local i32) (local.get 0)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-local-num-vs-num (result i32) (local f32) (i32.eqz (local.get 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-local-num-vs-num (result f64) (local f64 i64) (f64.neg (local.get 1))))\n  \"type mismatch\"\n)\n\n\n;; Invalid typing of access to parameters\n\n(assert_invalid\n  (module (func $type-param-num-vs-num (param i32) (result i64) (local.get 0)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-num (param f32) (result i32) (i32.eqz (local.get 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-num (param f64 i64) (result f64) (f64.neg (local.get 1))))\n  \"type mismatch\"\n)\n\n\n;; local.set should have retval\n\n(assert_invalid\n  (module (func $type-empty-vs-i32 (local i32) (local.get 0)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-vs-i64 (local i64) (local.get 0)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-vs-f32 (local f32) (local.get 0)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-vs-f64 (local f64) (local.get 0)))\n  \"type mismatch\"\n)\n\n\n;; Invalid local index\n\n(assert_invalid\n  (module (func $unbound-local (local i32 i64) (local.get 3) drop))\n  \"unknown local\"\n)\n(assert_invalid\n  (module (func $large-local (local i32 i64) (local.get 14324343) drop))\n  \"unknown local\"\n)\n\n(assert_invalid\n  (module (func $unbound-param (param i32 i64) (local.get 2) drop))\n  \"unknown local\"\n)\n(assert_invalid\n  (module (func $large-param (param i32 i64) (local.get 714324343) drop))\n  \"unknown local\"\n)\n\n(assert_invalid\n  (module (func $unbound-mixed (param i32) (local i32 i64) (local.get 3) drop))\n  \"unknown local\"\n)\n(assert_invalid\n  (module (func $large-mixed (param i64) (local i32 i64) (local.get 214324343) drop))\n  \"unknown local\"\n)\n\n"
  },
  {
    "path": "test/core/local_set.wast",
    "content": ";; Test `local.set` operator\n\n(module\n  ;; Typing\n\n  (func (export \"type-local-i32\") (local i32) (local.set 0 (i32.const 0)))\n  (func (export \"type-local-i64\") (local i64) (local.set 0 (i64.const 0)))\n  (func (export \"type-local-f32\") (local f32) (local.set 0 (f32.const 0)))\n  (func (export \"type-local-f64\") (local f64) (local.set 0 (f64.const 0)))\n\n  (func (export \"type-param-i32\") (param i32) (local.set 0 (i32.const 10)))\n  (func (export \"type-param-i64\") (param i64) (local.set 0 (i64.const 11)))\n  (func (export \"type-param-f32\") (param f32) (local.set 0 (f32.const 11.1)))\n  (func (export \"type-param-f64\") (param f64) (local.set 0 (f64.const 12.2)))\n\n  (func (export \"type-mixed\") (param i64 f32 f64 i32 i32) (local f32 i64 i64 f64)\n    (local.set 0 (i64.const 0))\n    (local.set 1 (f32.const 0))\n    (local.set 2 (f64.const 0))\n    (local.set 3 (i32.const 0))\n    (local.set 4 (i32.const 0))\n    (local.set 5 (f32.const 0))\n    (local.set 6 (i64.const 0))\n    (local.set 7 (i64.const 0))\n    (local.set 8 (f64.const 0))\n  )\n\n  ;; Writing\n\n  (func (export \"write\") (param i64 f32 f64 i32 i32) (result i64)\n    (local f32 i64 i64 f64)\n    (local.set 1 (f32.const -0.3))\n    (local.set 3 (i32.const 40))\n    (local.set 4 (i32.const -7))\n    (local.set 5 (f32.const 5.5))\n    (local.set 6 (i64.const 6))\n    (local.set 8 (f64.const 8))\n    (i64.trunc_f64_s\n      (f64.add\n        (f64.convert_i64_u (local.get 0))\n        (f64.add\n          (f64.promote_f32 (local.get 1))\n          (f64.add\n            (local.get 2)\n            (f64.add\n              (f64.convert_i32_u (local.get 3))\n              (f64.add\n                (f64.convert_i32_s (local.get 4))\n                (f64.add\n                  (f64.promote_f32 (local.get 5))\n                  (f64.add\n                    (f64.convert_i64_u (local.get 6))\n                    (f64.add\n                      (f64.convert_i64_u (local.get 7))\n                      (local.get 8)\n                    )\n                  )\n                )\n              )\n            )\n          )\n        )\n      )\n    )\n  )\n\n  ;; As parameter of control constructs and instructions\n\n  (func (export \"as-block-value\") (param i32)\n    (block (local.set 0 (i32.const 1)))\n  )\n  (func (export \"as-loop-value\") (param i32)\n    (loop (local.set 0 (i32.const 3)))\n  )\n\n  (func (export \"as-br-value\") (param i32)\n    (block (br 0 (local.set 0 (i32.const 9))))\n  )\n  (func (export \"as-br_if-value\") (param i32)\n    (block\n      (br_if 0 (local.set 0 (i32.const 8)) (i32.const 1))\n    )\n  )\n  (func (export \"as-br_if-value-cond\") (param i32)\n    (block\n      (br_if 0 (i32.const 6) (local.set 0 (i32.const 9)))\n    )\n  )\n  (func (export \"as-br_table-value\") (param i32)\n    (block\n      (br_table 0 (local.set 0 (i32.const 10)) (i32.const 1))\n    )\n  )\n\n  (func (export \"as-return-value\") (param i32)\n    (return (local.set 0 (i32.const 7)))\n  )\n\n  (func (export \"as-if-then\") (param i32)\n    (if (local.get 0) (then (local.set 0 (i32.const 3))))\n  )\n  (func (export \"as-if-else\") (param i32)\n    (if (local.get 0) (then) (else (local.set 0 (i32.const 1))))\n  )\n)\n\n(assert_return (invoke \"type-local-i32\"))\n(assert_return (invoke \"type-local-i64\"))\n(assert_return (invoke \"type-local-f32\"))\n(assert_return (invoke \"type-local-f64\"))\n\n(assert_return (invoke \"type-param-i32\" (i32.const 2)))\n(assert_return (invoke \"type-param-i64\" (i64.const 3)))\n(assert_return (invoke \"type-param-f32\" (f32.const 4.4)))\n(assert_return (invoke \"type-param-f64\" (f64.const 5.5)))\n\n(assert_return (invoke \"as-block-value\" (i32.const 0)))\n(assert_return (invoke \"as-loop-value\" (i32.const 0)))\n\n(assert_return (invoke \"as-br-value\" (i32.const 0)))\n(assert_return (invoke \"as-br_if-value\" (i32.const 0)))\n(assert_return (invoke \"as-br_if-value-cond\" (i32.const 0)))\n(assert_return (invoke \"as-br_table-value\" (i32.const 0)))\n\n(assert_return (invoke \"as-return-value\" (i32.const 0)))\n\n(assert_return (invoke \"as-if-then\" (i32.const 1)))\n(assert_return (invoke \"as-if-else\" (i32.const 0)))\n\n(assert_return\n  (invoke \"type-mixed\"\n    (i64.const 1) (f32.const 2.2) (f64.const 3.3) (i32.const 4) (i32.const 5)\n  )\n)\n\n(assert_return\n  (invoke \"write\"\n    (i64.const 1) (f32.const 2) (f64.const 3.3) (i32.const 4) (i32.const 5)\n  )\n  (i64.const 56)\n)\n\n\n;; Invalid typing of access to locals\n\n\n(assert_invalid\n  (module (func $type-local-arg-void-vs-num (local i32) (local.set 0 (nop))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-local-arg-num-vs-num (local i32) (local.set 0 (f32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-local-arg-num-vs-num (local f32) (local.set 0 (f64.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-local-arg-num-vs-num (local f64 i64) (local.set 1 (f64.const 0))))\n  \"type mismatch\"\n)\n\n\n;; Invalid typing of access to parameters\n\n\n(assert_invalid\n  (module (func $type-param-arg-void-vs-num (param i32) (local.set 0 (nop))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-arg-num-vs-num (param i32) (local.set 0 (f32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-arg-num-vs-num (param f32) (local.set 0 (f64.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-arg-num-vs-num (param f64 i64) (local.set 1 (f64.const 0))))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num (param i32)\n      (local.set 0)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-block (param i32)\n      (i32.const 0)\n      (block (local.set 0))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-loop (param i32)\n      (i32.const 0)\n      (loop (local.set 0))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-then (param i32)\n      (i32.const 0)\n      (if (i32.const 1) (then (local.set 0)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-else (param i32)\n      (i32.const 0)\n      (if (result i32) (i32.const 0) (then (i32.const 0)) (else (local.set 0)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-br (param i32)\n      (i32.const 0)\n      (block (br 0 (local.set 0)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-br_if (param i32)\n      (i32.const 0)\n      (block (br_if 0 (local.set 0)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-br_table (param i32)\n      (i32.const 0)\n      (block (br_table 0 (local.set 0)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-return (param i32)\n      (return (local.set 0))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-select (param i32)\n      (select (local.set 0) (i32.const 1) (i32.const 2))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-call (param i32)\n      (call 1 (local.set 0))\n    )\n    (func (param i32) (result i32) (local.get 0))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $f (param i32) (result i32) (local.get 0))\n    (type $sig (func (param i32) (result i32)))\n    (table funcref (elem $f))\n    (func $type-param-arg-empty-vs-num-in-call_indirect (param i32)\n      (block (result i32)\n        (call_indirect (type $sig)\n          (local.set 0) (i32.const 0)\n        )\n      )\n    )\n  )\n  \"type mismatch\"\n)\n\n\n;; Invalid typing of access to mixed args\n\n(assert_invalid\n  (module (func $type-mixed-arg-num-vs-num (param f32) (local i32) (local.set 1 (f32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-mixed-arg-num-vs-num (param i64 i32) (local f32) (local.set 1 (f32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-mixed-arg-num-vs-num (param i64) (local f64 i64) (local.set 1 (i64.const 0))))\n  \"type mismatch\"\n)\n\n\n;; local.set should have no retval\n\n(assert_invalid\n  (module (func $type-empty-vs-i32 (param i32) (result i32) (local.set 0 (i32.const 1))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-vs-i64 (param i64) (result i64) (local.set 0 (i64.const 1))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-vs-f32 (param f32) (result f32) (local.set 0 (f32.const 1))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-vs-f64 (param f64) (result f64) (local.set 0 (f64.const 1))))\n  \"type mismatch\"\n)\n\n\n;; Invalid local index\n\n(assert_invalid\n  (module (func $unbound-local (local i32 i64) (local.set 3 (i32.const 0))))\n  \"unknown local\"\n)\n(assert_invalid\n  (module (func $large-local (local i32 i64) (local.set 14324343 (i32.const 0))))\n  \"unknown local\"\n)\n\n(assert_invalid\n  (module (func $unbound-param (param i32 i64) (local.set 2 (i32.const 0))))\n  \"unknown local\"\n)\n(assert_invalid\n  (module (func $large-param (param i32 i64) (local.set 714324343 (i32.const 0))))\n  \"unknown local\"\n)\n\n(assert_invalid\n  (module (func $unbound-mixed (param i32) (local i32 i64) (local.set 3 (i32.const 0))))\n  \"unknown local\"\n)\n(assert_invalid\n  (module (func $large-mixed (param i64) (local i32 i64) (local.set 214324343 (i32.const 0))))\n  \"unknown local\"\n)\n\n"
  },
  {
    "path": "test/core/local_tee.wast",
    "content": ";; Test `local.tee` operator\n\n(module\n  ;; Typing\n\n  (func (export \"type-local-i32\") (result i32) (local i32) (local.tee 0 (i32.const 0)))\n  (func (export \"type-local-i64\") (result i64) (local i64) (local.tee 0 (i64.const 0)))\n  (func (export \"type-local-f32\") (result f32) (local f32) (local.tee 0 (f32.const 0)))\n  (func (export \"type-local-f64\") (result f64) (local f64) (local.tee 0 (f64.const 0)))\n\n  (func (export \"type-param-i32\") (param i32) (result i32) (local.tee 0 (i32.const 10)))\n  (func (export \"type-param-i64\") (param i64) (result i64) (local.tee 0 (i64.const 11)))\n  (func (export \"type-param-f32\") (param f32) (result f32) (local.tee 0 (f32.const 11.1)))\n  (func (export \"type-param-f64\") (param f64) (result f64) (local.tee 0 (f64.const 12.2)))\n\n  (func (export \"type-mixed\") (param i64 f32 f64 i32 i32) (local f32 i64 i64 f64)\n    (drop (i64.eqz (local.tee 0 (i64.const 0))))\n    (drop (f32.neg (local.tee 1 (f32.const 0))))\n    (drop (f64.neg (local.tee 2 (f64.const 0))))\n    (drop (i32.eqz (local.tee 3 (i32.const 0))))\n    (drop (i32.eqz (local.tee 4 (i32.const 0))))\n    (drop (f32.neg (local.tee 5 (f32.const 0))))\n    (drop (i64.eqz (local.tee 6 (i64.const 0))))\n    (drop (i64.eqz (local.tee 7 (i64.const 0))))\n    (drop (f64.neg (local.tee 8 (f64.const 0))))\n  )\n\n  ;; Writing\n\n  (func (export \"write\") (param i64 f32 f64 i32 i32) (result i64) (local f32 i64 i64 f64)\n    (drop (local.tee 1 (f32.const -0.3)))\n    (drop (local.tee 3 (i32.const 40)))\n    (drop (local.tee 4 (i32.const -7)))\n    (drop (local.tee 5 (f32.const 5.5)))\n    (drop (local.tee 6 (i64.const 6)))\n    (drop (local.tee 8 (f64.const 8)))\n    (i64.trunc_f64_s\n      (f64.add\n        (f64.convert_i64_u (local.get 0))\n        (f64.add\n          (f64.promote_f32 (local.get 1))\n          (f64.add\n            (local.get 2)\n            (f64.add\n              (f64.convert_i32_u (local.get 3))\n              (f64.add\n                (f64.convert_i32_s (local.get 4))\n                (f64.add\n                  (f64.promote_f32 (local.get 5))\n                  (f64.add\n                    (f64.convert_i64_u (local.get 6))\n                    (f64.add\n                      (f64.convert_i64_u (local.get 7))\n                      (local.get 8)\n                    )\n                  )\n                )\n              )\n            )\n          )\n        )\n      )\n    )\n  )\n\n  ;; Result\n\n  (func (export \"result\") (param i64 f32 f64 i32 i32) (result f64)\n    (local f32 i64 i64 f64)\n    (f64.add\n      (f64.convert_i64_u (local.tee 0 (i64.const 1)))\n      (f64.add\n        (f64.promote_f32 (local.tee 1 (f32.const 2)))\n        (f64.add\n          (local.tee 2 (f64.const 3.3))\n          (f64.add\n            (f64.convert_i32_u (local.tee 3 (i32.const 4)))\n            (f64.add\n              (f64.convert_i32_s (local.tee 4 (i32.const 5)))\n              (f64.add\n                (f64.promote_f32 (local.tee 5 (f32.const 5.5)))\n                (f64.add\n                  (f64.convert_i64_u (local.tee 6 (i64.const 6)))\n                  (f64.add\n                    (f64.convert_i64_u (local.tee 7 (i64.const 0)))\n                    (local.tee 8 (f64.const 8))\n                  )\n                )\n              )\n            )\n          )\n        )\n      )\n    )\n  )\n\n  (func $dummy)\n\n  (func (export \"as-block-first\") (param i32) (result i32)\n    (block (result i32) (local.tee 0 (i32.const 1)) (call $dummy))\n  )\n  (func (export \"as-block-mid\") (param i32) (result i32)\n    (block (result i32) (call $dummy) (local.tee 0 (i32.const 1)) (call $dummy))\n  )\n  (func (export \"as-block-last\") (param i32) (result i32)\n    (block (result i32) (call $dummy) (call $dummy) (local.tee 0 (i32.const 1)))\n  )\n\n  (func (export \"as-loop-first\") (param i32) (result i32)\n    (loop (result i32) (local.tee 0 (i32.const 3)) (call $dummy))\n  )\n  (func (export \"as-loop-mid\") (param i32) (result i32)\n    (loop (result i32) (call $dummy) (local.tee 0 (i32.const 4)) (call $dummy))\n  )\n  (func (export \"as-loop-last\") (param i32) (result i32)\n    (loop (result i32) (call $dummy) (call $dummy) (local.tee 0 (i32.const 5)))\n  )\n\n  (func (export \"as-br-value\") (param i32) (result i32)\n    (block (result i32) (br 0 (local.tee 0 (i32.const 9))))\n  )\n\n  (func (export \"as-br_if-cond\") (param i32)\n    (block (br_if 0 (local.tee 0 (i32.const 1))))\n  )\n  (func (export \"as-br_if-value\") (param i32) (result i32)\n    (block (result i32)\n      (drop (br_if 0 (local.tee 0 (i32.const 8)) (i32.const 1))) (i32.const 7)\n    )\n  )\n  (func (export \"as-br_if-value-cond\") (param i32) (result i32)\n    (block (result i32)\n      (drop (br_if 0 (i32.const 6) (local.tee 0 (i32.const 9)))) (i32.const 7)\n    )\n  )\n\n  (func (export \"as-br_table-index\") (param i32)\n    (block (br_table 0 0 0 (local.tee 0 (i32.const 0))))\n  )\n  (func (export \"as-br_table-value\") (param i32) (result i32)\n    (block (result i32)\n      (br_table 0 0 0 (local.tee 0 (i32.const 10)) (i32.const 1)) (i32.const 7)\n    )\n  )\n  (func (export \"as-br_table-value-index\") (param i32) (result i32)\n    (block (result i32)\n      (br_table 0 0 (i32.const 6) (local.tee 0 (i32.const 11))) (i32.const 7)\n    )\n  )\n\n  (func (export \"as-return-value\") (param i32) (result i32)\n    (return (local.tee 0 (i32.const 7)))\n  )\n\n  (func (export \"as-if-cond\") (param i32) (result i32)\n    (if (result i32) (local.tee 0 (i32.const 2))\n      (then (i32.const 0)) (else (i32.const 1))\n    )\n  )\n  (func (export \"as-if-then\") (param i32) (result i32)\n    (if (result i32) (local.get 0)\n      (then (local.tee 0 (i32.const 3))) (else (local.get 0))\n    )\n  )\n  (func (export \"as-if-else\") (param i32) (result i32)\n    (if (result i32) (local.get 0)\n      (then (local.get 0)) (else (local.tee 0 (i32.const 4)))\n    )\n  )\n\n  (func (export \"as-select-first\") (param i32 i32) (result i32)\n    (select (local.tee 0 (i32.const 5)) (local.get 0) (local.get 1))\n  )\n  (func (export \"as-select-second\") (param i32 i32) (result i32)\n    (select (local.get 0) (local.tee 0 (i32.const 6)) (local.get 1))\n  )\n  (func (export \"as-select-cond\") (param i32) (result i32)\n    (select (i32.const 0) (i32.const 1) (local.tee 0 (i32.const 7)))\n  )\n\n  (func $f (param i32 i32 i32) (result i32) (i32.const -1))\n  (func (export \"as-call-first\") (param i32) (result i32)\n    (call $f (local.tee 0 (i32.const 12)) (i32.const 2) (i32.const 3))\n  )\n  (func (export \"as-call-mid\") (param i32) (result i32)\n    (call $f (i32.const 1) (local.tee 0 (i32.const 13)) (i32.const 3))\n  )\n  (func (export \"as-call-last\") (param i32) (result i32)\n    (call $f (i32.const 1) (i32.const 2) (local.tee 0 (i32.const 14)))\n  )\n\n  (type $sig (func (param i32 i32 i32) (result i32)))\n  (table funcref (elem $f))\n  (func (export \"as-call_indirect-first\") (param i32) (result i32)\n    (call_indirect (type $sig)\n      (local.tee 0 (i32.const 1)) (i32.const 2) (i32.const 3) (i32.const 0)\n    )\n  )\n  (func (export \"as-call_indirect-mid\") (param i32) (result i32)\n    (call_indirect (type $sig)\n      (i32.const 1) (local.tee 0 (i32.const 2)) (i32.const 3) (i32.const 0)\n    )\n  )\n  (func (export \"as-call_indirect-last\") (param i32) (result i32)\n    (call_indirect (type $sig)\n      (i32.const 1) (i32.const 2) (local.tee 0 (i32.const 3)) (i32.const 0)\n    )\n  )\n  (func (export \"as-call_indirect-index\") (param i32) (result i32)\n    (call_indirect (type $sig)\n      (i32.const 1) (i32.const 2) (i32.const 3) (local.tee 0 (i32.const 0))\n    )\n  )\n\n  (func (export \"as-local.set-value\") (local i32)\n    (local.set 0 (local.tee 0 (i32.const 1)))\n  )\n  (func (export \"as-local.tee-value\") (param i32) (result i32)\n    (local.tee 0 (local.tee 0 (i32.const 1)))\n  )\n  (global $g (mut i32) (i32.const 0))\n  (func (export \"as-global.set-value\") (local i32)\n    (global.set $g (local.tee 0 (i32.const 1)))\n  )\n\n  (memory 1)\n  (func (export \"as-load-address\") (param i32) (result i32)\n    (i32.load (local.tee 0 (i32.const 1)))\n  )\n  (func (export \"as-loadN-address\") (param i32) (result i32)\n    (i32.load8_s (local.tee 0 (i32.const 3)))\n  )\n\n  (func (export \"as-store-address\") (param i32)\n    (i32.store (local.tee 0 (i32.const 30)) (i32.const 7))\n  )\n  (func (export \"as-store-value\") (param i32)\n    (i32.store (i32.const 2) (local.tee 0 (i32.const 1)))\n  )\n\n  (func (export \"as-storeN-address\") (param i32)\n    (i32.store8 (local.tee 0 (i32.const 1)) (i32.const 7))\n  )\n  (func (export \"as-storeN-value\") (param i32)\n    (i32.store16 (i32.const 2) (local.tee 0 (i32.const 1)))\n  )\n\n  (func (export \"as-unary-operand\") (param f32) (result f32)\n    (f32.neg (local.tee 0 (f32.const nan:0x0f1e2)))\n  )\n\n  (func (export \"as-binary-left\") (param i32) (result i32)\n    (i32.add (local.tee 0 (i32.const 3)) (i32.const 10))\n  )\n  (func (export \"as-binary-right\") (param i32) (result i32)\n    (i32.sub (i32.const 10) (local.tee 0 (i32.const 4)))\n  )\n\n  (func (export \"as-test-operand\") (param i32) (result i32)\n    (i32.eqz (local.tee 0 (i32.const 0)))\n  )\n\n  (func (export \"as-compare-left\") (param i32) (result i32)\n    (i32.le_s (local.tee 0 (i32.const 43)) (i32.const 10))\n  )\n  (func (export \"as-compare-right\") (param i32) (result i32)\n    (i32.ne (i32.const 10) (local.tee 0 (i32.const 42)))\n  )\n\n  (func (export \"as-convert-operand\") (param i64) (result i32)\n    (i32.wrap_i64 (local.tee 0 (i64.const 41)))\n  )\n\n  (func (export \"as-memory.grow-size\") (param i32) (result i32)\n    (memory.grow (local.tee 0 (i32.const 40)))\n  )\n\n)\n\n(assert_return (invoke \"type-local-i32\") (i32.const 0))\n(assert_return (invoke \"type-local-i64\") (i64.const 0))\n(assert_return (invoke \"type-local-f32\") (f32.const 0))\n(assert_return (invoke \"type-local-f64\") (f64.const 0))\n\n(assert_return (invoke \"type-param-i32\" (i32.const 2)) (i32.const 10))\n(assert_return (invoke \"type-param-i64\" (i64.const 3)) (i64.const 11))\n(assert_return (invoke \"type-param-f32\" (f32.const 4.4)) (f32.const 11.1))\n(assert_return (invoke \"type-param-f64\" (f64.const 5.5)) (f64.const 12.2))\n\n(assert_return (invoke \"as-block-first\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-block-mid\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-block-last\" (i32.const 0)) (i32.const 1))\n\n(assert_return (invoke \"as-loop-first\" (i32.const 0)) (i32.const 3))\n(assert_return (invoke \"as-loop-mid\" (i32.const 0)) (i32.const 4))\n(assert_return (invoke \"as-loop-last\" (i32.const 0)) (i32.const 5))\n\n(assert_return (invoke \"as-br-value\" (i32.const 0)) (i32.const 9))\n\n(assert_return (invoke \"as-br_if-cond\" (i32.const 0)))\n(assert_return (invoke \"as-br_if-value\" (i32.const 0)) (i32.const 8))\n(assert_return (invoke \"as-br_if-value-cond\" (i32.const 0)) (i32.const 6))\n\n(assert_return (invoke \"as-br_table-index\" (i32.const 0)))\n(assert_return (invoke \"as-br_table-value\" (i32.const 0)) (i32.const 10))\n(assert_return (invoke \"as-br_table-value-index\" (i32.const 0)) (i32.const 6))\n\n(assert_return (invoke \"as-return-value\" (i32.const 0)) (i32.const 7))\n\n(assert_return (invoke \"as-if-cond\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-if-then\" (i32.const 1)) (i32.const 3))\n(assert_return (invoke \"as-if-else\" (i32.const 0)) (i32.const 4))\n\n(assert_return (invoke \"as-select-first\" (i32.const 0) (i32.const 1)) (i32.const 5))\n(assert_return (invoke \"as-select-second\" (i32.const 0) (i32.const 0)) (i32.const 6))\n(assert_return (invoke \"as-select-cond\" (i32.const 0)) (i32.const 0))\n\n(assert_return (invoke \"as-call-first\" (i32.const 0)) (i32.const -1))\n(assert_return (invoke \"as-call-mid\" (i32.const 0)) (i32.const -1))\n(assert_return (invoke \"as-call-last\" (i32.const 0)) (i32.const -1))\n\n(assert_return (invoke \"as-call_indirect-first\" (i32.const 0)) (i32.const -1))\n(assert_return (invoke \"as-call_indirect-mid\" (i32.const 0)) (i32.const -1))\n(assert_return (invoke \"as-call_indirect-last\" (i32.const 0)) (i32.const -1))\n(assert_return (invoke \"as-call_indirect-index\" (i32.const 0)) (i32.const -1))\n\n(assert_return (invoke \"as-local.set-value\"))\n(assert_return (invoke \"as-local.tee-value\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-global.set-value\"))\n\n(assert_return (invoke \"as-load-address\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-loadN-address\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-store-address\" (i32.const 0)))\n(assert_return (invoke \"as-store-value\" (i32.const 0)))\n(assert_return (invoke \"as-storeN-address\" (i32.const 0)))\n(assert_return (invoke \"as-storeN-value\" (i32.const 0)))\n\n(assert_return (invoke \"as-unary-operand\" (f32.const 0)) (f32.const -nan:0x0f1e2))\n(assert_return (invoke \"as-binary-left\" (i32.const 0)) (i32.const 13))\n(assert_return (invoke \"as-binary-right\" (i32.const 0)) (i32.const 6))\n(assert_return (invoke \"as-test-operand\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-compare-left\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-compare-right\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-convert-operand\" (i64.const 0)) (i32.const 41))\n(assert_return (invoke \"as-memory.grow-size\" (i32.const 0)) (i32.const 1))\n\n(assert_return\n  (invoke \"type-mixed\"\n    (i64.const 1) (f32.const 2.2) (f64.const 3.3) (i32.const 4) (i32.const 5)\n  )\n)\n\n(assert_return\n  (invoke \"write\"\n    (i64.const 1) (f32.const 2) (f64.const 3.3) (i32.const 4) (i32.const 5)\n  )\n  (i64.const 56)\n)\n\n(assert_return\n  (invoke \"result\"\n    (i64.const -1) (f32.const -2) (f64.const -3.3) (i32.const -4) (i32.const -5)\n  )\n  (f64.const 34.8)\n)\n\n\n;; Invalid typing of access to locals\n\n(assert_invalid\n  (module (func $type-local-num-vs-num (result i64) (local i32) (local.tee 0 (i32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-local-num-vs-num (local f32) (i32.eqz (local.tee 0 (f32.const 0)))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-local-num-vs-num (local f64 i64) (f64.neg (local.tee 1 (i64.const 0)))))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-local-arg-void-vs-num (local i32) (local.tee 0 (nop))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-local-arg-num-vs-num (local i32) (local.tee 0 (f32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-local-arg-num-vs-num (local f32) (local.tee 0 (f64.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-local-arg-num-vs-num (local f64 i64) (local.tee 1 (f64.const 0))))\n  \"type mismatch\"\n)\n\n\n;; Invalid typing of access to parameters\n\n(assert_invalid\n  (module (func $type-param-num-vs-num (param i32) (result i64) (local.get 0)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-num (param f32) (i32.eqz (local.get 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-num (param f64 i64) (f64.neg (local.get 1))))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-param-arg-void-vs-num (param i32) (local.tee 0 (nop))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-arg-num-vs-num (param i32) (local.tee 0 (f32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-arg-num-vs-num (param f32) (local.tee 0 (f64.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-arg-num-vs-num (param f64 i64) (local.tee 1 (f64.const 0))))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num (param i32)\n      (local.tee 0) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-block (param i32)\n      (i32.const 0)\n      (block (local.tee 0) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-loop (param i32)\n      (i32.const 0)\n      (loop (local.tee 0) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-then (param i32)\n      (i32.const 0) (i32.const 0)\n      (if (then (local.tee 0) (drop)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-else (param i32)\n      (i32.const 0) (i32.const 0)\n      (if (result i32) (then (i32.const 0)) (else (local.tee 0))) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-br (param i32)\n      (i32.const 0)\n      (block (br 0 (local.tee 0)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-br_if (param i32)\n      (i32.const 0)\n      (block (br_if 0 (local.tee 0) (i32.const 1)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-br_table (param i32)\n      (i32.const 0)\n      (block (br_table 0 (local.tee 0)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-return (param i32)\n      (return (local.tee 0)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-select (param i32)\n      (select (local.tee 0) (i32.const 1) (i32.const 2)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-call (param i32)\n      (call 1 (local.tee 0)) (drop)\n    )\n    (func (param i32) (result i32) (local.get 0))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $f (param i32) (result i32) (local.get 0))\n    (type $sig (func (param i32) (result i32)))\n    (table funcref (elem $f))\n    (func $type-param-arg-empty-vs-num-in-call_indirect (param i32)\n      (block (result i32)\n        (call_indirect (type $sig)\n          (local.tee 0) (i32.const 0)\n        )\n        (drop)\n      )\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-local.set (param i32)\n      (local.set 0 (local.tee 0)) (local.get 0) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-param-arg-empty-vs-num-in-local.tee (param i32)\n      (local.tee 0 (local.tee 0)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-param-arg-empty-vs-num-in-global.set (param i32)\n      (global.set $x (local.tee 0)) (global.get $x) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-param-arg-empty-vs-num-in-memory.grow (param i32)\n      (memory.grow (local.tee 0)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-param-arg-empty-vs-num-in-load (param i32)\n      (i32.load (local.tee 0)) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-param-arg-empty-vs-num-in-store (param i32)\n      (i32.store (local.tee 0) (i32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-mixed-arg-num-vs-num (param f32) (local i32) (local.tee 1 (f32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-mixed-arg-num-vs-num (param i64 i32) (local f32) (local.tee 1 (f32.const 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-mixed-arg-num-vs-num (param i64) (local f64 i64) (local.tee 1 (i64.const 0))))\n  \"type mismatch\"\n)\n\n\n;; Invalid local index\n\n(assert_invalid\n  (module (func $unbound-local (local i32 i64) (local.tee 3 (i32.const 0)) drop))\n  \"unknown local\"\n)\n(assert_invalid\n  (module (func $large-local (local i32 i64) (local.tee 14324343 (i32.const 0)) drop))\n  \"unknown local\"\n)\n\n(assert_invalid\n  (module (func $unbound-param (param i32 i64) (local.tee 2 (i32.const 0)) drop))\n  \"unknown local\"\n)\n(assert_invalid\n  (module (func $large-param (param i32 i64) (local.tee 714324343 (i32.const 0)) drop))\n  \"unknown local\"\n)\n\n(assert_invalid\n  (module (func $unbound-mixed (param i32) (local i32 i64) (local.tee 3 (i32.const 0)) drop))\n  \"unknown local\"\n)\n(assert_invalid\n  (module (func $large-mixed (param i64) (local i32 i64) (local.tee 214324343 (i32.const 0)) drop))\n  \"unknown local\"\n)\n"
  },
  {
    "path": "test/core/loop.wast",
    "content": ";; Test `loop` opcode\n\n(module\n  (memory 1)\n\n  (func $dummy)\n\n  (func (export \"empty\")\n    (loop)\n    (loop $l)\n  )\n\n  (func (export \"singular\") (result i32)\n    (loop (nop))\n    (loop (result i32) (i32.const 7))\n  )\n\n  (func (export \"multi\") (result i32)\n    (loop (call $dummy) (call $dummy) (call $dummy) (call $dummy))\n    (loop (result i32) (call $dummy) (call $dummy) (i32.const 8) (call $dummy))\n    (drop)\n    (loop (result i32 i64 i32)\n      (call $dummy) (call $dummy) (call $dummy) (i32.const 8) (call $dummy)\n      (call $dummy) (call $dummy) (call $dummy) (i64.const 7) (call $dummy)\n      (call $dummy) (call $dummy) (call $dummy) (i32.const 9) (call $dummy)\n    )\n    (drop) (drop)\n  )\n\n  (func (export \"nested\") (result i32)\n    (loop (result i32)\n      (loop (call $dummy) (block) (nop))\n      (loop (result i32) (call $dummy) (i32.const 9))\n    )\n  )\n\n  (func (export \"deep\") (result i32)\n    (loop (result i32) (block (result i32)\n      (loop (result i32) (block (result i32)\n        (loop (result i32) (block (result i32)\n          (loop (result i32) (block (result i32)\n            (loop (result i32) (block (result i32)\n              (loop (result i32) (block (result i32)\n                (loop (result i32) (block (result i32)\n                  (loop (result i32) (block (result i32)\n                    (loop (result i32) (block (result i32)\n                      (loop (result i32) (block (result i32)\n                        (loop (result i32) (block (result i32)\n                          (loop (result i32) (block (result i32)\n                            (loop (result i32) (block (result i32)\n                              (loop (result i32) (block (result i32)\n                                (loop (result i32) (block (result i32)\n                                  (loop (result i32) (block (result i32)\n                                    (loop (result i32) (block (result i32)\n                                      (loop (result i32) (block (result i32)\n                                        (loop (result i32) (block (result i32)\n                                          (loop (result i32) (block (result i32)\n                                            (call $dummy) (i32.const 150)\n                                          ))\n                                        ))\n                                      ))\n                                    ))\n                                  ))\n                                ))\n                              ))\n                            ))\n                          ))\n                        ))\n                      ))\n                    ))\n                  ))\n                ))\n              ))\n            ))\n          ))\n        ))\n      ))\n    ))\n  )\n\n  (func (export \"as-select-first\") (result i32)\n    (select (loop (result i32) (i32.const 1)) (i32.const 2) (i32.const 3))\n  )\n  (func (export \"as-select-mid\") (result i32)\n    (select (i32.const 2) (loop (result i32) (i32.const 1)) (i32.const 3))\n  )\n  (func (export \"as-select-last\") (result i32)\n    (select (i32.const 2) (i32.const 3) (loop (result i32) (i32.const 1)))\n  )\n\n  (func (export \"as-if-condition\")\n    (loop (result i32) (i32.const 1)) (if (then (call $dummy)))\n  )\n  (func (export \"as-if-then\") (result i32)\n    (if (result i32) (i32.const 1) (then (loop (result i32) (i32.const 1))) (else (i32.const 2)))\n  )\n  (func (export \"as-if-else\") (result i32)\n    (if (result i32) (i32.const 1) (then (i32.const 2)) (else (loop (result i32) (i32.const 1))))\n  )\n\n  (func (export \"as-br_if-first\") (result i32)\n    (block (result i32) (br_if 0 (loop (result i32) (i32.const 1)) (i32.const 2)))\n  )\n  (func (export \"as-br_if-last\") (result i32)\n    (block (result i32) (br_if 0 (i32.const 2) (loop (result i32) (i32.const 1))))\n  )\n\n  (func (export \"as-br_table-first\") (result i32)\n    (block (result i32) (loop (result i32) (i32.const 1)) (i32.const 2) (br_table 0 0))\n  )\n  (func (export \"as-br_table-last\") (result i32)\n    (block (result i32) (i32.const 2) (loop (result i32) (i32.const 1)) (br_table 0 0))\n  )\n\n  (func $func (param i32 i32) (result i32) (local.get 0))\n  (type $check (func (param i32 i32) (result i32)))\n  (table funcref (elem $func))\n  (func (export \"as-call_indirect-first\") (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (loop (result i32) (i32.const 1)) (i32.const 2) (i32.const 0)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-mid\") (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (i32.const 2) (loop (result i32) (i32.const 1)) (i32.const 0)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-last\") (result i32)\n    (block (result i32)\n      (call_indirect (type $check)\n        (i32.const 1) (i32.const 2) (loop (result i32) (i32.const 0))\n      )\n    )\n  )\n\n  (func (export \"as-store-first\")\n    (loop (result i32) (i32.const 1)) (i32.const 1) (i32.store)\n  )\n  (func (export \"as-store-last\")\n    (i32.const 10) (loop (result i32) (i32.const 1)) (i32.store)\n  )\n\n  (func (export \"as-memory.grow-value\") (result i32)\n    (memory.grow (loop (result i32) (i32.const 1)))\n  )\n\n  (func $f (param i32) (result i32) (local.get 0))\n\n  (func (export \"as-call-value\") (result i32)\n    (call $f (loop (result i32) (i32.const 1)))\n  )\n  (func (export \"as-return-value\") (result i32)\n    (loop (result i32) (i32.const 1)) (return)\n  )\n  (func (export \"as-drop-operand\")\n    (drop (loop (result i32) (i32.const 1)))\n  )\n  (func (export \"as-br-value\") (result i32)\n    (block (result i32) (br 0 (loop (result i32) (i32.const 1))))\n  )\n  (func (export \"as-local.set-value\") (result i32)\n    (local i32) (local.set 0 (loop (result i32) (i32.const 1))) (local.get 0)\n  )\n  (func (export \"as-local.tee-value\") (result i32)\n    (local i32) (local.tee 0 (loop (result i32) (i32.const 1)))\n  )\n  (global $a (mut i32) (i32.const 0))\n  (func (export \"as-global.set-value\") (result i32)\n    (global.set $a (loop (result i32) (i32.const 1)))\n    (global.get $a)\n  )\n  (func (export \"as-load-operand\") (result i32)\n    (i32.load (loop (result i32) (i32.const 1)))\n  )\n\n  (func (export \"as-unary-operand\") (result i32)\n    (i32.ctz (loop (result i32) (call $dummy) (i32.const 13)))\n  )\n  (func (export \"as-binary-operand\") (result i32)\n    (i32.mul\n      (loop (result i32) (call $dummy) (i32.const 3))\n      (loop (result i32) (call $dummy) (i32.const 4))\n    )\n  )\n  (func (export \"as-test-operand\") (result i32)\n    (i32.eqz (loop (result i32) (call $dummy) (i32.const 13)))\n  )\n  (func (export \"as-compare-operand\") (result i32)\n    (f32.gt\n      (loop (result f32) (call $dummy) (f32.const 3))\n      (loop (result f32) (call $dummy) (f32.const 3))\n    )\n  )\n  (func (export \"as-binary-operands\") (result i32)\n    (i32.mul\n      (loop (result i32 i32)\n        (call $dummy) (i32.const 3) (call $dummy) (i32.const 4)\n      )\n    )\n  )\n  (func (export \"as-compare-operands\") (result i32)\n    (f32.gt\n      (loop (result f32 f32)\n        (call $dummy) (f32.const 3) (call $dummy) (f32.const 3)\n      )\n    )\n  )\n  (func (export \"as-mixed-operands\") (result i32)\n    (loop (result i32 i32)\n      (call $dummy) (i32.const 3) (call $dummy) (i32.const 4)\n    )\n    (i32.const 5)\n    (i32.add)\n    (i32.mul)\n  )\n\n  (func (export \"break-bare\") (result i32)\n    (block (loop (br 1) (br 0) (unreachable)))\n    (block (loop (br_if 1 (i32.const 1)) (unreachable)))\n    (block (loop (br_table 1 (i32.const 0)) (unreachable)))\n    (block (loop (br_table 1 1 1 (i32.const 1)) (unreachable)))\n    (i32.const 19)\n  )\n  (func (export \"break-value\") (result i32)\n    (block (result i32)\n      (i32.const 0)\n      (loop (param i32)\n        (block (br 2 (i32.const 18)))\n        (br 0 (i32.const 20))\n      )\n      (i32.const 19)\n    )\n  )\n  (func (export \"break-multi-value\") (result i32 i32 i64)\n    (block (result i32 i32 i64)\n      (i32.const 0) (i32.const 0) (i64.const 0)\n      (loop (param i32 i32 i64)\n        (block (br 2 (i32.const 18) (i32.const -18) (i64.const 18)))\n        (br 0 (i32.const 20) (i32.const -20) (i64.const 20))\n      )\n      (i32.const 19) (i32.const -19) (i64.const 19)\n    )\n  )\n  (func (export \"break-repeated\") (result i32)\n    (block (result i32)\n      (loop (result i32)\n        (br 1 (i32.const 18))\n        (br 1 (i32.const 19))\n        (drop (br_if 1 (i32.const 20) (i32.const 0)))\n        (drop (br_if 1 (i32.const 20) (i32.const 1)))\n        (br 1 (i32.const 21))\n        (br_table 1 (i32.const 22) (i32.const 0))\n        (br_table 1 1 1 (i32.const 23) (i32.const 1))\n        (i32.const 21)\n      )\n    )\n  )\n  (func (export \"break-inner\") (result i32)\n    (local i32)\n    (local.set 0 (i32.const 0))\n    (local.set 0 (i32.add (local.get 0) (block (result i32) (loop (result i32) (block (result i32) (br 2 (i32.const 0x1)))))))\n    (local.set 0 (i32.add (local.get 0) (block (result i32) (loop (result i32) (loop (result i32) (br 2 (i32.const 0x2)))))))\n    (local.set 0 (i32.add (local.get 0) (block (result i32) (loop (result i32) (block (result i32) (loop (result i32) (br 1 (i32.const 0x4))))))))\n    (local.set 0 (i32.add (local.get 0) (block (result i32) (loop (result i32) (i32.ctz (br 1 (i32.const 0x8)))))))\n    (local.set 0 (i32.add (local.get 0) (block (result i32) (loop (result i32) (i32.ctz (loop (result i32) (br 2 (i32.const 0x10))))))))\n    (local.get 0)\n  )\n  (func (export \"cont-inner\") (result i32)\n    (local i32)\n    (local.set 0 (i32.const 0))\n    (local.set 0 (i32.add (local.get 0) (loop (result i32) (loop (result i32) (br 1)))))\n    (local.set 0 (i32.add (local.get 0) (loop (result i32) (i32.ctz (br 0)))))\n    (local.set 0 (i32.add (local.get 0) (loop (result i32) (i32.ctz (loop (result i32) (br 1))))))\n    (local.get 0)\n  )\n\n  (func (export \"param\") (result i32)\n    (i32.const 1)\n    (loop (param i32) (result i32)\n      (i32.const 2)\n      (i32.add)\n    )\n  )\n  (func (export \"params\") (result i32)\n    (i32.const 1)\n    (i32.const 2)\n    (loop (param i32 i32) (result i32)\n      (i32.add)\n    )\n  )\n  (func (export \"params-id\") (result i32)\n    (i32.const 1)\n    (i32.const 2)\n    (loop (param i32 i32) (result i32 i32))\n    (i32.add)\n  )\n  (func (export \"param-break\") (result i32)\n    (local $x i32)\n    (i32.const 1)\n    (loop (param i32) (result i32)\n      (i32.const 4)\n      (i32.add)\n      (local.tee $x)\n      (local.get $x)\n      (i32.const 10)\n      (i32.lt_u)\n      (br_if 0)\n    )\n  )\n  (func (export \"params-break\") (result i32)\n    (local $x i32)\n    (i32.const 1)\n    (i32.const 2)\n    (loop (param i32 i32) (result i32)\n      (i32.add)\n      (local.tee $x)\n      (i32.const 3)\n      (local.get $x)\n      (i32.const 10)\n      (i32.lt_u)\n      (br_if 0)\n      (drop)\n    )\n  )\n  (func (export \"params-id-break\") (result i32)\n    (local $x i32)\n    (local.set $x (i32.const 0))\n    (i32.const 1)\n    (i32.const 2)\n    (loop (param i32 i32) (result i32 i32)\n      (local.set $x (i32.add (local.get $x) (i32.const 1)))\n      (br_if 0 (i32.lt_u (local.get $x) (i32.const 10)))\n    )\n    (i32.add)\n  )\n\n  (func $fx (export \"effects\") (result i32)\n    (local i32)\n    (block\n      (loop\n        (local.set 0 (i32.const 1))\n        (local.set 0 (i32.mul (local.get 0) (i32.const 3)))\n        (local.set 0 (i32.sub (local.get 0) (i32.const 5)))\n        (local.set 0 (i32.mul (local.get 0) (i32.const 7)))\n        (br 1)\n        (local.set 0 (i32.mul (local.get 0) (i32.const 100)))\n      )\n    )\n    (i32.eq (local.get 0) (i32.const -14))\n  )\n\n  (func (export \"while\") (param i64) (result i64)\n    (local i64)\n    (local.set 1 (i64.const 1))\n    (block\n      (loop\n        (br_if 1 (i64.eqz (local.get 0)))\n        (local.set 1 (i64.mul (local.get 0) (local.get 1)))\n        (local.set 0 (i64.sub (local.get 0) (i64.const 1)))\n        (br 0)\n      )\n    )\n    (local.get 1)\n  )\n\n  (func (export \"for\") (param i64) (result i64)\n    (local i64 i64)\n    (local.set 1 (i64.const 1))\n    (local.set 2 (i64.const 2))\n    (block\n      (loop\n        (br_if 1 (i64.gt_u (local.get 2) (local.get 0)))\n        (local.set 1 (i64.mul (local.get 1) (local.get 2)))\n        (local.set 2 (i64.add (local.get 2) (i64.const 1)))\n        (br 0)\n      )\n    )\n    (local.get 1)\n  )\n\n  (func (export \"nesting\") (param f32 f32) (result f32)\n    (local f32 f32)\n    (block\n      (loop\n        (br_if 1 (f32.eq (local.get 0) (f32.const 0)))\n        (local.set 2 (local.get 1))\n        (block\n          (loop\n            (br_if 1 (f32.eq (local.get 2) (f32.const 0)))\n            (br_if 3 (f32.lt (local.get 2) (f32.const 0)))\n            (local.set 3 (f32.add (local.get 3) (local.get 2)))\n            (local.set 2 (f32.sub (local.get 2) (f32.const 2)))\n            (br 0)\n          )\n        )\n        (local.set 3 (f32.div (local.get 3) (local.get 0)))\n        (local.set 0 (f32.sub (local.get 0) (f32.const 1)))\n        (br 0)\n      )\n    )\n    (local.get 3)\n  )\n\n  (type $block-sig-1 (func))\n  (type $block-sig-2 (func (result i32)))\n  (type $block-sig-3 (func (param $x i32)))\n  (type $block-sig-4 (func (param i32 f64 i32) (result i32 f64 i32)))\n\n  (func (export \"type-use\")\n    (loop (type $block-sig-1))\n    (loop (type $block-sig-2) (i32.const 0))\n    (loop (type $block-sig-3) (drop))\n    (i32.const 0) (f64.const 0) (i32.const 0)\n    (loop (type $block-sig-4))\n    (drop) (drop) (drop)\n    (loop (type $block-sig-2) (result i32) (i32.const 0))\n    (loop (type $block-sig-3) (param i32) (drop))\n    (i32.const 0) (f64.const 0) (i32.const 0)\n    (loop (type $block-sig-4)\n      (param i32) (param f64 i32) (result i32 f64) (result i32)\n    )\n    (drop) (drop) (drop)\n  )\n)\n\n(assert_return (invoke \"empty\"))\n(assert_return (invoke \"singular\") (i32.const 7))\n(assert_return (invoke \"multi\") (i32.const 8))\n(assert_return (invoke \"nested\") (i32.const 9))\n(assert_return (invoke \"deep\") (i32.const 150))\n\n(assert_return (invoke \"as-select-first\") (i32.const 1))\n(assert_return (invoke \"as-select-mid\") (i32.const 2))\n(assert_return (invoke \"as-select-last\") (i32.const 2))\n\n(assert_return (invoke \"as-if-condition\"))\n(assert_return (invoke \"as-if-then\") (i32.const 1))\n(assert_return (invoke \"as-if-else\") (i32.const 2))\n\n(assert_return (invoke \"as-br_if-first\") (i32.const 1))\n(assert_return (invoke \"as-br_if-last\") (i32.const 2))\n\n(assert_return (invoke \"as-br_table-first\") (i32.const 1))\n(assert_return (invoke \"as-br_table-last\") (i32.const 2))\n\n(assert_return (invoke \"as-call_indirect-first\") (i32.const 1))\n(assert_return (invoke \"as-call_indirect-mid\") (i32.const 2))\n(assert_return (invoke \"as-call_indirect-last\") (i32.const 1))\n\n(assert_return (invoke \"as-store-first\"))\n(assert_return (invoke \"as-store-last\"))\n\n(assert_return (invoke \"as-memory.grow-value\") (i32.const 1))\n(assert_return (invoke \"as-call-value\") (i32.const 1))\n(assert_return (invoke \"as-return-value\") (i32.const 1))\n(assert_return (invoke \"as-drop-operand\"))\n(assert_return (invoke \"as-br-value\") (i32.const 1))\n(assert_return (invoke \"as-local.set-value\") (i32.const 1))\n(assert_return (invoke \"as-local.tee-value\") (i32.const 1))\n(assert_return (invoke \"as-global.set-value\") (i32.const 1))\n(assert_return (invoke \"as-load-operand\") (i32.const 1))\n\n(assert_return (invoke \"as-unary-operand\") (i32.const 0))\n(assert_return (invoke \"as-binary-operand\") (i32.const 12))\n(assert_return (invoke \"as-test-operand\") (i32.const 0))\n(assert_return (invoke \"as-compare-operand\") (i32.const 0))\n(assert_return (invoke \"as-binary-operands\") (i32.const 12))\n(assert_return (invoke \"as-compare-operands\") (i32.const 0))\n(assert_return (invoke \"as-mixed-operands\") (i32.const 27))\n\n(assert_return (invoke \"break-bare\") (i32.const 19))\n(assert_return (invoke \"break-value\") (i32.const 18))\n(assert_return (invoke \"break-multi-value\")\n  (i32.const 18) (i32.const -18) (i64.const 18)\n)\n(assert_return (invoke \"break-repeated\") (i32.const 18))\n(assert_return (invoke \"break-inner\") (i32.const 0x1f))\n\n(assert_return (invoke \"param\") (i32.const 3))\n(assert_return (invoke \"params\") (i32.const 3))\n(assert_return (invoke \"params-id\") (i32.const 3))\n(assert_return (invoke \"param-break\") (i32.const 13))\n(assert_return (invoke \"params-break\") (i32.const 12))\n(assert_return (invoke \"params-id-break\") (i32.const 3))\n\n(assert_return (invoke \"effects\") (i32.const 1))\n\n(assert_return (invoke \"while\" (i64.const 0)) (i64.const 1))\n(assert_return (invoke \"while\" (i64.const 1)) (i64.const 1))\n(assert_return (invoke \"while\" (i64.const 2)) (i64.const 2))\n(assert_return (invoke \"while\" (i64.const 3)) (i64.const 6))\n(assert_return (invoke \"while\" (i64.const 5)) (i64.const 120))\n(assert_return (invoke \"while\" (i64.const 20)) (i64.const 2432902008176640000))\n\n(assert_return (invoke \"for\" (i64.const 0)) (i64.const 1))\n(assert_return (invoke \"for\" (i64.const 1)) (i64.const 1))\n(assert_return (invoke \"for\" (i64.const 2)) (i64.const 2))\n(assert_return (invoke \"for\" (i64.const 3)) (i64.const 6))\n(assert_return (invoke \"for\" (i64.const 5)) (i64.const 120))\n(assert_return (invoke \"for\" (i64.const 20)) (i64.const 2432902008176640000))\n\n(assert_return (invoke \"nesting\" (f32.const 0) (f32.const 7)) (f32.const 0))\n(assert_return (invoke \"nesting\" (f32.const 7) (f32.const 0)) (f32.const 0))\n(assert_return (invoke \"nesting\" (f32.const 1) (f32.const 1)) (f32.const 1))\n(assert_return (invoke \"nesting\" (f32.const 1) (f32.const 2)) (f32.const 2))\n(assert_return (invoke \"nesting\" (f32.const 1) (f32.const 3)) (f32.const 4))\n(assert_return (invoke \"nesting\" (f32.const 1) (f32.const 4)) (f32.const 6))\n(assert_return (invoke \"nesting\" (f32.const 1) (f32.const 100)) (f32.const 2550))\n(assert_return (invoke \"nesting\" (f32.const 1) (f32.const 101)) (f32.const 2601))\n(assert_return (invoke \"nesting\" (f32.const 2) (f32.const 1)) (f32.const 1))\n(assert_return (invoke \"nesting\" (f32.const 3) (f32.const 1)) (f32.const 1))\n(assert_return (invoke \"nesting\" (f32.const 10) (f32.const 1)) (f32.const 1))\n(assert_return (invoke \"nesting\" (f32.const 2) (f32.const 2)) (f32.const 3))\n(assert_return (invoke \"nesting\" (f32.const 2) (f32.const 3)) (f32.const 4))\n(assert_return (invoke \"nesting\" (f32.const 7) (f32.const 4)) (f32.const 10.3095235825))\n(assert_return (invoke \"nesting\" (f32.const 7) (f32.const 100)) (f32.const 4381.54785156))\n(assert_return (invoke \"nesting\" (f32.const 7) (f32.const 101)) (f32.const 2601))\n\n(assert_return (invoke \"type-use\"))\n\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0) (loop (type $sig) (result i32) (param i32)))\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0) (loop (param i32) (type $sig) (result i32)))\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0) (loop (param i32) (result i32) (type $sig)))\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0) (loop (result i32) (type $sig) (param i32)))\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0) (loop (result i32) (param i32) (type $sig)))\"\n  )\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(func (i32.const 0) (loop (result i32) (param i32)))\"\n  )\n  \"unexpected token\"\n)\n\n(assert_malformed\n  (module quote \"(func (i32.const 0) (loop (param $x i32) (drop)))\")\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func))\"\n    \"(func (loop (type $sig) (result i32) (i32.const 0)) (unreachable))\"\n  )\n  \"inline function type\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (loop (type $sig) (result i32) (i32.const 0)) (unreachable))\"\n  )\n  \"inline function type\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32) (result i32)))\"\n    \"(func (i32.const 0) (loop (type $sig) (param i32) (drop)) (unreachable))\"\n  )\n  \"inline function type\"\n)\n(assert_malformed\n  (module quote\n    \"(type $sig (func (param i32 i32) (result i32)))\"\n    \"(func (i32.const 0) (loop (type $sig) (param i32) (result i32)) (unreachable))\"\n  )\n  \"inline function type\"\n)\n\n(assert_invalid\n  (module\n    (type $sig (func))\n    (func (loop (type $sig) (i32.const 0)))\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-empty-i32 (result i32) (loop)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-i64 (result i64) (loop)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-f32 (result f32) (loop)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-empty-f64 (result f64) (loop)))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-value-num-vs-void\n    (loop (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-nums-vs-void\n    (loop (i32.const 1) (i32.const 2))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-empty-vs-num (result i32)\n    (loop (result i32))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-empty-vs-nums (result i32 i32)\n    (loop (result i32 i32))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-void-vs-num (result i32)\n    (loop (result i32) (nop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-void-vs-nums (result i32 i32)\n    (loop (result i32 i32) (nop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-num-vs-num (result i32)\n    (loop (result i32) (f32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-num-vs-nums (result i32 i32)\n    (loop (result i32 i32) (i32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-partial-vs-nums (result i32 i32)\n    (i32.const 1) (loop (result i32 i32) (i32.const 2))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-nums-vs-num (result i32)\n    (loop (result i32) (i32.const 1) (i32.const 2))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-unreached-select (result i32)\n    (loop (result i64) (select (unreachable) (unreachable) (unreachable)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (func $type-value-empty-in-block\n      (i32.const 0)\n      (block (loop (result i32)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-value-empty-in-loop\n      (i32.const 0)\n      (loop (loop (result i32)) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-value-empty-in-then\n      (i32.const 0) (i32.const 0)\n      (if (then (loop (result i32)) (drop)))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-param-void-vs-num\n    (loop (param i32) (drop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-void-vs-nums\n    (loop (param i32 f64) (drop) (drop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-num\n    (f32.const 0) (loop (param i32) (drop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-nums\n    (f32.const 0) (loop (param f32 i32) (drop) (drop))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-nested-void-vs-num\n    (block (loop (param i32) (drop)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-void-vs-nums\n    (block (loop (param i32 f64) (drop) (drop)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-num\n    (block (f32.const 0) (loop (param i32) (drop)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-param-num-vs-nums\n    (block (f32.const 0) (loop (param f32 i32) (drop) (drop)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_malformed\n  (module quote \"(func (param i32) (result i32) loop (param $x i32) end)\")\n  \"unexpected token\"\n)\n(assert_malformed\n  (module quote \"(func (param i32) (result i32) (loop (param $x i32)))\")\n  \"unexpected token\"\n)\n\n(assert_malformed\n  (module quote \"(func loop end $l)\")\n  \"mismatching label\"\n)\n(assert_malformed\n  (module quote \"(func loop $a end $l)\")\n  \"mismatching label\"\n)\n"
  },
  {
    "path": "test/core/memory.wast",
    "content": ";; Test memory section structure\n\n(module (memory 0))\n(module (memory 1))\n(module (memory 0 0))\n(module (memory 0 1))\n(module (memory 1 256))\n(module (memory 0 65536))\n\n(assert_invalid (module (memory 0) (memory 0)) \"multiple memories\")\n(assert_invalid (module (memory (import \"spectest\" \"memory\") 0) (memory 0)) \"multiple memories\")\n\n(module (memory (data)) (func (export \"memsize\") (result i32) (memory.size)))\n(assert_return (invoke \"memsize\") (i32.const 0))\n(module (memory (data \"\")) (func (export \"memsize\") (result i32) (memory.size)))\n(assert_return (invoke \"memsize\") (i32.const 0))\n(module (memory (data \"x\")) (func (export \"memsize\") (result i32) (memory.size)))\n(assert_return (invoke \"memsize\") (i32.const 1))\n\n(assert_invalid (module (data (i32.const 0))) \"unknown memory\")\n(assert_invalid (module (data (i32.const 0) \"\")) \"unknown memory\")\n(assert_invalid (module (data (i32.const 0) \"x\")) \"unknown memory\")\n\n(assert_invalid\n  (module (func (drop (f32.load (i32.const 0)))))\n  \"unknown memory\"\n)\n(assert_invalid\n  (module (func (f32.store (i32.const 0) (f32.const 0))))\n  \"unknown memory\"\n)\n(assert_invalid\n  (module (func (drop (i32.load8_s (i32.const 0)))))\n  \"unknown memory\"\n)\n(assert_invalid\n  (module (func (i32.store8 (i32.const 0) (i32.const 0))))\n  \"unknown memory\"\n)\n(assert_invalid\n  (module (func (drop (memory.size))))\n  \"unknown memory\"\n)\n(assert_invalid\n  (module (func (drop (memory.grow (i32.const 0)))))\n  \"unknown memory\"\n)\n\n\n(assert_invalid\n  (module (memory 1 0))\n  \"size minimum must not be greater than maximum\"\n)\n(assert_invalid\n  (module (memory 65537))\n  \"memory size must be at most 65536 pages (4GiB)\"\n)\n(assert_invalid\n  (module (memory 2147483648))\n  \"memory size must be at most 65536 pages (4GiB)\"\n)\n(assert_invalid\n  (module (memory 4294967295))\n  \"memory size must be at most 65536 pages (4GiB)\"\n)\n(assert_invalid\n  (module (memory 0 65537))\n  \"memory size must be at most 65536 pages (4GiB)\"\n)\n(assert_invalid\n  (module (memory 0 2147483648))\n  \"memory size must be at most 65536 pages (4GiB)\"\n)\n(assert_invalid\n  (module (memory 0 4294967295))\n  \"memory size must be at most 65536 pages (4GiB)\"\n)\n\n(assert_malformed\n  (module quote \"(memory 0x1_0000_0000)\")\n  \"i32 constant out of range\"\n)\n(assert_malformed\n  (module quote \"(memory 0x1_0000_0000 0x1_0000_0000)\")\n  \"i32 constant out of range\"\n)\n(assert_malformed\n  (module quote \"(memory 0 0x1_0000_0000)\")\n  \"i32 constant out of range\"\n)\n\n(module\n  (memory 1)\n  (data (i32.const 0) \"ABC\\a7D\") (data (i32.const 20) \"WASM\")\n\n  ;; Data section\n  (func (export \"data\") (result i32)\n    (i32.and\n      (i32.and\n        (i32.and\n          (i32.eq (i32.load8_u (i32.const 0)) (i32.const 65))\n          (i32.eq (i32.load8_u (i32.const 3)) (i32.const 167))\n        )\n        (i32.and\n          (i32.eq (i32.load8_u (i32.const 6)) (i32.const 0))\n          (i32.eq (i32.load8_u (i32.const 19)) (i32.const 0))\n        )\n      )\n      (i32.and\n        (i32.and\n          (i32.eq (i32.load8_u (i32.const 20)) (i32.const 87))\n          (i32.eq (i32.load8_u (i32.const 23)) (i32.const 77))\n        )\n        (i32.and\n          (i32.eq (i32.load8_u (i32.const 24)) (i32.const 0))\n          (i32.eq (i32.load8_u (i32.const 1023)) (i32.const 0))\n        )\n      )\n    )\n  )\n\n  ;; Memory cast\n  (func (export \"cast\") (result f64)\n    (i64.store (i32.const 8) (i64.const -12345))\n    (if\n      (f64.eq\n        (f64.load (i32.const 8))\n        (f64.reinterpret_i64 (i64.const -12345))\n      )\n      (then (return (f64.const 0)))\n    )\n    (i64.store align=1 (i32.const 9) (i64.const 0))\n    (i32.store16 align=1 (i32.const 15) (i32.const 16453))\n    (f64.load align=1 (i32.const 9))\n  )\n\n  ;; Sign and zero extending memory loads\n  (func (export \"i32_load8_s\") (param $i i32) (result i32)\n\t(i32.store8 (i32.const 8) (local.get $i))\n\t(i32.load8_s (i32.const 8))\n  )\n  (func (export \"i32_load8_u\") (param $i i32) (result i32)\n\t(i32.store8 (i32.const 8) (local.get $i))\n\t(i32.load8_u (i32.const 8))\n  )\n  (func (export \"i32_load16_s\") (param $i i32) (result i32)\n\t(i32.store16 (i32.const 8) (local.get $i))\n\t(i32.load16_s (i32.const 8))\n  )\n  (func (export \"i32_load16_u\") (param $i i32) (result i32)\n\t(i32.store16 (i32.const 8) (local.get $i))\n\t(i32.load16_u (i32.const 8))\n  )\n  (func (export \"i64_load8_s\") (param $i i64) (result i64)\n\t(i64.store8 (i32.const 8) (local.get $i))\n\t(i64.load8_s (i32.const 8))\n  )\n  (func (export \"i64_load8_u\") (param $i i64) (result i64)\n\t(i64.store8 (i32.const 8) (local.get $i))\n\t(i64.load8_u (i32.const 8))\n  )\n  (func (export \"i64_load16_s\") (param $i i64) (result i64)\n\t(i64.store16 (i32.const 8) (local.get $i))\n\t(i64.load16_s (i32.const 8))\n  )\n  (func (export \"i64_load16_u\") (param $i i64) (result i64)\n\t(i64.store16 (i32.const 8) (local.get $i))\n\t(i64.load16_u (i32.const 8))\n  )\n  (func (export \"i64_load32_s\") (param $i i64) (result i64)\n\t(i64.store32 (i32.const 8) (local.get $i))\n\t(i64.load32_s (i32.const 8))\n  )\n  (func (export \"i64_load32_u\") (param $i i64) (result i64)\n\t(i64.store32 (i32.const 8) (local.get $i))\n\t(i64.load32_u (i32.const 8))\n  )\n)\n\n(assert_return (invoke \"data\") (i32.const 1))\n(assert_return (invoke \"cast\") (f64.const 42.0))\n\n(assert_return (invoke \"i32_load8_s\" (i32.const -1)) (i32.const -1))\n(assert_return (invoke \"i32_load8_u\" (i32.const -1)) (i32.const 255))\n(assert_return (invoke \"i32_load16_s\" (i32.const -1)) (i32.const -1))\n(assert_return (invoke \"i32_load16_u\" (i32.const -1)) (i32.const 65535))\n\n(assert_return (invoke \"i32_load8_s\" (i32.const 100)) (i32.const 100))\n(assert_return (invoke \"i32_load8_u\" (i32.const 200)) (i32.const 200))\n(assert_return (invoke \"i32_load16_s\" (i32.const 20000)) (i32.const 20000))\n(assert_return (invoke \"i32_load16_u\" (i32.const 40000)) (i32.const 40000))\n\n(assert_return (invoke \"i32_load8_s\" (i32.const 0xfedc6543)) (i32.const 0x43))\n(assert_return (invoke \"i32_load8_s\" (i32.const 0x3456cdef)) (i32.const 0xffffffef))\n(assert_return (invoke \"i32_load8_u\" (i32.const 0xfedc6543)) (i32.const 0x43))\n(assert_return (invoke \"i32_load8_u\" (i32.const 0x3456cdef)) (i32.const 0xef))\n(assert_return (invoke \"i32_load16_s\" (i32.const 0xfedc6543)) (i32.const 0x6543))\n(assert_return (invoke \"i32_load16_s\" (i32.const 0x3456cdef)) (i32.const 0xffffcdef))\n(assert_return (invoke \"i32_load16_u\" (i32.const 0xfedc6543)) (i32.const 0x6543))\n(assert_return (invoke \"i32_load16_u\" (i32.const 0x3456cdef)) (i32.const 0xcdef))\n\n(assert_return (invoke \"i64_load8_s\" (i64.const -1)) (i64.const -1))\n(assert_return (invoke \"i64_load8_u\" (i64.const -1)) (i64.const 255))\n(assert_return (invoke \"i64_load16_s\" (i64.const -1)) (i64.const -1))\n(assert_return (invoke \"i64_load16_u\" (i64.const -1)) (i64.const 65535))\n(assert_return (invoke \"i64_load32_s\" (i64.const -1)) (i64.const -1))\n(assert_return (invoke \"i64_load32_u\" (i64.const -1)) (i64.const 4294967295))\n\n(assert_return (invoke \"i64_load8_s\" (i64.const 100)) (i64.const 100))\n(assert_return (invoke \"i64_load8_u\" (i64.const 200)) (i64.const 200))\n(assert_return (invoke \"i64_load16_s\" (i64.const 20000)) (i64.const 20000))\n(assert_return (invoke \"i64_load16_u\" (i64.const 40000)) (i64.const 40000))\n(assert_return (invoke \"i64_load32_s\" (i64.const 20000)) (i64.const 20000))\n(assert_return (invoke \"i64_load32_u\" (i64.const 40000)) (i64.const 40000))\n\n(assert_return (invoke \"i64_load8_s\" (i64.const 0xfedcba9856346543)) (i64.const 0x43))\n(assert_return (invoke \"i64_load8_s\" (i64.const 0x3456436598bacdef)) (i64.const 0xffffffffffffffef))\n(assert_return (invoke \"i64_load8_u\" (i64.const 0xfedcba9856346543)) (i64.const 0x43))\n(assert_return (invoke \"i64_load8_u\" (i64.const 0x3456436598bacdef)) (i64.const 0xef))\n(assert_return (invoke \"i64_load16_s\" (i64.const 0xfedcba9856346543)) (i64.const 0x6543))\n(assert_return (invoke \"i64_load16_s\" (i64.const 0x3456436598bacdef)) (i64.const 0xffffffffffffcdef))\n(assert_return (invoke \"i64_load16_u\" (i64.const 0xfedcba9856346543)) (i64.const 0x6543))\n(assert_return (invoke \"i64_load16_u\" (i64.const 0x3456436598bacdef)) (i64.const 0xcdef))\n(assert_return (invoke \"i64_load32_s\" (i64.const 0xfedcba9856346543)) (i64.const 0x56346543))\n(assert_return (invoke \"i64_load32_s\" (i64.const 0x3456436598bacdef)) (i64.const 0xffffffff98bacdef))\n(assert_return (invoke \"i64_load32_u\" (i64.const 0xfedcba9856346543)) (i64.const 0x56346543))\n(assert_return (invoke \"i64_load32_u\" (i64.const 0x3456436598bacdef)) (i64.const 0x98bacdef))\n\n;; Duplicate identifier errors\n\n(assert_malformed (module quote\n  \"(memory $foo 1)\"\n  \"(memory $foo 1)\")\n  \"duplicate memory\")\n(assert_malformed (module quote\n  \"(import \\\"\\\" \\\"\\\" (memory $foo 1))\"\n  \"(memory $foo 1)\")\n  \"duplicate memory\")\n(assert_malformed (module quote\n  \"(import \\\"\\\" \\\"\\\" (memory $foo 1))\"\n  \"(import \\\"\\\" \\\"\\\" (memory $foo 1))\")\n  \"duplicate memory\")\n"
  },
  {
    "path": "test/core/memory_copy.wast",
    "content": ";;\n;; Generated by ../meta/generate_memory_copy.js\n;; DO NOT EDIT THIS FILE.  CHANGE THE SOURCE AND REGENERATE.\n;;\n\n(module\n  (memory (export \"memory0\") 1 1)\n  (data (i32.const 2) \"\\03\\01\\04\\01\")\n  (data (i32.const 12) \"\\07\\05\\02\\03\\06\")\n  (func (export \"test\")\n    (nop))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(invoke \"test\")\n\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 6)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 16)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 17)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29)) (i32.const 0))\n\n(module\n  (memory (export \"memory0\") 1 1)\n  (data (i32.const 2) \"\\03\\01\\04\\01\")\n  (data (i32.const 12) \"\\07\\05\\02\\03\\06\")\n  (func (export \"test\")\n    (memory.copy (i32.const 13) (i32.const 2) (i32.const 3)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(invoke \"test\")\n\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 6)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 14)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 15)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 16)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 17)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29)) (i32.const 0))\n\n(module\n  (memory (export \"memory0\") 1 1)\n  (data (i32.const 2) \"\\03\\01\\04\\01\")\n  (data (i32.const 12) \"\\07\\05\\02\\03\\06\")\n  (func (export \"test\")\n    (memory.copy (i32.const 25) (i32.const 15) (i32.const 2)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(invoke \"test\")\n\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 6)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 16)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 17)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 26)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 27)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29)) (i32.const 0))\n\n(module\n  (memory (export \"memory0\") 1 1)\n  (data (i32.const 2) \"\\03\\01\\04\\01\")\n  (data (i32.const 12) \"\\07\\05\\02\\03\\06\")\n  (func (export \"test\")\n    (memory.copy (i32.const 13) (i32.const 25) (i32.const 3)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(invoke \"test\")\n\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 6)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 17)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29)) (i32.const 0))\n\n(module\n  (memory (export \"memory0\") 1 1)\n  (data (i32.const 2) \"\\03\\01\\04\\01\")\n  (data (i32.const 12) \"\\07\\05\\02\\03\\06\")\n  (func (export \"test\")\n    (memory.copy (i32.const 20) (i32.const 22) (i32.const 4)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(invoke \"test\")\n\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 6)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 16)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 17)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29)) (i32.const 0))\n\n(module\n  (memory (export \"memory0\") 1 1)\n  (data (i32.const 2) \"\\03\\01\\04\\01\")\n  (data (i32.const 12) \"\\07\\05\\02\\03\\06\")\n  (func (export \"test\")\n    (memory.copy (i32.const 25) (i32.const 1) (i32.const 3)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(invoke \"test\")\n\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 6)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 16)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 17)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 27)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 28)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29)) (i32.const 0))\n\n(module\n  (memory (export \"memory0\") 1 1)\n  (data (i32.const 2) \"\\03\\01\\04\\01\")\n  (data (i32.const 12) \"\\07\\05\\02\\03\\06\")\n  (func (export \"test\")\n    (memory.copy (i32.const 10) (i32.const 12) (i32.const 7)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(invoke \"test\")\n\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 6)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 14)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 15)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29)) (i32.const 0))\n\n(module\n  (memory (export \"memory0\") 1 1)\n  (data (i32.const 2) \"\\03\\01\\04\\01\")\n  (data (i32.const 12) \"\\07\\05\\02\\03\\06\")\n  (func (export \"test\")\n    (memory.copy (i32.const 12) (i32.const 10) (i32.const 7)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(invoke \"test\")\n\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 6)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 15)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 16)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 17)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 18)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 19)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29)) (i32.const 0))\n\n(module\n  (memory (export \"mem\") 1 1 )\n  (data (i32.const 0) \"\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13\")\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(assert_trap (invoke \"run\" (i32.const 65516) (i32.const 0) (i32.const 40))\n             \"out of bounds memory access\")\n\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 2)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 3)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 5)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 7)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 8)) (i32.const 8))\n(assert_return (invoke \"load8_u\" (i32.const 9)) (i32.const 9))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 10))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 11))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 12))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 13))\n(assert_return (invoke \"load8_u\" (i32.const 14)) (i32.const 14))\n(assert_return (invoke \"load8_u\" (i32.const 15)) (i32.const 15))\n(assert_return (invoke \"load8_u\" (i32.const 16)) (i32.const 16))\n(assert_return (invoke \"load8_u\" (i32.const 17)) (i32.const 17))\n(assert_return (invoke \"load8_u\" (i32.const 18)) (i32.const 18))\n(assert_return (invoke \"load8_u\" (i32.const 19)) (i32.const 19))\n(assert_return (invoke \"load8_u\" (i32.const 218)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 417)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 616)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 815)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1014)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1213)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1412)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1611)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1810)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2009)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2208)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2407)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2606)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2805)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3004)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3203)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3402)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3601)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3800)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3999)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4198)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4397)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4596)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4795)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4994)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5193)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5392)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5591)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5790)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5989)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6188)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6387)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6586)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6785)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6984)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7183)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7382)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7581)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7780)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7979)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8178)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8377)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8576)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8775)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8974)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9173)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9372)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9571)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9770)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9969)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10168)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10367)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10566)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10765)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10964)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11163)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11362)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11561)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11760)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11959)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12158)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12357)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12556)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12755)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12954)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13153)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13352)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13551)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13750)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13949)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14148)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14347)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14546)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14745)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14944)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15143)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15342)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15541)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15740)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15939)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16138)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16337)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16536)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16735)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16934)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17133)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17332)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17531)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17730)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17929)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18128)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18327)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18526)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18725)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18924)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19123)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19322)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19521)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19720)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19919)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20118)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20317)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20516)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20715)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20914)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21113)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21312)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21511)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21710)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21909)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22108)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22307)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22506)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22705)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22904)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23103)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23302)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23501)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23700)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23899)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24098)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24297)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24496)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24695)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24894)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25093)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25292)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25491)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25690)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25889)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26088)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26287)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26486)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26685)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26884)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27083)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27282)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27481)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27680)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27879)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28078)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28277)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28476)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28675)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28874)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29073)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29272)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29471)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29670)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29869)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30068)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30267)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30466)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30665)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30864)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31063)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31262)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31461)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31660)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31859)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32058)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32257)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32456)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32655)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32854)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33053)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33252)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33451)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33650)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33849)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34048)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34247)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34446)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34645)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34844)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35043)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35242)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35441)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35640)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35839)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36038)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36237)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36436)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36635)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36834)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37033)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37232)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37431)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37630)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37829)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38028)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38227)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38426)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38625)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38824)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39023)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39222)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39421)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39620)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39819)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40018)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40217)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40416)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40615)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40814)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41013)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41212)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41411)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41610)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41809)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42008)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42207)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42406)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42605)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42804)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43003)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43202)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43401)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43600)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43799)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43998)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44197)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44396)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44595)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44794)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44993)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45192)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45391)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45590)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45789)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45988)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46187)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46386)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46585)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46784)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46983)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47182)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47381)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47580)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47779)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47978)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48177)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48376)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48575)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48774)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48973)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49172)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49371)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49570)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49769)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49968)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50167)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50366)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50565)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50764)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50963)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51162)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51361)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51560)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51759)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51958)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52157)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52356)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52555)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52754)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52953)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53152)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53351)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53550)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53749)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53948)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54147)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54346)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54545)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54744)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54943)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55142)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55341)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55540)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55739)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55938)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56137)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56336)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56535)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56734)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56933)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57132)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57331)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57530)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57729)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57928)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58127)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58326)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58525)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58724)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58923)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59122)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59321)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59520)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59719)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59918)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60117)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60316)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60515)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60714)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60913)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61112)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61311)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61510)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61709)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61908)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62107)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62306)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62505)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62704)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62903)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63102)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63301)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63500)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63699)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63898)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64097)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64296)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64495)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64694)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64893)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65092)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65291)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65490)) (i32.const 0))\n\n(module\n  (memory (export \"mem\") 1 1 )\n  (data (i32.const 0) \"\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13\\14\")\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(assert_trap (invoke \"run\" (i32.const 65515) (i32.const 0) (i32.const 39))\n             \"out of bounds memory access\")\n\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 2)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 3)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 5)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 7)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 8)) (i32.const 8))\n(assert_return (invoke \"load8_u\" (i32.const 9)) (i32.const 9))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 10))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 11))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 12))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 13))\n(assert_return (invoke \"load8_u\" (i32.const 14)) (i32.const 14))\n(assert_return (invoke \"load8_u\" (i32.const 15)) (i32.const 15))\n(assert_return (invoke \"load8_u\" (i32.const 16)) (i32.const 16))\n(assert_return (invoke \"load8_u\" (i32.const 17)) (i32.const 17))\n(assert_return (invoke \"load8_u\" (i32.const 18)) (i32.const 18))\n(assert_return (invoke \"load8_u\" (i32.const 19)) (i32.const 19))\n(assert_return (invoke \"load8_u\" (i32.const 20)) (i32.const 20))\n(assert_return (invoke \"load8_u\" (i32.const 219)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 418)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 617)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 816)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1015)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1214)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1413)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1612)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1811)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2010)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2209)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2408)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2607)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2806)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3005)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3204)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3403)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3602)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3801)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4000)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4199)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4398)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4597)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4796)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4995)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5194)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5393)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5592)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5791)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5990)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6189)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6388)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6587)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6786)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6985)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7184)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7383)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7582)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7781)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7980)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8179)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8378)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8577)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8776)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8975)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9174)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9373)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9572)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9771)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9970)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10169)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10368)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10567)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10766)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10965)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11164)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11363)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11562)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11761)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11960)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12159)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12358)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12557)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12756)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12955)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13154)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13353)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13552)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13751)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13950)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14149)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14348)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14547)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14746)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14945)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15144)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15343)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15542)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15741)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15940)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16139)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16338)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16537)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16736)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16935)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17134)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17333)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17532)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17731)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17930)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18129)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18328)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18527)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18726)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18925)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19124)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19323)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19522)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19721)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19920)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20119)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20318)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20517)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20716)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20915)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21114)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21313)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21512)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21711)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21910)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22109)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22308)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22507)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22706)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22905)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23104)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23303)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23502)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23701)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23900)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24099)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24298)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24497)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24696)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24895)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25094)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25293)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25492)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25691)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25890)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26089)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26288)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26487)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26686)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26885)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27084)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27283)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27482)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27681)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27880)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28079)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28278)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28477)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28676)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28875)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29074)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29273)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29472)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29671)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29870)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30069)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30268)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30467)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30666)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30865)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31064)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31263)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31462)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31661)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31860)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32059)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32258)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32457)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32656)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32855)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33054)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33253)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33452)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33651)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33850)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34049)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34248)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34447)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34646)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34845)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35044)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35243)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35442)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35641)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35840)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36039)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36238)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36437)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36636)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36835)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37034)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37233)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37432)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37631)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37830)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38029)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38228)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38427)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38626)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38825)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39024)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39223)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39422)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39621)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39820)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40019)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40218)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40417)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40616)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40815)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41014)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41213)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41412)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41611)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41810)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42009)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42208)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42407)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42606)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42805)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43004)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43203)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43402)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43601)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43800)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43999)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44198)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44397)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44596)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44795)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44994)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45193)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45392)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45591)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45790)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45989)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46188)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46387)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46586)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46785)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46984)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47183)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47382)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47581)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47780)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47979)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48178)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48377)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48576)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48775)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48974)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49173)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49372)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49571)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49770)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49969)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50168)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50367)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50566)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50765)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50964)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51163)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51362)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51561)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51760)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51959)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52158)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52357)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52556)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52755)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52954)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53153)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53352)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53551)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53750)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53949)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54148)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54347)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54546)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54745)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54944)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55143)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55342)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55541)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55740)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55939)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56138)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56337)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56536)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56735)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56934)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57133)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57332)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57531)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57730)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57929)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58128)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58327)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58526)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58725)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58924)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59123)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59322)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59521)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59720)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59919)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60118)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60317)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60516)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60715)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60914)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61113)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61312)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61511)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61710)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61909)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62108)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62307)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62506)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62705)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62904)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63103)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63302)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63501)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63700)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63899)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64098)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64297)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64496)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64695)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64894)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65093)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65292)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65491)) (i32.const 0))\n\n(module\n  (memory (export \"mem\") 1 1 )\n  (data (i32.const 65516) \"\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13\")\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(assert_trap (invoke \"run\" (i32.const 0) (i32.const 65516) (i32.const 40))\n             \"out of bounds memory access\")\n\n(assert_return (invoke \"load8_u\" (i32.const 198)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 397)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 596)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 795)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 994)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1193)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1392)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1591)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1790)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1989)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2188)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2387)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2586)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2785)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2984)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3183)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3382)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3581)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3780)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3979)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4178)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4377)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4576)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4775)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4974)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5173)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5372)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5571)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5770)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5969)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6168)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6367)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6566)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6765)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6964)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7163)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7362)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7561)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7760)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7959)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8158)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8357)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8556)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8755)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8954)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9153)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9352)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9551)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9750)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9949)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10148)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10347)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10546)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10745)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10944)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11143)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11342)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11541)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11740)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11939)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12138)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12337)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12536)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12735)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12934)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13133)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13332)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13531)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13730)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13929)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14128)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14327)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14526)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14725)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14924)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15123)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15322)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15521)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15720)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15919)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16118)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16317)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16516)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16715)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16914)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17113)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17312)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17511)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17710)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17909)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18108)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18307)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18506)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18705)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18904)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19103)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19302)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19501)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19700)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19899)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20098)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20297)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20496)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20695)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20894)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21093)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21292)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21491)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21690)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21889)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22088)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22287)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22486)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22685)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22884)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23083)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23282)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23481)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23680)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23879)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24078)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24277)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24476)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24675)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24874)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25073)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25272)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25471)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25670)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25869)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26068)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26267)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26466)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26665)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26864)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27063)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27262)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27461)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27660)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27859)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28058)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28257)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28456)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28655)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28854)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29053)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29252)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29451)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29650)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29849)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30048)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30247)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30446)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30645)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30844)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31043)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31242)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31441)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31640)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31839)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32038)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32237)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32436)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32635)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32834)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33033)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33232)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33431)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33630)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33829)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34028)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34227)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34426)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34625)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34824)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35023)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35222)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35421)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35620)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35819)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36018)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36217)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36416)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36615)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36814)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37013)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37212)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37411)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37610)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37809)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38008)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38207)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38406)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38605)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38804)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39003)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39202)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39401)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39600)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39799)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39998)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40197)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40396)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40595)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40794)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40993)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41192)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41391)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41590)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41789)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41988)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42187)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42386)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42585)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42784)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42983)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43182)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43381)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43580)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43779)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43978)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44177)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44376)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44575)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44774)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44973)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45172)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45371)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45570)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45769)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45968)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46167)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46366)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46565)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46764)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46963)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47162)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47361)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47560)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47759)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47958)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48157)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48356)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48555)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48754)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48953)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49152)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49351)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49550)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49749)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49948)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50147)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50346)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50545)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50744)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50943)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51142)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51341)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51540)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51739)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51938)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52137)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52336)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52535)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52734)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52933)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53132)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53331)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53530)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53729)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53928)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54127)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54326)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54525)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54724)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54923)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55122)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55321)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55520)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55719)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55918)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56117)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56316)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56515)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56714)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56913)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57112)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57311)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57510)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57709)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57908)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58107)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58306)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58505)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58704)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58903)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59102)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59301)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59500)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59699)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59898)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60097)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60296)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60495)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60694)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60893)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61092)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61291)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61490)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61689)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61888)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62087)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62286)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62485)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62684)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62883)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63082)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63281)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63480)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63679)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63878)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64077)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64276)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64475)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64674)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64873)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65072)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65271)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65470)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65516)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65517)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 65518)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 65519)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 65520)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 65521)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 65522)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 65523)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 65524)) (i32.const 8))\n(assert_return (invoke \"load8_u\" (i32.const 65525)) (i32.const 9))\n(assert_return (invoke \"load8_u\" (i32.const 65526)) (i32.const 10))\n(assert_return (invoke \"load8_u\" (i32.const 65527)) (i32.const 11))\n(assert_return (invoke \"load8_u\" (i32.const 65528)) (i32.const 12))\n(assert_return (invoke \"load8_u\" (i32.const 65529)) (i32.const 13))\n(assert_return (invoke \"load8_u\" (i32.const 65530)) (i32.const 14))\n(assert_return (invoke \"load8_u\" (i32.const 65531)) (i32.const 15))\n(assert_return (invoke \"load8_u\" (i32.const 65532)) (i32.const 16))\n(assert_return (invoke \"load8_u\" (i32.const 65533)) (i32.const 17))\n(assert_return (invoke \"load8_u\" (i32.const 65534)) (i32.const 18))\n(assert_return (invoke \"load8_u\" (i32.const 65535)) (i32.const 19))\n\n(module\n  (memory (export \"mem\") 1 1 )\n  (data (i32.const 65515) \"\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13\\14\")\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(assert_trap (invoke \"run\" (i32.const 0) (i32.const 65515) (i32.const 39))\n             \"out of bounds memory access\")\n\n(assert_return (invoke \"load8_u\" (i32.const 198)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 397)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 596)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 795)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 994)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1193)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1392)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1591)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1790)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1989)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2188)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2387)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2586)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2785)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2984)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3183)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3382)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3581)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3780)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3979)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4178)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4377)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4576)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4775)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4974)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5173)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5372)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5571)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5770)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5969)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6168)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6367)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6566)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6765)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6964)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7163)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7362)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7561)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7760)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7959)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8158)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8357)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8556)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8755)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8954)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9153)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9352)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9551)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9750)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9949)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10148)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10347)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10546)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10745)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10944)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11143)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11342)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11541)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11740)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11939)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12138)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12337)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12536)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12735)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12934)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13133)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13332)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13531)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13730)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13929)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14128)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14327)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14526)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14725)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14924)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15123)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15322)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15521)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15720)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15919)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16118)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16317)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16516)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16715)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16914)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17113)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17312)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17511)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17710)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17909)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18108)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18307)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18506)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18705)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18904)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19103)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19302)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19501)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19700)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19899)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20098)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20297)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20496)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20695)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20894)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21093)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21292)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21491)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21690)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21889)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22088)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22287)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22486)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22685)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22884)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23083)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23282)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23481)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23680)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23879)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24078)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24277)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24476)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24675)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24874)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25073)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25272)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25471)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25670)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25869)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26068)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26267)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26466)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26665)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26864)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27063)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27262)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27461)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27660)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27859)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28058)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28257)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28456)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28655)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28854)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29053)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29252)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29451)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29650)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29849)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30048)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30247)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30446)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30645)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30844)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31043)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31242)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31441)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31640)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31839)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32038)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32237)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32436)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32635)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32834)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33033)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33232)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33431)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33630)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33829)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34028)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34227)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34426)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34625)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34824)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35023)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35222)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35421)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35620)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35819)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36018)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36217)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36416)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36615)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36814)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37013)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37212)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37411)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37610)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37809)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38008)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38207)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38406)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38605)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38804)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39003)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39202)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39401)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39600)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39799)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39998)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40197)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40396)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40595)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40794)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40993)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41192)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41391)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41590)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41789)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41988)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42187)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42386)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42585)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42784)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42983)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43182)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43381)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43580)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43779)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43978)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44177)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44376)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44575)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44774)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44973)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45172)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45371)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45570)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45769)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45968)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46167)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46366)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46565)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46764)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46963)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47162)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47361)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47560)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47759)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47958)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48157)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48356)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48555)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48754)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48953)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49152)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49351)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49550)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49749)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49948)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50147)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50346)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50545)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50744)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50943)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51142)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51341)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51540)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51739)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51938)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52137)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52336)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52535)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52734)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52933)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53132)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53331)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53530)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53729)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53928)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54127)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54326)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54525)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54724)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54923)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55122)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55321)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55520)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55719)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55918)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56117)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56316)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56515)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56714)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56913)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57112)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57311)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57510)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57709)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57908)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58107)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58306)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58505)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58704)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58903)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59102)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59301)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59500)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59699)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59898)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60097)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60296)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60495)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60694)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60893)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61092)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61291)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61490)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61689)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61888)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62087)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62286)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62485)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62684)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62883)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63082)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63281)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63480)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63679)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63878)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64077)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64276)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64475)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64674)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64873)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65072)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65271)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65470)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65515)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65516)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 65517)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 65518)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 65519)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 65520)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 65521)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 65522)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 65523)) (i32.const 8))\n(assert_return (invoke \"load8_u\" (i32.const 65524)) (i32.const 9))\n(assert_return (invoke \"load8_u\" (i32.const 65525)) (i32.const 10))\n(assert_return (invoke \"load8_u\" (i32.const 65526)) (i32.const 11))\n(assert_return (invoke \"load8_u\" (i32.const 65527)) (i32.const 12))\n(assert_return (invoke \"load8_u\" (i32.const 65528)) (i32.const 13))\n(assert_return (invoke \"load8_u\" (i32.const 65529)) (i32.const 14))\n(assert_return (invoke \"load8_u\" (i32.const 65530)) (i32.const 15))\n(assert_return (invoke \"load8_u\" (i32.const 65531)) (i32.const 16))\n(assert_return (invoke \"load8_u\" (i32.const 65532)) (i32.const 17))\n(assert_return (invoke \"load8_u\" (i32.const 65533)) (i32.const 18))\n(assert_return (invoke \"load8_u\" (i32.const 65534)) (i32.const 19))\n(assert_return (invoke \"load8_u\" (i32.const 65535)) (i32.const 20))\n\n(module\n  (memory (export \"mem\") 1 1 )\n  (data (i32.const 65486) \"\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13\")\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(assert_trap (invoke \"run\" (i32.const 65516) (i32.const 65486) (i32.const 40))\n             \"out of bounds memory access\")\n\n(assert_return (invoke \"load8_u\" (i32.const 198)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 397)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 596)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 795)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 994)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1193)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1392)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1591)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1790)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1989)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2188)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2387)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2586)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2785)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2984)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3183)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3382)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3581)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3780)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3979)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4178)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4377)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4576)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4775)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4974)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5173)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5372)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5571)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5770)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5969)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6168)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6367)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6566)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6765)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6964)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7163)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7362)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7561)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7760)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7959)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8158)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8357)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8556)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8755)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8954)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9153)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9352)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9551)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9750)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9949)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10148)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10347)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10546)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10745)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10944)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11143)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11342)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11541)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11740)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11939)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12138)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12337)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12536)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12735)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12934)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13133)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13332)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13531)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13730)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13929)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14128)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14327)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14526)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14725)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14924)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15123)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15322)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15521)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15720)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15919)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16118)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16317)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16516)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16715)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16914)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17113)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17312)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17511)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17710)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17909)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18108)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18307)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18506)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18705)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18904)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19103)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19302)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19501)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19700)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19899)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20098)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20297)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20496)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20695)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20894)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21093)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21292)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21491)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21690)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21889)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22088)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22287)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22486)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22685)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22884)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23083)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23282)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23481)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23680)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23879)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24078)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24277)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24476)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24675)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24874)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25073)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25272)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25471)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25670)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25869)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26068)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26267)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26466)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26665)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26864)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27063)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27262)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27461)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27660)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27859)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28058)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28257)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28456)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28655)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28854)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29053)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29252)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29451)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29650)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29849)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30048)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30247)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30446)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30645)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30844)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31043)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31242)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31441)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31640)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31839)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32038)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32237)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32436)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32635)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32834)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33033)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33232)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33431)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33630)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33829)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34028)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34227)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34426)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34625)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34824)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35023)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35222)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35421)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35620)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35819)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36018)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36217)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36416)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36615)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36814)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37013)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37212)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37411)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37610)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37809)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38008)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38207)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38406)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38605)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38804)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39003)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39202)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39401)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39600)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39799)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39998)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40197)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40396)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40595)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40794)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40993)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41192)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41391)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41590)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41789)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41988)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42187)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42386)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42585)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42784)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42983)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43182)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43381)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43580)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43779)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43978)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44177)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44376)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44575)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44774)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44973)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45172)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45371)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45570)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45769)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45968)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46167)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46366)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46565)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46764)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46963)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47162)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47361)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47560)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47759)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47958)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48157)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48356)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48555)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48754)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48953)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49152)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49351)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49550)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49749)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49948)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50147)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50346)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50545)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50744)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50943)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51142)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51341)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51540)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51739)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51938)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52137)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52336)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52535)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52734)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52933)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53132)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53331)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53530)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53729)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53928)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54127)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54326)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54525)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54724)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54923)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55122)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55321)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55520)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55719)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55918)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56117)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56316)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56515)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56714)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56913)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57112)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57311)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57510)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57709)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57908)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58107)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58306)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58505)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58704)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58903)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59102)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59301)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59500)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59699)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59898)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60097)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60296)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60495)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60694)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60893)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61092)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61291)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61490)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61689)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61888)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62087)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62286)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62485)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62684)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62883)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63082)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63281)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63480)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63679)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63878)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64077)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64276)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64475)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64674)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64873)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65072)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65271)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65470)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65486)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65487)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 65488)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 65489)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 65490)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 65491)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 65492)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 65493)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 65494)) (i32.const 8))\n(assert_return (invoke \"load8_u\" (i32.const 65495)) (i32.const 9))\n(assert_return (invoke \"load8_u\" (i32.const 65496)) (i32.const 10))\n(assert_return (invoke \"load8_u\" (i32.const 65497)) (i32.const 11))\n(assert_return (invoke \"load8_u\" (i32.const 65498)) (i32.const 12))\n(assert_return (invoke \"load8_u\" (i32.const 65499)) (i32.const 13))\n(assert_return (invoke \"load8_u\" (i32.const 65500)) (i32.const 14))\n(assert_return (invoke \"load8_u\" (i32.const 65501)) (i32.const 15))\n(assert_return (invoke \"load8_u\" (i32.const 65502)) (i32.const 16))\n(assert_return (invoke \"load8_u\" (i32.const 65503)) (i32.const 17))\n(assert_return (invoke \"load8_u\" (i32.const 65504)) (i32.const 18))\n(assert_return (invoke \"load8_u\" (i32.const 65505)) (i32.const 19))\n\n(module\n  (memory (export \"mem\") 1 1 )\n  (data (i32.const 65516) \"\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13\")\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(assert_trap (invoke \"run\" (i32.const 65486) (i32.const 65516) (i32.const 40))\n             \"out of bounds memory access\")\n\n(assert_return (invoke \"load8_u\" (i32.const 198)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 397)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 596)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 795)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 994)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1193)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1392)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1591)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1790)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1989)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2188)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2387)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2586)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2785)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2984)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3183)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3382)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3581)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3780)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3979)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4178)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4377)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4576)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4775)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4974)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5173)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5372)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5571)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5770)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5969)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6168)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6367)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6566)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6765)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6964)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7163)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7362)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7561)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7760)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7959)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8158)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8357)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8556)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8755)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8954)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9153)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9352)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9551)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9750)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9949)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10148)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10347)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10546)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10745)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10944)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11143)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11342)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11541)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11740)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11939)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12138)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12337)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12536)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12735)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12934)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13133)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13332)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13531)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13730)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13929)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14128)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14327)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14526)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14725)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14924)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15123)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15322)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15521)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15720)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15919)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16118)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16317)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16516)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16715)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16914)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17113)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17312)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17511)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17710)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17909)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18108)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18307)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18506)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18705)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18904)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19103)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19302)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19501)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19700)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19899)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20098)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20297)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20496)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20695)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20894)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21093)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21292)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21491)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21690)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21889)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22088)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22287)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22486)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22685)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22884)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23083)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23282)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23481)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23680)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23879)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24078)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24277)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24476)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24675)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24874)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25073)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25272)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25471)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25670)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25869)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26068)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26267)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26466)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26665)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26864)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27063)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27262)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27461)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27660)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27859)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28058)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28257)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28456)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28655)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28854)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29053)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29252)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29451)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29650)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29849)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30048)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30247)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30446)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30645)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30844)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31043)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31242)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31441)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31640)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31839)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32038)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32237)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32436)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32635)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32834)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33033)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33232)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33431)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33630)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33829)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34028)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34227)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34426)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34625)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34824)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35023)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35222)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35421)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35620)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35819)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36018)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36217)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36416)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36615)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36814)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37013)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37212)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37411)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37610)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37809)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38008)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38207)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38406)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38605)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38804)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39003)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39202)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39401)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39600)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39799)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39998)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40197)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40396)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40595)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40794)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40993)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41192)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41391)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41590)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41789)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41988)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42187)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42386)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42585)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42784)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42983)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43182)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43381)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43580)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43779)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43978)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44177)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44376)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44575)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44774)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44973)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45172)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45371)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45570)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45769)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45968)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46167)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46366)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46565)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46764)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46963)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47162)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47361)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47560)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47759)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47958)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48157)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48356)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48555)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48754)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48953)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49152)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49351)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49550)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49749)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49948)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50147)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50346)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50545)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50744)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50943)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51142)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51341)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51540)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51739)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51938)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52137)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52336)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52535)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52734)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52933)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53132)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53331)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53530)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53729)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53928)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54127)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54326)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54525)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54724)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54923)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55122)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55321)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55520)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55719)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55918)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56117)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56316)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56515)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56714)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56913)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57112)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57311)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57510)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57709)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57908)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58107)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58306)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58505)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58704)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58903)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59102)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59301)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59500)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59699)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59898)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60097)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60296)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60495)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60694)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60893)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61092)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61291)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61490)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61689)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61888)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62087)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62286)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62485)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62684)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62883)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63082)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63281)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63480)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63679)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63878)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64077)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64276)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64475)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64674)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64873)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65072)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65271)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65470)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65516)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65517)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 65518)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 65519)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 65520)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 65521)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 65522)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 65523)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 65524)) (i32.const 8))\n(assert_return (invoke \"load8_u\" (i32.const 65525)) (i32.const 9))\n(assert_return (invoke \"load8_u\" (i32.const 65526)) (i32.const 10))\n(assert_return (invoke \"load8_u\" (i32.const 65527)) (i32.const 11))\n(assert_return (invoke \"load8_u\" (i32.const 65528)) (i32.const 12))\n(assert_return (invoke \"load8_u\" (i32.const 65529)) (i32.const 13))\n(assert_return (invoke \"load8_u\" (i32.const 65530)) (i32.const 14))\n(assert_return (invoke \"load8_u\" (i32.const 65531)) (i32.const 15))\n(assert_return (invoke \"load8_u\" (i32.const 65532)) (i32.const 16))\n(assert_return (invoke \"load8_u\" (i32.const 65533)) (i32.const 17))\n(assert_return (invoke \"load8_u\" (i32.const 65534)) (i32.const 18))\n(assert_return (invoke \"load8_u\" (i32.const 65535)) (i32.const 19))\n\n(module\n  (memory (export \"mem\") 1 1 )\n  (data (i32.const 65506) \"\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13\")\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(assert_trap (invoke \"run\" (i32.const 65516) (i32.const 65506) (i32.const 40))\n             \"out of bounds memory access\")\n\n(assert_return (invoke \"load8_u\" (i32.const 198)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 397)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 596)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 795)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 994)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1193)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1392)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1591)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1790)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1989)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2188)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2387)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2586)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2785)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2984)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3183)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3382)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3581)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3780)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3979)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4178)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4377)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4576)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4775)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4974)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5173)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5372)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5571)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5770)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5969)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6168)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6367)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6566)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6765)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6964)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7163)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7362)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7561)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7760)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7959)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8158)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8357)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8556)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8755)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8954)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9153)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9352)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9551)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9750)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9949)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10148)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10347)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10546)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10745)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10944)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11143)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11342)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11541)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11740)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11939)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12138)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12337)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12536)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12735)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12934)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13133)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13332)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13531)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13730)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13929)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14128)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14327)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14526)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14725)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14924)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15123)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15322)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15521)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15720)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15919)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16118)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16317)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16516)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16715)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16914)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17113)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17312)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17511)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17710)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17909)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18108)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18307)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18506)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18705)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18904)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19103)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19302)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19501)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19700)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19899)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20098)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20297)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20496)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20695)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20894)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21093)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21292)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21491)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21690)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21889)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22088)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22287)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22486)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22685)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22884)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23083)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23282)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23481)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23680)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23879)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24078)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24277)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24476)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24675)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24874)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25073)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25272)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25471)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25670)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25869)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26068)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26267)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26466)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26665)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26864)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27063)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27262)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27461)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27660)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27859)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28058)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28257)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28456)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28655)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28854)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29053)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29252)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29451)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29650)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29849)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30048)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30247)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30446)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30645)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30844)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31043)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31242)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31441)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31640)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31839)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32038)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32237)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32436)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32635)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32834)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33033)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33232)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33431)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33630)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33829)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34028)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34227)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34426)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34625)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34824)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35023)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35222)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35421)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35620)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35819)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36018)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36217)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36416)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36615)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36814)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37013)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37212)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37411)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37610)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37809)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38008)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38207)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38406)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38605)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38804)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39003)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39202)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39401)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39600)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39799)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39998)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40197)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40396)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40595)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40794)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40993)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41192)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41391)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41590)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41789)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41988)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42187)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42386)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42585)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42784)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42983)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43182)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43381)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43580)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43779)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43978)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44177)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44376)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44575)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44774)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44973)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45172)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45371)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45570)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45769)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45968)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46167)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46366)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46565)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46764)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46963)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47162)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47361)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47560)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47759)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47958)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48157)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48356)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48555)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48754)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48953)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49152)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49351)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49550)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49749)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49948)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50147)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50346)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50545)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50744)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50943)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51142)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51341)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51540)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51739)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51938)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52137)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52336)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52535)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52734)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52933)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53132)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53331)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53530)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53729)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53928)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54127)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54326)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54525)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54724)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54923)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55122)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55321)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55520)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55719)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55918)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56117)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56316)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56515)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56714)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56913)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57112)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57311)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57510)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57709)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57908)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58107)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58306)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58505)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58704)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58903)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59102)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59301)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59500)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59699)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59898)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60097)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60296)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60495)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60694)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60893)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61092)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61291)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61490)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61689)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61888)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62087)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62286)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62485)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62684)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62883)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63082)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63281)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63480)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63679)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63878)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64077)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64276)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64475)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64674)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64873)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65072)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65271)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65470)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65506)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65507)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 65508)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 65509)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 65510)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 65511)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 65512)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 65513)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 65514)) (i32.const 8))\n(assert_return (invoke \"load8_u\" (i32.const 65515)) (i32.const 9))\n(assert_return (invoke \"load8_u\" (i32.const 65516)) (i32.const 10))\n(assert_return (invoke \"load8_u\" (i32.const 65517)) (i32.const 11))\n(assert_return (invoke \"load8_u\" (i32.const 65518)) (i32.const 12))\n(assert_return (invoke \"load8_u\" (i32.const 65519)) (i32.const 13))\n(assert_return (invoke \"load8_u\" (i32.const 65520)) (i32.const 14))\n(assert_return (invoke \"load8_u\" (i32.const 65521)) (i32.const 15))\n(assert_return (invoke \"load8_u\" (i32.const 65522)) (i32.const 16))\n(assert_return (invoke \"load8_u\" (i32.const 65523)) (i32.const 17))\n(assert_return (invoke \"load8_u\" (i32.const 65524)) (i32.const 18))\n(assert_return (invoke \"load8_u\" (i32.const 65525)) (i32.const 19))\n\n(module\n  (memory (export \"mem\") 1 1 )\n  (data (i32.const 65516) \"\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13\")\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(assert_trap (invoke \"run\" (i32.const 65506) (i32.const 65516) (i32.const 40))\n             \"out of bounds memory access\")\n\n(assert_return (invoke \"load8_u\" (i32.const 198)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 397)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 596)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 795)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 994)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1193)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1392)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1591)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1790)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1989)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2188)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2387)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2586)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2785)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2984)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3183)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3382)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3581)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3780)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3979)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4178)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4377)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4576)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4775)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4974)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5173)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5372)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5571)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5770)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5969)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6168)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6367)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6566)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6765)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6964)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7163)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7362)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7561)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7760)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7959)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8158)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8357)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8556)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8755)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8954)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9153)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9352)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9551)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9750)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9949)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10148)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10347)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10546)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10745)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10944)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11143)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11342)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11541)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11740)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11939)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12138)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12337)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12536)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12735)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12934)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13133)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13332)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13531)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13730)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13929)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14128)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14327)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14526)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14725)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14924)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15123)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15322)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15521)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15720)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15919)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16118)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16317)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16516)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16715)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16914)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17113)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17312)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17511)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17710)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17909)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18108)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18307)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18506)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18705)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18904)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19103)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19302)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19501)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19700)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19899)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20098)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20297)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20496)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20695)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20894)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21093)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21292)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21491)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21690)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21889)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22088)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22287)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22486)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22685)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22884)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23083)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23282)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23481)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23680)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23879)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24078)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24277)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24476)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24675)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24874)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25073)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25272)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25471)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25670)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25869)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26068)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26267)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26466)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26665)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26864)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27063)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27262)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27461)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27660)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27859)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28058)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28257)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28456)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28655)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28854)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29053)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29252)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29451)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29650)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29849)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30048)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30247)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30446)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30645)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30844)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31043)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31242)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31441)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31640)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31839)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32038)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32237)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32436)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32635)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32834)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33033)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33232)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33431)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33630)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33829)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34028)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34227)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34426)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34625)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34824)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35023)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35222)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35421)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35620)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35819)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36018)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36217)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36416)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36615)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36814)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37013)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37212)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37411)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37610)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37809)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38008)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38207)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38406)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38605)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38804)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39003)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39202)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39401)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39600)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39799)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39998)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40197)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40396)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40595)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40794)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40993)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41192)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41391)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41590)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41789)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41988)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42187)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42386)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42585)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42784)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42983)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43182)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43381)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43580)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43779)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43978)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44177)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44376)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44575)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44774)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44973)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45172)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45371)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45570)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45769)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45968)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46167)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46366)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46565)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46764)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46963)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47162)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47361)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47560)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47759)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47958)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48157)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48356)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48555)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48754)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48953)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49152)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49351)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49550)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49749)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49948)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50147)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50346)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50545)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50744)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50943)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51142)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51341)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51540)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51739)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51938)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52137)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52336)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52535)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52734)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52933)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53132)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53331)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53530)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53729)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53928)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54127)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54326)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54525)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54724)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54923)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55122)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55321)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55520)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55719)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55918)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56117)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56316)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56515)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56714)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56913)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57112)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57311)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57510)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57709)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57908)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58107)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58306)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58505)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58704)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58903)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59102)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59301)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59500)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59699)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59898)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60097)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60296)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60495)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60694)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60893)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61092)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61291)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61490)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61689)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61888)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62087)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62286)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62485)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62684)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62883)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63082)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63281)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63480)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63679)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63878)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64077)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64276)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64475)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64674)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64873)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65072)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65271)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65470)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65516)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65517)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 65518)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 65519)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 65520)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 65521)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 65522)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 65523)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 65524)) (i32.const 8))\n(assert_return (invoke \"load8_u\" (i32.const 65525)) (i32.const 9))\n(assert_return (invoke \"load8_u\" (i32.const 65526)) (i32.const 10))\n(assert_return (invoke \"load8_u\" (i32.const 65527)) (i32.const 11))\n(assert_return (invoke \"load8_u\" (i32.const 65528)) (i32.const 12))\n(assert_return (invoke \"load8_u\" (i32.const 65529)) (i32.const 13))\n(assert_return (invoke \"load8_u\" (i32.const 65530)) (i32.const 14))\n(assert_return (invoke \"load8_u\" (i32.const 65531)) (i32.const 15))\n(assert_return (invoke \"load8_u\" (i32.const 65532)) (i32.const 16))\n(assert_return (invoke \"load8_u\" (i32.const 65533)) (i32.const 17))\n(assert_return (invoke \"load8_u\" (i32.const 65534)) (i32.const 18))\n(assert_return (invoke \"load8_u\" (i32.const 65535)) (i32.const 19))\n\n(module\n  (memory (export \"mem\") 1 1 )\n  (data (i32.const 65516) \"\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13\")\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(assert_trap (invoke \"run\" (i32.const 65516) (i32.const 65516) (i32.const 40))\n             \"out of bounds memory access\")\n\n(assert_return (invoke \"load8_u\" (i32.const 198)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 397)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 596)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 795)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 994)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1193)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1392)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1591)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1790)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1989)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2188)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2387)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2586)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2785)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2984)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3183)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3382)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3581)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3780)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3979)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4178)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4377)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4576)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4775)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4974)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5173)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5372)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5571)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5770)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5969)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6168)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6367)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6566)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6765)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6964)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7163)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7362)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7561)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7760)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7959)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8158)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8357)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8556)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8755)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8954)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9153)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9352)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9551)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9750)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9949)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10148)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10347)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10546)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10745)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10944)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11143)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11342)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11541)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11740)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11939)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12138)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12337)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12536)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12735)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12934)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13133)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13332)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13531)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13730)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13929)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14128)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14327)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14526)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14725)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14924)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15123)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15322)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15521)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15720)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15919)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16118)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16317)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16516)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16715)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16914)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17113)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17312)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17511)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17710)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17909)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18108)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18307)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18506)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18705)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18904)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19103)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19302)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19501)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19700)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19899)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20098)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20297)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20496)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20695)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20894)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21093)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21292)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21491)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21690)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21889)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22088)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22287)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22486)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22685)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22884)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23083)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23282)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23481)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23680)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23879)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24078)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24277)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24476)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24675)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24874)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25073)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25272)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25471)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25670)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25869)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26068)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26267)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26466)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26665)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26864)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27063)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27262)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27461)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27660)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27859)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28058)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28257)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28456)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28655)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28854)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29053)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29252)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29451)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29650)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29849)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30048)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30247)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30446)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30645)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30844)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31043)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31242)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31441)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31640)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31839)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32038)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32237)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32436)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32635)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32834)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33033)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33232)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33431)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33630)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33829)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34028)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34227)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34426)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34625)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34824)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35023)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35222)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35421)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35620)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35819)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36018)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36217)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36416)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36615)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36814)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37013)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37212)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37411)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37610)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37809)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38008)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38207)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38406)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38605)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38804)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39003)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39202)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39401)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39600)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39799)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39998)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40197)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40396)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40595)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40794)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40993)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41192)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41391)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41590)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41789)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41988)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42187)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42386)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42585)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42784)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42983)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43182)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43381)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43580)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43779)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43978)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44177)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44376)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44575)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44774)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44973)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45172)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45371)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45570)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45769)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45968)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46167)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46366)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46565)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46764)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46963)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47162)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47361)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47560)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47759)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47958)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48157)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48356)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48555)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48754)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48953)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49152)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49351)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49550)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49749)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49948)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50147)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50346)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50545)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50744)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50943)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51142)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51341)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51540)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51739)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51938)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52137)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52336)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52535)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52734)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52933)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53132)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53331)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53530)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53729)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53928)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54127)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54326)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54525)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54724)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54923)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55122)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55321)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55520)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55719)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55918)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56117)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56316)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56515)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56714)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56913)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57112)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57311)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57510)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57709)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57908)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58107)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58306)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58505)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58704)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58903)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59102)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59301)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59500)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59699)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59898)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60097)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60296)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60495)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60694)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60893)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61092)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61291)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61490)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61689)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61888)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62087)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62286)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62485)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62684)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62883)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63082)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63281)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63480)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63679)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63878)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64077)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64276)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64475)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64674)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64873)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65072)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65271)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65470)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65516)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65517)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 65518)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 65519)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 65520)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 65521)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 65522)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 65523)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 65524)) (i32.const 8))\n(assert_return (invoke \"load8_u\" (i32.const 65525)) (i32.const 9))\n(assert_return (invoke \"load8_u\" (i32.const 65526)) (i32.const 10))\n(assert_return (invoke \"load8_u\" (i32.const 65527)) (i32.const 11))\n(assert_return (invoke \"load8_u\" (i32.const 65528)) (i32.const 12))\n(assert_return (invoke \"load8_u\" (i32.const 65529)) (i32.const 13))\n(assert_return (invoke \"load8_u\" (i32.const 65530)) (i32.const 14))\n(assert_return (invoke \"load8_u\" (i32.const 65531)) (i32.const 15))\n(assert_return (invoke \"load8_u\" (i32.const 65532)) (i32.const 16))\n(assert_return (invoke \"load8_u\" (i32.const 65533)) (i32.const 17))\n(assert_return (invoke \"load8_u\" (i32.const 65534)) (i32.const 18))\n(assert_return (invoke \"load8_u\" (i32.const 65535)) (i32.const 19))\n\n(module\n  (memory (export \"mem\") 1  )\n  (data (i32.const 65516) \"\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13\")\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(assert_trap (invoke \"run\" (i32.const 0) (i32.const 65516) (i32.const 4294963200))\n             \"out of bounds memory access\")\n\n(assert_return (invoke \"load8_u\" (i32.const 198)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 397)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 596)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 795)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 994)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1193)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1392)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1591)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1790)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1989)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2188)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2387)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2586)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2785)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2984)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3183)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3382)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3581)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3780)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3979)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4178)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4377)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4576)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4775)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4974)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5173)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5372)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5571)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5770)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5969)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6168)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6367)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6566)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6765)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6964)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7163)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7362)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7561)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7760)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7959)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8158)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8357)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8556)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8755)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8954)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9153)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9352)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9551)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9750)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9949)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10148)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10347)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10546)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10745)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10944)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11143)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11342)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11541)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11740)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11939)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12138)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12337)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12536)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12735)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12934)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13133)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13332)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13531)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13730)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13929)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14128)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14327)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14526)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14725)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14924)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15123)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15322)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15521)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15720)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15919)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16118)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16317)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16516)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16715)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16914)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17113)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17312)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17511)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17710)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17909)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18108)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18307)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18506)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18705)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18904)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19103)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19302)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19501)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19700)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19899)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20098)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20297)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20496)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20695)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20894)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21093)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21292)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21491)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21690)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21889)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22088)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22287)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22486)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22685)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22884)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23083)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23282)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23481)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23680)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23879)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24078)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24277)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24476)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24675)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24874)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25073)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25272)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25471)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25670)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25869)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26068)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26267)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26466)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26665)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26864)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27063)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27262)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27461)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27660)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27859)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28058)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28257)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28456)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28655)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28854)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29053)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29252)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29451)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29650)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29849)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30048)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30247)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30446)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30645)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30844)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31043)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31242)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31441)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31640)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31839)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32038)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32237)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32436)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32635)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32834)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33033)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33232)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33431)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33630)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33829)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34028)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34227)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34426)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34625)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34824)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35023)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35222)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35421)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35620)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35819)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36018)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36217)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36416)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36615)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36814)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37013)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37212)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37411)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37610)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37809)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38008)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38207)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38406)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38605)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38804)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39003)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39202)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39401)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39600)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39799)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39998)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40197)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40396)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40595)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40794)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40993)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41192)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41391)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41590)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41789)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41988)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42187)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42386)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42585)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42784)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42983)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43182)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43381)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43580)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43779)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43978)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44177)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44376)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44575)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44774)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44973)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45172)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45371)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45570)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45769)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45968)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46167)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46366)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46565)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46764)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46963)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47162)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47361)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47560)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47759)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47958)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48157)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48356)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48555)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48754)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48953)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49152)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49351)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49550)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49749)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49948)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50147)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50346)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50545)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50744)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50943)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51142)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51341)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51540)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51739)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51938)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52137)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52336)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52535)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52734)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52933)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53132)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53331)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53530)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53729)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53928)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54127)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54326)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54525)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54724)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54923)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55122)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55321)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55520)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55719)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55918)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56117)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56316)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56515)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56714)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56913)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57112)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57311)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57510)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57709)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57908)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58107)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58306)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58505)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58704)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58903)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59102)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59301)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59500)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59699)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59898)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60097)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60296)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60495)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60694)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60893)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61092)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61291)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61490)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61689)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61888)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62087)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62286)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62485)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62684)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62883)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63082)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63281)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63480)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63679)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63878)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64077)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64276)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64475)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64674)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64873)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65072)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65271)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65470)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65516)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65517)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 65518)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 65519)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 65520)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 65521)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 65522)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 65523)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 65524)) (i32.const 8))\n(assert_return (invoke \"load8_u\" (i32.const 65525)) (i32.const 9))\n(assert_return (invoke \"load8_u\" (i32.const 65526)) (i32.const 10))\n(assert_return (invoke \"load8_u\" (i32.const 65527)) (i32.const 11))\n(assert_return (invoke \"load8_u\" (i32.const 65528)) (i32.const 12))\n(assert_return (invoke \"load8_u\" (i32.const 65529)) (i32.const 13))\n(assert_return (invoke \"load8_u\" (i32.const 65530)) (i32.const 14))\n(assert_return (invoke \"load8_u\" (i32.const 65531)) (i32.const 15))\n(assert_return (invoke \"load8_u\" (i32.const 65532)) (i32.const 16))\n(assert_return (invoke \"load8_u\" (i32.const 65533)) (i32.const 17))\n(assert_return (invoke \"load8_u\" (i32.const 65534)) (i32.const 18))\n(assert_return (invoke \"load8_u\" (i32.const 65535)) (i32.const 19))\n\n(module\n  (memory (export \"mem\") 1 1 )\n  (data (i32.const 61440) \"\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\\10\\11\\12\\13\")\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(assert_trap (invoke \"run\" (i32.const 65516) (i32.const 61440) (i32.const 4294967040))\n             \"out of bounds memory access\")\n\n(assert_return (invoke \"load8_u\" (i32.const 198)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 397)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 596)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 795)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 994)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1193)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1392)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1591)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1790)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1989)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2188)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2387)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2586)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2785)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2984)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3183)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3382)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3581)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3780)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 3979)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4178)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4377)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4576)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4775)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 4974)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5173)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5372)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5571)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5770)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 5969)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6168)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6367)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6566)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6765)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 6964)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7163)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7362)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7561)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7760)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7959)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8158)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8357)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8556)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8755)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8954)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9153)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9352)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9551)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9750)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9949)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10148)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10347)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10546)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10745)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10944)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11143)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11342)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11541)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11740)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11939)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12138)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12337)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12536)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12735)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12934)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13133)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13332)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13531)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13730)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 13929)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14128)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14327)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14526)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14725)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14924)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15123)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15322)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15521)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15720)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 15919)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16118)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16317)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16516)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16715)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 16914)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17113)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17312)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17511)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17710)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 17909)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18108)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18307)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18506)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18705)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18904)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19103)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19302)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19501)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19700)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19899)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20098)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20297)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20496)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20695)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20894)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21093)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21292)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21491)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21690)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21889)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22088)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22287)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22486)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22685)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22884)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23083)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23282)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23481)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23680)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23879)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24078)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24277)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24476)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24675)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24874)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25073)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25272)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25471)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25670)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25869)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26068)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26267)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26466)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26665)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26864)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27063)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27262)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27461)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27660)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27859)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28058)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28257)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28456)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28655)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28854)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29053)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29252)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29451)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29650)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29849)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30048)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30247)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30446)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30645)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 30844)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31043)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31242)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31441)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31640)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 31839)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32038)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32237)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32436)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32635)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 32834)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33033)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33232)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33431)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33630)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 33829)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34028)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34227)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34426)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34625)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 34824)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35023)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35222)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35421)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35620)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 35819)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36018)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36217)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36416)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36615)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 36814)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37013)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37212)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37411)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37610)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 37809)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38008)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38207)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38406)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38605)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 38804)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39003)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39202)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39401)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39600)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39799)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 39998)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40197)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40396)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40595)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40794)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 40993)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41192)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41391)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41590)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41789)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 41988)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42187)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42386)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42585)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42784)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 42983)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43182)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43381)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43580)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43779)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 43978)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44177)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44376)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44575)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44774)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 44973)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45172)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45371)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45570)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45769)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 45968)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46167)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46366)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46565)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46764)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 46963)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47162)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47361)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47560)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47759)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 47958)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48157)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48356)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48555)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48754)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 48953)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49152)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49351)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49550)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49749)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 49948)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50147)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50346)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50545)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50744)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 50943)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51142)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51341)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51540)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51739)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 51938)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52137)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52336)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52535)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52734)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 52933)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53132)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53331)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53530)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53729)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 53928)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54127)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54326)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54525)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54724)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 54923)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55122)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55321)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55520)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55719)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 55918)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56117)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56316)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56515)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56714)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 56913)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57112)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57311)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57510)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57709)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 57908)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58107)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58306)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58505)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58704)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 58903)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59102)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59301)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59500)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59699)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 59898)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60097)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60296)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60495)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60694)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 60893)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61092)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61291)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61440)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61441)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 61442)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 61443)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 61444)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 61445)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 61446)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 61447)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 61448)) (i32.const 8))\n(assert_return (invoke \"load8_u\" (i32.const 61449)) (i32.const 9))\n(assert_return (invoke \"load8_u\" (i32.const 61450)) (i32.const 10))\n(assert_return (invoke \"load8_u\" (i32.const 61451)) (i32.const 11))\n(assert_return (invoke \"load8_u\" (i32.const 61452)) (i32.const 12))\n(assert_return (invoke \"load8_u\" (i32.const 61453)) (i32.const 13))\n(assert_return (invoke \"load8_u\" (i32.const 61454)) (i32.const 14))\n(assert_return (invoke \"load8_u\" (i32.const 61455)) (i32.const 15))\n(assert_return (invoke \"load8_u\" (i32.const 61456)) (i32.const 16))\n(assert_return (invoke \"load8_u\" (i32.const 61457)) (i32.const 17))\n(assert_return (invoke \"load8_u\" (i32.const 61458)) (i32.const 18))\n(assert_return (invoke \"load8_u\" (i32.const 61459)) (i32.const 19))\n(assert_return (invoke \"load8_u\" (i32.const 61510)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61709)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 61908)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62107)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62306)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62505)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62704)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 62903)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63102)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63301)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63500)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63699)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 63898)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64097)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64296)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64495)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64694)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 64893)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65092)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65291)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 65490)) (i32.const 0))\n\n(assert_invalid\n  (module\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (i32.const 20) (i32.const 30))))\n  \"unknown memory 0\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (i32.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (i32.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (i32.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (f32.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (f32.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (f32.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (f32.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (i64.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (i64.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (i64.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (i64.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (f64.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (f64.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (f64.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (f64.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f32.const 10) (i32.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f32.const 10) (i32.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f32.const 10) (i32.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f32.const 10) (i32.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f32.const 10) (f32.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f32.const 10) (f32.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f32.const 10) (f32.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f32.const 10) (f32.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f32.const 10) (i64.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f32.const 10) (i64.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f32.const 10) (i64.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f32.const 10) (i64.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f32.const 10) (f64.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f32.const 10) (f64.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f32.const 10) (f64.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f32.const 10) (f64.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i64.const 10) (i32.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i64.const 10) (i32.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i64.const 10) (i32.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i64.const 10) (i32.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i64.const 10) (f32.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i64.const 10) (f32.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i64.const 10) (f32.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i64.const 10) (f32.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i64.const 10) (i64.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i64.const 10) (i64.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i64.const 10) (i64.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i64.const 10) (i64.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i64.const 10) (f64.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i64.const 10) (f64.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i64.const 10) (f64.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (i64.const 10) (f64.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f64.const 10) (i32.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f64.const 10) (i32.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f64.const 10) (i32.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f64.const 10) (i32.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f64.const 10) (f32.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f64.const 10) (f32.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f64.const 10) (f32.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f64.const 10) (f32.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f64.const 10) (i64.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f64.const 10) (i64.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f64.const 10) (i64.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f64.const 10) (i64.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f64.const 10) (f64.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f64.const 10) (f64.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f64.const 10) (f64.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (f64.const 10) (f64.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n\n(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.fill (i32.const 10) (i32.const 0x55) (i32.const 10))\n    (memory.copy (i32.const 9) (i32.const 10) (i32.const 5)))\n  \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n)\n(invoke \"test\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 9) (i32.const 0))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 9) (i32.const 20) (i32.const 85))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 20) (i32.const 65536) (i32.const 0))\n               (i32.const -1))\n\n(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.fill (i32.const 10) (i32.const 0x55) (i32.const 10))\n    (memory.copy (i32.const 16) (i32.const 15) (i32.const 5)))\n  \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n)\n(invoke \"test\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 10) (i32.const 0))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 10) (i32.const 21) (i32.const 85))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 21) (i32.const 65536) (i32.const 0))\n               (i32.const -1))\n\n(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0xFF00) (i32.const 0x8000) (i32.const 257))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0xFFFFFF00) (i32.const 0x4000) (i32.const 257))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0x8000) (i32.const 0xFF00) (i32.const 257))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(module\n (memory 1 1)\n (func (export \"test\")\n   (memory.copy (i32.const 0x4000) (i32.const 0xFFFFFF00) (i32.const 257))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.fill (i32.const 0x0000) (i32.const 0x55) (i32.const 0x8000))\n    (memory.fill (i32.const 0x8000) (i32.const 0xAA) (i32.const 0x8000))\n    (memory.copy (i32.const 0x9000) (i32.const 0x7000) (i32.const 0)))\n  \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n)\n(invoke \"test\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 32768) (i32.const 85))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 32768) (i32.const 65536) (i32.const 170))\n               (i32.const -1))\n(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0x10000) (i32.const 0x7000) (i32.const 0))))\n(invoke \"test\")\n\n(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0x20000) (i32.const 0x7000) (i32.const 0))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0x9000) (i32.const 0x10000) (i32.const 0))))\n(invoke \"test\")\n\n(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0x9000) (i32.const 0x20000) (i32.const 0))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0x10000) (i32.const 0x10000) (i32.const 0))))\n(invoke \"test\")\n\n(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0x20000) (i32.const 0x20000) (i32.const 0))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.fill (i32.const 17767) (i32.const 1) (i32.const 1344))\n    (memory.fill (i32.const 39017) (i32.const 2) (i32.const 1055))\n    (memory.fill (i32.const 56401) (i32.const 3) (i32.const 988))\n    (memory.fill (i32.const 37962) (i32.const 4) (i32.const 322))\n    (memory.fill (i32.const 7977) (i32.const 5) (i32.const 1994))\n    (memory.fill (i32.const 22714) (i32.const 6) (i32.const 3036))\n    (memory.fill (i32.const 16882) (i32.const 7) (i32.const 2372))\n    (memory.fill (i32.const 43491) (i32.const 8) (i32.const 835))\n    (memory.fill (i32.const 124) (i32.const 9) (i32.const 1393))\n    (memory.fill (i32.const 2132) (i32.const 10) (i32.const 2758))\n    (memory.fill (i32.const 8987) (i32.const 11) (i32.const 3098))\n    (memory.fill (i32.const 52711) (i32.const 12) (i32.const 741))\n    (memory.fill (i32.const 3958) (i32.const 13) (i32.const 2823))\n    (memory.fill (i32.const 49715) (i32.const 14) (i32.const 1280))\n    (memory.fill (i32.const 50377) (i32.const 15) (i32.const 1466))\n    (memory.fill (i32.const 20493) (i32.const 16) (i32.const 3158))\n    (memory.fill (i32.const 47665) (i32.const 17) (i32.const 544))\n    (memory.fill (i32.const 12451) (i32.const 18) (i32.const 2669))\n    (memory.fill (i32.const 24869) (i32.const 19) (i32.const 2651))\n    (memory.fill (i32.const 45317) (i32.const 20) (i32.const 1570))\n    (memory.fill (i32.const 43096) (i32.const 21) (i32.const 1691))\n    (memory.fill (i32.const 33886) (i32.const 22) (i32.const 646))\n    (memory.fill (i32.const 48555) (i32.const 23) (i32.const 1858))\n    (memory.fill (i32.const 53453) (i32.const 24) (i32.const 2657))\n    (memory.fill (i32.const 30363) (i32.const 25) (i32.const 981))\n    (memory.fill (i32.const 9300) (i32.const 26) (i32.const 1807))\n    (memory.fill (i32.const 50190) (i32.const 27) (i32.const 487))\n    (memory.fill (i32.const 62753) (i32.const 28) (i32.const 530))\n    (memory.fill (i32.const 36316) (i32.const 29) (i32.const 943))\n    (memory.fill (i32.const 6768) (i32.const 30) (i32.const 381))\n    (memory.fill (i32.const 51262) (i32.const 31) (i32.const 3089))\n    (memory.fill (i32.const 49729) (i32.const 32) (i32.const 658))\n    (memory.fill (i32.const 44540) (i32.const 33) (i32.const 1702))\n    (memory.fill (i32.const 33342) (i32.const 34) (i32.const 1092))\n    (memory.fill (i32.const 50814) (i32.const 35) (i32.const 1410))\n    (memory.fill (i32.const 47594) (i32.const 36) (i32.const 2204))\n    (memory.fill (i32.const 54123) (i32.const 37) (i32.const 2394))\n    (memory.fill (i32.const 55183) (i32.const 38) (i32.const 250))\n    (memory.fill (i32.const 22620) (i32.const 39) (i32.const 2097))\n    (memory.fill (i32.const 17132) (i32.const 40) (i32.const 3264))\n    (memory.fill (i32.const 54331) (i32.const 41) (i32.const 3299))\n    (memory.fill (i32.const 39474) (i32.const 42) (i32.const 2796))\n    (memory.fill (i32.const 36156) (i32.const 43) (i32.const 2070))\n    (memory.fill (i32.const 35308) (i32.const 44) (i32.const 2763))\n    (memory.fill (i32.const 32731) (i32.const 45) (i32.const 312))\n    (memory.fill (i32.const 63746) (i32.const 46) (i32.const 192))\n    (memory.fill (i32.const 30974) (i32.const 47) (i32.const 596))\n    (memory.fill (i32.const 16635) (i32.const 48) (i32.const 501))\n    (memory.fill (i32.const 57002) (i32.const 49) (i32.const 686))\n    (memory.fill (i32.const 34299) (i32.const 50) (i32.const 385))\n    (memory.fill (i32.const 60881) (i32.const 51) (i32.const 903))\n    (memory.fill (i32.const 61445) (i32.const 52) (i32.const 2390))\n    (memory.fill (i32.const 46972) (i32.const 53) (i32.const 1441))\n    (memory.fill (i32.const 25973) (i32.const 54) (i32.const 3162))\n    (memory.fill (i32.const 5566) (i32.const 55) (i32.const 2135))\n    (memory.fill (i32.const 35977) (i32.const 56) (i32.const 519))\n    (memory.fill (i32.const 44892) (i32.const 57) (i32.const 3280))\n    (memory.fill (i32.const 46760) (i32.const 58) (i32.const 1678))\n    (memory.fill (i32.const 46607) (i32.const 59) (i32.const 3168))\n    (memory.fill (i32.const 22449) (i32.const 60) (i32.const 1441))\n    (memory.fill (i32.const 58609) (i32.const 61) (i32.const 663))\n    (memory.fill (i32.const 32261) (i32.const 62) (i32.const 1671))\n    (memory.fill (i32.const 3063) (i32.const 63) (i32.const 721))\n    (memory.fill (i32.const 34025) (i32.const 64) (i32.const 84))\n    (memory.fill (i32.const 33338) (i32.const 65) (i32.const 2029))\n    (memory.fill (i32.const 36810) (i32.const 66) (i32.const 29))\n    (memory.fill (i32.const 19147) (i32.const 67) (i32.const 3034))\n    (memory.fill (i32.const 12616) (i32.const 68) (i32.const 1043))\n    (memory.fill (i32.const 18276) (i32.const 69) (i32.const 3324))\n    (memory.fill (i32.const 4639) (i32.const 70) (i32.const 1091))\n    (memory.fill (i32.const 16158) (i32.const 71) (i32.const 1997))\n    (memory.fill (i32.const 18204) (i32.const 72) (i32.const 2259))\n    (memory.fill (i32.const 50532) (i32.const 73) (i32.const 3189))\n    (memory.fill (i32.const 11028) (i32.const 74) (i32.const 1968))\n    (memory.fill (i32.const 15962) (i32.const 75) (i32.const 1455))\n    (memory.fill (i32.const 45406) (i32.const 76) (i32.const 1177))\n    (memory.fill (i32.const 54137) (i32.const 77) (i32.const 1568))\n    (memory.fill (i32.const 33083) (i32.const 78) (i32.const 1642))\n    (memory.fill (i32.const 61028) (i32.const 79) (i32.const 3284))\n    (memory.fill (i32.const 51729) (i32.const 80) (i32.const 223))\n    (memory.fill (i32.const 4361) (i32.const 81) (i32.const 2171))\n    (memory.fill (i32.const 57514) (i32.const 82) (i32.const 1322))\n    (memory.fill (i32.const 55724) (i32.const 83) (i32.const 2648))\n    (memory.fill (i32.const 24091) (i32.const 84) (i32.const 1045))\n    (memory.fill (i32.const 43183) (i32.const 85) (i32.const 3097))\n    (memory.fill (i32.const 32307) (i32.const 86) (i32.const 2796))\n    (memory.fill (i32.const 3811) (i32.const 87) (i32.const 2010))\n    (memory.fill (i32.const 54856) (i32.const 88) (i32.const 0))\n    (memory.fill (i32.const 49941) (i32.const 89) (i32.const 2069))\n    (memory.fill (i32.const 20411) (i32.const 90) (i32.const 2896))\n    (memory.fill (i32.const 33826) (i32.const 91) (i32.const 192))\n    (memory.fill (i32.const 9402) (i32.const 92) (i32.const 2195))\n    (memory.fill (i32.const 12413) (i32.const 93) (i32.const 24))\n    (memory.fill (i32.const 14091) (i32.const 94) (i32.const 577))\n    (memory.fill (i32.const 44058) (i32.const 95) (i32.const 2089))\n    (memory.fill (i32.const 36735) (i32.const 96) (i32.const 3436))\n    (memory.fill (i32.const 23288) (i32.const 97) (i32.const 2765))\n    (memory.fill (i32.const 6392) (i32.const 98) (i32.const 830))\n    (memory.fill (i32.const 33307) (i32.const 99) (i32.const 1938))\n    (memory.fill (i32.const 21941) (i32.const 100) (i32.const 2750))\n    (memory.copy (i32.const 59214) (i32.const 54248) (i32.const 2098))\n    (memory.copy (i32.const 63026) (i32.const 39224) (i32.const 230))\n    (memory.copy (i32.const 51833) (i32.const 23629) (i32.const 2300))\n    (memory.copy (i32.const 6708) (i32.const 23996) (i32.const 639))\n    (memory.copy (i32.const 6990) (i32.const 33399) (i32.const 1097))\n    (memory.copy (i32.const 19403) (i32.const 10348) (i32.const 3197))\n    (memory.copy (i32.const 27308) (i32.const 54406) (i32.const 100))\n    (memory.copy (i32.const 27221) (i32.const 43682) (i32.const 1717))\n    (memory.copy (i32.const 60528) (i32.const 8629) (i32.const 119))\n    (memory.copy (i32.const 5947) (i32.const 2308) (i32.const 658))\n    (memory.copy (i32.const 4787) (i32.const 51631) (i32.const 2269))\n    (memory.copy (i32.const 12617) (i32.const 19197) (i32.const 833))\n    (memory.copy (i32.const 11854) (i32.const 46505) (i32.const 3300))\n    (memory.copy (i32.const 11376) (i32.const 45012) (i32.const 2281))\n    (memory.copy (i32.const 34186) (i32.const 6697) (i32.const 2572))\n    (memory.copy (i32.const 4936) (i32.const 1690) (i32.const 1328))\n    (memory.copy (i32.const 63164) (i32.const 7637) (i32.const 1670))\n    (memory.copy (i32.const 44568) (i32.const 18344) (i32.const 33))\n    (memory.copy (i32.const 43918) (i32.const 22348) (i32.const 1427))\n    (memory.copy (i32.const 46637) (i32.const 49819) (i32.const 1434))\n    (memory.copy (i32.const 63684) (i32.const 8755) (i32.const 834))\n    (memory.copy (i32.const 33485) (i32.const 20131) (i32.const 3317))\n    (memory.copy (i32.const 40575) (i32.const 54317) (i32.const 3201))\n    (memory.copy (i32.const 25812) (i32.const 59254) (i32.const 2452))\n    (memory.copy (i32.const 19678) (i32.const 56882) (i32.const 346))\n    (memory.copy (i32.const 15852) (i32.const 35914) (i32.const 2430))\n    (memory.copy (i32.const 11824) (i32.const 35574) (i32.const 300))\n    (memory.copy (i32.const 59427) (i32.const 13957) (i32.const 3153))\n    (memory.copy (i32.const 34299) (i32.const 60594) (i32.const 1281))\n    (memory.copy (i32.const 8964) (i32.const 12276) (i32.const 943))\n    (memory.copy (i32.const 2827) (i32.const 10425) (i32.const 1887))\n    (memory.copy (i32.const 43194) (i32.const 43910) (i32.const 738))\n    (memory.copy (i32.const 63038) (i32.const 18949) (i32.const 122))\n    (memory.copy (i32.const 24044) (i32.const 44761) (i32.const 1755))\n    (memory.copy (i32.const 22608) (i32.const 14755) (i32.const 702))\n    (memory.copy (i32.const 11284) (i32.const 26579) (i32.const 1830))\n    (memory.copy (i32.const 23092) (i32.const 20471) (i32.const 1064))\n    (memory.copy (i32.const 57248) (i32.const 54770) (i32.const 2631))\n    (memory.copy (i32.const 25492) (i32.const 1025) (i32.const 3113))\n    (memory.copy (i32.const 49588) (i32.const 44220) (i32.const 975))\n    (memory.copy (i32.const 28280) (i32.const 41722) (i32.const 2336))\n    (memory.copy (i32.const 61289) (i32.const 230) (i32.const 2872))\n    (memory.copy (i32.const 22480) (i32.const 52506) (i32.const 2197))\n    (memory.copy (i32.const 40553) (i32.const 9578) (i32.const 1958))\n    (memory.copy (i32.const 29004) (i32.const 20862) (i32.const 2186))\n    (memory.copy (i32.const 53029) (i32.const 43955) (i32.const 1037))\n    (memory.copy (i32.const 25476) (i32.const 35667) (i32.const 1650))\n    (memory.copy (i32.const 58516) (i32.const 45819) (i32.const 1986))\n    (memory.copy (i32.const 38297) (i32.const 5776) (i32.const 1955))\n    (memory.copy (i32.const 28503) (i32.const 55364) (i32.const 2368))\n    (memory.copy (i32.const 62619) (i32.const 18108) (i32.const 1356))\n    (memory.copy (i32.const 50149) (i32.const 13861) (i32.const 382))\n    (memory.copy (i32.const 16904) (i32.const 36341) (i32.const 1900))\n    (memory.copy (i32.const 48098) (i32.const 11358) (i32.const 2807))\n    (memory.copy (i32.const 28512) (i32.const 40362) (i32.const 323))\n    (memory.copy (i32.const 35506) (i32.const 27856) (i32.const 1670))\n    (memory.copy (i32.const 62970) (i32.const 53332) (i32.const 1341))\n    (memory.copy (i32.const 14133) (i32.const 46312) (i32.const 644))\n    (memory.copy (i32.const 29030) (i32.const 19074) (i32.const 496))\n    (memory.copy (i32.const 44952) (i32.const 47577) (i32.const 2784))\n    (memory.copy (i32.const 39559) (i32.const 44661) (i32.const 1350))\n    (memory.copy (i32.const 10352) (i32.const 29274) (i32.const 1475))\n    (memory.copy (i32.const 46911) (i32.const 46178) (i32.const 1467))\n    (memory.copy (i32.const 4905) (i32.const 28740) (i32.const 1895))\n    (memory.copy (i32.const 38012) (i32.const 57253) (i32.const 1751))\n    (memory.copy (i32.const 26446) (i32.const 27223) (i32.const 1127))\n    (memory.copy (i32.const 58835) (i32.const 24657) (i32.const 1063))\n    (memory.copy (i32.const 61356) (i32.const 38790) (i32.const 766))\n    (memory.copy (i32.const 44160) (i32.const 2284) (i32.const 1520))\n    (memory.copy (i32.const 32740) (i32.const 47237) (i32.const 3014))\n    (memory.copy (i32.const 11148) (i32.const 21260) (i32.const 1011))\n    (memory.copy (i32.const 7665) (i32.const 31612) (i32.const 3034))\n    (memory.copy (i32.const 18044) (i32.const 12987) (i32.const 3320))\n    (memory.copy (i32.const 57306) (i32.const 55905) (i32.const 308))\n    (memory.copy (i32.const 24675) (i32.const 16815) (i32.const 1155))\n    (memory.copy (i32.const 19900) (i32.const 10115) (i32.const 722))\n    (memory.copy (i32.const 2921) (i32.const 5935) (i32.const 2370))\n    (memory.copy (i32.const 32255) (i32.const 50095) (i32.const 2926))\n    (memory.copy (i32.const 15126) (i32.const 17299) (i32.const 2607))\n    (memory.copy (i32.const 45575) (i32.const 28447) (i32.const 2045))\n    (memory.copy (i32.const 55149) (i32.const 36113) (i32.const 2596))\n    (memory.copy (i32.const 28461) (i32.const 54157) (i32.const 1168))\n    (memory.copy (i32.const 47951) (i32.const 53385) (i32.const 3137))\n    (memory.copy (i32.const 30646) (i32.const 45155) (i32.const 2649))\n    (memory.copy (i32.const 5057) (i32.const 4295) (i32.const 52))\n    (memory.copy (i32.const 6692) (i32.const 24195) (i32.const 441))\n    (memory.copy (i32.const 32984) (i32.const 27117) (i32.const 3445))\n    (memory.copy (i32.const 32530) (i32.const 59372) (i32.const 2785))\n    (memory.copy (i32.const 34361) (i32.const 8962) (i32.const 2406))\n    (memory.copy (i32.const 17893) (i32.const 54538) (i32.const 3381))\n    (memory.copy (i32.const 22685) (i32.const 44151) (i32.const 136))\n    (memory.copy (i32.const 59089) (i32.const 7077) (i32.const 1045))\n    (memory.copy (i32.const 42945) (i32.const 55028) (i32.const 2389))\n    (memory.copy (i32.const 44693) (i32.const 20138) (i32.const 877))\n    (memory.copy (i32.const 36810) (i32.const 25196) (i32.const 3447))\n    (memory.copy (i32.const 45742) (i32.const 31888) (i32.const 854))\n    (memory.copy (i32.const 24236) (i32.const 31866) (i32.const 1377))\n    (memory.copy (i32.const 33778) (i32.const 692) (i32.const 1594))\n    (memory.copy (i32.const 60618) (i32.const 18585) (i32.const 2987))\n    (memory.copy (i32.const 50370) (i32.const 41271) (i32.const 1406))\n  )\n  \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n)\n(invoke \"test\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 124) (i32.const 0))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 124) (i32.const 1517) (i32.const 9))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 1517) (i32.const 2132) (i32.const 0))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 2132) (i32.const 2827) (i32.const 10))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 2827) (i32.const 2921) (i32.const 92))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 2921) (i32.const 3538) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 3538) (i32.const 3786) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 3786) (i32.const 4042) (i32.const 97))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 4042) (i32.const 4651) (i32.const 99))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 4651) (i32.const 5057) (i32.const 0))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 5057) (i32.const 5109) (i32.const 99))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 5109) (i32.const 5291) (i32.const 0))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 5291) (i32.const 5524) (i32.const 72))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 5524) (i32.const 5691) (i32.const 92))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 5691) (i32.const 6552) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 6552) (i32.const 7133) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 7133) (i32.const 7665) (i32.const 99))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 7665) (i32.const 8314) (i32.const 0))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 8314) (i32.const 8360) (i32.const 62))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 8360) (i32.const 8793) (i32.const 86))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 8793) (i32.const 8979) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 8979) (i32.const 9373) (i32.const 79))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 9373) (i32.const 9518) (i32.const 95))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 9518) (i32.const 9934) (i32.const 59))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 9934) (i32.const 10087) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 10087) (i32.const 10206) (i32.const 5))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 10206) (i32.const 10230) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 10230) (i32.const 10249) (i32.const 41))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 10249) (i32.const 11148) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 11148) (i32.const 11356) (i32.const 74))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 11356) (i32.const 11380) (i32.const 93))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 11380) (i32.const 11939) (i32.const 74))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 11939) (i32.const 12159) (i32.const 68))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 12159) (i32.const 12575) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 12575) (i32.const 12969) (i32.const 79))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 12969) (i32.const 13114) (i32.const 95))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 13114) (i32.const 14133) (i32.const 59))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 14133) (i32.const 14404) (i32.const 76))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 14404) (i32.const 14428) (i32.const 57))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 14428) (i32.const 14458) (i32.const 59))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 14458) (i32.const 14580) (i32.const 32))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 14580) (i32.const 14777) (i32.const 89))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 14777) (i32.const 15124) (i32.const 59))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 15124) (i32.const 15126) (i32.const 36))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 15126) (i32.const 15192) (i32.const 100))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 15192) (i32.const 15871) (i32.const 96))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 15871) (i32.const 15998) (i32.const 95))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 15998) (i32.const 17017) (i32.const 59))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 17017) (i32.const 17288) (i32.const 76))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 17288) (i32.const 17312) (i32.const 57))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 17312) (i32.const 17342) (i32.const 59))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 17342) (i32.const 17464) (i32.const 32))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 17464) (i32.const 17661) (i32.const 89))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 17661) (i32.const 17727) (i32.const 59))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 17727) (i32.const 17733) (i32.const 5))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 17733) (i32.const 17893) (i32.const 96))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 17893) (i32.const 18553) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 18553) (i32.const 18744) (i32.const 42))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 18744) (i32.const 18801) (i32.const 76))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 18801) (i32.const 18825) (i32.const 57))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 18825) (i32.const 18876) (i32.const 59))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 18876) (i32.const 18885) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 18885) (i32.const 18904) (i32.const 41))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 18904) (i32.const 19567) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 19567) (i32.const 20403) (i32.const 96))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 20403) (i32.const 21274) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 21274) (i32.const 21364) (i32.const 100))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 21364) (i32.const 21468) (i32.const 74))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 21468) (i32.const 21492) (i32.const 93))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 21492) (i32.const 22051) (i32.const 74))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 22051) (i32.const 22480) (i32.const 68))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 22480) (i32.const 22685) (i32.const 100))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 22685) (i32.const 22694) (i32.const 68))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 22694) (i32.const 22821) (i32.const 10))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 22821) (i32.const 22869) (i32.const 100))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 22869) (i32.const 24107) (i32.const 97))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 24107) (i32.const 24111) (i32.const 37))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 24111) (i32.const 24236) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 24236) (i32.const 24348) (i32.const 72))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 24348) (i32.const 24515) (i32.const 92))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 24515) (i32.const 24900) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 24900) (i32.const 25136) (i32.const 95))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 25136) (i32.const 25182) (i32.const 85))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 25182) (i32.const 25426) (i32.const 68))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 25426) (i32.const 25613) (i32.const 89))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 25613) (i32.const 25830) (i32.const 96))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 25830) (i32.const 26446) (i32.const 100))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 26446) (i32.const 26517) (i32.const 10))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 26517) (i32.const 27468) (i32.const 92))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 27468) (i32.const 27503) (i32.const 95))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 27503) (i32.const 27573) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 27573) (i32.const 28245) (i32.const 92))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 28245) (i32.const 28280) (i32.const 95))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 28280) (i32.const 29502) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 29502) (i32.const 29629) (i32.const 42))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 29629) (i32.const 30387) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 30387) (i32.const 30646) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 30646) (i32.const 31066) (i32.const 92))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 31066) (i32.const 31131) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 31131) (i32.const 31322) (i32.const 42))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 31322) (i32.const 31379) (i32.const 76))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 31379) (i32.const 31403) (i32.const 57))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 31403) (i32.const 31454) (i32.const 59))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 31454) (i32.const 31463) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 31463) (i32.const 31482) (i32.const 41))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 31482) (i32.const 31649) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 31649) (i32.const 31978) (i32.const 72))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 31978) (i32.const 32145) (i32.const 92))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 32145) (i32.const 32530) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 32530) (i32.const 32766) (i32.const 95))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 32766) (i32.const 32812) (i32.const 85))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 32812) (i32.const 33056) (i32.const 68))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 33056) (i32.const 33660) (i32.const 89))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 33660) (i32.const 33752) (i32.const 59))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 33752) (i32.const 33775) (i32.const 36))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 33775) (i32.const 33778) (i32.const 32))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 33778) (i32.const 34603) (i32.const 9))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 34603) (i32.const 35218) (i32.const 0))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 35218) (i32.const 35372) (i32.const 10))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 35372) (i32.const 35486) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 35486) (i32.const 35605) (i32.const 5))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 35605) (i32.const 35629) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 35629) (i32.const 35648) (i32.const 41))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 35648) (i32.const 36547) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 36547) (i32.const 36755) (i32.const 74))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 36755) (i32.const 36767) (i32.const 93))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 36767) (i32.const 36810) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 36810) (i32.const 36839) (i32.const 100))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 36839) (i32.const 37444) (i32.const 96))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 37444) (i32.const 38060) (i32.const 100))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 38060) (i32.const 38131) (i32.const 10))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 38131) (i32.const 39082) (i32.const 92))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 39082) (i32.const 39117) (i32.const 95))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 39117) (i32.const 39187) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 39187) (i32.const 39859) (i32.const 92))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 39859) (i32.const 39894) (i32.const 95))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 39894) (i32.const 40257) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 40257) (i32.const 40344) (i32.const 89))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 40344) (i32.const 40371) (i32.const 59))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 40371) (i32.const 40804) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 40804) (i32.const 40909) (i32.const 5))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 40909) (i32.const 42259) (i32.const 92))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 42259) (i32.const 42511) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 42511) (i32.const 42945) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 42945) (i32.const 43115) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 43115) (i32.const 43306) (i32.const 42))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 43306) (i32.const 43363) (i32.const 76))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 43363) (i32.const 43387) (i32.const 57))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 43387) (i32.const 43438) (i32.const 59))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 43438) (i32.const 43447) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 43447) (i32.const 43466) (i32.const 41))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 43466) (i32.const 44129) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 44129) (i32.const 44958) (i32.const 96))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 44958) (i32.const 45570) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 45570) (i32.const 45575) (i32.const 92))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 45575) (i32.const 45640) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 45640) (i32.const 45742) (i32.const 42))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 45742) (i32.const 45832) (i32.const 72))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 45832) (i32.const 45999) (i32.const 92))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 45999) (i32.const 46384) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 46384) (i32.const 46596) (i32.const 95))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 46596) (i32.const 46654) (i32.const 92))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 46654) (i32.const 47515) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 47515) (i32.const 47620) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 47620) (i32.const 47817) (i32.const 79))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 47817) (i32.const 47951) (i32.const 95))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 47951) (i32.const 48632) (i32.const 100))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 48632) (i32.const 48699) (i32.const 97))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 48699) (i32.const 48703) (i32.const 37))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 48703) (i32.const 49764) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 49764) (i32.const 49955) (i32.const 42))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 49955) (i32.const 50012) (i32.const 76))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 50012) (i32.const 50036) (i32.const 57))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 50036) (i32.const 50087) (i32.const 59))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 50087) (i32.const 50096) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 50096) (i32.const 50115) (i32.const 41))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 50115) (i32.const 50370) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 50370) (i32.const 51358) (i32.const 92))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 51358) (i32.const 51610) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 51610) (i32.const 51776) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 51776) (i32.const 51833) (i32.const 89))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 51833) (i32.const 52895) (i32.const 100))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 52895) (i32.const 53029) (i32.const 97))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 53029) (i32.const 53244) (i32.const 68))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 53244) (i32.const 54066) (i32.const 100))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 54066) (i32.const 54133) (i32.const 97))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 54133) (i32.const 54137) (i32.const 37))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 54137) (i32.const 55198) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 55198) (i32.const 55389) (i32.const 42))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 55389) (i32.const 55446) (i32.const 76))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 55446) (i32.const 55470) (i32.const 57))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 55470) (i32.const 55521) (i32.const 59))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 55521) (i32.const 55530) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 55530) (i32.const 55549) (i32.const 41))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 55549) (i32.const 56212) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 56212) (i32.const 57048) (i32.const 96))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 57048) (i32.const 58183) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 58183) (i32.const 58202) (i32.const 41))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 58202) (i32.const 58516) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 58516) (i32.const 58835) (i32.const 95))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 58835) (i32.const 58855) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 58855) (i32.const 59089) (i32.const 95))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 59089) (i32.const 59145) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 59145) (i32.const 59677) (i32.const 99))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 59677) (i32.const 60134) (i32.const 0))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 60134) (i32.const 60502) (i32.const 89))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 60502) (i32.const 60594) (i32.const 59))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 60594) (i32.const 60617) (i32.const 36))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 60617) (i32.const 60618) (i32.const 32))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 60618) (i32.const 60777) (i32.const 42))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 60777) (i32.const 60834) (i32.const 76))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 60834) (i32.const 60858) (i32.const 57))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 60858) (i32.const 60909) (i32.const 59))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 60909) (i32.const 60918) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 60918) (i32.const 60937) (i32.const 41))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 60937) (i32.const 61600) (i32.const 83))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 61600) (i32.const 62436) (i32.const 96))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 62436) (i32.const 63307) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 63307) (i32.const 63397) (i32.const 100))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 63397) (i32.const 63501) (i32.const 74))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 63501) (i32.const 63525) (i32.const 93))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 63525) (i32.const 63605) (i32.const 74))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 63605) (i32.const 63704) (i32.const 100))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 63704) (i32.const 63771) (i32.const 97))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 63771) (i32.const 63775) (i32.const 37))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 63775) (i32.const 64311) (i32.const 77))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 64311) (i32.const 64331) (i32.const 26))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 64331) (i32.const 64518) (i32.const 92))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 64518) (i32.const 64827) (i32.const 11))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 64827) (i32.const 64834) (i32.const 26))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 64834) (i32.const 65536) (i32.const 0))\n               (i32.const -1))\n"
  },
  {
    "path": "test/core/memory_fill.wast",
    "content": ";;\n;; Generated by ../meta/generate_memory_fill.js\n;; DO NOT EDIT THIS FILE.  CHANGE THE SOURCE AND REGENERATE.\n;;\n\n(module\n  (memory 1 1)\n  \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"test\")\n    (memory.fill (i32.const 0xFF00) (i32.const 0x55) (i32.const 256))))\n(invoke \"test\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 65280) (i32.const 0))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 65280) (i32.const 65536) (i32.const 85))\n               (i32.const -1))\n(module\n  (memory 1 1)\n  \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"test\")\n    (memory.fill (i32.const 0xFF00) (i32.const 0x55) (i32.const 257))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(module\n  (memory 1 1)\n  \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"test\")\n    (memory.fill (i32.const 0xFFFFFF00) (i32.const 0x55) (i32.const 257))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(module\n  (memory 1 1)\n  \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"test\")\n    (memory.fill (i32.const 0x12) (i32.const 0x55) (i32.const 0))))\n(invoke \"test\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 65536) (i32.const 0))\n               (i32.const -1))\n(module\n  (memory 1 1)\n  \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"test\")\n    (memory.fill (i32.const 0x10000) (i32.const 0x55) (i32.const 0))))\n(invoke \"test\")\n\n(module\n  (memory 1 1)\n  \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"test\")\n    (memory.fill (i32.const 0x20000) (i32.const 0x55) (i32.const 0))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(module\n  (memory 1 1)\n  \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"test\")\n    (memory.fill (i32.const 0x1) (i32.const 0xAA) (i32.const 0xFFFE))))\n(invoke \"test\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 1) (i32.const 0))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 1) (i32.const 65535) (i32.const 170))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 65535) (i32.const 65536) (i32.const 0))\n               (i32.const -1))\n\n(module\n  (memory 1 1)\n  \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"test\")\n     (memory.fill (i32.const 0x12) (i32.const 0x55) (i32.const 10))\n     (memory.fill (i32.const 0x15) (i32.const 0xAA) (i32.const 4))))\n(invoke \"test\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 18) (i32.const 0))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 18) (i32.const 21) (i32.const 85))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 21) (i32.const 25) (i32.const 170))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 25) (i32.const 28) (i32.const 85))\n               (i32.const -1))\n(assert_return (invoke \"checkRange\" (i32.const 28) (i32.const 65536) (i32.const 0))\n               (i32.const -1))\n(assert_invalid\n  (module\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (i32.const 20) (i32.const 30))))\n  \"unknown memory 0\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (i32.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (i32.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (i32.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (f32.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (f32.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (f32.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (f32.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (i64.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (i64.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (i64.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (i64.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (f64.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (f64.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (f64.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (f64.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f32.const 10) (i32.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f32.const 10) (i32.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f32.const 10) (i32.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f32.const 10) (i32.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f32.const 10) (f32.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f32.const 10) (f32.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f32.const 10) (f32.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f32.const 10) (f32.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f32.const 10) (i64.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f32.const 10) (i64.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f32.const 10) (i64.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f32.const 10) (i64.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f32.const 10) (f64.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f32.const 10) (f64.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f32.const 10) (f64.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f32.const 10) (f64.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i64.const 10) (i32.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i64.const 10) (i32.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i64.const 10) (i32.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i64.const 10) (i32.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i64.const 10) (f32.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i64.const 10) (f32.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i64.const 10) (f32.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i64.const 10) (f32.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i64.const 10) (i64.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i64.const 10) (i64.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i64.const 10) (i64.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i64.const 10) (i64.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i64.const 10) (f64.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i64.const 10) (f64.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i64.const 10) (f64.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (i64.const 10) (f64.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f64.const 10) (i32.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f64.const 10) (i32.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f64.const 10) (i32.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f64.const 10) (i32.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f64.const 10) (f32.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f64.const 10) (f32.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f64.const 10) (f32.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f64.const 10) (f32.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f64.const 10) (i64.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f64.const 10) (i64.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f64.const 10) (i64.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f64.const 10) (i64.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f64.const 10) (f64.const 20) (i32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f64.const 10) (f64.const 20) (f32.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f64.const 10) (f64.const 20) (i64.const 30))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (f64.const 10) (f64.const 20) (f64.const 30))))\n  \"type mismatch\")\n\n(module\n  (memory 1 1 )\n  \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"run\") (param $offs i32) (param $val i32) (param $len i32)\n    (memory.fill (local.get $offs) (local.get $val) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 65280) (i32.const 37) (i32.const 512))\n              \"out of bounds memory access\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 1) (i32.const 0))\n               (i32.const -1))\n(module\n  (memory 1 1 )\n  \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"run\") (param $offs i32) (param $val i32) (param $len i32)\n    (memory.fill (local.get $offs) (local.get $val) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 65279) (i32.const 37) (i32.const 514))\n              \"out of bounds memory access\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 1) (i32.const 0))\n               (i32.const -1))\n(module\n  (memory 1 1 )\n  \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"run\") (param $offs i32) (param $val i32) (param $len i32)\n    (memory.fill (local.get $offs) (local.get $val) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 65279) (i32.const 37) (i32.const 4294967295))\n              \"out of bounds memory access\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 1) (i32.const 0))\n               (i32.const -1))\n"
  },
  {
    "path": "test/core/memory_grow.wast",
    "content": "(module\n    (memory 0)\n\n    (func (export \"load_at_zero\") (result i32) (i32.load (i32.const 0)))\n    (func (export \"store_at_zero\") (i32.store (i32.const 0) (i32.const 2)))\n\n    (func (export \"load_at_page_size\") (result i32) (i32.load (i32.const 0x10000)))\n    (func (export \"store_at_page_size\") (i32.store (i32.const 0x10000) (i32.const 3)))\n\n    (func (export \"grow\") (param $sz i32) (result i32) (memory.grow (local.get $sz)))\n    (func (export \"size\") (result i32) (memory.size))\n)\n\n(assert_return (invoke \"size\") (i32.const 0))\n(assert_trap (invoke \"store_at_zero\") \"out of bounds memory access\")\n(assert_trap (invoke \"load_at_zero\") \"out of bounds memory access\")\n(assert_trap (invoke \"store_at_page_size\") \"out of bounds memory access\")\n(assert_trap (invoke \"load_at_page_size\") \"out of bounds memory access\")\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"size\") (i32.const 1))\n(assert_return (invoke \"load_at_zero\") (i32.const 0))\n(assert_return (invoke \"store_at_zero\"))\n(assert_return (invoke \"load_at_zero\") (i32.const 2))\n(assert_trap (invoke \"store_at_page_size\") \"out of bounds memory access\")\n(assert_trap (invoke \"load_at_page_size\") \"out of bounds memory access\")\n(assert_return (invoke \"grow\" (i32.const 4)) (i32.const 1))\n(assert_return (invoke \"size\") (i32.const 5))\n(assert_return (invoke \"load_at_zero\") (i32.const 2))\n(assert_return (invoke \"store_at_zero\"))\n(assert_return (invoke \"load_at_zero\") (i32.const 2))\n(assert_return (invoke \"load_at_page_size\") (i32.const 0))\n(assert_return (invoke \"store_at_page_size\"))\n(assert_return (invoke \"load_at_page_size\") (i32.const 3))\n\n\n(module\n  (memory 0)\n  (func (export \"grow\") (param i32) (result i32) (memory.grow (local.get 0)))\n)\n\n(assert_return (invoke \"grow\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"grow\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"grow\" (i32.const 2)) (i32.const 1))\n(assert_return (invoke \"grow\" (i32.const 800)) (i32.const 3))\n(assert_return (invoke \"grow\" (i32.const 0x10000)) (i32.const -1))\n(assert_return (invoke \"grow\" (i32.const 64736)) (i32.const -1))\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const 803))\n\n(module\n  (memory 0 10)\n  (func (export \"grow\") (param i32) (result i32) (memory.grow (local.get 0)))\n)\n\n(assert_return (invoke \"grow\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"grow\" (i32.const 2)) (i32.const 2))\n(assert_return (invoke \"grow\" (i32.const 6)) (i32.const 4))\n(assert_return (invoke \"grow\" (i32.const 0)) (i32.const 10))\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const -1))\n(assert_return (invoke \"grow\" (i32.const 0x10000)) (i32.const -1))\n\n;; Test that newly allocated memory (program start and memory.grow) is zeroed\n\n(module\n  (memory 1)\n  (func (export \"grow\") (param i32) (result i32)\n    (memory.grow (local.get 0))\n  )\n  (func (export \"check-memory-zero\") (param i32 i32) (result i32)\n    (local i32)\n    (local.set 2 (i32.const 1))\n    (block\n      (loop\n        (local.set 2 (i32.load8_u (local.get 0)))\n        (br_if 1 (i32.ne (local.get 2) (i32.const 0)))\n        (br_if 1 (i32.ge_u (local.get 0) (local.get 1)))\n        (local.set 0 (i32.add (local.get 0) (i32.const 1)))\n        (br_if 0 (i32.le_u (local.get 0) (local.get 1)))\n      )\n    )\n    (local.get 2)\n  )\n)\n\n(assert_return (invoke \"check-memory-zero\" (i32.const 0) (i32.const 0xffff)) (i32.const 0))\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"check-memory-zero\" (i32.const 0x10000) (i32.const 0x1_ffff)) (i32.const 0))\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"check-memory-zero\" (i32.const 0x20000) (i32.const 0x2_ffff)) (i32.const 0))\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const 3))\n(assert_return (invoke \"check-memory-zero\" (i32.const 0x30000) (i32.const 0x3_ffff)) (i32.const 0))\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const 4))\n(assert_return (invoke \"check-memory-zero\" (i32.const 0x40000) (i32.const 0x4_ffff)) (i32.const 0))\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const 5))\n(assert_return (invoke \"check-memory-zero\" (i32.const 0x50000) (i32.const 0x5_ffff)) (i32.const 0))\n\n;; As the argument of control constructs and instructions\n\n(module\n  (memory 1)\n\n  (func (export \"as-br-value\") (result i32)\n    (block (result i32) (br 0 (memory.grow (i32.const 0))))\n  )\n\n  (func (export \"as-br_if-cond\")\n    (block (br_if 0 (memory.grow (i32.const 0))))\n  )\n  (func (export \"as-br_if-value\") (result i32)\n    (block (result i32)\n      (drop (br_if 0 (memory.grow (i32.const 0)) (i32.const 1))) (i32.const 7)\n    )\n  )\n  (func (export \"as-br_if-value-cond\") (result i32)\n    (block (result i32)\n      (drop (br_if 0 (i32.const 6) (memory.grow (i32.const 0)))) (i32.const 7)\n    )\n  )\n\n  (func (export \"as-br_table-index\")\n    (block (br_table 0 0 0 (memory.grow (i32.const 0))))\n  )\n  (func (export \"as-br_table-value\") (result i32)\n    (block (result i32)\n      (br_table 0 0 0 (memory.grow (i32.const 0)) (i32.const 1)) (i32.const 7)\n    )\n  )\n  (func (export \"as-br_table-value-index\") (result i32)\n    (block (result i32)\n      (br_table 0 0 (i32.const 6) (memory.grow (i32.const 0))) (i32.const 7)\n    )\n  )\n\n  (func (export \"as-return-value\") (result i32)\n    (return (memory.grow (i32.const 0)))\n  )\n\n  (func (export \"as-if-cond\") (result i32)\n    (if (result i32) (memory.grow (i32.const 0))\n      (then (i32.const 0)) (else (i32.const 1))\n    )\n  )\n  (func (export \"as-if-then\") (result i32)\n    (if (result i32) (i32.const 1)\n      (then (memory.grow (i32.const 0))) (else (i32.const 0))\n    )\n  )\n  (func (export \"as-if-else\") (result i32)\n    (if (result i32) (i32.const 0)\n      (then (i32.const 0)) (else (memory.grow (i32.const 0)))\n    )\n  )\n\n  (func (export \"as-select-first\") (param i32 i32) (result i32)\n    (select (memory.grow (i32.const 0)) (local.get 0) (local.get 1))\n  )\n  (func (export \"as-select-second\") (param i32 i32) (result i32)\n    (select (local.get 0) (memory.grow (i32.const 0)) (local.get 1))\n  )\n  (func (export \"as-select-cond\") (result i32)\n    (select (i32.const 0) (i32.const 1) (memory.grow (i32.const 0)))\n  )\n\n  (func $f (param i32 i32 i32) (result i32) (i32.const -1))\n  (func (export \"as-call-first\") (result i32)\n    (call $f (memory.grow (i32.const 0)) (i32.const 2) (i32.const 3))\n  )\n  (func (export \"as-call-mid\") (result i32)\n    (call $f (i32.const 1) (memory.grow (i32.const 0)) (i32.const 3))\n  )\n  (func (export \"as-call-last\") (result i32)\n    (call $f (i32.const 1) (i32.const 2) (memory.grow (i32.const 0)))\n  )\n\n  (type $sig (func (param i32 i32 i32) (result i32)))\n  (table funcref (elem $f))\n  (func (export \"as-call_indirect-first\") (result i32)\n    (call_indirect (type $sig)\n      (memory.grow (i32.const 0)) (i32.const 2) (i32.const 3) (i32.const 0)\n    )\n  )\n  (func (export \"as-call_indirect-mid\") (result i32)\n    (call_indirect (type $sig)\n      (i32.const 1) (memory.grow (i32.const 0)) (i32.const 3) (i32.const 0)\n    )\n  )\n  (func (export \"as-call_indirect-last\") (result i32)\n    (call_indirect (type $sig)\n      (i32.const 1) (i32.const 2) (memory.grow (i32.const 0)) (i32.const 0)\n    )\n  )\n  (func (export \"as-call_indirect-index\") (result i32)\n    (call_indirect (type $sig)\n      (i32.const 1) (i32.const 2) (i32.const 3) (memory.grow (i32.const 0))\n    )\n  )\n\n  (func (export \"as-local.set-value\") (local i32)\n    (local.set 0 (memory.grow (i32.const 0)))\n  )\n  (func (export \"as-local.tee-value\") (result i32) (local i32)\n    (local.tee 0 (memory.grow (i32.const 0)))\n  )\n  (global $g (mut i32) (i32.const 0))\n  (func (export \"as-global.set-value\") (local i32)\n    (global.set $g (memory.grow (i32.const 0)))\n  )\n\n  (func (export \"as-load-address\") (result i32)\n    (i32.load (memory.grow (i32.const 0)))\n  )\n  (func (export \"as-loadN-address\") (result i32)\n    (i32.load8_s (memory.grow (i32.const 0)))\n  )\n\n  (func (export \"as-store-address\")\n    (i32.store (memory.grow (i32.const 0)) (i32.const 7))\n  )\n  (func (export \"as-store-value\")\n    (i32.store (i32.const 2) (memory.grow (i32.const 0)))\n  )\n\n  (func (export \"as-storeN-address\")\n    (i32.store8 (memory.grow (i32.const 0)) (i32.const 7))\n  )\n  (func (export \"as-storeN-value\")\n    (i32.store16 (i32.const 2) (memory.grow (i32.const 0)))\n  )\n\n  (func (export \"as-unary-operand\") (result i32)\n    (i32.clz (memory.grow (i32.const 0)))\n  )\n\n  (func (export \"as-binary-left\") (result i32)\n    (i32.add (memory.grow (i32.const 0)) (i32.const 10))\n  )\n  (func (export \"as-binary-right\") (result i32)\n    (i32.sub (i32.const 10) (memory.grow (i32.const 0)))\n  )\n\n  (func (export \"as-test-operand\") (result i32)\n    (i32.eqz (memory.grow (i32.const 0)))\n  )\n\n  (func (export \"as-compare-left\") (result i32)\n    (i32.le_s (memory.grow (i32.const 0)) (i32.const 10))\n  )\n  (func (export \"as-compare-right\") (result i32)\n    (i32.ne (i32.const 10) (memory.grow (i32.const 0)))\n  )\n\n  (func (export \"as-memory.grow-size\") (result i32)\n    (memory.grow (memory.grow (i32.const 0)))\n  )\n)\n\n(assert_return (invoke \"as-br-value\") (i32.const 1))\n\n(assert_return (invoke \"as-br_if-cond\"))\n(assert_return (invoke \"as-br_if-value\") (i32.const 1))\n(assert_return (invoke \"as-br_if-value-cond\") (i32.const 6))\n\n(assert_return (invoke \"as-br_table-index\"))\n(assert_return (invoke \"as-br_table-value\") (i32.const 1))\n(assert_return (invoke \"as-br_table-value-index\") (i32.const 6))\n\n(assert_return (invoke \"as-return-value\") (i32.const 1))\n\n(assert_return (invoke \"as-if-cond\") (i32.const 0))\n(assert_return (invoke \"as-if-then\") (i32.const 1))\n(assert_return (invoke \"as-if-else\") (i32.const 1))\n\n(assert_return (invoke \"as-select-first\" (i32.const 0) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-select-second\" (i32.const 0) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-select-cond\") (i32.const 0))\n\n(assert_return (invoke \"as-call-first\") (i32.const -1))\n(assert_return (invoke \"as-call-mid\") (i32.const -1))\n(assert_return (invoke \"as-call-last\") (i32.const -1))\n\n(assert_return (invoke \"as-call_indirect-first\") (i32.const -1))\n(assert_return (invoke \"as-call_indirect-mid\") (i32.const -1))\n(assert_return (invoke \"as-call_indirect-last\") (i32.const -1))\n(assert_trap (invoke \"as-call_indirect-index\") \"undefined element\")\n\n(assert_return (invoke \"as-local.set-value\"))\n(assert_return (invoke \"as-local.tee-value\") (i32.const 1))\n(assert_return (invoke \"as-global.set-value\"))\n\n(assert_return (invoke \"as-load-address\") (i32.const 0))\n(assert_return (invoke \"as-loadN-address\") (i32.const 0))\n(assert_return (invoke \"as-store-address\"))\n(assert_return (invoke \"as-store-value\"))\n(assert_return (invoke \"as-storeN-address\"))\n(assert_return (invoke \"as-storeN-value\"))\n\n(assert_return (invoke \"as-unary-operand\") (i32.const 31))\n\n(assert_return (invoke \"as-binary-left\") (i32.const 11))\n(assert_return (invoke \"as-binary-right\") (i32.const 9))\n\n(assert_return (invoke \"as-test-operand\") (i32.const 0))\n\n(assert_return (invoke \"as-compare-left\") (i32.const 1))\n(assert_return (invoke \"as-compare-right\") (i32.const 1))\n\n(assert_return (invoke \"as-memory.grow-size\") (i32.const 1))\n\n\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-size-empty-vs-i32 (result i32)\n      (memory.grow)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-size-empty-vs-i32-in-block (result i32)\n      (i32.const 0)\n      (block (result i32) (memory.grow))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-size-empty-vs-i32-in-loop (result i32)\n      (i32.const 0)\n      (loop (result i32) (memory.grow))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-size-empty-vs-i32-in-then (result i32)\n      (i32.const 0) (i32.const 0)\n      (if (result i32) (then (memory.grow)))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-size-f32-vs-i32 (result i32)\n      (memory.grow (f32.const 0))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-result-i32-vs-empty\n      (memory.grow (i32.const 0))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-result-i32-vs-f32 (result f32)\n      (memory.grow (i32.const 0))\n    )\n  )\n  \"type mismatch\"\n)\n"
  },
  {
    "path": "test/core/memory_init.wast",
    "content": ";;\n;; Generated by ../meta/generate_memory_init.js\n;; DO NOT EDIT THIS FILE.  CHANGE THE SOURCE AND REGENERATE.\n;;\n\n(module\n  (memory (export \"memory0\") 1 1)\n  (data (i32.const 2) \"\\03\\01\\04\\01\")\n  (data \"\\02\\07\\01\\08\")\n  (data (i32.const 12) \"\\07\\05\\02\\03\\06\")\n  (data \"\\05\\09\\02\\07\\06\")\n  (func (export \"test\")\n    (nop))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(invoke \"test\")\n\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 6)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 16)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 17)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29)) (i32.const 0))\n\n(module\n  (memory (export \"memory0\") 1 1)\n  (data (i32.const 2) \"\\03\\01\\04\\01\")\n  (data \"\\02\\07\\01\\08\")\n  (data (i32.const 12) \"\\07\\05\\02\\03\\06\")\n  (data \"\\05\\09\\02\\07\\06\")\n  (func (export \"test\")\n    (memory.init 1 (i32.const 7) (i32.const 0) (i32.const 4)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(invoke \"test\")\n\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 6)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 8)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 9)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 8))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 16)) (i32.const 6))\n(assert_return (invoke \"load8_u\" (i32.const 17)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 18)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29)) (i32.const 0))\n\n(module\n  (memory (export \"memory0\") 1 1)\n  (data (i32.const 2) \"\\03\\01\\04\\01\")\n  (data \"\\02\\07\\01\\08\")\n  (data (i32.const 12) \"\\07\\05\\02\\03\\06\")\n  (data \"\\05\\09\\02\\07\\06\")\n  (func (export \"test\")\n    (memory.init 3 (i32.const 15) (i32.const 1) (i32.const 3)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(invoke \"test\")\n\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 6)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 8)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 9)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 15)) (i32.const 9))\n(assert_return (invoke \"load8_u\" (i32.const 16)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 17)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 18)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 20)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 22)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 24)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 25)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29)) (i32.const 0))\n\n(module\n  (memory (export \"memory0\") 1 1)\n  (data (i32.const 2) \"\\03\\01\\04\\01\")\n  (data \"\\02\\07\\01\\08\")\n  (data (i32.const 12) \"\\07\\05\\02\\03\\06\")\n  (data \"\\05\\09\\02\\07\\06\")\n  (func (export \"test\")\n    (memory.init 1 (i32.const 7) (i32.const 0) (i32.const 4))\n    (data.drop 1)\n    (memory.init 3 (i32.const 15) (i32.const 1) (i32.const 3))\n    (data.drop 3)\n    (memory.copy (i32.const 20) (i32.const 15) (i32.const 5))\n    (memory.copy (i32.const 21) (i32.const 29) (i32.const 1))\n    (memory.copy (i32.const 24) (i32.const 10) (i32.const 1))\n    (memory.copy (i32.const 13) (i32.const 11) (i32.const 4))\n    (memory.copy (i32.const 19) (i32.const 20) (i32.const 5)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(invoke \"test\")\n\n(assert_return (invoke \"load8_u\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"load8_u\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"load8_u\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 6)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 7)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 8)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 9)) (i32.const 1))\n(assert_return (invoke \"load8_u\" (i32.const 10)) (i32.const 8))\n(assert_return (invoke \"load8_u\" (i32.const 11)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 13)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 14)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 15)) (i32.const 5))\n(assert_return (invoke \"load8_u\" (i32.const 16)) (i32.const 2))\n(assert_return (invoke \"load8_u\" (i32.const 17)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 18)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 19)) (i32.const 9))\n(assert_return (invoke \"load8_u\" (i32.const 20)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 21)) (i32.const 7))\n(assert_return (invoke \"load8_u\" (i32.const 22)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 23)) (i32.const 8))\n(assert_return (invoke \"load8_u\" (i32.const 24)) (i32.const 8))\n(assert_return (invoke \"load8_u\" (i32.const 25)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 26)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 27)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 28)) (i32.const 0))\n(assert_return (invoke \"load8_u\" (i32.const 29)) (i32.const 0))\n(assert_invalid\n   (module\n     (func (export \"test\")\n       (data.drop 0)))\n   \"unknown data segment\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (data.drop 4)))\n  \"unknown data segment\")\n\n(module\n  (memory 1)\n    (data \"\\37\")\n  (func (export \"test\")\n    (data.drop 0)\n    (data.drop 0)))\n(invoke \"test\")\n\n(module\n  (memory 1)\n    (data \"\\37\")\n  (func (export \"test\")\n    (data.drop 0)\n    (memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 1))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(module\n   (memory 1)\n   (data (i32.const 0) \"\\37\")\n   (func (export \"test\")\n     (memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 1))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(assert_invalid\n  (module\n    (func (export \"test\")\n      (memory.init 1 (i32.const 1234) (i32.const 1) (i32.const 1))))\n  \"unknown memory 0\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 1 (i32.const 1234) (i32.const 1) (i32.const 1))))\n  \"unknown data segment 1\")\n\n(module\n  (memory 1)\n    (data \"\\37\")\n  (func (export \"test\")\n    (memory.init 0 (i32.const 1) (i32.const 0) (i32.const 1))\n    (memory.init 0 (i32.const 1) (i32.const 0) (i32.const 1))))\n(invoke \"test\")\n\n(module\n  (memory 1)\n    (data \"\\37\")\n  (func (export \"test\")\n    (memory.init 0 (i32.const 1234) (i32.const 0) (i32.const 5))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(module\n  (memory 1)\n    (data \"\\37\")\n  (func (export \"test\")\n    (memory.init 0 (i32.const 1234) (i32.const 2) (i32.const 3))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(module\n  (memory 1)\n    (data \"\\37\")\n  (func (export \"test\")\n    (memory.init 0 (i32.const 0xFFFE) (i32.const 1) (i32.const 3))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(module\n  (memory 1)\n    (data \"\\37\")\n  (func (export \"test\")\n    (memory.init 0 (i32.const 1234) (i32.const 4) (i32.const 0))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(module\n  (memory 1)\n    (data \"\\37\")\n  (func (export \"test\")\n    (memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 0))))\n(invoke \"test\")\n\n(module\n  (memory 1)\n    (data \"\\37\")\n  (func (export \"test\")\n    (memory.init 0 (i32.const 0x10001) (i32.const 0) (i32.const 0))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(module\n  (memory 1)\n    (data \"\\37\")\n  (func (export \"test\")\n    (memory.init 0 (i32.const 0x10000) (i32.const 0) (i32.const 0))))\n(invoke \"test\")\n\n(module\n  (memory 1)\n    (data \"\\37\")\n  (func (export \"test\")\n    (memory.init 0 (i32.const 0x10000) (i32.const 1) (i32.const 0))))\n(invoke \"test\")\n\n(module\n  (memory 1)\n    (data \"\\37\")\n  (func (export \"test\")\n    (memory.init 0 (i32.const 0x10001) (i32.const 4) (i32.const 0))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i32.const 1) (i32.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i32.const 1) (i32.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i32.const 1) (i32.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i32.const 1) (f32.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i32.const 1) (f32.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i32.const 1) (f32.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i32.const 1) (f32.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i32.const 1) (i64.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i32.const 1) (i64.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i32.const 1) (i64.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i32.const 1) (i64.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i32.const 1) (f64.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i32.const 1) (f64.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i32.const 1) (f64.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i32.const 1) (f64.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f32.const 1) (i32.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f32.const 1) (i32.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f32.const 1) (i32.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f32.const 1) (i32.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f32.const 1) (f32.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f32.const 1) (f32.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f32.const 1) (f32.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f32.const 1) (f32.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f32.const 1) (i64.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f32.const 1) (i64.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f32.const 1) (i64.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f32.const 1) (i64.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f32.const 1) (f64.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f32.const 1) (f64.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f32.const 1) (f64.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f32.const 1) (f64.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i64.const 1) (i32.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i64.const 1) (i32.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i64.const 1) (i32.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i64.const 1) (i32.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i64.const 1) (f32.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i64.const 1) (f32.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i64.const 1) (f32.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i64.const 1) (f32.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i64.const 1) (i64.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i64.const 1) (i64.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i64.const 1) (i64.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i64.const 1) (i64.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i64.const 1) (f64.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i64.const 1) (f64.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i64.const 1) (f64.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (i64.const 1) (f64.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f64.const 1) (i32.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f64.const 1) (i32.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f64.const 1) (i32.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f64.const 1) (i32.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f64.const 1) (f32.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f64.const 1) (f32.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f64.const 1) (f32.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f64.const 1) (f32.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f64.const 1) (i64.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f64.const 1) (i64.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f64.const 1) (i64.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f64.const 1) (i64.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f64.const 1) (f64.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f64.const 1) (f64.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f64.const 1) (f64.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (memory 1)\n    (data \"\\37\")\n    (func (export \"test\")\n      (memory.init 0 (f64.const 1) (f64.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(module\n  (memory 1 1 )\n  (data \"\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\")\n   \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"run\") (param $offs i32) (param $len i32)\n    (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 65528) (i32.const 16))\n              \"out of bounds memory access\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 1) (i32.const 0))\n               (i32.const -1))\n(module\n  (memory 1 1 )\n  (data \"\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\")\n   \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"run\") (param $offs i32) (param $len i32)\n    (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 65527) (i32.const 16))\n              \"out of bounds memory access\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 1) (i32.const 0))\n               (i32.const -1))\n(module\n  (memory 1 1 )\n  (data \"\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\")\n   \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"run\") (param $offs i32) (param $len i32)\n    (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 65472) (i32.const 30))\n              \"out of bounds memory access\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 1) (i32.const 0))\n               (i32.const -1))\n(module\n  (memory 1 1 )\n  (data \"\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\")\n   \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"run\") (param $offs i32) (param $len i32)\n    (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 65473) (i32.const 31))\n              \"out of bounds memory access\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 1) (i32.const 0))\n               (i32.const -1))\n(module\n  (memory 1  )\n  (data \"\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\")\n   \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"run\") (param $offs i32) (param $len i32)\n    (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 65528) (i32.const 4294967040))\n              \"out of bounds memory access\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 1) (i32.const 0))\n               (i32.const -1))\n(module\n  (memory 1  )\n  (data \"\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\\42\")\n   \n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n\n  (func (export \"run\") (param $offs i32) (param $len i32)\n    (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 0) (i32.const 4294967292))\n              \"out of bounds memory access\")\n\n(assert_return (invoke \"checkRange\" (i32.const 0) (i32.const 1) (i32.const 0))\n               (i32.const -1))\n\n(module\n  (memory 1)\n  ;; 65 data segments. 64 is the smallest positive number that is encoded\n  ;; differently as a signed LEB.\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\")\n  (func (memory.init 64 (i32.const 0) (i32.const 0) (i32.const 0))))\n"
  },
  {
    "path": "test/core/memory_redundancy.wast",
    "content": ";; Test that optimizers don't do redundant-load, store-to-load, or dead-store\n;; optimizations when there are interfering stores, even of different types\n;; and to non-identical addresses.\n\n(module\n  (memory 1 1)\n\n  (func (export \"zero_everything\")\n    (i32.store (i32.const 0) (i32.const 0))\n    (i32.store (i32.const 4) (i32.const 0))\n    (i32.store (i32.const 8) (i32.const 0))\n    (i32.store (i32.const 12) (i32.const 0))\n  )\n\n  (func (export \"test_store_to_load\") (result i32)\n    (i32.store (i32.const 8) (i32.const 0))\n    (f32.store (i32.const 5) (f32.const -0.0))\n    (i32.load (i32.const 8))\n  )\n\n  (func (export \"test_redundant_load\") (result i32)\n    (local $t i32)\n    (local $s i32)\n    (local.set $t (i32.load (i32.const 8)))\n    (i32.store (i32.const 5) (i32.const 0x80000000))\n    (local.set $s (i32.load (i32.const 8)))\n    (i32.add (local.get $t) (local.get $s))\n  )\n\n  (func (export \"test_dead_store\") (result f32)\n    (local $t f32)\n    (i32.store (i32.const 8) (i32.const 0x23232323))\n    (local.set $t (f32.load (i32.const 11)))\n    (i32.store (i32.const 8) (i32.const 0))\n    (local.get $t)\n  )\n\n  ;; A function named \"malloc\" which implementations nonetheless shouldn't\n  ;; assume behaves like C malloc.\n  (func $malloc (export \"malloc\")\n     (param $size i32)\n     (result i32)\n     (i32.const 16)\n  )\n\n  ;; Call malloc twice, but unlike C malloc, we don't get non-aliasing pointers.\n  (func (export \"malloc_aliasing\")\n     (result i32)\n     (local $x i32)\n     (local $y i32)\n     (local.set $x (call $malloc (i32.const 4)))\n     (local.set $y (call $malloc (i32.const 4)))\n     (i32.store (local.get $x) (i32.const 42))\n     (i32.store (local.get $y) (i32.const 43))\n     (i32.load (local.get $x))\n  )\n)\n\n(assert_return (invoke \"test_store_to_load\") (i32.const 0x00000080))\n(invoke \"zero_everything\")\n(assert_return (invoke \"test_redundant_load\") (i32.const 0x00000080))\n(invoke \"zero_everything\")\n(assert_return (invoke \"test_dead_store\") (f32.const 0x1.18p-144))\n(invoke \"zero_everything\")\n(assert_return (invoke \"malloc_aliasing\") (i32.const 43))\n"
  },
  {
    "path": "test/core/memory_size.wast",
    "content": "(module\n  (memory 0)\n  (func (export \"size\") (result i32) (memory.size))\n  (func (export \"grow\") (param $sz i32) (drop (memory.grow (local.get $sz))))\n)\n\n(assert_return (invoke \"size\") (i32.const 0))\n(assert_return (invoke \"grow\" (i32.const 1)))\n(assert_return (invoke \"size\") (i32.const 1))\n(assert_return (invoke \"grow\" (i32.const 4)))\n(assert_return (invoke \"size\") (i32.const 5))\n(assert_return (invoke \"grow\" (i32.const 0)))\n(assert_return (invoke \"size\") (i32.const 5))\n\n(module\n  (memory 1)\n  (func (export \"size\") (result i32) (memory.size))\n  (func (export \"grow\") (param $sz i32) (drop (memory.grow (local.get $sz))))\n)\n\n(assert_return (invoke \"size\") (i32.const 1))\n(assert_return (invoke \"grow\" (i32.const 1)))\n(assert_return (invoke \"size\") (i32.const 2))\n(assert_return (invoke \"grow\" (i32.const 4)))\n(assert_return (invoke \"size\") (i32.const 6))\n(assert_return (invoke \"grow\" (i32.const 0)))\n(assert_return (invoke \"size\") (i32.const 6))\n\n(module\n  (memory 0 2)\n  (func (export \"size\") (result i32) (memory.size))\n  (func (export \"grow\") (param $sz i32) (drop (memory.grow (local.get $sz))))\n)\n\n(assert_return (invoke \"size\") (i32.const 0))\n(assert_return (invoke \"grow\" (i32.const 3)))\n(assert_return (invoke \"size\") (i32.const 0))\n(assert_return (invoke \"grow\" (i32.const 1)))\n(assert_return (invoke \"size\") (i32.const 1))\n(assert_return (invoke \"grow\" (i32.const 0)))\n(assert_return (invoke \"size\") (i32.const 1))\n(assert_return (invoke \"grow\" (i32.const 4)))\n(assert_return (invoke \"size\") (i32.const 1))\n(assert_return (invoke \"grow\" (i32.const 1)))\n(assert_return (invoke \"size\") (i32.const 2))\n\n(module\n  (memory 3 8)\n  (func (export \"size\") (result i32) (memory.size))\n  (func (export \"grow\") (param $sz i32) (drop (memory.grow (local.get $sz))))\n)\n\n(assert_return (invoke \"size\") (i32.const 3))\n(assert_return (invoke \"grow\" (i32.const 1)))\n(assert_return (invoke \"size\") (i32.const 4))\n(assert_return (invoke \"grow\" (i32.const 3)))\n(assert_return (invoke \"size\") (i32.const 7))\n(assert_return (invoke \"grow\" (i32.const 0)))\n(assert_return (invoke \"size\") (i32.const 7))\n(assert_return (invoke \"grow\" (i32.const 2)))\n(assert_return (invoke \"size\") (i32.const 7))\n(assert_return (invoke \"grow\" (i32.const 1)))\n(assert_return (invoke \"size\") (i32.const 8))\n\n\n;; Type errors\n\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-result-i32-vs-empty\n      (memory.size)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-result-i32-vs-f32 (result f32)\n      (memory.size)\n    )\n  )\n  \"type mismatch\"\n)\n"
  },
  {
    "path": "test/core/memory_trap.wast",
    "content": "(module\n    (memory 1)\n\n    (func $addr_limit (result i32)\n      (i32.mul (memory.size) (i32.const 0x10000))\n    )\n\n    (func (export \"store\") (param $i i32) (param $v i32)\n      (i32.store (i32.add (call $addr_limit) (local.get $i)) (local.get $v))\n    )\n\n    (func (export \"load\") (param $i i32) (result i32)\n      (i32.load (i32.add (call $addr_limit) (local.get $i)))\n    )\n\n    (func (export \"memory.grow\") (param i32) (result i32)\n      (memory.grow (local.get 0))\n    )\n)\n\n(assert_return (invoke \"store\" (i32.const -4) (i32.const 42)))\n(assert_return (invoke \"load\" (i32.const -4)) (i32.const 42))\n(assert_trap (invoke \"store\" (i32.const -3) (i32.const 13)) \"out of bounds memory access\")\n(assert_trap (invoke \"load\" (i32.const -3)) \"out of bounds memory access\")\n(assert_trap (invoke \"store\" (i32.const -2) (i32.const 13)) \"out of bounds memory access\")\n(assert_trap (invoke \"load\" (i32.const -2)) \"out of bounds memory access\")\n(assert_trap (invoke \"store\" (i32.const -1) (i32.const 13)) \"out of bounds memory access\")\n(assert_trap (invoke \"load\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"store\" (i32.const 0) (i32.const 13)) \"out of bounds memory access\")\n(assert_trap (invoke \"load\" (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"store\" (i32.const 0x80000000) (i32.const 13)) \"out of bounds memory access\")\n(assert_trap (invoke \"load\" (i32.const 0x80000000)) \"out of bounds memory access\")\n(assert_return (invoke \"memory.grow\" (i32.const 0x10001)) (i32.const -1))\n\n(module\n  (memory 1)\n  (data (i32.const 0) \"abcdefgh\")\n  (data (i32.const 0xfff8) \"abcdefgh\")\n\n  (func (export \"i32.load\") (param $a i32) (result i32)\n    (i32.load (local.get $a))\n  )\n  (func (export \"i64.load\") (param $a i32) (result i64)\n    (i64.load (local.get $a))\n  )\n  (func (export \"f32.load\") (param $a i32) (result f32)\n    (f32.load (local.get $a))\n  )\n  (func (export \"f64.load\") (param $a i32) (result f64)\n    (f64.load (local.get $a))\n  )\n  (func (export \"i32.load8_s\") (param $a i32) (result i32)\n    (i32.load8_s (local.get $a))\n  )\n  (func (export \"i32.load8_u\") (param $a i32) (result i32)\n    (i32.load8_u (local.get $a))\n  )\n  (func (export \"i32.load16_s\") (param $a i32) (result i32)\n    (i32.load16_s (local.get $a))\n  )\n  (func (export \"i32.load16_u\") (param $a i32) (result i32)\n    (i32.load16_u (local.get $a))\n  )\n  (func (export \"i64.load8_s\") (param $a i32) (result i64)\n    (i64.load8_s (local.get $a))\n  )\n  (func (export \"i64.load8_u\") (param $a i32) (result i64)\n    (i64.load8_u (local.get $a))\n  )\n  (func (export \"i64.load16_s\") (param $a i32) (result i64)\n    (i64.load16_s (local.get $a))\n  )\n  (func (export \"i64.load16_u\") (param $a i32) (result i64)\n    (i64.load16_u (local.get $a))\n  )\n  (func (export \"i64.load32_s\") (param $a i32) (result i64)\n    (i64.load32_s (local.get $a))\n  )\n  (func (export \"i64.load32_u\") (param $a i32) (result i64)\n    (i64.load32_u (local.get $a))\n  )\n  (func (export \"i32.store\") (param $a i32) (param $v i32)\n    (i32.store (local.get $a) (local.get $v))\n  )\n  (func (export \"i64.store\") (param $a i32) (param $v i64)\n    (i64.store (local.get $a) (local.get $v))\n  )\n  (func (export \"f32.store\") (param $a i32) (param $v f32)\n    (f32.store (local.get $a) (local.get $v))\n  )\n  (func (export \"f64.store\") (param $a i32) (param $v f64)\n    (f64.store (local.get $a) (local.get $v))\n  )\n  (func (export \"i32.store8\") (param $a i32) (param $v i32)\n    (i32.store8 (local.get $a) (local.get $v))\n  )\n  (func (export \"i32.store16\") (param $a i32) (param $v i32)\n    (i32.store16 (local.get $a) (local.get $v))\n  )\n  (func (export \"i64.store8\") (param $a i32) (param $v i64)\n    (i64.store8 (local.get $a) (local.get $v))\n  )\n  (func (export \"i64.store16\") (param $a i32) (param $v i64)\n    (i64.store16 (local.get $a) (local.get $v))\n  )\n  (func (export \"i64.store32\") (param $a i32) (param $v i64)\n    (i64.store32 (local.get $a) (local.get $v))\n  )\n)\n\n(assert_trap (invoke \"i32.store\" (i32.const 0x10000) (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.store\" (i32.const 0xffff) (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.store\" (i32.const 0xfffe) (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.store\" (i32.const 0xfffd) (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.store\" (i32.const -1) (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.store\" (i32.const -2) (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.store\" (i32.const -3) (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.store\" (i32.const -4) (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store\" (i32.const 0x10000) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store\" (i32.const 0xffff) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store\" (i32.const 0xfffe) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store\" (i32.const 0xfffd) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store\" (i32.const 0xfffc) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store\" (i32.const 0xfffb) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store\" (i32.const 0xfffa) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store\" (i32.const 0xfff9) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store\" (i32.const -1) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store\" (i32.const -2) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store\" (i32.const -3) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store\" (i32.const -4) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store\" (i32.const -5) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store\" (i32.const -6) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store\" (i32.const -7) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store\" (i32.const -8) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f32.store\" (i32.const 0x10000) (f32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f32.store\" (i32.const 0xffff) (f32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f32.store\" (i32.const 0xfffe) (f32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f32.store\" (i32.const 0xfffd) (f32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f32.store\" (i32.const -1) (f32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f32.store\" (i32.const -2) (f32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f32.store\" (i32.const -3) (f32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f32.store\" (i32.const -4) (f32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.store\" (i32.const 0x10000) (f64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.store\" (i32.const 0xffff) (f64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.store\" (i32.const 0xfffe) (f64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.store\" (i32.const 0xfffd) (f64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.store\" (i32.const 0xfffc) (f64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.store\" (i32.const 0xfffb) (f64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.store\" (i32.const 0xfffa) (f64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.store\" (i32.const 0xfff9) (f64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.store\" (i32.const -1) (f64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.store\" (i32.const -2) (f64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.store\" (i32.const -3) (f64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.store\" (i32.const -4) (f64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.store\" (i32.const -5) (f64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.store\" (i32.const -6) (f64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.store\" (i32.const -7) (f64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.store\" (i32.const -8) (f64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.store8\" (i32.const 0x10000) (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.store8\" (i32.const -1) (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.store16\" (i32.const 0x10000) (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.store16\" (i32.const 0xffff) (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.store16\" (i32.const -1) (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.store16\" (i32.const -2) (i32.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store8\" (i32.const 0x10000) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store8\" (i32.const -1) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store16\" (i32.const 0x10000) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store16\" (i32.const 0xffff) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store16\" (i32.const -1) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store16\" (i32.const -2) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store32\" (i32.const 0x10000) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store32\" (i32.const 0xffff) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store32\" (i32.const 0xfffe) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store32\" (i32.const 0xfffd) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store32\" (i32.const -1) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store32\" (i32.const -2) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store32\" (i32.const -3) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.store32\" (i32.const -4) (i64.const 0)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load\" (i32.const 0x10000)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load\" (i32.const 0xffff)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load\" (i32.const 0xfffe)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load\" (i32.const 0xfffd)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load\" (i32.const -2)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load\" (i32.const -3)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load\" (i32.const -4)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load\" (i32.const 0x10000)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load\" (i32.const 0xffff)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load\" (i32.const 0xfffe)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load\" (i32.const 0xfffd)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load\" (i32.const 0xfffc)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load\" (i32.const 0xfffb)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load\" (i32.const 0xfffa)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load\" (i32.const 0xfff9)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load\" (i32.const -2)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load\" (i32.const -3)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load\" (i32.const -4)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load\" (i32.const -5)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load\" (i32.const -6)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load\" (i32.const -7)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load\" (i32.const -8)) \"out of bounds memory access\")\n(assert_trap (invoke \"f32.load\" (i32.const 0x10000)) \"out of bounds memory access\")\n(assert_trap (invoke \"f32.load\" (i32.const 0xffff)) \"out of bounds memory access\")\n(assert_trap (invoke \"f32.load\" (i32.const 0xfffe)) \"out of bounds memory access\")\n(assert_trap (invoke \"f32.load\" (i32.const 0xfffd)) \"out of bounds memory access\")\n(assert_trap (invoke \"f32.load\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"f32.load\" (i32.const -2)) \"out of bounds memory access\")\n(assert_trap (invoke \"f32.load\" (i32.const -3)) \"out of bounds memory access\")\n(assert_trap (invoke \"f32.load\" (i32.const -4)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.load\" (i32.const 0x10000)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.load\" (i32.const 0xffff)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.load\" (i32.const 0xfffe)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.load\" (i32.const 0xfffd)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.load\" (i32.const 0xfffc)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.load\" (i32.const 0xfffb)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.load\" (i32.const 0xfffa)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.load\" (i32.const 0xfff9)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.load\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.load\" (i32.const -2)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.load\" (i32.const -3)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.load\" (i32.const -4)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.load\" (i32.const -5)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.load\" (i32.const -6)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.load\" (i32.const -7)) \"out of bounds memory access\")\n(assert_trap (invoke \"f64.load\" (i32.const -8)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load8_s\" (i32.const 0x10000)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load8_s\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load8_u\" (i32.const 0x10000)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load8_u\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load16_s\" (i32.const 0x10000)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load16_s\" (i32.const 0xffff)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load16_s\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load16_s\" (i32.const -2)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load16_u\" (i32.const 0x10000)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load16_u\" (i32.const 0xffff)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load16_u\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"i32.load16_u\" (i32.const -2)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load8_s\" (i32.const 0x10000)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load8_s\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load8_u\" (i32.const 0x10000)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load8_u\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load16_s\" (i32.const 0x10000)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load16_s\" (i32.const 0xffff)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load16_s\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load16_s\" (i32.const -2)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load16_u\" (i32.const 0x10000)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load16_u\" (i32.const 0xffff)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load16_u\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load16_u\" (i32.const -2)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load32_s\" (i32.const 0x10000)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load32_s\" (i32.const 0xffff)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load32_s\" (i32.const 0xfffe)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load32_s\" (i32.const 0xfffd)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load32_s\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load32_s\" (i32.const -2)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load32_s\" (i32.const -3)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load32_s\" (i32.const -4)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load32_u\" (i32.const 0x10000)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load32_u\" (i32.const 0xffff)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load32_u\" (i32.const 0xfffe)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load32_u\" (i32.const 0xfffd)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load32_u\" (i32.const -1)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load32_u\" (i32.const -2)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load32_u\" (i32.const -3)) \"out of bounds memory access\")\n(assert_trap (invoke \"i64.load32_u\" (i32.const -4)) \"out of bounds memory access\")\n\n;; No memory was changed\n(assert_return (invoke \"i64.load\" (i32.const 0xfff8)) (i64.const 0x6867666564636261))\n(assert_return (invoke \"i64.load\" (i32.const 0)) (i64.const 0x6867666564636261))\n"
  },
  {
    "path": "test/core/names.wast",
    "content": ";; Test files can define multiple modules. Test that implementations treat\n;; each module independently from the other.\n\n(module\n  (func (export \"foo\") (result i32) (i32.const 0))\n)\n\n(assert_return (invoke \"foo\") (i32.const 0))\n\n;; Another module, same function name, different contents.\n\n(module\n  (func (export \"foo\") (result i32) (i32.const 1))\n)\n\n(assert_return (invoke \"foo\") (i32.const 1))\n\n\n(module\n  ;; Test that we can use the empty string as a symbol.\n  (func (export \"\") (result i32) (i32.const 0))\n\n  ;; Test that we can use names beginning with a digit.\n  (func (export \"0\") (result i32) (i32.const 1))\n\n  ;; Test that we can use names beginning with a dash.\n  (func (export \"-0\") (result i32) (i32.const 2))\n\n  ;; Test that we can use names beginning with an underscore.\n  (func (export \"_\") (result i32) (i32.const 3))\n\n  ;; Test that we can use names beginning with a dollar sign.\n  (func (export \"$\") (result i32) (i32.const 4))\n\n  ;; Test that we can use names beginning with an at sign.\n  (func (export \"@\") (result i32) (i32.const 5))\n\n  ;; Test that we can use non-alphanumeric names.\n  (func (export \"~!@#$%^&*()_+`-={}|[]\\\\:\\\";'<>?,./ \") (result i32) (i32.const 6))\n\n  ;; Test that we can use names that have special meaning in JS.\n  (func (export \"NaN\") (result i32) (i32.const 7))\n  (func (export \"Infinity\") (result i32) (i32.const 8))\n  (func (export \"if\") (result i32) (i32.const 9))\n\n  ;; Test that we can use common libc names without conflict.\n  (func (export \"malloc\") (result i32) (i32.const 10))\n\n  ;; Test that we can use some libc hidden names without conflict.\n  (func (export \"_malloc\") (result i32) (i32.const 11))\n  (func (export \"__malloc\") (result i32) (i32.const 12))\n\n  ;; Test that names are case-sensitive.\n  (func (export \"a\") (result i32) (i32.const 13))\n  (func (export \"A\") (result i32) (i32.const 14))\n\n  ;; Test that UTF-8 BOM code points can appear in identifiers.\n  (func (export \"﻿\") (result i32) (i32.const 15))\n\n  ;; Test that Unicode normalization is not applied. These function names\n  ;; contain different codepoints which normalize to the same thing under\n  ;; NFC or NFD.\n  (func (export \"Å\") (result i32) (i32.const 16))\n  (func (export \"Å\") (result i32) (i32.const 17))\n  (func (export \"Å\") (result i32) (i32.const 18))\n\n  ;; Test that Unicode compatibility normalization is not applied. These\n  ;; function names contain different codepoints which normalize to the\n  ;; same thing under NFKC or NFKD.\n  (func (export \"ﬃ\") (result i32) (i32.const 19))\n  (func (export \"fﬁ\") (result i32) (i32.const 20))\n  (func (export \"ffi\") (result i32) (i32.const 21))\n\n  ;; Test the C0 control codes.\n  (func (export \"\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\") (result i32) (i32.const 22))\n  (func (export \"\\10\\11\\12\\13\\14\\15\\16\\17\\18\\19\\1a\\1b\\1c\\1d\\1e\\1f\") (result i32) (i32.const 23))\n  ;; Test miscellaneous control codes.\n  (func (export \" \\7f\") (result i32) (i32.const 24))\n  ;; Test the C1 control codes.\n  (func (export \"\\c2\\80\\c2\\81\\c2\\82\\c2\\83\\c2\\84\\c2\\85\\c2\\86\\c2\\87\\c2\\88\\c2\\89\\c2\\8a\\c2\\8b\\c2\\8c\\c2\\8d\\c2\\8e\\c2\\8f\") (result i32) (i32.const 25))\n  (func (export \"\\c2\\90\\c2\\91\\c2\\92\\c2\\93\\c2\\94\\c2\\95\\c2\\96\\c2\\97\\c2\\98\\c2\\99\\c2\\9a\\c2\\9b\\c2\\9c\\c2\\9d\\c2\\9e\\c2\\9f\") (result i32) (i32.const 26))\n  ;; Test the Unicode Specials.\n  (func (export \"\\ef\\bf\\b0\\ef\\bf\\b1\\ef\\bf\\b2\\ef\\bf\\b3\\ef\\bf\\b4\\ef\\bf\\b5\\ef\\bf\\b6\\ef\\bf\\b7\") (result i32) (i32.const 27))\n  (func (export \"\\ef\\bf\\b8\\ef\\bf\\b9\\ef\\bf\\ba\\ef\\bf\\bb\\ef\\bf\\bc\\ef\\bf\\bd\\ef\\bf\\be\\ef\\bf\\bf\") (result i32) (i32.const 28))\n\n  ;; Test that the control pictures are distinct from the control codes they\n  ;; depict. These correspond to the C0 and miscellaneous control code tests\n  ;; above.\n  (func (export \"␀␁␂␃␄␅␆␇␈␉␊␋␌␍␎␏\") (result i32) (i32.const 29))\n  (func (export \"␐␑␒␓␔␕␖␗␘␙␚␛␜␝␞␟\") (result i32) (i32.const 30))\n  (func (export \"␠␡\") (result i32) (i32.const 31))\n\n  ;; Test the Unicode Specials in non-escaped form (excluding U+FFFE and\n  ;; U+FFFF, so that generic tools don't detect this file as non-UTF-8).\n  (func (export \"￰￱￲￳￴￵￶￷￸￹￺￻￼�\") (result i32) (i32.const 32))\n\n  ;; Test a bare ZWJ code point.\n  (func (export \"‍\") (result i32) (i32.const 33))\n  ;; Test a bare ZWNJ code point.\n  (func (export \"‌\") (result i32) (i32.const 34))\n\n  ;; Test various bare joiner code points.\n  (func (export \"͏\") (result i32) (i32.const 35))\n  (func (export \"⁠\") (result i32) (i32.const 36))\n  (func (export \"⵿\") (result i32) (i32.const 37))\n  (func (export \"𑁿\") (result i32) (i32.const 38))\n  (func (export \"᠎\") (result i32) (i32.const 39))\n\n  ;; Test various interesting code points: reverse BOM, zero-width space,\n  ;; no-break space, soft hyphen, word joiner, ogham space mark,\n  ;; right-to-left override, left-to-right override.\n  (func (export \"￯​ ­⁠ ‮‭\") (result i32) (i32.const 40))\n\n  ;; Test more interesting code points: left-to-right mark, right-to-left mark,\n  ;; non-breaking hyphen, line separator, paragraph separator,\n  ;; left-to-right embedding, right-to-left embedding,\n  ;; pop directional formatting, narrow no-break space, left-to-right isolate,\n  ;; right-to-left isolate, first strong isolate, pop directional isolate.\n  (func (export \"‎‏‑  ‪‫‬ ⁦⁧⁨⁩\") (result i32) (i32.const 41))\n\n  ;; Test some deprecated code points: inhibit symmetric swapping,\n  ;; activate symmetric swapping, inhibit arabic form shaping,\n  ;; activate arabic form shaping, national digit shapes, nominal digit shapes.\n  (func (export \"⁪⁫⁬⁭⁮⁯\") (result i32) (i32.const 42))\n\n  ;; Test \"invisible\" operator code points.\n  (func (export \"⁡⁢⁣⁤\") (result i32) (i32.const 43))\n\n  ;; Test that code points outside the BMP are supported.\n  (func (export \"𐀀󟿿􏿿\") (result i32) (i32.const 44))\n\n  ;; Test that WebAssembly implementations cope in the presence of Zalgo.\n  (func (export \"Z̴͇̫̥̪͓͈͔͎̗̞̺̯̱̞̙̱̜̖̠̏͆̆͛͌͘͞ḁ̶̰̳̭͙̲̱̹̝͎̼͗ͨ̎̄̆͗̿̀́͟͡l̶̷͉̩̹̫̝͖̙̲̼͇͚͍̮͎̥̞̈́͊͗ͦ̈́ͫ̇́̚ͅͅg̶͕͔͚̩̓̐̅ͮ̔̐̎̂̏̾͊̍͋͊ͧ́̆ͦ͞o̡͋̔͐ͪͩ͏̢̧̫̙̤̮͖͙͓̺̜̩̼̘̠́\") (result i32) (i32.const 45))\n\n  ;; Test Hangul filler code points.\n  (func (export \"ᅟᅠㅤﾠ\") (result i32) (i32.const 46))\n\n  ;; Test variation selectors (which are also ID_Continue code points).\n  (func (export \"︀\") (result i32) (i32.const 47))\n  (func (export \"︄\") (result i32) (i32.const 48))\n  (func (export \"󠄀\") (result i32) (i32.const 49))\n  (func (export \"󠇯\") (result i32) (i32.const 50))\n\n  ;; Test an uncombined combining code point.\n  (func (export \"̈\") (result i32) (i32.const 51))\n\n  ;; Test that numerous different present and historical representations of the\n  ;; \"newline\" concept are distinct. Tests largely inspired by:\n  ;;   https://en.wikipedia.org/wiki/Newline#Representations\n  ;;   https://en.wikipedia.org/wiki/Newline#Unicode and\n  ;;   https://en.wikipedia.org/wiki/Newline#Reverse_and_partial_line_feeds\n  (func (export \"\\0a\") (result i32) (i32.const 52))\n  (func (export \"␤\") (result i32) (i32.const 53))\n  (func (export \" \") (result i32) (i32.const 54))\n  (func (export \"\\0d\") (result i32) (i32.const 55))\n  (func (export \"\\0d\\0a\") (result i32) (i32.const 56))\n  (func (export \"\\0a\\0d\") (result i32) (i32.const 57))\n  (func (export \"\\1e\") (result i32) (i32.const 58))\n  (func (export \"\\0b\") (result i32) (i32.const 59))\n  (func (export \"\\0c\") (result i32) (i32.const 60))\n  (func (export \"\\c2\\85\") (result i32) (i32.const 61))\n  (func (export \" \") (result i32) (i32.const 62))\n  (func (export \"…\") (result i32) (i32.const 63))\n  (func (export \"⏎\") (result i32) (i32.const 64))\n  (func (export \"\\c2\\8b\") (result i32) (i32.const 65))\n  (func (export \"\\c2\\8c\") (result i32) (i32.const 66))\n  (func (export \"\\c2\\8d\") (result i32) (i32.const 67))\n  (func (export \"↵\") (result i32) (i32.const 68))\n  (func (export \"↩\") (result i32) (i32.const 69))\n  (func (export \"⌤\") (result i32) (i32.const 70))\n  (func (export \"⤶\") (result i32) (i32.const 71))\n  (func (export \"↲\") (result i32) (i32.const 72))\n  (func (export \"⮨\") (result i32) (i32.const 73))\n  (func (export \"⮰\") (result i32) (i32.const 74))\n\n  ;; Test that non-characters are not replaced by the replacement character.\n  (func (export \"�\") (result i32) (i32.const 75))\n  (func (export \"\\ef\\b7\\90\") (result i32) (i32.const 76))\n  (func (export \"\\ef\\b7\\91\") (result i32) (i32.const 77))\n  (func (export \"\\ef\\b7\\92\") (result i32) (i32.const 78))\n  (func (export \"\\ef\\b7\\93\") (result i32) (i32.const 79))\n  (func (export \"\\ef\\b7\\94\") (result i32) (i32.const 80))\n  (func (export \"\\ef\\b7\\95\") (result i32) (i32.const 81))\n  (func (export \"\\ef\\b7\\96\") (result i32) (i32.const 82))\n  (func (export \"\\ef\\b7\\97\") (result i32) (i32.const 83))\n  (func (export \"\\ef\\b7\\98\") (result i32) (i32.const 84))\n  (func (export \"\\ef\\b7\\99\") (result i32) (i32.const 85))\n  (func (export \"\\ef\\b7\\9a\") (result i32) (i32.const 86))\n  (func (export \"\\ef\\b7\\9b\") (result i32) (i32.const 87))\n  (func (export \"\\ef\\b7\\9c\") (result i32) (i32.const 88))\n  (func (export \"\\ef\\b7\\9d\") (result i32) (i32.const 89))\n  (func (export \"\\ef\\b7\\9e\") (result i32) (i32.const 90))\n  (func (export \"\\ef\\b7\\9f\") (result i32) (i32.const 91))\n  (func (export \"\\ef\\b7\\a0\") (result i32) (i32.const 92))\n  (func (export \"\\ef\\b7\\a1\") (result i32) (i32.const 93))\n  (func (export \"\\ef\\b7\\a2\") (result i32) (i32.const 94))\n  (func (export \"\\ef\\b7\\a3\") (result i32) (i32.const 95))\n  (func (export \"\\ef\\b7\\a4\") (result i32) (i32.const 96))\n  (func (export \"\\ef\\b7\\a5\") (result i32) (i32.const 97))\n  (func (export \"\\ef\\b7\\a6\") (result i32) (i32.const 98))\n  (func (export \"\\ef\\b7\\a7\") (result i32) (i32.const 99))\n  (func (export \"\\ef\\b7\\a8\") (result i32) (i32.const 100))\n  (func (export \"\\ef\\b7\\a9\") (result i32) (i32.const 101))\n  (func (export \"\\ef\\b7\\aa\") (result i32) (i32.const 102))\n  (func (export \"\\ef\\b7\\ab\") (result i32) (i32.const 103))\n  (func (export \"\\ef\\b7\\ac\") (result i32) (i32.const 104))\n  (func (export \"\\ef\\b7\\ad\") (result i32) (i32.const 105))\n  (func (export \"\\ef\\b7\\ae\") (result i32) (i32.const 106))\n  (func (export \"\\ef\\b7\\af\") (result i32) (i32.const 107))\n  (func (export \"\\ef\\bf\\be\") (result i32) (i32.const 108))\n  (func (export \"\\ef\\bf\\bf\") (result i32) (i32.const 109))\n  (func (export \"\\f0\\9f\\bf\\be\") (result i32) (i32.const 110))\n  (func (export \"\\f0\\9f\\bf\\bf\") (result i32) (i32.const 111))\n  (func (export \"\\f0\\af\\bf\\be\") (result i32) (i32.const 112))\n  (func (export \"\\f0\\af\\bf\\bf\") (result i32) (i32.const 113))\n  (func (export \"\\f0\\bf\\bf\\be\") (result i32) (i32.const 114))\n  (func (export \"\\f0\\bf\\bf\\bf\") (result i32) (i32.const 115))\n  (func (export \"\\f1\\8f\\bf\\be\") (result i32) (i32.const 116))\n  (func (export \"\\f1\\8f\\bf\\bf\") (result i32) (i32.const 117))\n  (func (export \"\\f1\\9f\\bf\\be\") (result i32) (i32.const 118))\n  (func (export \"\\f1\\9f\\bf\\bf\") (result i32) (i32.const 119))\n  (func (export \"\\f1\\af\\bf\\be\") (result i32) (i32.const 120))\n  (func (export \"\\f1\\af\\bf\\bf\") (result i32) (i32.const 121))\n  (func (export \"\\f1\\bf\\bf\\be\") (result i32) (i32.const 122))\n  (func (export \"\\f1\\bf\\bf\\bf\") (result i32) (i32.const 123))\n  (func (export \"\\f2\\8f\\bf\\be\") (result i32) (i32.const 124))\n  (func (export \"\\f2\\8f\\bf\\bf\") (result i32) (i32.const 125))\n  (func (export \"\\f2\\9f\\bf\\be\") (result i32) (i32.const 126))\n  (func (export \"\\f2\\9f\\bf\\bf\") (result i32) (i32.const 127))\n  (func (export \"\\f2\\af\\bf\\be\") (result i32) (i32.const 128))\n  (func (export \"\\f2\\af\\bf\\bf\") (result i32) (i32.const 129))\n  (func (export \"\\f2\\bf\\bf\\be\") (result i32) (i32.const 130))\n  (func (export \"\\f2\\bf\\bf\\bf\") (result i32) (i32.const 131))\n  (func (export \"\\f3\\8f\\bf\\be\") (result i32) (i32.const 132))\n  (func (export \"\\f3\\8f\\bf\\bf\") (result i32) (i32.const 133))\n  (func (export \"\\f3\\9f\\bf\\be\") (result i32) (i32.const 134))\n  (func (export \"\\f3\\9f\\bf\\bf\") (result i32) (i32.const 135))\n  (func (export \"\\f3\\af\\bf\\be\") (result i32) (i32.const 136))\n  (func (export \"\\f3\\af\\bf\\bf\") (result i32) (i32.const 137))\n  (func (export \"\\f3\\bf\\bf\\be\") (result i32) (i32.const 138))\n  (func (export \"\\f3\\bf\\bf\\bf\") (result i32) (i32.const 139))\n  (func (export \"\\f4\\8f\\bf\\be\") (result i32) (i32.const 140))\n  (func (export \"\\f4\\8f\\bf\\bf\") (result i32) (i32.const 141))\n\n  ;; Test an interrobang with combining diacritical marks above.\n  ;; https://xkcd.com/1209/\n  (func (export \"̈‽̈̉\") (result i32) (i32.const 142))\n\n  ;; Test that RLM/LRM don't change the logical byte order.\n  (func (export \"abc\") (result i32) (i32.const 143))\n  (func (export \"‭abc\") (result i32) (i32.const 144))\n  (func (export \"‮cba\") (result i32) (i32.const 145))\n  (func (export \"‭abc‮\") (result i32) (i32.const 146))\n  (func (export \"‮cba‭\") (result i32) (i32.const 147))\n\n  ;; Test that Unicode font variations are preserved.\n  (func (export \"𝑨\") (result i32) (i32.const 148))\n  (func (export \"𝐴\") (result i32) (i32.const 149))\n  (func (export \"𝘈\") (result i32) (i32.const 150))\n  (func (export \"𝘼\") (result i32) (i32.const 151))\n  (func (export \"𝐀\") (result i32) (i32.const 152))\n  (func (export \"𝓐\") (result i32) (i32.const 153))\n  (func (export \"𝕬\") (result i32) (i32.const 154))\n  (func (export \"𝗔\") (result i32) (i32.const 155))\n  (func (export \"𝒜\") (result i32) (i32.const 156))\n  (func (export \"𝔄\") (result i32) (i32.const 157))\n  (func (export \"𝔸\") (result i32) (i32.const 158))\n  (func (export \"𝖠\") (result i32) (i32.const 159))\n  (func (export \"𝙰\") (result i32) (i32.const 160))\n  (func (export \"ᴀ\") (result i32) (i32.const 161))\n\n  ;; Test that various additional letter variations are preserved.\n  ;; (U+0040, U+0061, U+0041, U+00C5, U+0041 U+030A, U+212B, and the font\n  ;; variations are covered above.)\n  (func (export \"ᴬ\") (result i32) (i32.const 162))\n  (func (export \"Ⓐ\") (result i32) (i32.const 163))\n  (func (export \"Ａ\") (result i32) (i32.const 164))\n  (func (export \"🄐\") (result i32) (i32.const 165))\n  (func (export \"🄰\") (result i32) (i32.const 166))\n  (func (export \"󠁁\") (result i32) (i32.const 167))\n  (func (export \"U+0041\") (result i32) (i32.const 168))\n  (func (export \"A​\") (result i32) (i32.const 169))\n  (func (export \"А\") (result i32) (i32.const 170))\n  (func (export \"Ꙗ\") (result i32) (i32.const 171))\n  (func (export \"ⷼ\") (result i32) (i32.const 172))\n  (func (export \"ⷶ\") (result i32) (i32.const 173))\n  (func (export \"Ɐ\") (result i32) (i32.const 174))\n  (func (export \"🅐\") (result i32) (i32.const 175))\n  (func (export \"🅰\") (result i32) (i32.const 176))\n  (func (export \"Ⱝ\") (result i32) (i32.const 177))\n  (func (export \"𐐂\") (result i32) (i32.const 178))\n  (func (export \"𐐈\") (result i32) (i32.const 179))\n  (func (export \"𐒰\") (result i32) (i32.const 180))\n  (func (export \"À\") (result i32) (i32.const 181))\n  (func (export \"Á\") (result i32) (i32.const 182))\n  (func (export \"Â\") (result i32) (i32.const 183))\n  (func (export \"Ã\") (result i32) (i32.const 184))\n  (func (export \"Ä\") (result i32) (i32.const 185))\n  (func (export \"Ā\") (result i32) (i32.const 186))\n  (func (export \"Ă\") (result i32) (i32.const 187))\n  (func (export \"Ą\") (result i32) (i32.const 188))\n  (func (export \"Ǎ\") (result i32) (i32.const 189))\n  (func (export \"Ǟ\") (result i32) (i32.const 190))\n  (func (export \"Ǡ\") (result i32) (i32.const 191))\n  (func (export \"Ǻ\") (result i32) (i32.const 192))\n  (func (export \"Ȁ\") (result i32) (i32.const 193))\n  (func (export \"Ȃ\") (result i32) (i32.const 194))\n  (func (export \"Ȧ\") (result i32) (i32.const 195))\n  (func (export \"Ⱥ\") (result i32) (i32.const 196))\n  (func (export \"Ӑ\") (result i32) (i32.const 197))\n  (func (export \"Ӓ\") (result i32) (i32.const 198))\n  (func (export \"ߊ\") (result i32) (i32.const 199))\n  (func (export \"ࠡ\") (result i32) (i32.const 200))\n  (func (export \"ࠢ\") (result i32) (i32.const 201))\n  (func (export \"ࠣ\") (result i32) (i32.const 202))\n  (func (export \"ࠤ\") (result i32) (i32.const 203))\n  (func (export \"ࠥ\") (result i32) (i32.const 204))\n  (func (export \"ऄ\") (result i32) (i32.const 205))\n  (func (export \"अ\") (result i32) (i32.const 206))\n  (func (export \"ॲ\") (result i32) (i32.const 207))\n  (func (export \"অ\") (result i32) (i32.const 208))\n  (func (export \"ਅ\") (result i32) (i32.const 209))\n  (func (export \"અ\") (result i32) (i32.const 210))\n  (func (export \"ଅ\") (result i32) (i32.const 211))\n  (func (export \"அ\") (result i32) (i32.const 212))\n  (func (export \"అ\") (result i32) (i32.const 213))\n  (func (export \"ಅ\") (result i32) (i32.const 214))\n  (func (export \"അ\") (result i32) (i32.const 215))\n  (func (export \"ะ\") (result i32) (i32.const 216))\n  (func (export \"ະ\") (result i32) (i32.const 217))\n  (func (export \"༁\") (result i32) (i32.const 218))\n  (func (export \"ཨ\") (result i32) (i32.const 219))\n  (func (export \"ྸ\") (result i32) (i32.const 220))\n  (func (export \"အ\") (result i32) (i32.const 221))\n  (func (export \"ဢ\") (result i32) (i32.const 222))\n  (func (export \"ႜ\") (result i32) (i32.const 223))\n  (func (export \"ᅡ\") (result i32) (i32.const 224))\n  (func (export \"አ\") (result i32) (i32.const 225))\n  (func (export \"ዐ\") (result i32) (i32.const 226))\n  (func (export \"Ꭰ\") (result i32) (i32.const 227))\n  (func (export \"ᐊ\") (result i32) (i32.const 228))\n  (func (export \"ᖳ\") (result i32) (i32.const 229))\n  (func (export \"ᚨ\") (result i32) (i32.const 230))\n  (func (export \"ᚪ\") (result i32) (i32.const 231))\n  (func (export \"ᛆ\") (result i32) (i32.const 232))\n  (func (export \"ᜀ\") (result i32) (i32.const 233))\n  (func (export \"ᜠ\") (result i32) (i32.const 234))\n  (func (export \"ᝀ\") (result i32) (i32.const 235))\n  (func (export \"ᝠ\") (result i32) (i32.const 236))\n  (func (export \"ᠠ\") (result i32) (i32.const 237))\n  (func (export \"ᢇ\") (result i32) (i32.const 238))\n  (func (export \"ᤠ\") (result i32) (i32.const 239))\n  (func (export \"ᥣ\") (result i32) (i32.const 240))\n  (func (export \"ᨕ\") (result i32) (i32.const 241))\n  (func (export \"ᩋ\") (result i32) (i32.const 242))\n  (func (export \"ᩡ\") (result i32) (i32.const 243))\n  (func (export \"ᮃ\") (result i32) (i32.const 244))\n  (func (export \"ᯀ\") (result i32) (i32.const 245))\n  (func (export \"ᯁ\") (result i32) (i32.const 246))\n  (func (export \"ᰣ\") (result i32) (i32.const 247))\n  (func (export \"Ḁ\") (result i32) (i32.const 248))\n  (func (export \"Ạ\") (result i32) (i32.const 249))\n  (func (export \"Ả\") (result i32) (i32.const 250))\n  (func (export \"Ấ\") (result i32) (i32.const 251))\n  (func (export \"Ầ\") (result i32) (i32.const 252))\n  (func (export \"Ẩ\") (result i32) (i32.const 253))\n  (func (export \"Ẫ\") (result i32) (i32.const 254))\n  (func (export \"Ậ\") (result i32) (i32.const 255))\n  (func (export \"Ắ\") (result i32) (i32.const 256))\n  (func (export \"Ằ\") (result i32) (i32.const 257))\n  (func (export \"Ẳ\") (result i32) (i32.const 258))\n  (func (export \"Ẵ\") (result i32) (i32.const 259))\n  (func (export \"Ặ\") (result i32) (i32.const 260))\n  (func (export \"あ\") (result i32) (i32.const 261))\n  (func (export \"ア\") (result i32) (i32.const 262))\n  (func (export \"ㄚ\") (result i32) (i32.const 263))\n  (func (export \"ㅏ\") (result i32) (i32.const 264))\n  (func (export \"㈎\") (result i32) (i32.const 265))\n  (func (export \"㈏\") (result i32) (i32.const 266))\n  (func (export \"㈐\") (result i32) (i32.const 267))\n  (func (export \"㈑\") (result i32) (i32.const 268))\n  (func (export \"㈒\") (result i32) (i32.const 269))\n  (func (export \"㈓\") (result i32) (i32.const 270))\n  (func (export \"㈔\") (result i32) (i32.const 271))\n  (func (export \"㈕\") (result i32) (i32.const 272))\n  (func (export \"㈖\") (result i32) (i32.const 273))\n  (func (export \"㈗\") (result i32) (i32.const 274))\n  (func (export \"㈘\") (result i32) (i32.const 275))\n  (func (export \"㈙\") (result i32) (i32.const 276))\n  (func (export \"㈚\") (result i32) (i32.const 277))\n  (func (export \"㈛\") (result i32) (i32.const 278))\n  (func (export \"㉮\") (result i32) (i32.const 279))\n  (func (export \"㉯\") (result i32) (i32.const 280))\n  (func (export \"㉰\") (result i32) (i32.const 281))\n  (func (export \"㉱\") (result i32) (i32.const 282))\n  (func (export \"㉲\") (result i32) (i32.const 283))\n  (func (export \"㉳\") (result i32) (i32.const 284))\n  (func (export \"㉴\") (result i32) (i32.const 285))\n  (func (export \"㉵\") (result i32) (i32.const 286))\n  (func (export \"㉶\") (result i32) (i32.const 287))\n  (func (export \"㉷\") (result i32) (i32.const 288))\n  (func (export \"㉸\") (result i32) (i32.const 289))\n  (func (export \"㉹\") (result i32) (i32.const 290))\n  (func (export \"㉺\") (result i32) (i32.const 291))\n  (func (export \"㉻\") (result i32) (i32.const 292))\n  (func (export \"㋐\") (result i32) (i32.const 293))\n  (func (export \"ꀊ\") (result i32) (i32.const 294))\n  (func (export \"ꓮ\") (result i32) (i32.const 295))\n  (func (export \"ꕉ\") (result i32) (i32.const 296))\n  (func (export \"ꚠ\") (result i32) (i32.const 297))\n  (func (export \"ꠀ\") (result i32) (i32.const 298))\n  (func (export \"ꠣ\") (result i32) (i32.const 299))\n  (func (export \"ꡝ\") (result i32) (i32.const 300))\n  (func (export \"ꢂ\") (result i32) (i32.const 301))\n  (func (export \"꣪\") (result i32) (i32.const 302))\n  (func (export \"ꤢ\") (result i32) (i32.const 303))\n  (func (export \"ꥆ\") (result i32) (i32.const 304))\n  (func (export \"ꦄ\") (result i32) (i32.const 305))\n  (func (export \"ꨀ\") (result i32) (i32.const 306))\n  (func (export \"ｱ\") (result i32) (i32.const 307))\n  (func (export \"ￂ\") (result i32) (i32.const 308))\n  (func (export \"𐀀\") (result i32) (i32.const 309))\n  (func (export \"𐊀\") (result i32) (i32.const 310))\n  (func (export \"𐊠\") (result i32) (i32.const 311))\n  (func (export \"𐌀\") (result i32) (i32.const 312))\n  (func (export \"𐎠\") (result i32) (i32.const 313))\n  (func (export \"𐒖\") (result i32) (i32.const 314))\n  (func (export \"𐔀\") (result i32) (i32.const 315))\n  (func (export \"𐝀\") (result i32) (i32.const 316))\n  (func (export \"𐠀\") (result i32) (i32.const 317))\n  (func (export \"𐤠\") (result i32) (i32.const 318))\n  (func (export \"𐦀\") (result i32) (i32.const 319))\n  (func (export \"𐦠\") (result i32) (i32.const 320))\n  (func (export \"𐨀\") (result i32) (i32.const 321))\n  (func (export \"𐬀\") (result i32) (i32.const 322))\n  (func (export \"𐰀\") (result i32) (i32.const 323))\n  (func (export \"𐰁\") (result i32) (i32.const 324))\n  (func (export \"𐲀\") (result i32) (i32.const 325))\n  (func (export \"𑀅\") (result i32) (i32.const 326))\n  (func (export \"𑂃\") (result i32) (i32.const 327))\n  (func (export \"𑄧\") (result i32) (i32.const 328))\n  (func (export \"𑅐\") (result i32) (i32.const 329))\n  (func (export \"𑆃\") (result i32) (i32.const 330))\n  (func (export \"𑈀\") (result i32) (i32.const 331))\n  (func (export \"𑊀\") (result i32) (i32.const 332))\n  (func (export \"𑊰\") (result i32) (i32.const 333))\n  (func (export \"𑌅\") (result i32) (i32.const 334))\n  (func (export \"𑍰\") (result i32) (i32.const 335))\n  (func (export \"𑐀\") (result i32) (i32.const 336))\n  (func (export \"𑒁\") (result i32) (i32.const 337))\n  (func (export \"𑖀\") (result i32) (i32.const 338))\n  (func (export \"𑘀\") (result i32) (i32.const 339))\n  (func (export \"𑚀\") (result i32) (i32.const 340))\n  (func (export \"𑜒\") (result i32) (i32.const 341))\n  (func (export \"𑜠\") (result i32) (i32.const 342))\n  (func (export \"𑢡\") (result i32) (i32.const 343))\n  (func (export \"𑫕\") (result i32) (i32.const 344))\n  (func (export \"𑰀\") (result i32) (i32.const 345))\n  (func (export \"𑲏\") (result i32) (i32.const 346))\n  (func (export \"𑲯\") (result i32) (i32.const 347))\n  (func (export \"𒀀\") (result i32) (i32.const 348))\n  (func (export \"𖧕\") (result i32) (i32.const 349))\n  (func (export \"𖩆\") (result i32) (i32.const 350))\n  (func (export \"𖫧\") (result i32) (i32.const 351))\n  (func (export \"𖽔\") (result i32) (i32.const 352))\n  (func (export \"𛱁\") (result i32) (i32.const 353))\n  (func (export \"𛱤\") (result i32) (i32.const 354))\n  (func (export \"𞠣\") (result i32) (i32.const 355))\n  (func (export \"🇦\") (result i32) (i32.const 356))\n  (func (export \"Ɑ\") (result i32) (i32.const 357))\n  (func (export \"Λ\") (result i32) (i32.const 358))\n  (func (export \"Ɒ\") (result i32) (i32.const 359))\n  (func (export \"ª\") (result i32) (i32.const 360))\n  (func (export \"∀\") (result i32) (i32.const 361))\n  (func (export \"₳\") (result i32) (i32.const 362))\n  (func (export \"𐤀\") (result i32) (i32.const 363))\n  (func (export \"Ⲁ\") (result i32) (i32.const 364))\n  (func (export \"𐌰\") (result i32) (i32.const 365))\n  (func (export \"Ά\") (result i32) (i32.const 366))\n  (func (export \"Α\") (result i32) (i32.const 367))\n  (func (export \"Ἀ\") (result i32) (i32.const 368))\n  (func (export \"Ἁ\") (result i32) (i32.const 369))\n  (func (export \"Ἂ\") (result i32) (i32.const 370))\n  (func (export \"Ἃ\") (result i32) (i32.const 371))\n  (func (export \"Ἄ\") (result i32) (i32.const 372))\n  (func (export \"Ἅ\") (result i32) (i32.const 373))\n  (func (export \"Ἆ\") (result i32) (i32.const 374))\n  (func (export \"Ἇ\") (result i32) (i32.const 375))\n  (func (export \"ᾈ\") (result i32) (i32.const 376))\n  (func (export \"ᾉ\") (result i32) (i32.const 377))\n  (func (export \"ᾊ\") (result i32) (i32.const 378))\n  (func (export \"ᾋ\") (result i32) (i32.const 379))\n  (func (export \"ᾌ\") (result i32) (i32.const 380))\n  (func (export \"ᾍ\") (result i32) (i32.const 381))\n  (func (export \"ᾎ\") (result i32) (i32.const 382))\n  (func (export \"ᾏ\") (result i32) (i32.const 383))\n  (func (export \"Ᾰ\") (result i32) (i32.const 384))\n  (func (export \"Ᾱ\") (result i32) (i32.const 385))\n  (func (export \"Ὰ\") (result i32) (i32.const 386))\n  (func (export \"Ά\") (result i32) (i32.const 387))\n  (func (export \"ᾼ\") (result i32) (i32.const 388))\n  (func (export \"𝚨\") (result i32) (i32.const 389))\n  (func (export \"𝛢\") (result i32) (i32.const 390))\n  (func (export \"𝜜\") (result i32) (i32.const 391))\n  (func (export \"𝝖\") (result i32) (i32.const 392))\n  (func (export \"𝞐\") (result i32) (i32.const 393))\n  (func (export \"⍶\") (result i32) (i32.const 394))\n  (func (export \"⍺\") (result i32) (i32.const 395))\n  (func (export \"⩜\") (result i32) (i32.const 396))\n  (func (export \"ᗅ\") (result i32) (i32.const 397))\n  (func (export \"Ꭺ\") (result i32) (i32.const 398))\n\n  ;; Test unmatched \"closing\" and \"opening\" code points.\n  (func (export \")˺˼𔗏𝅴𝅶𝅸𝅺⁾₎❩❫⟯﴿︶﹚）｠󠀩❳❵⟧⟩⟫⟭⦈⦊⦖⸣⸥︘︸︺︼︾﹀﹂﹄﹈﹜﹞］｝｣󠁝󠁽»’”›❯\") (result i32) (i32.const 399))\n  (func (export \"(˹˻𔗎𝅳𝅵𝅷𝅹⁽₍❨❪⟮﴾︵﹙（｟󠀨❲❴⟦⟨⟪⟬⦇⦉⦕⸢⸤︗︷︹︻︽︿﹁﹃﹇﹛﹝［｛｢󠁛󠁻«‘“‹❮\") (result i32) (i32.const 400))\n  (func (export \"𝪋𝪤\") (result i32) (i32.const 401))\n  (func (export \"𝪋\") (result i32) (i32.const 402))\n\n  ;; Test that Unicode fraction normalization is not applied.\n  (func (export \"½\") (result i32) (i32.const 403))\n  (func (export \"1⁄2\") (result i32) (i32.const 404))\n  (func (export \"1/2\") (result i32) (i32.const 405))\n  (func (export \"୳\") (result i32) (i32.const 406))\n  (func (export \"൴\") (result i32) (i32.const 407))\n  (func (export \"⳽\") (result i32) (i32.const 408))\n  (func (export \"꠱\") (result i32) (i32.const 409))\n  (func (export \"𐅁\") (result i32) (i32.const 410))\n  (func (export \"𐅵\") (result i32) (i32.const 411))\n  (func (export \"𐅶\") (result i32) (i32.const 412))\n  (func (export \"𐦽\") (result i32) (i32.const 413))\n  (func (export \"𐹻\") (result i32) (i32.const 414))\n\n  ;; Test a full-width quote.\n  (func (export \"＂\") (result i32) (i32.const 415))\n\n  ;; Test that different present and historical representations of the \"delete\"\n  ;; concept are distinct.\n  (func (export \"\\7f\") (result i32) (i32.const 416))\n  (func (export \"\\08\") (result i32) (i32.const 417))\n  (func (export \"⌫\") (result i32) (i32.const 418))\n  (func (export \"⌦\") (result i32) (i32.const 419))\n  (func (export \"␈\") (result i32) (i32.const 420))\n  (func (export \"␡\") (result i32) (i32.const 421))\n  (func (export \"᷻\") (result i32) (i32.const 422))\n  (func (export \"\\0f\") (result i32) (i32.const 423))\n  (func (export \"←\") (result i32) (i32.const 424))\n  (func (export \"⌧\") (result i32) (i32.const 425))\n  (func (export \"⍒\") (result i32) (i32.const 426))\n  (func (export \"⍔\") (result i32) (i32.const 427))\n  (func (export \"⍢\") (result i32) (i32.const 428))\n  (func (export \"⍫\") (result i32) (i32.const 429))\n\n  ;; Test that different representations of the \"substitute\" concept are\n  ;; distinct. (U+FFFD is covered above.)\n  (func (export \"\\1a\") (result i32) (i32.const 430))\n  (func (export \"␦\") (result i32) (i32.const 431))\n  (func (export \"␚\") (result i32) (i32.const 432))\n  (func (export \"￼\") (result i32) (i32.const 433))\n  (func (export \"?\") (result i32) (i32.const 434))\n  (func (export \"¿\") (result i32) (i32.const 435))\n  (func (export \"᥅\") (result i32) (i32.const 436))\n  (func (export \";\") (result i32) (i32.const 437))\n  (func (export \"՞\") (result i32) (i32.const 438))\n  (func (export \"؟\") (result i32) (i32.const 439))\n  (func (export \"፧\") (result i32) (i32.const 440))\n  (func (export \"⁇\") (result i32) (i32.const 441))\n  (func (export \"⍰\") (result i32) (i32.const 442))\n  (func (export \"❓\") (result i32) (i32.const 443))\n  (func (export \"❔\") (result i32) (i32.const 444))\n  (func (export \"⳺\") (result i32) (i32.const 445))\n  (func (export \"⳻\") (result i32) (i32.const 446))\n  (func (export \"⸮\") (result i32) (i32.const 447))\n  (func (export \"㉄\") (result i32) (i32.const 448))\n  (func (export \"꘏\") (result i32) (i32.const 449))\n  (func (export \"꛷\") (result i32) (i32.const 450))\n  (func (export \"︖\") (result i32) (i32.const 451))\n  (func (export \"﹖\") (result i32) (i32.const 452))\n  (func (export \"？\") (result i32) (i32.const 453))\n  (func (export \"𑅃\") (result i32) (i32.const 454))\n  (func (export \"𞥟\") (result i32) (i32.const 455))\n  (func (export \"󠀿\") (result i32) (i32.const 456))\n  (func (export \"𖡄\") (result i32) (i32.const 457))\n  (func (export \"⯑\") (result i32) (i32.const 458))\n\n  ;; Test that different present and historical representations of the\n  ;; \"paragraph\" concept are distinct. (U+2029 is covered above).\n  (func (export \"¶\") (result i32) (i32.const 459))\n  (func (export \"⁋\") (result i32) (i32.const 460))\n  (func (export \"܀\") (result i32) (i32.const 461))\n  (func (export \"჻\") (result i32) (i32.const 462))\n  (func (export \"፨\") (result i32) (i32.const 463))\n  (func (export \"〷\") (result i32) (i32.const 464))\n  (func (export \"❡\") (result i32) (i32.const 465))\n  (func (export \"⸏\") (result i32) (i32.const 466))\n  (func (export \"⸐\") (result i32) (i32.const 467))\n  (func (export \"⸑\") (result i32) (i32.const 468))\n  (func (export \"⸎\") (result i32) (i32.const 469))\n  (func (export \"\\14\") (result i32) (i32.const 470)) ;; ¶ in CP437\n  (func (export \"☙\") (result i32) (i32.const 471))\n  (func (export \"⸿\") (result i32) (i32.const 472))\n  (func (export \"〇\") (result i32) (i32.const 473))\n  (func (export \"๛\") (result i32) (i32.const 474))\n\n  ;; Test an unusual character.\n  (func (export \"ꙮ\") (result i32) (i32.const 475))\n\n  ;; Test the three characters whose normalization forms under NFC, NFD, NFKC,\n  ;; and NFKD are all different.\n  ;; http://unicode.org/faq/normalization.html#6\n  (func (export \"ϓ\") (result i32) (i32.const 476))\n  (func (export \"ϔ\") (result i32) (i32.const 477))\n  (func (export \"ẛ\") (result i32) (i32.const 478))\n)\n\n(assert_return (invoke \"\") (i32.const 0))\n(assert_return (invoke \"0\") (i32.const 1))\n(assert_return (invoke \"-0\") (i32.const 2))\n(assert_return (invoke \"_\") (i32.const 3))\n(assert_return (invoke \"$\") (i32.const 4))\n(assert_return (invoke \"@\") (i32.const 5))\n(assert_return (invoke \"~!@#$%^&*()_+`-={}|[]\\\\:\\\";'<>?,./ \") (i32.const 6))\n(assert_return (invoke \"NaN\") (i32.const 7))\n(assert_return (invoke \"Infinity\") (i32.const 8))\n(assert_return (invoke \"if\") (i32.const 9))\n(assert_return (invoke \"malloc\") (i32.const 10))\n(assert_return (invoke \"_malloc\") (i32.const 11))\n(assert_return (invoke \"__malloc\") (i32.const 12))\n(assert_return (invoke \"a\") (i32.const 13))\n(assert_return (invoke \"A\") (i32.const 14))\n(assert_return (invoke \"﻿\") (i32.const 15))\n(assert_return (invoke \"Å\") (i32.const 16))\n(assert_return (invoke \"Å\") (i32.const 17))\n(assert_return (invoke \"Å\") (i32.const 18))\n(assert_return (invoke \"ﬃ\") (i32.const 19))\n(assert_return (invoke \"fﬁ\") (i32.const 20))\n(assert_return (invoke \"ffi\") (i32.const 21))\n(assert_return (invoke \"\\00\\01\\02\\03\\04\\05\\06\\07\\08\\09\\0a\\0b\\0c\\0d\\0e\\0f\") (i32.const 22))\n(assert_return (invoke \"\\10\\11\\12\\13\\14\\15\\16\\17\\18\\19\\1a\\1b\\1c\\1d\\1e\\1f\") (i32.const 23))\n(assert_return (invoke \" \\7f\") (i32.const 24))\n(assert_return (invoke \"\\c2\\80\\c2\\81\\c2\\82\\c2\\83\\c2\\84\\c2\\85\\c2\\86\\c2\\87\\c2\\88\\c2\\89\\c2\\8a\\c2\\8b\\c2\\8c\\c2\\8d\\c2\\8e\\c2\\8f\") (i32.const 25))\n(assert_return (invoke \"\\c2\\90\\c2\\91\\c2\\92\\c2\\93\\c2\\94\\c2\\95\\c2\\96\\c2\\97\\c2\\98\\c2\\99\\c2\\9a\\c2\\9b\\c2\\9c\\c2\\9d\\c2\\9e\\c2\\9f\") (i32.const 26))\n(assert_return (invoke \"\\ef\\bf\\b0\\ef\\bf\\b1\\ef\\bf\\b2\\ef\\bf\\b3\\ef\\bf\\b4\\ef\\bf\\b5\\ef\\bf\\b6\\ef\\bf\\b7\") (i32.const 27))\n(assert_return (invoke \"\\ef\\bf\\b8\\ef\\bf\\b9\\ef\\bf\\ba\\ef\\bf\\bb\\ef\\bf\\bc\\ef\\bf\\bd\\ef\\bf\\be\\ef\\bf\\bf\") (i32.const 28))\n(assert_return (invoke \"␀␁␂␃␄␅␆␇␈␉␊␋␌␍␎␏\") (i32.const 29))\n(assert_return (invoke \"␐␑␒␓␔␕␖␗␘␙␚␛␜␝␞␟\") (i32.const 30))\n(assert_return (invoke \"␠␡\") (i32.const 31))\n(assert_return (invoke \"￰￱￲￳￴￵￶￷￸￹￺￻￼�\") (i32.const 32))\n(assert_return (invoke \"‍\") (i32.const 33))\n(assert_return (invoke \"‌\") (i32.const 34))\n(assert_return (invoke \"͏\") (i32.const 35))\n(assert_return (invoke \"⁠\") (i32.const 36))\n(assert_return (invoke \"⵿\") (i32.const 37))\n(assert_return (invoke \"𑁿\") (i32.const 38))\n(assert_return (invoke \"᠎\") (i32.const 39))\n(assert_return (invoke \"￯​ ­⁠ ‮‭\") (i32.const 40))\n(assert_return (invoke \"‎‏‑  ‪‫‬ ⁦⁧⁨⁩\") (i32.const 41))\n(assert_return (invoke \"⁪⁫⁬⁭⁮⁯\") (i32.const 42))\n(assert_return (invoke \"⁡⁢⁣⁤\") (i32.const 43))\n(assert_return (invoke \"𐀀󟿿􏿿\") (i32.const 44))\n(assert_return (invoke \"Z̴͇̫̥̪͓͈͔͎̗̞̺̯̱̞̙̱̜̖̠̏͆̆͛͌͘͞ḁ̶̰̳̭͙̲̱̹̝͎̼͗ͨ̎̄̆͗̿̀́͟͡l̶̷͉̩̹̫̝͖̙̲̼͇͚͍̮͎̥̞̈́͊͗ͦ̈́ͫ̇́̚ͅͅg̶͕͔͚̩̓̐̅ͮ̔̐̎̂̏̾͊̍͋͊ͧ́̆ͦ͞o̡͋̔͐ͪͩ͏̢̧̫̙̤̮͖͙͓̺̜̩̼̘̠́\") (i32.const 45))\n(assert_return (invoke \"ᅟᅠㅤﾠ\") (i32.const 46))\n(assert_return (invoke \"︀\") (i32.const 47))\n(assert_return (invoke \"︄\") (i32.const 48))\n(assert_return (invoke \"󠄀\") (i32.const 49))\n(assert_return (invoke \"󠇯\") (i32.const 50))\n(assert_return (invoke \"̈\") (i32.const 51))\n(assert_return (invoke \"\\0a\") (i32.const 52))\n(assert_return (invoke \"␤\") (i32.const 53))\n(assert_return (invoke \" \") (i32.const 54))\n(assert_return (invoke \"\\0d\") (i32.const 55))\n(assert_return (invoke \"\\0d\\0a\") (i32.const 56))\n(assert_return (invoke \"\\0a\\0d\") (i32.const 57))\n(assert_return (invoke \"\\1e\") (i32.const 58))\n(assert_return (invoke \"\\0b\") (i32.const 59))\n(assert_return (invoke \"\\0c\") (i32.const 60))\n(assert_return (invoke \"\\c2\\85\") (i32.const 61))\n(assert_return (invoke \" \") (i32.const 62))\n(assert_return (invoke \"…\") (i32.const 63))\n(assert_return (invoke \"⏎\") (i32.const 64))\n(assert_return (invoke \"\\c2\\8b\") (i32.const 65))\n(assert_return (invoke \"\\c2\\8c\") (i32.const 66))\n(assert_return (invoke \"\\c2\\8d\") (i32.const 67))\n(assert_return (invoke \"↵\") (i32.const 68))\n(assert_return (invoke \"↩\") (i32.const 69))\n(assert_return (invoke \"⌤\") (i32.const 70))\n(assert_return (invoke \"⤶\") (i32.const 71))\n(assert_return (invoke \"↲\") (i32.const 72))\n(assert_return (invoke \"⮨\") (i32.const 73))\n(assert_return (invoke \"⮰\") (i32.const 74))\n(assert_return (invoke \"�\") (i32.const 75))\n(assert_return (invoke \"\\ef\\b7\\90\") (i32.const 76))\n(assert_return (invoke \"\\ef\\b7\\91\") (i32.const 77))\n(assert_return (invoke \"\\ef\\b7\\92\") (i32.const 78))\n(assert_return (invoke \"\\ef\\b7\\93\") (i32.const 79))\n(assert_return (invoke \"\\ef\\b7\\94\") (i32.const 80))\n(assert_return (invoke \"\\ef\\b7\\95\") (i32.const 81))\n(assert_return (invoke \"\\ef\\b7\\96\") (i32.const 82))\n(assert_return (invoke \"\\ef\\b7\\97\") (i32.const 83))\n(assert_return (invoke \"\\ef\\b7\\98\") (i32.const 84))\n(assert_return (invoke \"\\ef\\b7\\99\") (i32.const 85))\n(assert_return (invoke \"\\ef\\b7\\9a\") (i32.const 86))\n(assert_return (invoke \"\\ef\\b7\\9b\") (i32.const 87))\n(assert_return (invoke \"\\ef\\b7\\9c\") (i32.const 88))\n(assert_return (invoke \"\\ef\\b7\\9d\") (i32.const 89))\n(assert_return (invoke \"\\ef\\b7\\9e\") (i32.const 90))\n(assert_return (invoke \"\\ef\\b7\\9f\") (i32.const 91))\n(assert_return (invoke \"\\ef\\b7\\a0\") (i32.const 92))\n(assert_return (invoke \"\\ef\\b7\\a1\") (i32.const 93))\n(assert_return (invoke \"\\ef\\b7\\a2\") (i32.const 94))\n(assert_return (invoke \"\\ef\\b7\\a3\") (i32.const 95))\n(assert_return (invoke \"\\ef\\b7\\a4\") (i32.const 96))\n(assert_return (invoke \"\\ef\\b7\\a5\") (i32.const 97))\n(assert_return (invoke \"\\ef\\b7\\a6\") (i32.const 98))\n(assert_return (invoke \"\\ef\\b7\\a7\") (i32.const 99))\n(assert_return (invoke \"\\ef\\b7\\a8\") (i32.const 100))\n(assert_return (invoke \"\\ef\\b7\\a9\") (i32.const 101))\n(assert_return (invoke \"\\ef\\b7\\aa\") (i32.const 102))\n(assert_return (invoke \"\\ef\\b7\\ab\") (i32.const 103))\n(assert_return (invoke \"\\ef\\b7\\ac\") (i32.const 104))\n(assert_return (invoke \"\\ef\\b7\\ad\") (i32.const 105))\n(assert_return (invoke \"\\ef\\b7\\ae\") (i32.const 106))\n(assert_return (invoke \"\\ef\\b7\\af\") (i32.const 107))\n(assert_return (invoke \"\\ef\\bf\\be\") (i32.const 108))\n(assert_return (invoke \"\\ef\\bf\\bf\") (i32.const 109))\n(assert_return (invoke \"\\f0\\9f\\bf\\be\") (i32.const 110))\n(assert_return (invoke \"\\f0\\9f\\bf\\bf\") (i32.const 111))\n(assert_return (invoke \"\\f0\\af\\bf\\be\") (i32.const 112))\n(assert_return (invoke \"\\f0\\af\\bf\\bf\") (i32.const 113))\n(assert_return (invoke \"\\f0\\bf\\bf\\be\") (i32.const 114))\n(assert_return (invoke \"\\f0\\bf\\bf\\bf\") (i32.const 115))\n(assert_return (invoke \"\\f1\\8f\\bf\\be\") (i32.const 116))\n(assert_return (invoke \"\\f1\\8f\\bf\\bf\") (i32.const 117))\n(assert_return (invoke \"\\f1\\9f\\bf\\be\") (i32.const 118))\n(assert_return (invoke \"\\f1\\9f\\bf\\bf\") (i32.const 119))\n(assert_return (invoke \"\\f1\\af\\bf\\be\") (i32.const 120))\n(assert_return (invoke \"\\f1\\af\\bf\\bf\") (i32.const 121))\n(assert_return (invoke \"\\f1\\bf\\bf\\be\") (i32.const 122))\n(assert_return (invoke \"\\f1\\bf\\bf\\bf\") (i32.const 123))\n(assert_return (invoke \"\\f2\\8f\\bf\\be\") (i32.const 124))\n(assert_return (invoke \"\\f2\\8f\\bf\\bf\") (i32.const 125))\n(assert_return (invoke \"\\f2\\9f\\bf\\be\") (i32.const 126))\n(assert_return (invoke \"\\f2\\9f\\bf\\bf\") (i32.const 127))\n(assert_return (invoke \"\\f2\\af\\bf\\be\") (i32.const 128))\n(assert_return (invoke \"\\f2\\af\\bf\\bf\") (i32.const 129))\n(assert_return (invoke \"\\f2\\bf\\bf\\be\") (i32.const 130))\n(assert_return (invoke \"\\f2\\bf\\bf\\bf\") (i32.const 131))\n(assert_return (invoke \"\\f3\\8f\\bf\\be\") (i32.const 132))\n(assert_return (invoke \"\\f3\\8f\\bf\\bf\") (i32.const 133))\n(assert_return (invoke \"\\f3\\9f\\bf\\be\") (i32.const 134))\n(assert_return (invoke \"\\f3\\9f\\bf\\bf\") (i32.const 135))\n(assert_return (invoke \"\\f3\\af\\bf\\be\") (i32.const 136))\n(assert_return (invoke \"\\f3\\af\\bf\\bf\") (i32.const 137))\n(assert_return (invoke \"\\f3\\bf\\bf\\be\") (i32.const 138))\n(assert_return (invoke \"\\f3\\bf\\bf\\bf\") (i32.const 139))\n(assert_return (invoke \"\\f4\\8f\\bf\\be\") (i32.const 140))\n(assert_return (invoke \"\\f4\\8f\\bf\\bf\") (i32.const 141))\n(assert_return (invoke \"̈‽̈̉\") (i32.const 142))\n(assert_return (invoke \"abc\") (i32.const 143))\n(assert_return (invoke \"‭abc\") (i32.const 144))\n(assert_return (invoke \"‮cba\") (i32.const 145))\n(assert_return (invoke \"‭abc‮\") (i32.const 146))\n(assert_return (invoke \"‮cba‭\") (i32.const 147))\n(assert_return (invoke \"𝑨\") (i32.const 148))\n(assert_return (invoke \"𝐴\") (i32.const 149))\n(assert_return (invoke \"𝘈\") (i32.const 150))\n(assert_return (invoke \"𝘼\") (i32.const 151))\n(assert_return (invoke \"𝐀\") (i32.const 152))\n(assert_return (invoke \"𝓐\") (i32.const 153))\n(assert_return (invoke \"𝕬\") (i32.const 154))\n(assert_return (invoke \"𝗔\") (i32.const 155))\n(assert_return (invoke \"𝒜\") (i32.const 156))\n(assert_return (invoke \"𝔄\") (i32.const 157))\n(assert_return (invoke \"𝔸\") (i32.const 158))\n(assert_return (invoke \"𝖠\") (i32.const 159))\n(assert_return (invoke \"𝙰\") (i32.const 160))\n(assert_return (invoke \"ᴀ\") (i32.const 161))\n(assert_return (invoke \"ᴬ\") (i32.const 162))\n(assert_return (invoke \"Ⓐ\") (i32.const 163))\n(assert_return (invoke \"Ａ\") (i32.const 164))\n(assert_return (invoke \"🄐\") (i32.const 165))\n(assert_return (invoke \"🄰\") (i32.const 166))\n(assert_return (invoke \"󠁁\") (i32.const 167))\n(assert_return (invoke \"U+0041\") (i32.const 168))\n(assert_return (invoke \"A​\") (i32.const 169))\n(assert_return (invoke \"А\") (i32.const 170))\n(assert_return (invoke \"Ꙗ\") (i32.const 171))\n(assert_return (invoke \"ⷼ\") (i32.const 172))\n(assert_return (invoke \"ⷶ\") (i32.const 173))\n(assert_return (invoke \"Ɐ\") (i32.const 174))\n(assert_return (invoke \"🅐\") (i32.const 175))\n(assert_return (invoke \"🅰\") (i32.const 176))\n(assert_return (invoke \"Ⱝ\") (i32.const 177))\n(assert_return (invoke \"𐐂\") (i32.const 178))\n(assert_return (invoke \"𐐈\") (i32.const 179))\n(assert_return (invoke \"𐒰\") (i32.const 180))\n(assert_return (invoke \"À\") (i32.const 181))\n(assert_return (invoke \"Á\") (i32.const 182))\n(assert_return (invoke \"Â\") (i32.const 183))\n(assert_return (invoke \"Ã\") (i32.const 184))\n(assert_return (invoke \"Ä\") (i32.const 185))\n(assert_return (invoke \"Ā\") (i32.const 186))\n(assert_return (invoke \"Ă\") (i32.const 187))\n(assert_return (invoke \"Ą\") (i32.const 188))\n(assert_return (invoke \"Ǎ\") (i32.const 189))\n(assert_return (invoke \"Ǟ\") (i32.const 190))\n(assert_return (invoke \"Ǡ\") (i32.const 191))\n(assert_return (invoke \"Ǻ\") (i32.const 192))\n(assert_return (invoke \"Ȁ\") (i32.const 193))\n(assert_return (invoke \"Ȃ\") (i32.const 194))\n(assert_return (invoke \"Ȧ\") (i32.const 195))\n(assert_return (invoke \"Ⱥ\") (i32.const 196))\n(assert_return (invoke \"Ӑ\") (i32.const 197))\n(assert_return (invoke \"Ӓ\") (i32.const 198))\n(assert_return (invoke \"ߊ\") (i32.const 199))\n(assert_return (invoke \"ࠡ\") (i32.const 200))\n(assert_return (invoke \"ࠢ\") (i32.const 201))\n(assert_return (invoke \"ࠣ\") (i32.const 202))\n(assert_return (invoke \"ࠤ\") (i32.const 203))\n(assert_return (invoke \"ࠥ\") (i32.const 204))\n(assert_return (invoke \"ऄ\") (i32.const 205))\n(assert_return (invoke \"अ\") (i32.const 206))\n(assert_return (invoke \"ॲ\") (i32.const 207))\n(assert_return (invoke \"অ\") (i32.const 208))\n(assert_return (invoke \"ਅ\") (i32.const 209))\n(assert_return (invoke \"અ\") (i32.const 210))\n(assert_return (invoke \"ଅ\") (i32.const 211))\n(assert_return (invoke \"அ\") (i32.const 212))\n(assert_return (invoke \"అ\") (i32.const 213))\n(assert_return (invoke \"ಅ\") (i32.const 214))\n(assert_return (invoke \"അ\") (i32.const 215))\n(assert_return (invoke \"ะ\") (i32.const 216))\n(assert_return (invoke \"ະ\") (i32.const 217))\n(assert_return (invoke \"༁\") (i32.const 218))\n(assert_return (invoke \"ཨ\") (i32.const 219))\n(assert_return (invoke \"ྸ\") (i32.const 220))\n(assert_return (invoke \"အ\") (i32.const 221))\n(assert_return (invoke \"ဢ\") (i32.const 222))\n(assert_return (invoke \"ႜ\") (i32.const 223))\n(assert_return (invoke \"ᅡ\") (i32.const 224))\n(assert_return (invoke \"አ\") (i32.const 225))\n(assert_return (invoke \"ዐ\") (i32.const 226))\n(assert_return (invoke \"Ꭰ\") (i32.const 227))\n(assert_return (invoke \"ᐊ\") (i32.const 228))\n(assert_return (invoke \"ᖳ\") (i32.const 229))\n(assert_return (invoke \"ᚨ\") (i32.const 230))\n(assert_return (invoke \"ᚪ\") (i32.const 231))\n(assert_return (invoke \"ᛆ\") (i32.const 232))\n(assert_return (invoke \"ᜀ\") (i32.const 233))\n(assert_return (invoke \"ᜠ\") (i32.const 234))\n(assert_return (invoke \"ᝀ\") (i32.const 235))\n(assert_return (invoke \"ᝠ\") (i32.const 236))\n(assert_return (invoke \"ᠠ\") (i32.const 237))\n(assert_return (invoke \"ᢇ\") (i32.const 238))\n(assert_return (invoke \"ᤠ\") (i32.const 239))\n(assert_return (invoke \"ᥣ\") (i32.const 240))\n(assert_return (invoke \"ᨕ\") (i32.const 241))\n(assert_return (invoke \"ᩋ\") (i32.const 242))\n(assert_return (invoke \"ᩡ\") (i32.const 243))\n(assert_return (invoke \"ᮃ\") (i32.const 244))\n(assert_return (invoke \"ᯀ\") (i32.const 245))\n(assert_return (invoke \"ᯁ\") (i32.const 246))\n(assert_return (invoke \"ᰣ\") (i32.const 247))\n(assert_return (invoke \"Ḁ\") (i32.const 248))\n(assert_return (invoke \"Ạ\") (i32.const 249))\n(assert_return (invoke \"Ả\") (i32.const 250))\n(assert_return (invoke \"Ấ\") (i32.const 251))\n(assert_return (invoke \"Ầ\") (i32.const 252))\n(assert_return (invoke \"Ẩ\") (i32.const 253))\n(assert_return (invoke \"Ẫ\") (i32.const 254))\n(assert_return (invoke \"Ậ\") (i32.const 255))\n(assert_return (invoke \"Ắ\") (i32.const 256))\n(assert_return (invoke \"Ằ\") (i32.const 257))\n(assert_return (invoke \"Ẳ\") (i32.const 258))\n(assert_return (invoke \"Ẵ\") (i32.const 259))\n(assert_return (invoke \"Ặ\") (i32.const 260))\n(assert_return (invoke \"あ\") (i32.const 261))\n(assert_return (invoke \"ア\") (i32.const 262))\n(assert_return (invoke \"ㄚ\") (i32.const 263))\n(assert_return (invoke \"ㅏ\") (i32.const 264))\n(assert_return (invoke \"㈎\") (i32.const 265))\n(assert_return (invoke \"㈏\") (i32.const 266))\n(assert_return (invoke \"㈐\") (i32.const 267))\n(assert_return (invoke \"㈑\") (i32.const 268))\n(assert_return (invoke \"㈒\") (i32.const 269))\n(assert_return (invoke \"㈓\") (i32.const 270))\n(assert_return (invoke \"㈔\") (i32.const 271))\n(assert_return (invoke \"㈕\") (i32.const 272))\n(assert_return (invoke \"㈖\") (i32.const 273))\n(assert_return (invoke \"㈗\") (i32.const 274))\n(assert_return (invoke \"㈘\") (i32.const 275))\n(assert_return (invoke \"㈙\") (i32.const 276))\n(assert_return (invoke \"㈚\") (i32.const 277))\n(assert_return (invoke \"㈛\") (i32.const 278))\n(assert_return (invoke \"㉮\") (i32.const 279))\n(assert_return (invoke \"㉯\") (i32.const 280))\n(assert_return (invoke \"㉰\") (i32.const 281))\n(assert_return (invoke \"㉱\") (i32.const 282))\n(assert_return (invoke \"㉲\") (i32.const 283))\n(assert_return (invoke \"㉳\") (i32.const 284))\n(assert_return (invoke \"㉴\") (i32.const 285))\n(assert_return (invoke \"㉵\") (i32.const 286))\n(assert_return (invoke \"㉶\") (i32.const 287))\n(assert_return (invoke \"㉷\") (i32.const 288))\n(assert_return (invoke \"㉸\") (i32.const 289))\n(assert_return (invoke \"㉹\") (i32.const 290))\n(assert_return (invoke \"㉺\") (i32.const 291))\n(assert_return (invoke \"㉻\") (i32.const 292))\n(assert_return (invoke \"㋐\") (i32.const 293))\n(assert_return (invoke \"ꀊ\") (i32.const 294))\n(assert_return (invoke \"ꓮ\") (i32.const 295))\n(assert_return (invoke \"ꕉ\") (i32.const 296))\n(assert_return (invoke \"ꚠ\") (i32.const 297))\n(assert_return (invoke \"ꠀ\") (i32.const 298))\n(assert_return (invoke \"ꠣ\") (i32.const 299))\n(assert_return (invoke \"ꡝ\") (i32.const 300))\n(assert_return (invoke \"ꢂ\") (i32.const 301))\n(assert_return (invoke \"꣪\") (i32.const 302))\n(assert_return (invoke \"ꤢ\") (i32.const 303))\n(assert_return (invoke \"ꥆ\") (i32.const 304))\n(assert_return (invoke \"ꦄ\") (i32.const 305))\n(assert_return (invoke \"ꨀ\") (i32.const 306))\n(assert_return (invoke \"ｱ\") (i32.const 307))\n(assert_return (invoke \"ￂ\") (i32.const 308))\n(assert_return (invoke \"𐀀\") (i32.const 309))\n(assert_return (invoke \"𐊀\") (i32.const 310))\n(assert_return (invoke \"𐊠\") (i32.const 311))\n(assert_return (invoke \"𐌀\") (i32.const 312))\n(assert_return (invoke \"𐎠\") (i32.const 313))\n(assert_return (invoke \"𐒖\") (i32.const 314))\n(assert_return (invoke \"𐔀\") (i32.const 315))\n(assert_return (invoke \"𐝀\") (i32.const 316))\n(assert_return (invoke \"𐠀\") (i32.const 317))\n(assert_return (invoke \"𐤠\") (i32.const 318))\n(assert_return (invoke \"𐦀\") (i32.const 319))\n(assert_return (invoke \"𐦠\") (i32.const 320))\n(assert_return (invoke \"𐨀\") (i32.const 321))\n(assert_return (invoke \"𐬀\") (i32.const 322))\n(assert_return (invoke \"𐰀\") (i32.const 323))\n(assert_return (invoke \"𐰁\") (i32.const 324))\n(assert_return (invoke \"𐲀\") (i32.const 325))\n(assert_return (invoke \"𑀅\") (i32.const 326))\n(assert_return (invoke \"𑂃\") (i32.const 327))\n(assert_return (invoke \"𑄧\") (i32.const 328))\n(assert_return (invoke \"𑅐\") (i32.const 329))\n(assert_return (invoke \"𑆃\") (i32.const 330))\n(assert_return (invoke \"𑈀\") (i32.const 331))\n(assert_return (invoke \"𑊀\") (i32.const 332))\n(assert_return (invoke \"𑊰\") (i32.const 333))\n(assert_return (invoke \"𑌅\") (i32.const 334))\n(assert_return (invoke \"𑍰\") (i32.const 335))\n(assert_return (invoke \"𑐀\") (i32.const 336))\n(assert_return (invoke \"𑒁\") (i32.const 337))\n(assert_return (invoke \"𑖀\") (i32.const 338))\n(assert_return (invoke \"𑘀\") (i32.const 339))\n(assert_return (invoke \"𑚀\") (i32.const 340))\n(assert_return (invoke \"𑜒\") (i32.const 341))\n(assert_return (invoke \"𑜠\") (i32.const 342))\n(assert_return (invoke \"𑢡\") (i32.const 343))\n(assert_return (invoke \"𑫕\") (i32.const 344))\n(assert_return (invoke \"𑰀\") (i32.const 345))\n(assert_return (invoke \"𑲏\") (i32.const 346))\n(assert_return (invoke \"𑲯\") (i32.const 347))\n(assert_return (invoke \"𒀀\") (i32.const 348))\n(assert_return (invoke \"𖧕\") (i32.const 349))\n(assert_return (invoke \"𖩆\") (i32.const 350))\n(assert_return (invoke \"𖫧\") (i32.const 351))\n(assert_return (invoke \"𖽔\") (i32.const 352))\n(assert_return (invoke \"𛱁\") (i32.const 353))\n(assert_return (invoke \"𛱤\") (i32.const 354))\n(assert_return (invoke \"𞠣\") (i32.const 355))\n(assert_return (invoke \"🇦\") (i32.const 356))\n(assert_return (invoke \"Ɑ\") (i32.const 357))\n(assert_return (invoke \"Λ\") (i32.const 358))\n(assert_return (invoke \"Ɒ\") (i32.const 359))\n(assert_return (invoke \"ª\") (i32.const 360))\n(assert_return (invoke \"∀\") (i32.const 361))\n(assert_return (invoke \"₳\") (i32.const 362))\n(assert_return (invoke \"𐤀\") (i32.const 363))\n(assert_return (invoke \"Ⲁ\") (i32.const 364))\n(assert_return (invoke \"𐌰\") (i32.const 365))\n(assert_return (invoke \"Ά\") (i32.const 366))\n(assert_return (invoke \"Α\") (i32.const 367))\n(assert_return (invoke \"Ἀ\") (i32.const 368))\n(assert_return (invoke \"Ἁ\") (i32.const 369))\n(assert_return (invoke \"Ἂ\") (i32.const 370))\n(assert_return (invoke \"Ἃ\") (i32.const 371))\n(assert_return (invoke \"Ἄ\") (i32.const 372))\n(assert_return (invoke \"Ἅ\") (i32.const 373))\n(assert_return (invoke \"Ἆ\") (i32.const 374))\n(assert_return (invoke \"Ἇ\") (i32.const 375))\n(assert_return (invoke \"ᾈ\") (i32.const 376))\n(assert_return (invoke \"ᾉ\") (i32.const 377))\n(assert_return (invoke \"ᾊ\") (i32.const 378))\n(assert_return (invoke \"ᾋ\") (i32.const 379))\n(assert_return (invoke \"ᾌ\") (i32.const 380))\n(assert_return (invoke \"ᾍ\") (i32.const 381))\n(assert_return (invoke \"ᾎ\") (i32.const 382))\n(assert_return (invoke \"ᾏ\") (i32.const 383))\n(assert_return (invoke \"Ᾰ\") (i32.const 384))\n(assert_return (invoke \"Ᾱ\") (i32.const 385))\n(assert_return (invoke \"Ὰ\") (i32.const 386))\n(assert_return (invoke \"Ά\") (i32.const 387))\n(assert_return (invoke \"ᾼ\") (i32.const 388))\n(assert_return (invoke \"𝚨\") (i32.const 389))\n(assert_return (invoke \"𝛢\") (i32.const 390))\n(assert_return (invoke \"𝜜\") (i32.const 391))\n(assert_return (invoke \"𝝖\") (i32.const 392))\n(assert_return (invoke \"𝞐\") (i32.const 393))\n(assert_return (invoke \"⍶\") (i32.const 394))\n(assert_return (invoke \"⍺\") (i32.const 395))\n(assert_return (invoke \"⩜\") (i32.const 396))\n(assert_return (invoke \"ᗅ\") (i32.const 397))\n(assert_return (invoke \"Ꭺ\") (i32.const 398))\n(assert_return (invoke \")˺˼𔗏𝅴𝅶𝅸𝅺⁾₎❩❫⟯﴿︶﹚）｠󠀩❳❵⟧⟩⟫⟭⦈⦊⦖⸣⸥︘︸︺︼︾﹀﹂﹄﹈﹜﹞］｝｣󠁝󠁽»’”›❯\") (i32.const 399))\n(assert_return (invoke \"(˹˻𔗎𝅳𝅵𝅷𝅹⁽₍❨❪⟮﴾︵﹙（｟󠀨❲❴⟦⟨⟪⟬⦇⦉⦕⸢⸤︗︷︹︻︽︿﹁﹃﹇﹛﹝［｛｢󠁛󠁻«‘“‹❮\") (i32.const 400))\n(assert_return (invoke \"𝪋𝪤\") (i32.const 401))\n(assert_return (invoke \"𝪋\") (i32.const 402))\n(assert_return (invoke \"½\") (i32.const 403))\n(assert_return (invoke \"1⁄2\") (i32.const 404))\n(assert_return (invoke \"1/2\") (i32.const 405))\n(assert_return (invoke \"୳\") (i32.const 406))\n(assert_return (invoke \"൴\") (i32.const 407))\n(assert_return (invoke \"⳽\") (i32.const 408))\n(assert_return (invoke \"꠱\") (i32.const 409))\n(assert_return (invoke \"𐅁\") (i32.const 410))\n(assert_return (invoke \"𐅵\") (i32.const 411))\n(assert_return (invoke \"𐅶\") (i32.const 412))\n(assert_return (invoke \"𐦽\") (i32.const 413))\n(assert_return (invoke \"𐹻\") (i32.const 414))\n(assert_return (invoke \"＂\") (i32.const 415))\n(assert_return (invoke \"\\7f\") (i32.const 416))\n(assert_return (invoke \"\\08\") (i32.const 417))\n(assert_return (invoke \"⌫\") (i32.const 418))\n(assert_return (invoke \"⌦\") (i32.const 419))\n(assert_return (invoke \"␈\") (i32.const 420))\n(assert_return (invoke \"␡\") (i32.const 421))\n(assert_return (invoke \"᷻\") (i32.const 422))\n(assert_return (invoke \"\\0f\") (i32.const 423))\n(assert_return (invoke \"←\") (i32.const 424))\n(assert_return (invoke \"⌧\") (i32.const 425))\n(assert_return (invoke \"⍒\") (i32.const 426))\n(assert_return (invoke \"⍔\") (i32.const 427))\n(assert_return (invoke \"⍢\") (i32.const 428))\n(assert_return (invoke \"⍫\") (i32.const 429))\n(assert_return (invoke \"\\1a\") (i32.const 430))\n(assert_return (invoke \"␦\") (i32.const 431))\n(assert_return (invoke \"␚\") (i32.const 432))\n(assert_return (invoke \"￼\") (i32.const 433))\n(assert_return (invoke \"?\") (i32.const 434))\n(assert_return (invoke \"¿\") (i32.const 435))\n(assert_return (invoke \"᥅\") (i32.const 436))\n(assert_return (invoke \";\") (i32.const 437))\n(assert_return (invoke \"՞\") (i32.const 438))\n(assert_return (invoke \"؟\") (i32.const 439))\n(assert_return (invoke \"፧\") (i32.const 440))\n(assert_return (invoke \"⁇\") (i32.const 441))\n(assert_return (invoke \"⍰\") (i32.const 442))\n(assert_return (invoke \"❓\") (i32.const 443))\n(assert_return (invoke \"❔\") (i32.const 444))\n(assert_return (invoke \"⳺\") (i32.const 445))\n(assert_return (invoke \"⳻\") (i32.const 446))\n(assert_return (invoke \"⸮\") (i32.const 447))\n(assert_return (invoke \"㉄\") (i32.const 448))\n(assert_return (invoke \"꘏\") (i32.const 449))\n(assert_return (invoke \"꛷\") (i32.const 450))\n(assert_return (invoke \"︖\") (i32.const 451))\n(assert_return (invoke \"﹖\") (i32.const 452))\n(assert_return (invoke \"？\") (i32.const 453))\n(assert_return (invoke \"𑅃\") (i32.const 454))\n(assert_return (invoke \"𞥟\") (i32.const 455))\n(assert_return (invoke \"󠀿\") (i32.const 456))\n(assert_return (invoke \"𖡄\") (i32.const 457))\n(assert_return (invoke \"⯑\") (i32.const 458))\n(assert_return (invoke \"¶\") (i32.const 459))\n(assert_return (invoke \"⁋\") (i32.const 460))\n(assert_return (invoke \"܀\") (i32.const 461))\n(assert_return (invoke \"჻\") (i32.const 462))\n(assert_return (invoke \"፨\") (i32.const 463))\n(assert_return (invoke \"〷\") (i32.const 464))\n(assert_return (invoke \"❡\") (i32.const 465))\n(assert_return (invoke \"⸏\") (i32.const 466))\n(assert_return (invoke \"⸐\") (i32.const 467))\n(assert_return (invoke \"⸑\") (i32.const 468))\n(assert_return (invoke \"⸎\") (i32.const 469))\n(assert_return (invoke \"\\14\") (i32.const 470))\n(assert_return (invoke \"☙\") (i32.const 471))\n(assert_return (invoke \"⸿\") (i32.const 472))\n(assert_return (invoke \"〇\") (i32.const 473))\n(assert_return (invoke \"๛\") (i32.const 474))\n(assert_return (invoke \"ꙮ\") (i32.const 475))\n(assert_return (invoke \"ϓ\") (i32.const 476))\n(assert_return (invoke \"ϔ\") (i32.const 477))\n(assert_return (invoke \"ẛ\") (i32.const 478))\n\n(module\n  ;; Test that we can use indices instead of names to reference imports,\n  ;; exports, functions and parameters.\n  (import \"spectest\" \"print_i32\" (func (param i32)))\n  (func (import \"spectest\" \"print_i32\") (param i32))\n  (func (param i32) (param i32)\n    (call 0 (local.get 0))\n    (call 1 (local.get 1))\n  )\n  (export \"print32\" (func 2))\n)\n\n(assert_return (invoke \"print32\" (i32.const 42) (i32.const 123)))\n"
  },
  {
    "path": "test/core/nop.wast",
    "content": ";; Test `nop` operator.\n\n(module\n  ;; Auxiliary definitions\n  (func $dummy)\n  (func $3-ary (param i32 i32 i32) (result i32)\n    local.get 0 local.get 1 local.get 2 i32.sub i32.add\n  )\n  (memory 1)\n\n  (func (export \"as-func-first\") (result i32)\n    (nop) (i32.const 1)\n  )\n  (func (export \"as-func-mid\") (result i32)\n    (call $dummy) (nop) (i32.const 2)\n  )\n  (func (export \"as-func-last\") (result i32)\n    (call $dummy) (i32.const 3) (nop)\n  )\n  (func (export \"as-func-everywhere\") (result i32)\n    (nop) (nop) (call $dummy) (nop) (i32.const 4) (nop) (nop)\n  )\n\n  (func (export \"as-drop-first\") (param i32)\n    (nop) (local.get 0) (drop)\n  )\n  (func (export \"as-drop-last\") (param i32)\n    (local.get 0) (nop) (drop)\n  )\n  (func (export \"as-drop-everywhere\") (param i32)\n    (nop) (nop) (local.get 0) (nop) (nop) (drop)\n  )\n\n  (func (export \"as-select-first\") (param i32) (result i32)\n    (nop) (local.get 0) (local.get 0) (local.get 0) (select)\n  )\n  (func (export \"as-select-mid1\") (param i32) (result i32)\n    (local.get 0) (nop) (local.get 0) (local.get 0) (select)\n  )\n  (func (export \"as-select-mid2\") (param i32) (result i32)\n    (local.get 0) (local.get 0) (nop) (local.get 0) (select)\n  )\n  (func (export \"as-select-last\") (param i32) (result i32)\n    (local.get 0) (local.get 0) (local.get 0) (nop) (select)\n  )\n  (func (export \"as-select-everywhere\") (param i32) (result i32)\n    (nop) (local.get 0) (nop) (nop) (local.get 0)\n    (nop) (nop) (local.get 0) (nop) (nop) (select)\n  )\n\n  (func (export \"as-block-first\") (result i32)\n    (block (result i32) (nop) (i32.const 2))\n  )\n  (func (export \"as-block-mid\") (result i32)\n    (block (result i32) (call $dummy) (nop) (i32.const 2))\n  )\n  (func (export \"as-block-last\") (result i32)\n    (block (result i32) (nop) (call $dummy) (i32.const 3) (nop))\n  )\n  (func (export \"as-block-everywhere\") (result i32)\n    (block (result i32)\n      (nop) (nop) (call $dummy) (nop) (i32.const 4) (nop) (nop)\n    )\n  )\n\n  (func (export \"as-loop-first\") (result i32)\n    (loop (result i32) (nop) (i32.const 2))\n  )\n  (func (export \"as-loop-mid\") (result i32)\n    (loop (result i32) (call $dummy) (nop) (i32.const 2))\n  )\n  (func (export \"as-loop-last\") (result i32)\n    (loop (result i32) (call $dummy) (i32.const 3) (nop))\n  )\n  (func (export \"as-loop-everywhere\") (result i32)\n    (loop (result i32)\n      (nop) (nop) (call $dummy) (nop) (i32.const 4) (nop) (nop)\n    )\n  )\n\n  (func (export \"as-if-condition\") (param i32)\n    (local.get 0) (nop) (if (then (call $dummy)))\n  )\n  (func (export \"as-if-then\") (param i32)\n    (if (local.get 0) (then (nop)) (else (call $dummy)))\n  )\n  (func (export \"as-if-else\") (param i32)\n    (if (local.get 0) (then (call $dummy)) (else (nop)))\n  )\n\n  (func (export \"as-br-first\") (param i32) (result i32)\n    (block (result i32) (nop) (local.get 0) (br 0))\n  )\n  (func (export \"as-br-last\") (param i32) (result i32)\n    (block (result i32) (local.get 0) (nop) (br 0))\n  )\n  (func (export \"as-br-everywhere\") (param i32) (result i32)\n    (block (result i32) (nop) (nop) (local.get 0) (nop) (nop) (br 0))\n  )\n\n  (func (export \"as-br_if-first\") (param i32) (result i32)\n    (block (result i32) (nop) (local.get 0) (local.get 0) (br_if 0))\n  )\n  (func (export \"as-br_if-mid\") (param i32) (result i32)\n    (block (result i32) (local.get 0) (nop) (local.get 0) (br_if 0))\n  )\n  (func (export \"as-br_if-last\") (param i32) (result i32)\n    (block (result i32) (local.get 0) (local.get 0) (nop) (br_if 0))\n  )\n  (func (export \"as-br_if-everywhere\") (param i32) (result i32)\n    (block (result i32)\n      (nop) (nop) (local.get 0) (nop) (nop) (local.get 0) (nop) (nop)\n      (br_if 0)\n    )\n  )\n\n  (func (export \"as-br_table-first\") (param i32) (result i32)\n    (block (result i32) (nop) (local.get 0) (local.get 0) (br_table 0 0))\n  )\n  (func (export \"as-br_table-mid\") (param i32) (result i32)\n    (block (result i32) (local.get 0) (nop) (local.get 0) (br_table 0 0))\n  )\n  (func (export \"as-br_table-last\") (param i32) (result i32)\n    (block (result i32) (local.get 0) (local.get 0) (nop) (br_table 0 0))\n  )\n  (func (export \"as-br_table-everywhere\") (param i32) (result i32)\n    (block (result i32)\n      (nop) (nop) (local.get 0) (nop) (nop) (local.get 0) (nop) (nop)\n      (br_table 0 0)\n    )\n  )\n\n  (func (export \"as-return-first\") (param i32) (result i32)\n    (nop) (local.get 0) (return)\n  )\n  (func (export \"as-return-last\") (param i32) (result i32)\n    (local.get 0) (nop) (return)\n  )\n  (func (export \"as-return-everywhere\") (param i32) (result i32)\n    (nop) (nop) (local.get 0) (nop) (nop) (return)\n  )\n\n  (func (export \"as-call-first\") (param i32 i32 i32) (result i32)\n    (nop) (local.get 0) (local.get 1) (local.get 2) (call $3-ary)\n  )\n  (func (export \"as-call-mid1\") (param i32 i32 i32) (result i32)\n    (local.get 0) (nop) (local.get 1) (local.get 2) (call $3-ary)\n  )\n  (func (export \"as-call-mid2\") (param i32 i32 i32) (result i32)\n    (local.get 0) (local.get 1) (nop) (local.get 2) (call $3-ary)\n  )\n  (func (export \"as-call-last\") (param i32 i32 i32) (result i32)\n    (local.get 0) (local.get 1) (local.get 2) (nop) (call $3-ary)\n  )\n  (func (export \"as-call-everywhere\") (param i32 i32 i32) (result i32)\n    (nop) (nop) (local.get 0) (nop) (nop) (local.get 1)\n    (nop) (nop) (local.get 2) (nop) (nop) (call $3-ary)\n  )\n\n  (func (export \"as-unary-first\") (param i32) (result i32)\n    (nop) (local.get 0) (i32.ctz)\n  )\n  (func (export \"as-unary-last\") (param i32) (result i32)\n    (local.get 0) (nop) (i32.ctz)\n  )\n  (func (export \"as-unary-everywhere\") (param i32) (result i32)\n    (nop) (nop) (local.get 0) (nop) (nop) (i32.ctz)\n  )\n\n  (func (export \"as-binary-first\") (param i32) (result i32)\n    (nop) (local.get 0) (local.get 0) (i32.add)\n  )\n  (func (export \"as-binary-mid\") (param i32) (result i32)\n    (local.get 0) (nop) (local.get 0) (i32.add)\n  )\n  (func (export \"as-binary-last\") (param i32) (result i32)\n    (local.get 0) (local.get 0) (nop) (i32.add)\n  )\n  (func (export \"as-binary-everywhere\") (param i32) (result i32)\n    (nop) (local.get 0) (nop) (nop) (local.get 0) (nop) (nop) (i32.add)\n  )\n\n  (func (export \"as-test-first\") (param i32) (result i32)\n    (nop) (local.get 0) (i32.eqz)\n  )\n  (func (export \"as-test-last\") (param i32) (result i32)\n    (local.get 0) (nop) (i32.eqz)\n  )\n  (func (export \"as-test-everywhere\") (param i32) (result i32)\n    (nop) (nop) (local.get 0) (nop) (nop) i32.eqz\n  )\n\n  (func (export \"as-compare-first\") (param i32) (result i32)\n    (nop) (local.get 0) (local.get 0) (i32.ne)\n  )\n  (func (export \"as-compare-mid\") (param i32) (result i32)\n    (local.get 0) (nop) (local.get 0) (i32.ne)\n  )\n  (func (export \"as-compare-last\") (param i32) (result i32)\n    (local.get 0) (local.get 0) (nop) (i32.lt_u)\n  )\n  (func (export \"as-compare-everywhere\") (param i32) (result i32)\n    (nop) (local.get 0) (nop) (nop) (local.get 0) (nop) (nop) (i32.le_s)\n  )\n\n  (func (export \"as-memory.grow-first\") (param i32) (result i32)\n    (nop) (local.get 0) (memory.grow)\n  )\n  (func (export \"as-memory.grow-last\") (param i32) (result i32)\n    (local.get 0) (nop) (memory.grow)\n  )\n  (func (export \"as-memory.grow-everywhere\") (param i32) (result i32)\n    (nop) (nop) (local.get 0) (nop) (nop) (memory.grow)\n  )\n\n  (func $func (param i32 i32) (result i32) (local.get 0))\n  (type $check (func (param i32 i32) (result i32)))\n  (table funcref (elem $func))\n  (func (export \"as-call_indirect-first\") (result i32)\n    (block (result i32)\n      (nop) (i32.const 1) (i32.const 2) (i32.const 0)\n      (call_indirect (type $check))\n    )\n  )\n  (func (export \"as-call_indirect-mid1\") (result i32)\n    (block (result i32)\n      (i32.const 1) (nop) (i32.const 2) (i32.const 0)\n      (call_indirect (type $check))\n    )\n  )\n  (func (export \"as-call_indirect-mid2\") (result i32)\n    (block (result i32)\n      (i32.const 1) (i32.const 2) (nop) (i32.const 0)\n      (call_indirect (type $check))\n    )\n  )\n  (func (export \"as-call_indirect-last\") (result i32)\n    (block (result i32)\n      (i32.const 1) (i32.const 2) (i32.const 0) (nop)\n      (call_indirect (type $check))\n    )\n  )\n  (func (export \"as-call_indirect-everywhere\") (result i32)\n    (block (result i32)\n      (nop) (nop) (i32.const 1) (nop) (nop) (i32.const 2) (nop) (nop) (i32.const 0) (nop) (nop)\n      (call_indirect (type $check))\n    )\n  )\n\n  (func (export \"as-local.set-first\") (param i32) (result i32)\n    (nop) (i32.const 2) (local.set 0) (local.get 0)\n  )\n  (func (export \"as-local.set-last\") (param i32) (result i32)\n    (i32.const 2) (nop) (local.set 0) (local.get 0)\n  )\n  (func (export \"as-local.set-everywhere\") (param i32) (result i32)\n    (nop) (nop) (i32.const 2) (nop) (nop) (local.set 0) (local.get 0)\n  )\n\n  (func (export \"as-local.tee-first\") (param i32) (result i32)\n    (nop) (i32.const 2) (local.tee 0)\n  )\n  (func (export \"as-local.tee-last\") (param i32) (result i32)\n    (i32.const 2) (nop) (local.tee 0)\n  )\n  (func (export \"as-local.tee-everywhere\") (param i32) (result i32)\n    (nop) (nop) (i32.const 2) (nop) (nop) (local.tee 0)\n  )\n\n  (global $a (mut i32) (i32.const 0))\n  (func (export \"as-global.set-first\") (result i32)\n    (nop) (i32.const 2) (global.set $a) (global.get $a)\n  )\n  (func (export \"as-global.set-last\") (result i32)\n    (i32.const 2) (nop) (global.set $a) (global.get $a)\n  )\n  (func (export \"as-global.set-everywhere\") (result i32)\n    (nop) (nop) (i32.const 2) (nop) (nop) (global.set 0)\n    (global.get $a)\n  )\n\n  (func (export \"as-load-first\") (param i32) (result i32)\n    (nop) (local.get 0) (i32.load)\n  )\n  (func (export \"as-load-last\") (param i32) (result i32)\n    (local.get 0) (nop) (i32.load)\n  )\n  (func (export \"as-load-everywhere\") (param i32) (result i32)\n    (nop) (nop) (local.get 0) (nop) (nop) (i32.load)\n  )\n\n  (func (export \"as-store-first\") (param i32 i32)\n    (nop) (local.get 0) (local.get 1) (i32.store)\n  )\n  (func (export \"as-store-mid\") (param i32 i32)\n    (local.get 0) (nop) (local.get 1) (i32.store)\n  )\n  (func (export \"as-store-last\") (param i32 i32)\n    (local.get 0) (local.get 1) (nop) (i32.store)\n  )\n  (func (export \"as-store-everywhere\") (param i32 i32)\n    (nop) (nop) (local.get 0) (nop) (nop) (local.get 1) (nop) (nop) (i32.store)\n  )\n)\n\n(assert_return (invoke \"as-func-first\") (i32.const 1))\n(assert_return (invoke \"as-func-mid\") (i32.const 2))\n(assert_return (invoke \"as-func-last\") (i32.const 3))\n(assert_return (invoke \"as-func-everywhere\") (i32.const 4))\n\n(assert_return (invoke \"as-drop-first\" (i32.const 0)))\n(assert_return (invoke \"as-drop-last\" (i32.const 0)))\n(assert_return (invoke \"as-drop-everywhere\" (i32.const 0)))\n\n(assert_return (invoke \"as-select-first\" (i32.const 3)) (i32.const 3))\n(assert_return (invoke \"as-select-mid1\" (i32.const 3)) (i32.const 3))\n(assert_return (invoke \"as-select-mid2\" (i32.const 3)) (i32.const 3))\n(assert_return (invoke \"as-select-last\" (i32.const 3)) (i32.const 3))\n(assert_return (invoke \"as-select-everywhere\" (i32.const 3)) (i32.const 3))\n\n(assert_return (invoke \"as-block-first\") (i32.const 2))\n(assert_return (invoke \"as-block-mid\") (i32.const 2))\n(assert_return (invoke \"as-block-last\") (i32.const 3))\n(assert_return (invoke \"as-block-everywhere\") (i32.const 4))\n\n(assert_return (invoke \"as-loop-first\") (i32.const 2))\n(assert_return (invoke \"as-loop-mid\") (i32.const 2))\n(assert_return (invoke \"as-loop-last\") (i32.const 3))\n(assert_return (invoke \"as-loop-everywhere\") (i32.const 4))\n\n(assert_return (invoke \"as-if-condition\" (i32.const 0)))\n(assert_return (invoke \"as-if-condition\" (i32.const -1)))\n(assert_return (invoke \"as-if-then\" (i32.const 0)))\n(assert_return (invoke \"as-if-then\" (i32.const 4)))\n(assert_return (invoke \"as-if-else\" (i32.const 0)))\n(assert_return (invoke \"as-if-else\" (i32.const 3)))\n\n(assert_return (invoke \"as-br-first\" (i32.const 5)) (i32.const 5))\n(assert_return (invoke \"as-br-last\" (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"as-br-everywhere\" (i32.const 7)) (i32.const 7))\n\n(assert_return (invoke \"as-br_if-first\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"as-br_if-mid\" (i32.const 5)) (i32.const 5))\n(assert_return (invoke \"as-br_if-last\" (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"as-br_if-everywhere\" (i32.const 7)) (i32.const 7))\n\n(assert_return (invoke \"as-br_table-first\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"as-br_table-mid\" (i32.const 5)) (i32.const 5))\n(assert_return (invoke \"as-br_table-last\" (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"as-br_table-everywhere\" (i32.const 7)) (i32.const 7))\n\n(assert_return (invoke \"as-return-first\" (i32.const 5)) (i32.const 5))\n(assert_return (invoke \"as-return-last\" (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"as-return-everywhere\" (i32.const 7)) (i32.const 7))\n\n(assert_return (invoke \"as-call-first\" (i32.const 3) (i32.const 1) (i32.const 2)) (i32.const 2))\n(assert_return (invoke \"as-call-mid1\" (i32.const 3) (i32.const 1) (i32.const 2)) (i32.const 2))\n(assert_return (invoke \"as-call-mid2\" (i32.const 0) (i32.const 3) (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"as-call-last\" (i32.const 10) (i32.const 9) (i32.const -1)) (i32.const 20))\n(assert_return (invoke \"as-call-everywhere\" (i32.const 2) (i32.const 1) (i32.const 5)) (i32.const -2))\n\n(assert_return (invoke \"as-unary-first\" (i32.const 30)) (i32.const 1))\n(assert_return (invoke \"as-unary-last\" (i32.const 30)) (i32.const 1))\n(assert_return (invoke \"as-unary-everywhere\" (i32.const 12)) (i32.const 2))\n\n(assert_return (invoke \"as-binary-first\" (i32.const 3)) (i32.const 6))\n(assert_return (invoke \"as-binary-mid\" (i32.const 3)) (i32.const 6))\n(assert_return (invoke \"as-binary-last\" (i32.const 3)) (i32.const 6))\n(assert_return (invoke \"as-binary-everywhere\" (i32.const 3)) (i32.const 6))\n\n(assert_return (invoke \"as-test-first\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-test-last\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-test-everywhere\" (i32.const 0)) (i32.const 1))\n\n(assert_return (invoke \"as-compare-first\" (i32.const 3)) (i32.const 0))\n(assert_return (invoke \"as-compare-mid\" (i32.const 3)) (i32.const 0))\n(assert_return (invoke \"as-compare-last\" (i32.const 3)) (i32.const 0))\n(assert_return (invoke \"as-compare-everywhere\" (i32.const 3)) (i32.const 1))\n\n(assert_return (invoke \"as-memory.grow-first\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-memory.grow-last\" (i32.const 2)) (i32.const 1))\n(assert_return (invoke \"as-memory.grow-everywhere\" (i32.const 12)) (i32.const 3))\n\n(assert_return (invoke \"as-call_indirect-first\") (i32.const 1))\n(assert_return (invoke \"as-call_indirect-mid1\") (i32.const 1))\n(assert_return (invoke \"as-call_indirect-mid2\") (i32.const 1))\n(assert_return (invoke \"as-call_indirect-last\") (i32.const 1))\n(assert_return (invoke \"as-call_indirect-everywhere\") (i32.const 1))\n\n(assert_return (invoke \"as-local.set-first\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"as-local.set-last\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"as-local.set-everywhere\" (i32.const 1)) (i32.const 2))\n\n(assert_return (invoke \"as-local.tee-first\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"as-local.tee-last\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"as-local.tee-everywhere\" (i32.const 1)) (i32.const 2))\n\n(assert_return (invoke \"as-global.set-first\") (i32.const 2))\n(assert_return (invoke \"as-global.set-last\") (i32.const 2))\n(assert_return (invoke \"as-global.set-everywhere\") (i32.const 2))\n\n(assert_return (invoke \"as-load-first\" (i32.const 100)) (i32.const 0))\n(assert_return (invoke \"as-load-last\" (i32.const 100)) (i32.const 0))\n(assert_return (invoke \"as-load-everywhere\" (i32.const 100)) (i32.const 0))\n\n(assert_return (invoke \"as-store-first\" (i32.const 0) (i32.const 1)))\n(assert_return (invoke \"as-store-mid\" (i32.const 0) (i32.const 2)))\n(assert_return (invoke \"as-store-last\" (i32.const 0) (i32.const 3)))\n(assert_return (invoke \"as-store-everywhere\" (i32.const 0) (i32.const 4)))\n\n(assert_invalid\n  (module (func $type-i32 (result i32) (nop)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-i64 (result i64) (nop)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-f32 (result f32) (nop)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-f64 (result f64) (nop)))\n  \"type mismatch\"\n)\n"
  },
  {
    "path": "test/core/ref_func.wast",
    "content": "(module\n  (func (export \"f\") (param $x i32) (result i32) (local.get $x))\n)\n(register \"M\")\n\n(module\n  (func $f (import \"M\" \"f\") (param i32) (result i32))\n  (func $g (param $x i32) (result i32)\n    (i32.add (local.get $x) (i32.const 1))\n  )\n\n  (global funcref (ref.func $f))\n  (global funcref (ref.func $g))\n  (global $v (mut funcref) (ref.func $f))\n\n  (global funcref (ref.func $gf1))\n  (global funcref (ref.func $gf2))\n  (func (drop (ref.func $ff1)) (drop (ref.func $ff2)))\n  (elem declare func $gf1 $ff1)\n  (elem declare funcref (ref.func $gf2) (ref.func $ff2))\n  (func $gf1)\n  (func $gf2)\n  (func $ff1)\n  (func $ff2)\n\n  (func (export \"is_null-f\") (result i32)\n    (ref.is_null (ref.func $f))\n  )\n  (func (export \"is_null-g\") (result i32)\n    (ref.is_null (ref.func $g))\n  )\n  (func (export \"is_null-v\") (result i32)\n    (ref.is_null (global.get $v))\n  )\n\n  (func (export \"set-f\") (global.set $v (ref.func $f)))\n  (func (export \"set-g\") (global.set $v (ref.func $g)))\n\n  (table $t 1 funcref)\n  (elem declare func $f $g)\n\n  (func (export \"call-f\") (param $x i32) (result i32)\n    (table.set $t (i32.const 0) (ref.func $f))\n    (call_indirect $t (param i32) (result i32) (local.get $x) (i32.const 0))\n  )\n  (func (export \"call-g\") (param $x i32) (result i32)\n    (table.set $t (i32.const 0) (ref.func $g))\n    (call_indirect $t (param i32) (result i32) (local.get $x) (i32.const 0))\n  )\n  (func (export \"call-v\") (param $x i32) (result i32)\n    (table.set $t (i32.const 0) (global.get $v))\n    (call_indirect $t (param i32) (result i32) (local.get $x) (i32.const 0))\n  )\n)\n\n(assert_return (invoke \"is_null-f\") (i32.const 0))\n(assert_return (invoke \"is_null-g\") (i32.const 0))\n(assert_return (invoke \"is_null-v\") (i32.const 0))\n\n(assert_return (invoke \"call-f\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"call-g\" (i32.const 4)) (i32.const 5))\n(assert_return (invoke \"call-v\" (i32.const 4)) (i32.const 4))\n(invoke \"set-g\")\n(assert_return (invoke \"call-v\" (i32.const 4)) (i32.const 5))\n(invoke \"set-f\")\n(assert_return (invoke \"call-v\" (i32.const 4)) (i32.const 4))\n\n(assert_invalid\n  (module\n    (func $f (import \"M\" \"f\") (param i32) (result i32))\n    (func $g (import \"M\" \"g\") (param i32) (result i32))\n    (global funcref (ref.func 7))\n  )\n  \"unknown function 7\"\n)\n\n\n;; Reference declaration\n\n(module\n  (func $f1)\n  (func $f2)\n  (func $f3)\n  (func $f4)\n  (func $f5)\n  (func $f6)\n\n  (table $t 1 funcref)\n\n  (global funcref (ref.func $f1))\n  (export \"f\" (func $f2))\n  (elem (table $t) (i32.const 0) func $f3)\n  (elem (table $t) (i32.const 0) funcref (ref.func $f4))\n  (elem func $f5)\n  (elem funcref (ref.func $f6))\n\n  (func\n    (ref.func $f1)\n    (ref.func $f2)\n    (ref.func $f3)\n    (ref.func $f4)\n    (ref.func $f5)\n    (ref.func $f6)\n    (return)\n  )\n)\n\n(assert_invalid\n  (module (func $f (drop (ref.func $f))))\n  \"undeclared function reference\"\n)\n(assert_invalid\n  (module (start $f) (func $f (drop (ref.func $f))))\n  \"undeclared function reference\"\n)\n"
  },
  {
    "path": "test/core/ref_is_null.wast",
    "content": "(module\n  (func $f1 (export \"funcref\") (param $x funcref) (result i32)\n    (ref.is_null (local.get $x))\n  )\n  (func $f2 (export \"externref\") (param $x externref) (result i32)\n    (ref.is_null (local.get $x))\n  )\n\n  (table $t1 2 funcref)\n  (table $t2 2 externref)\n  (elem (table $t1) (i32.const 1) func $dummy)\n  (func $dummy)\n\n  (func (export \"init\") (param $r externref)\n    (table.set $t2 (i32.const 1) (local.get $r))\n  )\n  (func (export \"deinit\")\n    (table.set $t1 (i32.const 1) (ref.null func))\n    (table.set $t2 (i32.const 1) (ref.null extern))\n  )\n\n  (func (export \"funcref-elem\") (param $x i32) (result i32)\n    (call $f1 (table.get $t1 (local.get $x)))\n  )\n  (func (export \"externref-elem\") (param $x i32) (result i32)\n    (call $f2 (table.get $t2 (local.get $x)))\n  )\n)\n\n(assert_return (invoke \"funcref\" (ref.null func)) (i32.const 1))\n(assert_return (invoke \"externref\" (ref.null extern)) (i32.const 1))\n\n(assert_return (invoke \"externref\" (ref.extern 1)) (i32.const 0))\n\n(invoke \"init\" (ref.extern 0))\n\n(assert_return (invoke \"funcref-elem\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"externref-elem\" (i32.const 0)) (i32.const 1))\n\n(assert_return (invoke \"funcref-elem\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"externref-elem\" (i32.const 1)) (i32.const 0))\n\n(invoke \"deinit\")\n\n(assert_return (invoke \"funcref-elem\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"externref-elem\" (i32.const 0)) (i32.const 1))\n\n(assert_return (invoke \"funcref-elem\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"externref-elem\" (i32.const 1)) (i32.const 1))\n\n(assert_invalid\n  (module (func $ref-vs-num (param i32) (ref.is_null (local.get 0))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $ref-vs-empty (ref.is_null)))\n  \"type mismatch\"\n)\n"
  },
  {
    "path": "test/core/ref_null.wast",
    "content": "(module\n  (func (export \"externref\") (result externref) (ref.null extern))\n  (func (export \"funcref\") (result funcref) (ref.null func))\n\n  (global externref (ref.null extern))\n  (global funcref (ref.null func))\n)\n\n(assert_return (invoke \"externref\") (ref.null extern))\n(assert_return (invoke \"funcref\") (ref.null func))\n"
  },
  {
    "path": "test/core/return.wast",
    "content": ";; Test `return` operator\n\n(module\n  ;; Auxiliary definition\n  (func $dummy)\n\n  (func (export \"type-i32\") (drop (i32.ctz (return))))\n  (func (export \"type-i64\") (drop (i64.ctz (return))))\n  (func (export \"type-f32\") (drop (f32.neg (return))))\n  (func (export \"type-f64\") (drop (f64.neg (return))))\n\n  (func (export \"type-i32-value\") (result i32)\n    (block (result i32) (i32.ctz (return (i32.const 1))))\n  )\n  (func (export \"type-i64-value\") (result i64)\n    (block (result i64) (i64.ctz (return (i64.const 2))))\n  )\n  (func (export \"type-f32-value\") (result f32)\n    (block (result f32) (f32.neg (return (f32.const 3))))\n  )\n  (func (export \"type-f64-value\") (result f64)\n    (block (result f64) (f64.neg (return (f64.const 4))))\n  )\n\n  (func (export \"nullary\") (return))\n  (func (export \"unary\") (result f64) (return (f64.const 3)))\n\n  (func (export \"as-func-first\") (result i32)\n    (return (i32.const 1)) (i32.const 2)\n  )\n  (func (export \"as-func-mid\") (result i32)\n    (call $dummy) (return (i32.const 2)) (i32.const 3)\n  )\n  (func (export \"as-func-last\")\n    (nop) (call $dummy) (return)\n  )\n  (func (export \"as-func-value\") (result i32)\n    (nop) (call $dummy) (return (i32.const 3))\n  )\n\n  (func (export \"as-block-first\")\n    (block (return) (call $dummy))\n  )\n  (func (export \"as-block-mid\")\n    (block (call $dummy) (return) (call $dummy))\n  )\n  (func (export \"as-block-last\")\n    (block (nop) (call $dummy) (return))\n  )\n  (func (export \"as-block-value\") (result i32)\n    (block (result i32) (nop) (call $dummy) (return (i32.const 2)))\n  )\n\n  (func (export \"as-loop-first\") (result i32)\n    (loop (result i32) (return (i32.const 3)) (i32.const 2))\n  )\n  (func (export \"as-loop-mid\") (result i32)\n    (loop (result i32) (call $dummy) (return (i32.const 4)) (i32.const 2))\n  )\n  (func (export \"as-loop-last\") (result i32)\n    (loop (result i32) (nop) (call $dummy) (return (i32.const 5)))\n  )\n\n  (func (export \"as-br-value\") (result i32)\n    (block (result i32) (br 0 (return (i32.const 9))))\n  )\n\n  (func (export \"as-br_if-cond\")\n    (block (br_if 0 (return)))\n  )\n  (func (export \"as-br_if-value\") (result i32)\n    (block (result i32)\n      (drop (br_if 0 (return (i32.const 8)) (i32.const 1))) (i32.const 7)\n    )\n  )\n  (func (export \"as-br_if-value-cond\") (result i32)\n    (block (result i32)\n      (drop (br_if 0 (i32.const 6) (return (i32.const 9)))) (i32.const 7)\n    )\n  )\n\n  (func (export \"as-br_table-index\") (result i64)\n    (block (br_table 0 0 0 (return (i64.const 9)))) (i64.const -1)\n  )\n  (func (export \"as-br_table-value\") (result i32)\n    (block (result i32)\n      (br_table 0 0 0 (return (i32.const 10)) (i32.const 1)) (i32.const 7)\n    )\n  )\n  (func (export \"as-br_table-value-index\") (result i32)\n    (block (result i32)\n      (br_table 0 0 (i32.const 6) (return (i32.const 11))) (i32.const 7)\n    )\n  )\n\n  (func (export \"as-return-value\") (result i64)\n    (return (return (i64.const 7)))\n  )\n\n  (func (export \"as-if-cond\") (result i32)\n    (if (result i32)\n      (return (i32.const 2)) (then (i32.const 0)) (else (i32.const 1))\n    )\n  )\n  (func (export \"as-if-then\") (param i32 i32) (result i32)\n    (if (result i32)\n      (local.get 0) (then (return (i32.const 3))) (else (local.get 1))\n    )\n  )\n  (func (export \"as-if-else\") (param i32 i32) (result i32)\n    (if (result i32)\n      (local.get 0) (then (local.get 1)) (else (return (i32.const 4)))\n    )\n  )\n\n  (func (export \"as-select-first\") (param i32 i32) (result i32)\n    (select (return (i32.const 5)) (local.get 0) (local.get 1))\n  )\n  (func (export \"as-select-second\") (param i32 i32) (result i32)\n    (select (local.get 0) (return (i32.const 6)) (local.get 1))\n  )\n  (func (export \"as-select-cond\") (result i32)\n    (select (i32.const 0) (i32.const 1) (return (i32.const 7)))\n  )\n\n  (func $f (param i32 i32 i32) (result i32) (i32.const -1))\n  (func (export \"as-call-first\") (result i32)\n    (call $f (return (i32.const 12)) (i32.const 2) (i32.const 3))\n  )\n  (func (export \"as-call-mid\") (result i32)\n    (call $f (i32.const 1) (return (i32.const 13)) (i32.const 3))\n  )\n  (func (export \"as-call-last\") (result i32)\n    (call $f (i32.const 1) (i32.const 2) (return (i32.const 14)))\n  )\n\n  (type $sig (func (param i32 i32 i32) (result i32)))\n  (table funcref (elem $f))\n  (func (export \"as-call_indirect-func\") (result i32)\n    (call_indirect (type $sig)\n      (return (i32.const 20)) (i32.const 1) (i32.const 2) (i32.const 3)\n    )\n  )\n  (func (export \"as-call_indirect-first\") (result i32)\n    (call_indirect (type $sig)\n      (i32.const 0) (return (i32.const 21)) (i32.const 2) (i32.const 3)\n    )\n  )\n  (func (export \"as-call_indirect-mid\") (result i32)\n    (call_indirect (type $sig)\n      (i32.const 0) (i32.const 1) (return (i32.const 22)) (i32.const 3)\n    )\n  )\n  (func (export \"as-call_indirect-last\") (result i32)\n    (call_indirect (type $sig)\n      (i32.const 0) (i32.const 1) (i32.const 2) (return (i32.const 23))\n    )\n  )\n\n  (func (export \"as-local.set-value\") (result i32) (local f32)\n    (local.set 0 (return (i32.const 17))) (i32.const -1)\n  )\n  (func (export \"as-local.tee-value\") (result i32) (local i32)\n    (local.tee 0 (return (i32.const 1)))\n  )\n  (global $a (mut i32) (i32.const 0))\n  (func (export \"as-global.set-value\") (result i32)\n    (global.set $a (return (i32.const 1)))\n  )\n\n  (memory 1)\n  (func (export \"as-load-address\") (result f32)\n    (f32.load (return (f32.const 1.7)))\n  )\n  (func (export \"as-loadN-address\") (result i64)\n    (i64.load8_s (return (i64.const 30)))\n  )\n\n  (func (export \"as-store-address\") (result i32)\n    (f64.store (return (i32.const 30)) (f64.const 7)) (i32.const -1)\n  )\n  (func (export \"as-store-value\") (result i32)\n    (i64.store (i32.const 2) (return (i32.const 31))) (i32.const -1)\n  )\n\n  (func (export \"as-storeN-address\") (result i32)\n    (i32.store8 (return (i32.const 32)) (i32.const 7)) (i32.const -1)\n  )\n  (func (export \"as-storeN-value\") (result i32)\n    (i64.store16 (i32.const 2) (return (i32.const 33))) (i32.const -1)\n  )\n\n  (func (export \"as-unary-operand\") (result f32)\n    (f32.neg (return (f32.const 3.4)))\n  )\n\n  (func (export \"as-binary-left\") (result i32)\n    (i32.add (return (i32.const 3)) (i32.const 10))\n  )\n  (func (export \"as-binary-right\") (result i64)\n    (i64.sub (i64.const 10) (return (i64.const 45)))\n  )\n\n  (func (export \"as-test-operand\") (result i32)\n    (i32.eqz (return (i32.const 44)))\n  )\n\n  (func (export \"as-compare-left\") (result i32)\n    (f64.le (return (i32.const 43)) (f64.const 10))\n  )\n  (func (export \"as-compare-right\") (result i32)\n    (f32.ne (f32.const 10) (return (i32.const 42)))\n  )\n\n  (func (export \"as-convert-operand\") (result i32)\n    (i32.wrap_i64 (return (i32.const 41)))\n  )\n\n  (func (export \"as-memory.grow-size\") (result i32)\n    (memory.grow (return (i32.const 40)))\n  )\n)\n\n(assert_return (invoke \"type-i32\"))\n(assert_return (invoke \"type-i64\"))\n(assert_return (invoke \"type-f32\"))\n(assert_return (invoke \"type-f64\"))\n\n(assert_return (invoke \"type-i32-value\") (i32.const 1))\n(assert_return (invoke \"type-i64-value\") (i64.const 2))\n(assert_return (invoke \"type-f32-value\") (f32.const 3))\n(assert_return (invoke \"type-f64-value\") (f64.const 4))\n\n(assert_return (invoke \"nullary\"))\n(assert_return (invoke \"unary\") (f64.const 3))\n\n(assert_return (invoke \"as-func-first\") (i32.const 1))\n(assert_return (invoke \"as-func-mid\") (i32.const 2))\n(assert_return (invoke \"as-func-last\"))\n(assert_return (invoke \"as-func-value\") (i32.const 3))\n\n(assert_return (invoke \"as-block-first\"))\n(assert_return (invoke \"as-block-mid\"))\n(assert_return (invoke \"as-block-last\"))\n(assert_return (invoke \"as-block-value\") (i32.const 2))\n\n(assert_return (invoke \"as-loop-first\") (i32.const 3))\n(assert_return (invoke \"as-loop-mid\") (i32.const 4))\n(assert_return (invoke \"as-loop-last\") (i32.const 5))\n\n(assert_return (invoke \"as-br-value\") (i32.const 9))\n\n(assert_return (invoke \"as-br_if-cond\"))\n(assert_return (invoke \"as-br_if-value\") (i32.const 8))\n(assert_return (invoke \"as-br_if-value-cond\") (i32.const 9))\n\n(assert_return (invoke \"as-br_table-index\") (i64.const 9))\n(assert_return (invoke \"as-br_table-value\") (i32.const 10))\n(assert_return (invoke \"as-br_table-value-index\") (i32.const 11))\n\n(assert_return (invoke \"as-return-value\") (i64.const 7))\n\n(assert_return (invoke \"as-if-cond\") (i32.const 2))\n(assert_return (invoke \"as-if-then\" (i32.const 1) (i32.const 6)) (i32.const 3))\n(assert_return (invoke \"as-if-then\" (i32.const 0) (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"as-if-else\" (i32.const 0) (i32.const 6)) (i32.const 4))\n(assert_return (invoke \"as-if-else\" (i32.const 1) (i32.const 6)) (i32.const 6))\n\n(assert_return (invoke \"as-select-first\" (i32.const 0) (i32.const 6)) (i32.const 5))\n(assert_return (invoke \"as-select-first\" (i32.const 1) (i32.const 6)) (i32.const 5))\n(assert_return (invoke \"as-select-second\" (i32.const 0) (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"as-select-second\" (i32.const 1) (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"as-select-cond\") (i32.const 7))\n\n(assert_return (invoke \"as-call-first\") (i32.const 12))\n(assert_return (invoke \"as-call-mid\") (i32.const 13))\n(assert_return (invoke \"as-call-last\") (i32.const 14))\n\n(assert_return (invoke \"as-call_indirect-func\") (i32.const 20))\n(assert_return (invoke \"as-call_indirect-first\") (i32.const 21))\n(assert_return (invoke \"as-call_indirect-mid\") (i32.const 22))\n(assert_return (invoke \"as-call_indirect-last\") (i32.const 23))\n\n(assert_return (invoke \"as-local.set-value\") (i32.const 17))\n(assert_return (invoke \"as-local.tee-value\") (i32.const 1))\n(assert_return (invoke \"as-global.set-value\") (i32.const 1))\n\n(assert_return (invoke \"as-load-address\") (f32.const 1.7))\n(assert_return (invoke \"as-loadN-address\") (i64.const 30))\n\n(assert_return (invoke \"as-store-address\") (i32.const 30))\n(assert_return (invoke \"as-store-value\") (i32.const 31))\n(assert_return (invoke \"as-storeN-address\") (i32.const 32))\n(assert_return (invoke \"as-storeN-value\") (i32.const 33))\n\n(assert_return (invoke \"as-unary-operand\") (f32.const 3.4))\n\n(assert_return (invoke \"as-binary-left\") (i32.const 3))\n(assert_return (invoke \"as-binary-right\") (i64.const 45))\n\n(assert_return (invoke \"as-test-operand\") (i32.const 44))\n\n(assert_return (invoke \"as-compare-left\") (i32.const 43))\n(assert_return (invoke \"as-compare-right\") (i32.const 42))\n\n(assert_return (invoke \"as-convert-operand\") (i32.const 41))\n\n(assert_return (invoke \"as-memory.grow-size\") (i32.const 40))\n\n(assert_invalid\n  (module (func $type-value-empty-vs-num (result i32) (return)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-value-empty-vs-num-in-block (result i32)\n      (i32.const 0)\n      (block (return))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-value-empty-vs-num-in-loop (result i32)\n      (i32.const 0)\n      (loop (return))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-value-empty-vs-num-in-then (result i32)\n      (i32.const 0) (i32.const 0)\n      (if (then (return)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-value-empty-vs-num-in-else (result i32)\n      (i32.const 0) (i32.const 0)\n      (if (result i32) (then (i32.const 0)) (else (return))) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-value-empty-vs-num-in-br (result i32)\n      (i32.const 0)\n      (block (br 0 (return)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-value-empty-vs-num-in-br_if (result i32)\n      (i32.const 0)\n      (block (br_if 0 (return) (i32.const 1)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-value-empty-vs-num-in-br_table (result i32)\n      (i32.const 0)\n      (block (br_table 0 (return)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-value-empty-vs-num-in-return (result i32)\n      (return (return))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-value-empty-vs-num-in-select (result i32)\n      (select (return) (i32.const 1) (i32.const 2))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-value-empty-vs-num-in-call (result i32)\n      (call 1 (return))\n    )\n    (func (param i32) (result i32) (local.get 0))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $f (param i32) (result i32) (local.get 0))\n    (type $sig (func (param i32) (result i32)))\n    (table funcref (elem $f))\n    (func $type-value-empty-vs-num-in-call_indirect (result i32)\n      (block (result i32)\n        (call_indirect (type $sig)\n          (return) (i32.const 0)\n        )\n      )\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-value-empty-vs-num-in-local.set (result i32)\n      (local i32)\n      (local.set 0 (return)) (local.get 0)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-value-empty-vs-num-in-local.tee (result i32)\n      (local i32)\n      (local.tee 0 (return))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (global $x (mut i32) (i32.const 0))\n    (func $type-value-empty-vs-num-in-global.set (result i32)\n      (global.set $x (return)) (global.get $x)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-value-empty-vs-num-in-memory.grow (result i32)\n      (memory.grow (return))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 0)\n    (func $type-value-empty-vs-num-in-load (result i32)\n      (i32.load (return))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-value-empty-vs-num-in-store (result i32)\n      (i32.store (return) (i32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-void-vs-num (result f64) (return (nop))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-value-num-vs-num (result f64) (return (i64.const 1))))\n  \"type mismatch\"\n)\n\n"
  },
  {
    "path": "test/core/run.py",
    "content": "#!/usr/bin/env python3\n\nfrom __future__ import print_function\nimport argparse\nimport os\nimport os.path\nimport unittest\nimport subprocess\nimport glob\nimport sys\n\n\nownDir = os.path.dirname(os.path.abspath(sys.argv[0]))\ninputDir = ownDir\noutputDir = os.path.join(inputDir, \"_output\")\n\nparser = argparse.ArgumentParser()\nparser.add_argument(\"--wasm\", metavar=\"<wasm-command>\", default=os.path.join(os.getcwd(), \"wasm\"))\nparser.add_argument(\"--js\", metavar=\"<js-command>\")\nparser.add_argument(\"--out\", metavar=\"<out-dir>\", default=outputDir)\nparser.add_argument(\"file\", nargs='*')\narguments = parser.parse_args()\nsys.argv = sys.argv[:1]\n\nwasmCommand = arguments.wasm\njsCommand = arguments.js\noutputDir = arguments.out\ninputFiles = arguments.file if arguments.file else glob.glob(os.path.join(inputDir, \"*.wast\"))\n\nif not os.path.exists(wasmCommand):\n  sys.stderr.write(\"\"\"\\\nError: The executable '%s' does not exist.\nProvide the correct path with the '--wasm' flag.\n\n\"\"\" % (wasmCommand))\n  parser.print_help()\n  sys.exit(1)\n\n\nclass RunTests(unittest.TestCase):\n  def _runCommand(self, command, logPath, expectedExitCode = 0):\n    with open(logPath, 'w+') as out:\n      exitCode = subprocess.call(command, shell=True, stdout=out, stderr=subprocess.STDOUT)\n      self.assertEqual(expectedExitCode, exitCode, \"failed with exit code %i (expected %i) for %s\" % (exitCode, expectedExitCode, command))\n\n  def _auxFile(self, path):\n    if os.path.exists(path):\n      os.remove(path)\n    return path\n\n  def _compareFile(self, expectFile, actualFile):\n    if os.path.exists(expectFile):\n      with open(expectFile) as expect:\n        with open(actualFile) as actual:\n          expectText = expect.read()\n          actualText = actual.read()\n          self.assertEqual(expectText, actualText)\n\n  def _runTestFile(self, inputPath):\n    dir, inputFile = os.path.split(inputPath)\n    outputPath = os.path.join(outputDir, inputFile)\n\n    # Run original file\n    expectedExitCode = 1 if \".fail.\" in inputFile else 0\n    logPath = self._auxFile(outputPath + \".log\")\n    self._runCommand(('%s \"%s\"') % (wasmCommand, inputPath), logPath, expectedExitCode)\n\n    if expectedExitCode != 0:\n      return\n\n    # Convert to binary and run again\n    wasmPath = self._auxFile(outputPath + \".bin.wast\")\n    logPath = self._auxFile(wasmPath + \".log\")\n    self._runCommand(('%s -d \"%s\" -o \"%s\"') % (wasmCommand, inputPath, wasmPath), logPath)\n    self._runCommand(('%s \"%s\"') % (wasmCommand, wasmPath), logPath)\n\n    # Convert back to text and run again\n    wastPath = self._auxFile(wasmPath + \".wast\")\n    logPath = self._auxFile(wastPath + \".log\")\n    self._runCommand(('%s -d \"%s\" -o \"%s\"') % (wasmCommand, wasmPath, wastPath), logPath)\n    self._runCommand(('%s \"%s\"') % (wasmCommand, wastPath), logPath)\n\n    # Convert back to binary once more and compare\n    wasm2Path = self._auxFile(wastPath + \".bin.wast\")\n    logPath = self._auxFile(wasm2Path + \".log\")\n    self._runCommand(('%s -d \"%s\" -o \"%s\"') % (wasmCommand, wastPath, wasm2Path), logPath)\n    self._compareFile(wasmPath, wasm2Path)\n\n    # Convert back to text once more and compare\n    wast2Path = self._auxFile(wasm2Path + \".wast\")\n    logPath = self._auxFile(wast2Path + \".log\")\n    self._runCommand(('%s -d \"%s\" -o \"%s\"') % (wasmCommand, wasm2Path, wast2Path), logPath)\n    self._compareFile(wastPath, wast2Path)\n\n    # Convert to JavaScript\n    jsPath = self._auxFile(outputPath.replace(\".wast\", \".js\"))\n    logPath = self._auxFile(jsPath + \".log\")\n    self._runCommand(('%s -d \"%s\" -o \"%s\"') % (wasmCommand, inputPath, jsPath), logPath)\n    if jsCommand != None:\n      self._runCommand(('%s \"%s\"') % (jsCommand, jsPath), logPath)\n\n\nif __name__ == \"__main__\":\n  if not os.path.exists(outputDir):\n    os.makedirs(outputDir)\n  for fileName in inputFiles:\n    testName = 'test ' + os.path.basename(fileName)\n    setattr(RunTests, testName, lambda self, file=fileName: self._runTestFile(file))\n  unittest.main()\n"
  },
  {
    "path": "test/core/select.wast",
    "content": "(module\n  ;; Auxiliary\n  (func $dummy)\n  (table $tab funcref (elem $dummy))\n  (memory 1)\n\n  (func (export \"select-i32\") (param i32 i32 i32) (result i32)\n    (select (local.get 0) (local.get 1) (local.get 2))\n  )\n  (func (export \"select-i64\") (param i64 i64 i32) (result i64)\n    (select (local.get 0) (local.get 1) (local.get 2))\n  )\n  (func (export \"select-f32\") (param f32 f32 i32) (result f32)\n    (select (local.get 0) (local.get 1) (local.get 2))\n  )\n  (func (export \"select-f64\") (param f64 f64 i32) (result f64)\n    (select (local.get 0) (local.get 1) (local.get 2))\n  )\n\n  (func (export \"select-i32-t\") (param i32 i32 i32) (result i32)\n    (select (result i32) (local.get 0) (local.get 1) (local.get 2))\n  )\n  (func (export \"select-i64-t\") (param i64 i64 i32) (result i64)\n    (select (result i64) (local.get 0) (local.get 1) (local.get 2))\n  )\n  (func (export \"select-f32-t\") (param f32 f32 i32) (result f32)\n    (select (result f32) (local.get 0) (local.get 1) (local.get 2))\n  )\n  (func (export \"select-f64-t\") (param f64 f64 i32) (result f64)\n    (select (result f64) (local.get 0) (local.get 1) (local.get 2))\n  )\n  (func (export \"select-funcref\") (param funcref funcref i32) (result funcref)\n    (select (result funcref) (local.get 0) (local.get 1) (local.get 2))\n  )\n  (func (export \"select-externref\") (param externref externref i32) (result externref)\n    (select (result externref) (local.get 0) (local.get 1) (local.get 2))\n  )\n\n  ;; Check that both sides of the select are evaluated\n  (func (export \"select-trap-left\") (param $cond i32) (result i32)\n    (select (unreachable) (i32.const 0) (local.get $cond))\n  )\n  (func (export \"select-trap-right\") (param $cond i32) (result i32)\n    (select (i32.const 0) (unreachable) (local.get $cond))\n  )\n\n  (func (export \"select-unreached\")\n    (unreachable) (select)\n    (unreachable) (i32.const 0) (select)\n    (unreachable) (i32.const 0) (i32.const 0) (select)\n    (unreachable) (i32.const 0) (i32.const 0) (i32.const 0) (select)\n    (unreachable) (f32.const 0) (i32.const 0) (select)\n    (unreachable)\n  )\n\n  (func (export \"select_unreached_result_1\") (result i32)\n    (unreachable) (i32.add (select))\n  )\n\n  (func (export \"select_unreached_result_2\") (result i64)\n    (unreachable) (i64.add (select (i64.const 0) (i32.const 0)))\n  )\n\n  ;; As the argument of control constructs and instructions\n\n  (func (export \"as-select-first\") (param i32) (result i32)\n    (select (select (i32.const 0) (i32.const 1) (local.get 0)) (i32.const 2) (i32.const 3))\n  )\n  (func (export \"as-select-mid\") (param i32) (result i32)\n    (select (i32.const 2) (select (i32.const 0) (i32.const 1) (local.get 0)) (i32.const 3))\n  )\n  (func (export \"as-select-last\") (param i32) (result i32)\n    (select (i32.const 2) (i32.const 3) (select (i32.const 0) (i32.const 1) (local.get 0)))\n  )\n\n  (func (export \"as-loop-first\") (param i32) (result i32)\n    (loop (result i32) (select (i32.const 2) (i32.const 3) (local.get 0)) (call $dummy) (call $dummy))\n  )\n  (func (export \"as-loop-mid\") (param i32) (result i32)\n    (loop (result i32) (call $dummy) (select (i32.const 2) (i32.const 3) (local.get 0)) (call $dummy))\n  )\n  (func (export \"as-loop-last\") (param i32) (result i32)\n    (loop (result i32) (call $dummy) (call $dummy) (select (i32.const 2) (i32.const 3) (local.get 0)))\n  )\n\n  (func (export \"as-if-condition\") (param i32)\n    (select (i32.const 2) (i32.const 3) (local.get 0)) (if (then (call $dummy)))\n  )\n  (func (export \"as-if-then\") (param i32) (result i32)\n    (if (result i32) (i32.const 1) (then (select (i32.const 2) (i32.const 3) (local.get 0))) (else (i32.const 4)))\n  )\n  (func (export \"as-if-else\") (param i32) (result i32)\n    (if (result i32) (i32.const 0) (then (i32.const 2)) (else (select (i32.const 2) (i32.const 3) (local.get 0))))\n  )\n\n  (func (export \"as-br_if-first\") (param i32) (result i32)\n    (block (result i32) (br_if 0 (select (i32.const 2) (i32.const 3) (local.get 0)) (i32.const 4)))\n  )\n  (func (export \"as-br_if-last\") (param i32) (result i32)\n    (block (result i32) (br_if 0 (i32.const 2) (select (i32.const 2) (i32.const 3) (local.get 0))))\n  )\n\n  (func (export \"as-br_table-first\") (param i32) (result i32)\n    (block (result i32) (select (i32.const 2) (i32.const 3) (local.get 0)) (i32.const 2) (br_table 0 0))\n  )\n  (func (export \"as-br_table-last\") (param i32) (result i32)\n    (block (result i32) (i32.const 2) (select (i32.const 2) (i32.const 3) (local.get 0)) (br_table 0 0))\n  )\n\n  (func $func (param i32 i32) (result i32) (local.get 0))\n  (type $check (func (param i32 i32) (result i32)))\n  (table $t funcref (elem $func))\n  (func (export \"as-call_indirect-first\") (param i32) (result i32)\n    (block (result i32)\n      (call_indirect $t (type $check)\n        (select (i32.const 2) (i32.const 3) (local.get 0)) (i32.const 1) (i32.const 0)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-mid\") (param i32) (result i32)\n    (block (result i32)\n      (call_indirect $t (type $check)\n        (i32.const 1) (select (i32.const 2) (i32.const 3) (local.get 0)) (i32.const 0)\n      )\n    )\n  )\n  (func (export \"as-call_indirect-last\") (param i32) (result i32)\n    (block (result i32)\n      (call_indirect $t (type $check)\n        (i32.const 1) (i32.const 4) (select (i32.const 2) (i32.const 3) (local.get 0))\n      )\n    )\n  )\n\n  (func (export \"as-store-first\") (param i32)\n    (select (i32.const 0) (i32.const 4) (local.get 0)) (i32.const 1) (i32.store)\n  )\n  (func (export \"as-store-last\") (param i32)\n    (i32.const 8) (select (i32.const 1) (i32.const 2) (local.get 0)) (i32.store)\n  )\n\n  (func (export \"as-memory.grow-value\") (param i32) (result i32)\n    (memory.grow (select (i32.const 1) (i32.const 2) (local.get 0)))\n  )\n\n  (func $f (param i32) (result i32) (local.get 0))\n\n  (func (export \"as-call-value\") (param i32) (result i32)\n    (call $f (select (i32.const 1) (i32.const 2) (local.get 0)))\n  )\n  (func (export \"as-return-value\") (param i32) (result i32)\n    (select (i32.const 1) (i32.const 2) (local.get 0)) (return)\n  )\n  (func (export \"as-drop-operand\") (param i32)\n    (drop (select (i32.const 1) (i32.const 2) (local.get 0)))\n  )\n  (func (export \"as-br-value\") (param i32) (result i32)\n    (block (result i32) (br 0 (select (i32.const 1) (i32.const 2) (local.get 0))))\n  )\n  (func (export \"as-local.set-value\") (param i32) (result i32)\n    (local i32) (local.set 0 (select (i32.const 1) (i32.const 2) (local.get 0))) (local.get 0)\n  )\n  (func (export \"as-local.tee-value\") (param i32) (result i32)\n    (local.tee 0 (select (i32.const 1) (i32.const 2) (local.get 0)))\n  )\n  (global $a (mut i32) (i32.const 10))\n  (func (export \"as-global.set-value\") (param i32) (result i32)\n    (global.set $a (select (i32.const 1) (i32.const 2) (local.get 0)))\n    (global.get $a)\n  )\n  (func (export \"as-load-operand\") (param i32) (result i32)\n    (i32.load (select (i32.const 0) (i32.const 4) (local.get 0)))\n  )\n\n  (func (export \"as-unary-operand\") (param i32) (result i32)\n    (i32.eqz (select (i32.const 0) (i32.const 1) (local.get 0)))\n  )\n  (func (export \"as-binary-operand\") (param i32) (result i32)\n    (i32.mul\n      (select (i32.const 1) (i32.const 2) (local.get 0))\n      (select (i32.const 1) (i32.const 2) (local.get 0))\n    )\n  )\n  (func (export \"as-test-operand\") (param i32) (result i32)\n    (block (result i32)\n      (i32.eqz (select (i32.const 0) (i32.const 1) (local.get 0)))\n    )\n  )\n\n  (func (export \"as-compare-left\") (param i32) (result i32)\n    (block (result i32)\n      (i32.le_s (select (i32.const 1) (i32.const 2) (local.get 0)) (i32.const 1))\n    )\n  )\n  (func (export \"as-compare-right\") (param i32) (result i32)\n    (block (result i32)\n      (i32.ne (i32.const 1) (select (i32.const 0) (i32.const 1) (local.get 0)))\n    )\n  )\n\n  (func (export \"as-convert-operand\") (param i32) (result i32)\n    (block (result i32)\n      (i32.wrap_i64 (select (i64.const 1) (i64.const 0) (local.get 0)))\n    )\n  )\n\n  (func (export \"unreachable-num\")\n    (unreachable)\n    (select)\n    (i32.eqz)\n    (drop)\n  )\n  (func (export \"unreachable-ref\")\n    (unreachable)\n    (select)\n    (ref.is_null)\n    (drop)\n  )\n)\n\n(assert_return (invoke \"select-i32\" (i32.const 1) (i32.const 2) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"select-i64\" (i64.const 2) (i64.const 1) (i32.const 1)) (i64.const 2))\n(assert_return (invoke \"select-f32\" (f32.const 1) (f32.const 2) (i32.const 1)) (f32.const 1))\n(assert_return (invoke \"select-f64\" (f64.const 1) (f64.const 2) (i32.const 1)) (f64.const 1))\n\n(assert_return (invoke \"select-i32\" (i32.const 1) (i32.const 2) (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"select-i32\" (i32.const 2) (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"select-i64\" (i64.const 2) (i64.const 1) (i32.const -1)) (i64.const 2))\n(assert_return (invoke \"select-i64\" (i64.const 2) (i64.const 1) (i32.const 0xf0f0f0f0)) (i64.const 2))\n\n(assert_return (invoke \"select-f32\" (f32.const nan) (f32.const 1) (i32.const 1)) (f32.const nan))\n(assert_return (invoke \"select-f32\" (f32.const nan:0x20304) (f32.const 1) (i32.const 1)) (f32.const nan:0x20304))\n(assert_return (invoke \"select-f32\" (f32.const nan) (f32.const 1) (i32.const 0)) (f32.const 1))\n(assert_return (invoke \"select-f32\" (f32.const nan:0x20304) (f32.const 1) (i32.const 0)) (f32.const 1))\n(assert_return (invoke \"select-f32\" (f32.const 2) (f32.const nan) (i32.const 1)) (f32.const 2))\n(assert_return (invoke \"select-f32\" (f32.const 2) (f32.const nan:0x20304) (i32.const 1)) (f32.const 2))\n(assert_return (invoke \"select-f32\" (f32.const 2) (f32.const nan) (i32.const 0)) (f32.const nan))\n(assert_return (invoke \"select-f32\" (f32.const 2) (f32.const nan:0x20304) (i32.const 0)) (f32.const nan:0x20304))\n\n(assert_return (invoke \"select-f64\" (f64.const nan) (f64.const 1) (i32.const 1)) (f64.const nan))\n(assert_return (invoke \"select-f64\" (f64.const nan:0x20304) (f64.const 1) (i32.const 1)) (f64.const nan:0x20304))\n(assert_return (invoke \"select-f64\" (f64.const nan) (f64.const 1) (i32.const 0)) (f64.const 1))\n(assert_return (invoke \"select-f64\" (f64.const nan:0x20304) (f64.const 1) (i32.const 0)) (f64.const 1))\n(assert_return (invoke \"select-f64\" (f64.const 2) (f64.const nan) (i32.const 1)) (f64.const 2))\n(assert_return (invoke \"select-f64\" (f64.const 2) (f64.const nan:0x20304) (i32.const 1)) (f64.const 2))\n(assert_return (invoke \"select-f64\" (f64.const 2) (f64.const nan) (i32.const 0)) (f64.const nan))\n(assert_return (invoke \"select-f64\" (f64.const 2) (f64.const nan:0x20304) (i32.const 0)) (f64.const nan:0x20304))\n\n(assert_return (invoke \"select-i32-t\" (i32.const 1) (i32.const 2) (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"select-i64-t\" (i64.const 2) (i64.const 1) (i32.const 1)) (i64.const 2))\n(assert_return (invoke \"select-f32-t\" (f32.const 1) (f32.const 2) (i32.const 1)) (f32.const 1))\n(assert_return (invoke \"select-f64-t\" (f64.const 1) (f64.const 2) (i32.const 1)) (f64.const 1))\n(assert_return (invoke \"select-funcref\" (ref.null func) (ref.null func) (i32.const 1)) (ref.null func))\n(assert_return (invoke \"select-externref\" (ref.extern 1) (ref.extern 2) (i32.const 1)) (ref.extern 1))\n\n(assert_return (invoke \"select-i32-t\" (i32.const 1) (i32.const 2) (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"select-i32-t\" (i32.const 2) (i32.const 1) (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"select-i64-t\" (i64.const 2) (i64.const 1) (i32.const -1)) (i64.const 2))\n(assert_return (invoke \"select-i64-t\" (i64.const 2) (i64.const 1) (i32.const 0xf0f0f0f0)) (i64.const 2))\n(assert_return (invoke \"select-externref\" (ref.extern 1) (ref.extern 2) (i32.const 0)) (ref.extern 2))\n(assert_return (invoke \"select-externref\" (ref.extern 2) (ref.extern 1) (i32.const 0)) (ref.extern 1))\n\n(assert_return (invoke \"select-f32-t\" (f32.const nan) (f32.const 1) (i32.const 1)) (f32.const nan))\n(assert_return (invoke \"select-f32-t\" (f32.const nan:0x20304) (f32.const 1) (i32.const 1)) (f32.const nan:0x20304))\n(assert_return (invoke \"select-f32-t\" (f32.const nan) (f32.const 1) (i32.const 0)) (f32.const 1))\n(assert_return (invoke \"select-f32-t\" (f32.const nan:0x20304) (f32.const 1) (i32.const 0)) (f32.const 1))\n(assert_return (invoke \"select-f32-t\" (f32.const 2) (f32.const nan) (i32.const 1)) (f32.const 2))\n(assert_return (invoke \"select-f32-t\" (f32.const 2) (f32.const nan:0x20304) (i32.const 1)) (f32.const 2))\n(assert_return (invoke \"select-f32-t\" (f32.const 2) (f32.const nan) (i32.const 0)) (f32.const nan))\n(assert_return (invoke \"select-f32-t\" (f32.const 2) (f32.const nan:0x20304) (i32.const 0)) (f32.const nan:0x20304))\n\n(assert_return (invoke \"select-f64-t\" (f64.const nan) (f64.const 1) (i32.const 1)) (f64.const nan))\n(assert_return (invoke \"select-f64-t\" (f64.const nan:0x20304) (f64.const 1) (i32.const 1)) (f64.const nan:0x20304))\n(assert_return (invoke \"select-f64-t\" (f64.const nan) (f64.const 1) (i32.const 0)) (f64.const 1))\n(assert_return (invoke \"select-f64-t\" (f64.const nan:0x20304) (f64.const 1) (i32.const 0)) (f64.const 1))\n(assert_return (invoke \"select-f64-t\" (f64.const 2) (f64.const nan) (i32.const 1)) (f64.const 2))\n(assert_return (invoke \"select-f64-t\" (f64.const 2) (f64.const nan:0x20304) (i32.const 1)) (f64.const 2))\n(assert_return (invoke \"select-f64-t\" (f64.const 2) (f64.const nan) (i32.const 0)) (f64.const nan))\n(assert_return (invoke \"select-f64-t\" (f64.const 2) (f64.const nan:0x20304) (i32.const 0)) (f64.const nan:0x20304))\n\n(assert_trap (invoke \"select-trap-left\" (i32.const 1)) \"unreachable\")\n(assert_trap (invoke \"select-trap-left\" (i32.const 0)) \"unreachable\")\n(assert_trap (invoke \"select-trap-right\" (i32.const 1)) \"unreachable\")\n(assert_trap (invoke \"select-trap-right\" (i32.const 0)) \"unreachable\")\n\n(assert_return (invoke \"as-select-first\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-select-first\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"as-select-mid\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-select-mid\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"as-select-last\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-select-last\" (i32.const 1)) (i32.const 3))\n\n(assert_return (invoke \"as-loop-first\" (i32.const 0)) (i32.const 3))\n(assert_return (invoke \"as-loop-first\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"as-loop-mid\" (i32.const 0)) (i32.const 3))\n(assert_return (invoke \"as-loop-mid\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"as-loop-last\" (i32.const 0)) (i32.const 3))\n(assert_return (invoke \"as-loop-last\" (i32.const 1)) (i32.const 2))\n\n(assert_return (invoke \"as-if-condition\" (i32.const 0)))\n(assert_return (invoke \"as-if-condition\" (i32.const 1)))\n(assert_return (invoke \"as-if-then\" (i32.const 0)) (i32.const 3))\n(assert_return (invoke \"as-if-then\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"as-if-else\" (i32.const 0)) (i32.const 3))\n(assert_return (invoke \"as-if-else\" (i32.const 1)) (i32.const 2))\n\n(assert_return (invoke \"as-br_if-first\" (i32.const 0)) (i32.const 3))\n(assert_return (invoke \"as-br_if-first\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"as-br_if-last\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-br_if-last\" (i32.const 1)) (i32.const 2))\n\n(assert_return (invoke \"as-br_table-first\" (i32.const 0)) (i32.const 3))\n(assert_return (invoke \"as-br_table-first\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"as-br_table-last\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-br_table-last\" (i32.const 1)) (i32.const 2))\n\n(assert_return (invoke \"as-call_indirect-first\" (i32.const 0)) (i32.const 3))\n;;(assert_return (invoke \"as-call_indirect-first\" (i32.const 1)) (i32.const 2))\n(assert_return (invoke \"as-call_indirect-mid\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-call_indirect-mid\" (i32.const 1)) (i32.const 1))\n(assert_trap (invoke \"as-call_indirect-last\" (i32.const 0)) \"undefined element\")\n(assert_trap (invoke \"as-call_indirect-last\" (i32.const 1)) \"undefined element\")\n\n(assert_return (invoke \"as-store-first\" (i32.const 0)))\n(assert_return (invoke \"as-store-first\" (i32.const 1)))\n(assert_return (invoke \"as-store-last\" (i32.const 0)))\n(assert_return (invoke \"as-store-last\" (i32.const 1)))\n\n(assert_return (invoke \"as-memory.grow-value\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-memory.grow-value\" (i32.const 1)) (i32.const 3))\n\n(assert_return (invoke \"as-call-value\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-call-value\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-return-value\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-return-value\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-drop-operand\" (i32.const 0)))\n(assert_return (invoke \"as-drop-operand\" (i32.const 1)))\n(assert_return (invoke \"as-br-value\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-br-value\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-local.set-value\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-local.set-value\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-local.tee-value\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-local.tee-value\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-global.set-value\" (i32.const 0)) (i32.const 2))\n(assert_return (invoke \"as-global.set-value\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-load-operand\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"as-load-operand\" (i32.const 1)) (i32.const 1))\n\n(assert_return (invoke \"as-unary-operand\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-unary-operand\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-binary-operand\" (i32.const 0)) (i32.const 4))\n(assert_return (invoke \"as-binary-operand\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-test-operand\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-test-operand\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-compare-left\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-compare-left\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-compare-right\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-compare-right\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"as-convert-operand\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"as-convert-operand\" (i32.const 1)) (i32.const 1))\n\n(assert_invalid\n  (module (func $arity-0-implicit (select (nop) (nop) (i32.const 1))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $arity-0 (select (result) (nop) (nop) (i32.const 1))))\n  \"invalid result arity\"\n)\n(assert_invalid\n  (module (func $arity-2 (result i32 i32)\n    (select (result i32 i32)\n      (i32.const 0) (i32.const 0)\n      (i32.const 0) (i32.const 0)\n      (i32.const 1)\n    )\n  ))\n  \"invalid result arity\"\n)\n\n\n(assert_invalid\n  (module (func $type-externref-implicit (param $r externref)\n    (drop (select (local.get $r) (local.get $r) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-num-vs-num\n    (drop (select (i32.const 1) (i64.const 1) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-num-vs-num\n    (drop (select (i32.const 1) (f32.const 1.0) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-num-vs-num\n    (drop (select (i32.const 1) (f64.const 1.0) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-num-vs-num (select (i32.const 1) (i64.const 1) (i32.const 1)) (drop)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-num-vs-num (select (i32.const 1) (f32.const 1.0) (i32.const 1)) (drop)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-num-vs-num (select (i32.const 1) (i64.const 1) (i32.const 1)) (drop)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-num-vs-num (select (i32.const 1) (f32.const 1.0) (i32.const 1)) (drop)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-num-vs-num (select (i32.const 1) (f64.const 1.0) (i32.const 1)) (drop)))\n  \"type mismatch\"\n)\n\n\n(assert_invalid\n  (module\n    (func $type-1st-operand-empty\n      (select) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-2nd-operand-empty\n      (i32.const 0) (select) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-3rd-operand-empty\n      (i32.const 0) (i32.const 0) (select) (drop)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-1st-operand-empty-in-block\n      (i32.const 0) (i32.const 0) (i32.const 0)\n      (block (select) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-2nd-operand-empty-in-block\n      (i32.const 0) (i32.const 0)\n      (block (i32.const 0) (select) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-3rd-operand-empty-in-block\n      (i32.const 0)\n      (block (i32.const 0) (i32.const 0) (select) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-1st-operand-empty-in-loop\n      (i32.const 0) (i32.const 0) (i32.const 0)\n      (loop (select) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-2nd-operand-empty-in-loop\n      (i32.const 0) (i32.const 0)\n      (loop (i32.const 0) (select) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-3rd-operand-empty-in-loop\n      (i32.const 0)\n      (loop (i32.const 0) (i32.const 0) (select) (drop))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-1st-operand-empty-in-then\n      (i32.const 0) (i32.const 0) (i32.const 0)\n      (if (then (select) (drop)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-2nd-operand-empty-in-then\n      (i32.const 0) (i32.const 0)\n      (if (then (i32.const 0) (select) (drop)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (func $type-3rd-operand-empty-in-then\n      (i32.const 0)\n      (if (then (i32.const 0) (i32.const 0) (select) (drop)))\n    )\n  )\n  \"type mismatch\"\n)\n\n;; Third operand must be i32\n\n(assert_invalid\n  (module (func (select (i32.const 1) (i32.const 1) (i64.const 1)) (drop)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func (select (i32.const 1) (i32.const 1) (f32.const 1)) (drop)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func (select (i32.const 1) (i32.const 1) (f64.const 1)) (drop)))\n  \"type mismatch\"\n)\n\n;; Result of select has type of first two operands\n\n(assert_invalid\n  (module (func (result i32) (select (i64.const 1) (i64.const 1) (i32.const 1))))\n  \"type mismatch\"\n)\n\n;; Validation after unreachable\n\n;; The first two operands should have the same type as each other\n(assert_invalid\n  (module (func (unreachable) (select (i32.const 1) (i64.const 1) (i32.const 1)) (drop)))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func (unreachable) (select (i64.const 1) (i32.const 1) (i32.const 1)) (drop)))\n  \"type mismatch\"\n)\n\n;; Third operand must be i32\n(assert_invalid\n  (module (func (unreachable) (select (i32.const 1) (i32.const 1) (i64.const 1)) (drop)))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func (unreachable) (select (i32.const 1) (i64.const 1)) (drop)))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func (unreachable) (select (i64.const 1)) (drop)))\n  \"type mismatch\"\n)\n\n;; Result of select has type of first two operands (type of second operand when first one is omitted)\n(assert_invalid\n  (module (func (result i32) (unreachable) (select (i64.const 1) (i32.const 1))))\n  \"type mismatch\"\n)\n\n;; select always has non-empty result\n(assert_invalid\n  (module (func (unreachable) (select)))\n  \"type mismatch\"\n)\n\n"
  },
  {
    "path": "test/core/skip-stack-guard-page.wast",
    "content": ";; This tests that the stack overflow guard page can't be skipped by a function with more than a page of locals.\n(module\n  (memory 1)\n  (export \"test-guard-page-skip\" (func $test-guard-page-skip))\n\n  (func $test-guard-page-skip\n    (param $depth i32)\n    (if (i32.eq (local.get $depth) (i32.const 0))\n      (then (call $function-with-many-locals))\n      (else (call $test-guard-page-skip (i32.sub (local.get $depth) (i32.const 1))))\n    )\n  )\n\n  (func $function-with-many-locals\n\n    ;; 1056 i64 = 8448 bytes of locals\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x000-0x007\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x008-0x00f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x010-0x017\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x018-0x01f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x020-0x027\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x028-0x02f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x030-0x037\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x038-0x03f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x040-0x047\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x048-0x04f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x050-0x057\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x058-0x05f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x060-0x067\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x068-0x06f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x070-0x077\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x078-0x07f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x080-0x087\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x088-0x08f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x090-0x097\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x098-0x09f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0a0-0x0a7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0a8-0x0af\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0b0-0x0b7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0b8-0x0bf\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0c0-0x0c7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0c8-0x0cf\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0d0-0x0d7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0d8-0x0df\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0e0-0x0e7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0e8-0x0ef\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0f0-0x0f7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0f8-0x0ff\n\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x100-0x107\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x108-0x10f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x110-0x117\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x118-0x11f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x120-0x127\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x128-0x12f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x130-0x137\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x138-0x13f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x140-0x147\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x148-0x14f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x150-0x157\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x158-0x15f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x160-0x167\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x168-0x16f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x170-0x177\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x178-0x17f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x180-0x187\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x188-0x18f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x190-0x197\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x198-0x19f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1a0-0x1a7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1a8-0x1af\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1b0-0x1b7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1b8-0x1bf\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1c0-0x1c7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1c8-0x1cf\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1d0-0x1d7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1d8-0x1df\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1e0-0x1e7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1e8-0x1ef\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1f0-0x1f7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1f8-0x1ff\n\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x200-0x207\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x208-0x20f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x210-0x217\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x218-0x21f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x220-0x227\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x228-0x22f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x230-0x237\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x238-0x23f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x240-0x247\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x248-0x24f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x250-0x257\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x258-0x25f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x260-0x267\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x268-0x26f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x270-0x277\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x278-0x27f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x280-0x287\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x288-0x28f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x290-0x297\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x298-0x29f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2a0-0x2a7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2a8-0x2af\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2b0-0x2b7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2b8-0x2bf\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2c0-0x2c7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2c8-0x2cf\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2d0-0x2d7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2d8-0x2df\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2e0-0x2e7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2e8-0x2ef\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2f0-0x2f7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2f8-0x2ff\n\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x300-0x307\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x308-0x30f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x310-0x317\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x318-0x31f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x320-0x327\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x328-0x32f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x330-0x337\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x338-0x33f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x340-0x347\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x348-0x34f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x350-0x357\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x358-0x35f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x360-0x367\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x368-0x36f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x370-0x377\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x378-0x37f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x380-0x387\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x388-0x38f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x390-0x397\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x398-0x39f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3a0-0x3a7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3a8-0x3af\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3b0-0x3b7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3b8-0x3bf\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3c0-0x3c7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3c8-0x3cf\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3d0-0x3d7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3d8-0x3df\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3e0-0x3e7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3e8-0x3ef\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3f0-0x3f7\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3f8-0x3ff\n\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x400-0x407\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x408-0x40f\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x410-0x417\n    (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x418-0x41f\n\n    ;; recurse first to try to make the callee access the stack below the space allocated for the locals before the locals themselves have been initialized.\n    (call $function-with-many-locals)\n\n    ;; load from memory into the locals\n    (local.set 0x000 (i64.load offset=0x000 align=1 (i32.const 0)))\n    (local.set 0x001 (i64.load offset=0x001 align=1 (i32.const 0)))\n    (local.set 0x002 (i64.load offset=0x002 align=1 (i32.const 0)))\n    (local.set 0x003 (i64.load offset=0x003 align=1 (i32.const 0)))\n    (local.set 0x004 (i64.load offset=0x004 align=1 (i32.const 0)))\n    (local.set 0x005 (i64.load offset=0x005 align=1 (i32.const 0)))\n    (local.set 0x006 (i64.load offset=0x006 align=1 (i32.const 0)))\n    (local.set 0x007 (i64.load offset=0x007 align=1 (i32.const 0)))\n    (local.set 0x008 (i64.load offset=0x008 align=1 (i32.const 0)))\n    (local.set 0x009 (i64.load offset=0x009 align=1 (i32.const 0)))\n    (local.set 0x00a (i64.load offset=0x00a align=1 (i32.const 0)))\n    (local.set 0x00b (i64.load offset=0x00b align=1 (i32.const 0)))\n    (local.set 0x00c (i64.load offset=0x00c align=1 (i32.const 0)))\n    (local.set 0x00d (i64.load offset=0x00d align=1 (i32.const 0)))\n    (local.set 0x00e (i64.load offset=0x00e align=1 (i32.const 0)))\n    (local.set 0x00f (i64.load offset=0x00f align=1 (i32.const 0)))\n    (local.set 0x010 (i64.load offset=0x010 align=1 (i32.const 0)))\n    (local.set 0x011 (i64.load offset=0x011 align=1 (i32.const 0)))\n    (local.set 0x012 (i64.load offset=0x012 align=1 (i32.const 0)))\n    (local.set 0x013 (i64.load offset=0x013 align=1 (i32.const 0)))\n    (local.set 0x014 (i64.load offset=0x014 align=1 (i32.const 0)))\n    (local.set 0x015 (i64.load offset=0x015 align=1 (i32.const 0)))\n    (local.set 0x016 (i64.load offset=0x016 align=1 (i32.const 0)))\n    (local.set 0x017 (i64.load offset=0x017 align=1 (i32.const 0)))\n    (local.set 0x018 (i64.load offset=0x018 align=1 (i32.const 0)))\n    (local.set 0x019 (i64.load offset=0x019 align=1 (i32.const 0)))\n    (local.set 0x01a (i64.load offset=0x01a align=1 (i32.const 0)))\n    (local.set 0x01b (i64.load offset=0x01b align=1 (i32.const 0)))\n    (local.set 0x01c (i64.load offset=0x01c align=1 (i32.const 0)))\n    (local.set 0x01d (i64.load offset=0x01d align=1 (i32.const 0)))\n    (local.set 0x01e (i64.load offset=0x01e align=1 (i32.const 0)))\n    (local.set 0x01f (i64.load offset=0x01f align=1 (i32.const 0)))\n    (local.set 0x020 (i64.load offset=0x020 align=1 (i32.const 0)))\n    (local.set 0x021 (i64.load offset=0x021 align=1 (i32.const 0)))\n    (local.set 0x022 (i64.load offset=0x022 align=1 (i32.const 0)))\n    (local.set 0x023 (i64.load offset=0x023 align=1 (i32.const 0)))\n    (local.set 0x024 (i64.load offset=0x024 align=1 (i32.const 0)))\n    (local.set 0x025 (i64.load offset=0x025 align=1 (i32.const 0)))\n    (local.set 0x026 (i64.load offset=0x026 align=1 (i32.const 0)))\n    (local.set 0x027 (i64.load offset=0x027 align=1 (i32.const 0)))\n    (local.set 0x028 (i64.load offset=0x028 align=1 (i32.const 0)))\n    (local.set 0x029 (i64.load offset=0x029 align=1 (i32.const 0)))\n    (local.set 0x02a (i64.load offset=0x02a align=1 (i32.const 0)))\n    (local.set 0x02b (i64.load offset=0x02b align=1 (i32.const 0)))\n    (local.set 0x02c (i64.load offset=0x02c align=1 (i32.const 0)))\n    (local.set 0x02d (i64.load offset=0x02d align=1 (i32.const 0)))\n    (local.set 0x02e (i64.load offset=0x02e align=1 (i32.const 0)))\n    (local.set 0x02f (i64.load offset=0x02f align=1 (i32.const 0)))\n    (local.set 0x030 (i64.load offset=0x030 align=1 (i32.const 0)))\n    (local.set 0x031 (i64.load offset=0x031 align=1 (i32.const 0)))\n    (local.set 0x032 (i64.load offset=0x032 align=1 (i32.const 0)))\n    (local.set 0x033 (i64.load offset=0x033 align=1 (i32.const 0)))\n    (local.set 0x034 (i64.load offset=0x034 align=1 (i32.const 0)))\n    (local.set 0x035 (i64.load offset=0x035 align=1 (i32.const 0)))\n    (local.set 0x036 (i64.load offset=0x036 align=1 (i32.const 0)))\n    (local.set 0x037 (i64.load offset=0x037 align=1 (i32.const 0)))\n    (local.set 0x038 (i64.load offset=0x038 align=1 (i32.const 0)))\n    (local.set 0x039 (i64.load offset=0x039 align=1 (i32.const 0)))\n    (local.set 0x03a (i64.load offset=0x03a align=1 (i32.const 0)))\n    (local.set 0x03b (i64.load offset=0x03b align=1 (i32.const 0)))\n    (local.set 0x03c (i64.load offset=0x03c align=1 (i32.const 0)))\n    (local.set 0x03d (i64.load offset=0x03d align=1 (i32.const 0)))\n    (local.set 0x03e (i64.load offset=0x03e align=1 (i32.const 0)))\n    (local.set 0x03f (i64.load offset=0x03f align=1 (i32.const 0)))\n    (local.set 0x040 (i64.load offset=0x040 align=1 (i32.const 0)))\n    (local.set 0x041 (i64.load offset=0x041 align=1 (i32.const 0)))\n    (local.set 0x042 (i64.load offset=0x042 align=1 (i32.const 0)))\n    (local.set 0x043 (i64.load offset=0x043 align=1 (i32.const 0)))\n    (local.set 0x044 (i64.load offset=0x044 align=1 (i32.const 0)))\n    (local.set 0x045 (i64.load offset=0x045 align=1 (i32.const 0)))\n    (local.set 0x046 (i64.load offset=0x046 align=1 (i32.const 0)))\n    (local.set 0x047 (i64.load offset=0x047 align=1 (i32.const 0)))\n    (local.set 0x048 (i64.load offset=0x048 align=1 (i32.const 0)))\n    (local.set 0x049 (i64.load offset=0x049 align=1 (i32.const 0)))\n    (local.set 0x04a (i64.load offset=0x04a align=1 (i32.const 0)))\n    (local.set 0x04b (i64.load offset=0x04b align=1 (i32.const 0)))\n    (local.set 0x04c (i64.load offset=0x04c align=1 (i32.const 0)))\n    (local.set 0x04d (i64.load offset=0x04d align=1 (i32.const 0)))\n    (local.set 0x04e (i64.load offset=0x04e align=1 (i32.const 0)))\n    (local.set 0x04f (i64.load offset=0x04f align=1 (i32.const 0)))\n    (local.set 0x050 (i64.load offset=0x050 align=1 (i32.const 0)))\n    (local.set 0x051 (i64.load offset=0x051 align=1 (i32.const 0)))\n    (local.set 0x052 (i64.load offset=0x052 align=1 (i32.const 0)))\n    (local.set 0x053 (i64.load offset=0x053 align=1 (i32.const 0)))\n    (local.set 0x054 (i64.load offset=0x054 align=1 (i32.const 0)))\n    (local.set 0x055 (i64.load offset=0x055 align=1 (i32.const 0)))\n    (local.set 0x056 (i64.load offset=0x056 align=1 (i32.const 0)))\n    (local.set 0x057 (i64.load offset=0x057 align=1 (i32.const 0)))\n    (local.set 0x058 (i64.load offset=0x058 align=1 (i32.const 0)))\n    (local.set 0x059 (i64.load offset=0x059 align=1 (i32.const 0)))\n    (local.set 0x05a (i64.load offset=0x05a align=1 (i32.const 0)))\n    (local.set 0x05b (i64.load offset=0x05b align=1 (i32.const 0)))\n    (local.set 0x05c (i64.load offset=0x05c align=1 (i32.const 0)))\n    (local.set 0x05d (i64.load offset=0x05d align=1 (i32.const 0)))\n    (local.set 0x05e (i64.load offset=0x05e align=1 (i32.const 0)))\n    (local.set 0x05f (i64.load offset=0x05f align=1 (i32.const 0)))\n    (local.set 0x060 (i64.load offset=0x060 align=1 (i32.const 0)))\n    (local.set 0x061 (i64.load offset=0x061 align=1 (i32.const 0)))\n    (local.set 0x062 (i64.load offset=0x062 align=1 (i32.const 0)))\n    (local.set 0x063 (i64.load offset=0x063 align=1 (i32.const 0)))\n    (local.set 0x064 (i64.load offset=0x064 align=1 (i32.const 0)))\n    (local.set 0x065 (i64.load offset=0x065 align=1 (i32.const 0)))\n    (local.set 0x066 (i64.load offset=0x066 align=1 (i32.const 0)))\n    (local.set 0x067 (i64.load offset=0x067 align=1 (i32.const 0)))\n    (local.set 0x068 (i64.load offset=0x068 align=1 (i32.const 0)))\n    (local.set 0x069 (i64.load offset=0x069 align=1 (i32.const 0)))\n    (local.set 0x06a (i64.load offset=0x06a align=1 (i32.const 0)))\n    (local.set 0x06b (i64.load offset=0x06b align=1 (i32.const 0)))\n    (local.set 0x06c (i64.load offset=0x06c align=1 (i32.const 0)))\n    (local.set 0x06d (i64.load offset=0x06d align=1 (i32.const 0)))\n    (local.set 0x06e (i64.load offset=0x06e align=1 (i32.const 0)))\n    (local.set 0x06f (i64.load offset=0x06f align=1 (i32.const 0)))\n    (local.set 0x070 (i64.load offset=0x070 align=1 (i32.const 0)))\n    (local.set 0x071 (i64.load offset=0x071 align=1 (i32.const 0)))\n    (local.set 0x072 (i64.load offset=0x072 align=1 (i32.const 0)))\n    (local.set 0x073 (i64.load offset=0x073 align=1 (i32.const 0)))\n    (local.set 0x074 (i64.load offset=0x074 align=1 (i32.const 0)))\n    (local.set 0x075 (i64.load offset=0x075 align=1 (i32.const 0)))\n    (local.set 0x076 (i64.load offset=0x076 align=1 (i32.const 0)))\n    (local.set 0x077 (i64.load offset=0x077 align=1 (i32.const 0)))\n    (local.set 0x078 (i64.load offset=0x078 align=1 (i32.const 0)))\n    (local.set 0x079 (i64.load offset=0x079 align=1 (i32.const 0)))\n    (local.set 0x07a (i64.load offset=0x07a align=1 (i32.const 0)))\n    (local.set 0x07b (i64.load offset=0x07b align=1 (i32.const 0)))\n    (local.set 0x07c (i64.load offset=0x07c align=1 (i32.const 0)))\n    (local.set 0x07d (i64.load offset=0x07d align=1 (i32.const 0)))\n    (local.set 0x07e (i64.load offset=0x07e align=1 (i32.const 0)))\n    (local.set 0x07f (i64.load offset=0x07f align=1 (i32.const 0)))\n    (local.set 0x080 (i64.load offset=0x080 align=1 (i32.const 0)))\n    (local.set 0x081 (i64.load offset=0x081 align=1 (i32.const 0)))\n    (local.set 0x082 (i64.load offset=0x082 align=1 (i32.const 0)))\n    (local.set 0x083 (i64.load offset=0x083 align=1 (i32.const 0)))\n    (local.set 0x084 (i64.load offset=0x084 align=1 (i32.const 0)))\n    (local.set 0x085 (i64.load offset=0x085 align=1 (i32.const 0)))\n    (local.set 0x086 (i64.load offset=0x086 align=1 (i32.const 0)))\n    (local.set 0x087 (i64.load offset=0x087 align=1 (i32.const 0)))\n    (local.set 0x088 (i64.load offset=0x088 align=1 (i32.const 0)))\n    (local.set 0x089 (i64.load offset=0x089 align=1 (i32.const 0)))\n    (local.set 0x08a (i64.load offset=0x08a align=1 (i32.const 0)))\n    (local.set 0x08b (i64.load offset=0x08b align=1 (i32.const 0)))\n    (local.set 0x08c (i64.load offset=0x08c align=1 (i32.const 0)))\n    (local.set 0x08d (i64.load offset=0x08d align=1 (i32.const 0)))\n    (local.set 0x08e (i64.load offset=0x08e align=1 (i32.const 0)))\n    (local.set 0x08f (i64.load offset=0x08f align=1 (i32.const 0)))\n    (local.set 0x090 (i64.load offset=0x090 align=1 (i32.const 0)))\n    (local.set 0x091 (i64.load offset=0x091 align=1 (i32.const 0)))\n    (local.set 0x092 (i64.load offset=0x092 align=1 (i32.const 0)))\n    (local.set 0x093 (i64.load offset=0x093 align=1 (i32.const 0)))\n    (local.set 0x094 (i64.load offset=0x094 align=1 (i32.const 0)))\n    (local.set 0x095 (i64.load offset=0x095 align=1 (i32.const 0)))\n    (local.set 0x096 (i64.load offset=0x096 align=1 (i32.const 0)))\n    (local.set 0x097 (i64.load offset=0x097 align=1 (i32.const 0)))\n    (local.set 0x098 (i64.load offset=0x098 align=1 (i32.const 0)))\n    (local.set 0x099 (i64.load offset=0x099 align=1 (i32.const 0)))\n    (local.set 0x09a (i64.load offset=0x09a align=1 (i32.const 0)))\n    (local.set 0x09b (i64.load offset=0x09b align=1 (i32.const 0)))\n    (local.set 0x09c (i64.load offset=0x09c align=1 (i32.const 0)))\n    (local.set 0x09d (i64.load offset=0x09d align=1 (i32.const 0)))\n    (local.set 0x09e (i64.load offset=0x09e align=1 (i32.const 0)))\n    (local.set 0x09f (i64.load offset=0x09f align=1 (i32.const 0)))\n    (local.set 0x0a0 (i64.load offset=0x0a0 align=1 (i32.const 0)))\n    (local.set 0x0a1 (i64.load offset=0x0a1 align=1 (i32.const 0)))\n    (local.set 0x0a2 (i64.load offset=0x0a2 align=1 (i32.const 0)))\n    (local.set 0x0a3 (i64.load offset=0x0a3 align=1 (i32.const 0)))\n    (local.set 0x0a4 (i64.load offset=0x0a4 align=1 (i32.const 0)))\n    (local.set 0x0a5 (i64.load offset=0x0a5 align=1 (i32.const 0)))\n    (local.set 0x0a6 (i64.load offset=0x0a6 align=1 (i32.const 0)))\n    (local.set 0x0a7 (i64.load offset=0x0a7 align=1 (i32.const 0)))\n    (local.set 0x0a8 (i64.load offset=0x0a8 align=1 (i32.const 0)))\n    (local.set 0x0a9 (i64.load offset=0x0a9 align=1 (i32.const 0)))\n    (local.set 0x0aa (i64.load offset=0x0aa align=1 (i32.const 0)))\n    (local.set 0x0ab (i64.load offset=0x0ab align=1 (i32.const 0)))\n    (local.set 0x0ac (i64.load offset=0x0ac align=1 (i32.const 0)))\n    (local.set 0x0ad (i64.load offset=0x0ad align=1 (i32.const 0)))\n    (local.set 0x0ae (i64.load offset=0x0ae align=1 (i32.const 0)))\n    (local.set 0x0af (i64.load offset=0x0af align=1 (i32.const 0)))\n    (local.set 0x0b0 (i64.load offset=0x0b0 align=1 (i32.const 0)))\n    (local.set 0x0b1 (i64.load offset=0x0b1 align=1 (i32.const 0)))\n    (local.set 0x0b2 (i64.load offset=0x0b2 align=1 (i32.const 0)))\n    (local.set 0x0b3 (i64.load offset=0x0b3 align=1 (i32.const 0)))\n    (local.set 0x0b4 (i64.load offset=0x0b4 align=1 (i32.const 0)))\n    (local.set 0x0b5 (i64.load offset=0x0b5 align=1 (i32.const 0)))\n    (local.set 0x0b6 (i64.load offset=0x0b6 align=1 (i32.const 0)))\n    (local.set 0x0b7 (i64.load offset=0x0b7 align=1 (i32.const 0)))\n    (local.set 0x0b8 (i64.load offset=0x0b8 align=1 (i32.const 0)))\n    (local.set 0x0b9 (i64.load offset=0x0b9 align=1 (i32.const 0)))\n    (local.set 0x0ba (i64.load offset=0x0ba align=1 (i32.const 0)))\n    (local.set 0x0bb (i64.load offset=0x0bb align=1 (i32.const 0)))\n    (local.set 0x0bc (i64.load offset=0x0bc align=1 (i32.const 0)))\n    (local.set 0x0bd (i64.load offset=0x0bd align=1 (i32.const 0)))\n    (local.set 0x0be (i64.load offset=0x0be align=1 (i32.const 0)))\n    (local.set 0x0bf (i64.load offset=0x0bf align=1 (i32.const 0)))\n    (local.set 0x0c0 (i64.load offset=0x0c0 align=1 (i32.const 0)))\n    (local.set 0x0c1 (i64.load offset=0x0c1 align=1 (i32.const 0)))\n    (local.set 0x0c2 (i64.load offset=0x0c2 align=1 (i32.const 0)))\n    (local.set 0x0c3 (i64.load offset=0x0c3 align=1 (i32.const 0)))\n    (local.set 0x0c4 (i64.load offset=0x0c4 align=1 (i32.const 0)))\n    (local.set 0x0c5 (i64.load offset=0x0c5 align=1 (i32.const 0)))\n    (local.set 0x0c6 (i64.load offset=0x0c6 align=1 (i32.const 0)))\n    (local.set 0x0c7 (i64.load offset=0x0c7 align=1 (i32.const 0)))\n    (local.set 0x0c8 (i64.load offset=0x0c8 align=1 (i32.const 0)))\n    (local.set 0x0c9 (i64.load offset=0x0c9 align=1 (i32.const 0)))\n    (local.set 0x0ca (i64.load offset=0x0ca align=1 (i32.const 0)))\n    (local.set 0x0cb (i64.load offset=0x0cb align=1 (i32.const 0)))\n    (local.set 0x0cc (i64.load offset=0x0cc align=1 (i32.const 0)))\n    (local.set 0x0cd (i64.load offset=0x0cd align=1 (i32.const 0)))\n    (local.set 0x0ce (i64.load offset=0x0ce align=1 (i32.const 0)))\n    (local.set 0x0cf (i64.load offset=0x0cf align=1 (i32.const 0)))\n    (local.set 0x0d0 (i64.load offset=0x0d0 align=1 (i32.const 0)))\n    (local.set 0x0d1 (i64.load offset=0x0d1 align=1 (i32.const 0)))\n    (local.set 0x0d2 (i64.load offset=0x0d2 align=1 (i32.const 0)))\n    (local.set 0x0d3 (i64.load offset=0x0d3 align=1 (i32.const 0)))\n    (local.set 0x0d4 (i64.load offset=0x0d4 align=1 (i32.const 0)))\n    (local.set 0x0d5 (i64.load offset=0x0d5 align=1 (i32.const 0)))\n    (local.set 0x0d6 (i64.load offset=0x0d6 align=1 (i32.const 0)))\n    (local.set 0x0d7 (i64.load offset=0x0d7 align=1 (i32.const 0)))\n    (local.set 0x0d8 (i64.load offset=0x0d8 align=1 (i32.const 0)))\n    (local.set 0x0d9 (i64.load offset=0x0d9 align=1 (i32.const 0)))\n    (local.set 0x0da (i64.load offset=0x0da align=1 (i32.const 0)))\n    (local.set 0x0db (i64.load offset=0x0db align=1 (i32.const 0)))\n    (local.set 0x0dc (i64.load offset=0x0dc align=1 (i32.const 0)))\n    (local.set 0x0dd (i64.load offset=0x0dd align=1 (i32.const 0)))\n    (local.set 0x0de (i64.load offset=0x0de align=1 (i32.const 0)))\n    (local.set 0x0df (i64.load offset=0x0df align=1 (i32.const 0)))\n    (local.set 0x0e0 (i64.load offset=0x0e0 align=1 (i32.const 0)))\n    (local.set 0x0e1 (i64.load offset=0x0e1 align=1 (i32.const 0)))\n    (local.set 0x0e2 (i64.load offset=0x0e2 align=1 (i32.const 0)))\n    (local.set 0x0e3 (i64.load offset=0x0e3 align=1 (i32.const 0)))\n    (local.set 0x0e4 (i64.load offset=0x0e4 align=1 (i32.const 0)))\n    (local.set 0x0e5 (i64.load offset=0x0e5 align=1 (i32.const 0)))\n    (local.set 0x0e6 (i64.load offset=0x0e6 align=1 (i32.const 0)))\n    (local.set 0x0e7 (i64.load offset=0x0e7 align=1 (i32.const 0)))\n    (local.set 0x0e8 (i64.load offset=0x0e8 align=1 (i32.const 0)))\n    (local.set 0x0e9 (i64.load offset=0x0e9 align=1 (i32.const 0)))\n    (local.set 0x0ea (i64.load offset=0x0ea align=1 (i32.const 0)))\n    (local.set 0x0eb (i64.load offset=0x0eb align=1 (i32.const 0)))\n    (local.set 0x0ec (i64.load offset=0x0ec align=1 (i32.const 0)))\n    (local.set 0x0ed (i64.load offset=0x0ed align=1 (i32.const 0)))\n    (local.set 0x0ee (i64.load offset=0x0ee align=1 (i32.const 0)))\n    (local.set 0x0ef (i64.load offset=0x0ef align=1 (i32.const 0)))\n    (local.set 0x0f0 (i64.load offset=0x0f0 align=1 (i32.const 0)))\n    (local.set 0x0f1 (i64.load offset=0x0f1 align=1 (i32.const 0)))\n    (local.set 0x0f2 (i64.load offset=0x0f2 align=1 (i32.const 0)))\n    (local.set 0x0f3 (i64.load offset=0x0f3 align=1 (i32.const 0)))\n    (local.set 0x0f4 (i64.load offset=0x0f4 align=1 (i32.const 0)))\n    (local.set 0x0f5 (i64.load offset=0x0f5 align=1 (i32.const 0)))\n    (local.set 0x0f6 (i64.load offset=0x0f6 align=1 (i32.const 0)))\n    (local.set 0x0f7 (i64.load offset=0x0f7 align=1 (i32.const 0)))\n    (local.set 0x0f8 (i64.load offset=0x0f8 align=1 (i32.const 0)))\n    (local.set 0x0f9 (i64.load offset=0x0f9 align=1 (i32.const 0)))\n    (local.set 0x0fa (i64.load offset=0x0fa align=1 (i32.const 0)))\n    (local.set 0x0fb (i64.load offset=0x0fb align=1 (i32.const 0)))\n    (local.set 0x0fc (i64.load offset=0x0fc align=1 (i32.const 0)))\n    (local.set 0x0fd (i64.load offset=0x0fd align=1 (i32.const 0)))\n    (local.set 0x0fe (i64.load offset=0x0fe align=1 (i32.const 0)))\n    (local.set 0x0ff (i64.load offset=0x0ff align=1 (i32.const 0)))\n    (local.set 0x100 (i64.load offset=0x100 align=1 (i32.const 0)))\n    (local.set 0x101 (i64.load offset=0x101 align=1 (i32.const 0)))\n    (local.set 0x102 (i64.load offset=0x102 align=1 (i32.const 0)))\n    (local.set 0x103 (i64.load offset=0x103 align=1 (i32.const 0)))\n    (local.set 0x104 (i64.load offset=0x104 align=1 (i32.const 0)))\n    (local.set 0x105 (i64.load offset=0x105 align=1 (i32.const 0)))\n    (local.set 0x106 (i64.load offset=0x106 align=1 (i32.const 0)))\n    (local.set 0x107 (i64.load offset=0x107 align=1 (i32.const 0)))\n    (local.set 0x108 (i64.load offset=0x108 align=1 (i32.const 0)))\n    (local.set 0x109 (i64.load offset=0x109 align=1 (i32.const 0)))\n    (local.set 0x10a (i64.load offset=0x10a align=1 (i32.const 0)))\n    (local.set 0x10b (i64.load offset=0x10b align=1 (i32.const 0)))\n    (local.set 0x10c (i64.load offset=0x10c align=1 (i32.const 0)))\n    (local.set 0x10d (i64.load offset=0x10d align=1 (i32.const 0)))\n    (local.set 0x10e (i64.load offset=0x10e align=1 (i32.const 0)))\n    (local.set 0x10f (i64.load offset=0x10f align=1 (i32.const 0)))\n    (local.set 0x110 (i64.load offset=0x110 align=1 (i32.const 0)))\n    (local.set 0x111 (i64.load offset=0x111 align=1 (i32.const 0)))\n    (local.set 0x112 (i64.load offset=0x112 align=1 (i32.const 0)))\n    (local.set 0x113 (i64.load offset=0x113 align=1 (i32.const 0)))\n    (local.set 0x114 (i64.load offset=0x114 align=1 (i32.const 0)))\n    (local.set 0x115 (i64.load offset=0x115 align=1 (i32.const 0)))\n    (local.set 0x116 (i64.load offset=0x116 align=1 (i32.const 0)))\n    (local.set 0x117 (i64.load offset=0x117 align=1 (i32.const 0)))\n    (local.set 0x118 (i64.load offset=0x118 align=1 (i32.const 0)))\n    (local.set 0x119 (i64.load offset=0x119 align=1 (i32.const 0)))\n    (local.set 0x11a (i64.load offset=0x11a align=1 (i32.const 0)))\n    (local.set 0x11b (i64.load offset=0x11b align=1 (i32.const 0)))\n    (local.set 0x11c (i64.load offset=0x11c align=1 (i32.const 0)))\n    (local.set 0x11d (i64.load offset=0x11d align=1 (i32.const 0)))\n    (local.set 0x11e (i64.load offset=0x11e align=1 (i32.const 0)))\n    (local.set 0x11f (i64.load offset=0x11f align=1 (i32.const 0)))\n    (local.set 0x120 (i64.load offset=0x120 align=1 (i32.const 0)))\n    (local.set 0x121 (i64.load offset=0x121 align=1 (i32.const 0)))\n    (local.set 0x122 (i64.load offset=0x122 align=1 (i32.const 0)))\n    (local.set 0x123 (i64.load offset=0x123 align=1 (i32.const 0)))\n    (local.set 0x124 (i64.load offset=0x124 align=1 (i32.const 0)))\n    (local.set 0x125 (i64.load offset=0x125 align=1 (i32.const 0)))\n    (local.set 0x126 (i64.load offset=0x126 align=1 (i32.const 0)))\n    (local.set 0x127 (i64.load offset=0x127 align=1 (i32.const 0)))\n    (local.set 0x128 (i64.load offset=0x128 align=1 (i32.const 0)))\n    (local.set 0x129 (i64.load offset=0x129 align=1 (i32.const 0)))\n    (local.set 0x12a (i64.load offset=0x12a align=1 (i32.const 0)))\n    (local.set 0x12b (i64.load offset=0x12b align=1 (i32.const 0)))\n    (local.set 0x12c (i64.load offset=0x12c align=1 (i32.const 0)))\n    (local.set 0x12d (i64.load offset=0x12d align=1 (i32.const 0)))\n    (local.set 0x12e (i64.load offset=0x12e align=1 (i32.const 0)))\n    (local.set 0x12f (i64.load offset=0x12f align=1 (i32.const 0)))\n    (local.set 0x130 (i64.load offset=0x130 align=1 (i32.const 0)))\n    (local.set 0x131 (i64.load offset=0x131 align=1 (i32.const 0)))\n    (local.set 0x132 (i64.load offset=0x132 align=1 (i32.const 0)))\n    (local.set 0x133 (i64.load offset=0x133 align=1 (i32.const 0)))\n    (local.set 0x134 (i64.load offset=0x134 align=1 (i32.const 0)))\n    (local.set 0x135 (i64.load offset=0x135 align=1 (i32.const 0)))\n    (local.set 0x136 (i64.load offset=0x136 align=1 (i32.const 0)))\n    (local.set 0x137 (i64.load offset=0x137 align=1 (i32.const 0)))\n    (local.set 0x138 (i64.load offset=0x138 align=1 (i32.const 0)))\n    (local.set 0x139 (i64.load offset=0x139 align=1 (i32.const 0)))\n    (local.set 0x13a (i64.load offset=0x13a align=1 (i32.const 0)))\n    (local.set 0x13b (i64.load offset=0x13b align=1 (i32.const 0)))\n    (local.set 0x13c (i64.load offset=0x13c align=1 (i32.const 0)))\n    (local.set 0x13d (i64.load offset=0x13d align=1 (i32.const 0)))\n    (local.set 0x13e (i64.load offset=0x13e align=1 (i32.const 0)))\n    (local.set 0x13f (i64.load offset=0x13f align=1 (i32.const 0)))\n    (local.set 0x140 (i64.load offset=0x140 align=1 (i32.const 0)))\n    (local.set 0x141 (i64.load offset=0x141 align=1 (i32.const 0)))\n    (local.set 0x142 (i64.load offset=0x142 align=1 (i32.const 0)))\n    (local.set 0x143 (i64.load offset=0x143 align=1 (i32.const 0)))\n    (local.set 0x144 (i64.load offset=0x144 align=1 (i32.const 0)))\n    (local.set 0x145 (i64.load offset=0x145 align=1 (i32.const 0)))\n    (local.set 0x146 (i64.load offset=0x146 align=1 (i32.const 0)))\n    (local.set 0x147 (i64.load offset=0x147 align=1 (i32.const 0)))\n    (local.set 0x148 (i64.load offset=0x148 align=1 (i32.const 0)))\n    (local.set 0x149 (i64.load offset=0x149 align=1 (i32.const 0)))\n    (local.set 0x14a (i64.load offset=0x14a align=1 (i32.const 0)))\n    (local.set 0x14b (i64.load offset=0x14b align=1 (i32.const 0)))\n    (local.set 0x14c (i64.load offset=0x14c align=1 (i32.const 0)))\n    (local.set 0x14d (i64.load offset=0x14d align=1 (i32.const 0)))\n    (local.set 0x14e (i64.load offset=0x14e align=1 (i32.const 0)))\n    (local.set 0x14f (i64.load offset=0x14f align=1 (i32.const 0)))\n    (local.set 0x150 (i64.load offset=0x150 align=1 (i32.const 0)))\n    (local.set 0x151 (i64.load offset=0x151 align=1 (i32.const 0)))\n    (local.set 0x152 (i64.load offset=0x152 align=1 (i32.const 0)))\n    (local.set 0x153 (i64.load offset=0x153 align=1 (i32.const 0)))\n    (local.set 0x154 (i64.load offset=0x154 align=1 (i32.const 0)))\n    (local.set 0x155 (i64.load offset=0x155 align=1 (i32.const 0)))\n    (local.set 0x156 (i64.load offset=0x156 align=1 (i32.const 0)))\n    (local.set 0x157 (i64.load offset=0x157 align=1 (i32.const 0)))\n    (local.set 0x158 (i64.load offset=0x158 align=1 (i32.const 0)))\n    (local.set 0x159 (i64.load offset=0x159 align=1 (i32.const 0)))\n    (local.set 0x15a (i64.load offset=0x15a align=1 (i32.const 0)))\n    (local.set 0x15b (i64.load offset=0x15b align=1 (i32.const 0)))\n    (local.set 0x15c (i64.load offset=0x15c align=1 (i32.const 0)))\n    (local.set 0x15d (i64.load offset=0x15d align=1 (i32.const 0)))\n    (local.set 0x15e (i64.load offset=0x15e align=1 (i32.const 0)))\n    (local.set 0x15f (i64.load offset=0x15f align=1 (i32.const 0)))\n    (local.set 0x160 (i64.load offset=0x160 align=1 (i32.const 0)))\n    (local.set 0x161 (i64.load offset=0x161 align=1 (i32.const 0)))\n    (local.set 0x162 (i64.load offset=0x162 align=1 (i32.const 0)))\n    (local.set 0x163 (i64.load offset=0x163 align=1 (i32.const 0)))\n    (local.set 0x164 (i64.load offset=0x164 align=1 (i32.const 0)))\n    (local.set 0x165 (i64.load offset=0x165 align=1 (i32.const 0)))\n    (local.set 0x166 (i64.load offset=0x166 align=1 (i32.const 0)))\n    (local.set 0x167 (i64.load offset=0x167 align=1 (i32.const 0)))\n    (local.set 0x168 (i64.load offset=0x168 align=1 (i32.const 0)))\n    (local.set 0x169 (i64.load offset=0x169 align=1 (i32.const 0)))\n    (local.set 0x16a (i64.load offset=0x16a align=1 (i32.const 0)))\n    (local.set 0x16b (i64.load offset=0x16b align=1 (i32.const 0)))\n    (local.set 0x16c (i64.load offset=0x16c align=1 (i32.const 0)))\n    (local.set 0x16d (i64.load offset=0x16d align=1 (i32.const 0)))\n    (local.set 0x16e (i64.load offset=0x16e align=1 (i32.const 0)))\n    (local.set 0x16f (i64.load offset=0x16f align=1 (i32.const 0)))\n    (local.set 0x170 (i64.load offset=0x170 align=1 (i32.const 0)))\n    (local.set 0x171 (i64.load offset=0x171 align=1 (i32.const 0)))\n    (local.set 0x172 (i64.load offset=0x172 align=1 (i32.const 0)))\n    (local.set 0x173 (i64.load offset=0x173 align=1 (i32.const 0)))\n    (local.set 0x174 (i64.load offset=0x174 align=1 (i32.const 0)))\n    (local.set 0x175 (i64.load offset=0x175 align=1 (i32.const 0)))\n    (local.set 0x176 (i64.load offset=0x176 align=1 (i32.const 0)))\n    (local.set 0x177 (i64.load offset=0x177 align=1 (i32.const 0)))\n    (local.set 0x178 (i64.load offset=0x178 align=1 (i32.const 0)))\n    (local.set 0x179 (i64.load offset=0x179 align=1 (i32.const 0)))\n    (local.set 0x17a (i64.load offset=0x17a align=1 (i32.const 0)))\n    (local.set 0x17b (i64.load offset=0x17b align=1 (i32.const 0)))\n    (local.set 0x17c (i64.load offset=0x17c align=1 (i32.const 0)))\n    (local.set 0x17d (i64.load offset=0x17d align=1 (i32.const 0)))\n    (local.set 0x17e (i64.load offset=0x17e align=1 (i32.const 0)))\n    (local.set 0x17f (i64.load offset=0x17f align=1 (i32.const 0)))\n    (local.set 0x180 (i64.load offset=0x180 align=1 (i32.const 0)))\n    (local.set 0x181 (i64.load offset=0x181 align=1 (i32.const 0)))\n    (local.set 0x182 (i64.load offset=0x182 align=1 (i32.const 0)))\n    (local.set 0x183 (i64.load offset=0x183 align=1 (i32.const 0)))\n    (local.set 0x184 (i64.load offset=0x184 align=1 (i32.const 0)))\n    (local.set 0x185 (i64.load offset=0x185 align=1 (i32.const 0)))\n    (local.set 0x186 (i64.load offset=0x186 align=1 (i32.const 0)))\n    (local.set 0x187 (i64.load offset=0x187 align=1 (i32.const 0)))\n    (local.set 0x188 (i64.load offset=0x188 align=1 (i32.const 0)))\n    (local.set 0x189 (i64.load offset=0x189 align=1 (i32.const 0)))\n    (local.set 0x18a (i64.load offset=0x18a align=1 (i32.const 0)))\n    (local.set 0x18b (i64.load offset=0x18b align=1 (i32.const 0)))\n    (local.set 0x18c (i64.load offset=0x18c align=1 (i32.const 0)))\n    (local.set 0x18d (i64.load offset=0x18d align=1 (i32.const 0)))\n    (local.set 0x18e (i64.load offset=0x18e align=1 (i32.const 0)))\n    (local.set 0x18f (i64.load offset=0x18f align=1 (i32.const 0)))\n    (local.set 0x190 (i64.load offset=0x190 align=1 (i32.const 0)))\n    (local.set 0x191 (i64.load offset=0x191 align=1 (i32.const 0)))\n    (local.set 0x192 (i64.load offset=0x192 align=1 (i32.const 0)))\n    (local.set 0x193 (i64.load offset=0x193 align=1 (i32.const 0)))\n    (local.set 0x194 (i64.load offset=0x194 align=1 (i32.const 0)))\n    (local.set 0x195 (i64.load offset=0x195 align=1 (i32.const 0)))\n    (local.set 0x196 (i64.load offset=0x196 align=1 (i32.const 0)))\n    (local.set 0x197 (i64.load offset=0x197 align=1 (i32.const 0)))\n    (local.set 0x198 (i64.load offset=0x198 align=1 (i32.const 0)))\n    (local.set 0x199 (i64.load offset=0x199 align=1 (i32.const 0)))\n    (local.set 0x19a (i64.load offset=0x19a align=1 (i32.const 0)))\n    (local.set 0x19b (i64.load offset=0x19b align=1 (i32.const 0)))\n    (local.set 0x19c (i64.load offset=0x19c align=1 (i32.const 0)))\n    (local.set 0x19d (i64.load offset=0x19d align=1 (i32.const 0)))\n    (local.set 0x19e (i64.load offset=0x19e align=1 (i32.const 0)))\n    (local.set 0x19f (i64.load offset=0x19f align=1 (i32.const 0)))\n    (local.set 0x1a0 (i64.load offset=0x1a0 align=1 (i32.const 0)))\n    (local.set 0x1a1 (i64.load offset=0x1a1 align=1 (i32.const 0)))\n    (local.set 0x1a2 (i64.load offset=0x1a2 align=1 (i32.const 0)))\n    (local.set 0x1a3 (i64.load offset=0x1a3 align=1 (i32.const 0)))\n    (local.set 0x1a4 (i64.load offset=0x1a4 align=1 (i32.const 0)))\n    (local.set 0x1a5 (i64.load offset=0x1a5 align=1 (i32.const 0)))\n    (local.set 0x1a6 (i64.load offset=0x1a6 align=1 (i32.const 0)))\n    (local.set 0x1a7 (i64.load offset=0x1a7 align=1 (i32.const 0)))\n    (local.set 0x1a8 (i64.load offset=0x1a8 align=1 (i32.const 0)))\n    (local.set 0x1a9 (i64.load offset=0x1a9 align=1 (i32.const 0)))\n    (local.set 0x1aa (i64.load offset=0x1aa align=1 (i32.const 0)))\n    (local.set 0x1ab (i64.load offset=0x1ab align=1 (i32.const 0)))\n    (local.set 0x1ac (i64.load offset=0x1ac align=1 (i32.const 0)))\n    (local.set 0x1ad (i64.load offset=0x1ad align=1 (i32.const 0)))\n    (local.set 0x1ae (i64.load offset=0x1ae align=1 (i32.const 0)))\n    (local.set 0x1af (i64.load offset=0x1af align=1 (i32.const 0)))\n    (local.set 0x1b0 (i64.load offset=0x1b0 align=1 (i32.const 0)))\n    (local.set 0x1b1 (i64.load offset=0x1b1 align=1 (i32.const 0)))\n    (local.set 0x1b2 (i64.load offset=0x1b2 align=1 (i32.const 0)))\n    (local.set 0x1b3 (i64.load offset=0x1b3 align=1 (i32.const 0)))\n    (local.set 0x1b4 (i64.load offset=0x1b4 align=1 (i32.const 0)))\n    (local.set 0x1b5 (i64.load offset=0x1b5 align=1 (i32.const 0)))\n    (local.set 0x1b6 (i64.load offset=0x1b6 align=1 (i32.const 0)))\n    (local.set 0x1b7 (i64.load offset=0x1b7 align=1 (i32.const 0)))\n    (local.set 0x1b8 (i64.load offset=0x1b8 align=1 (i32.const 0)))\n    (local.set 0x1b9 (i64.load offset=0x1b9 align=1 (i32.const 0)))\n    (local.set 0x1ba (i64.load offset=0x1ba align=1 (i32.const 0)))\n    (local.set 0x1bb (i64.load offset=0x1bb align=1 (i32.const 0)))\n    (local.set 0x1bc (i64.load offset=0x1bc align=1 (i32.const 0)))\n    (local.set 0x1bd (i64.load offset=0x1bd align=1 (i32.const 0)))\n    (local.set 0x1be (i64.load offset=0x1be align=1 (i32.const 0)))\n    (local.set 0x1bf (i64.load offset=0x1bf align=1 (i32.const 0)))\n    (local.set 0x1c0 (i64.load offset=0x1c0 align=1 (i32.const 0)))\n    (local.set 0x1c1 (i64.load offset=0x1c1 align=1 (i32.const 0)))\n    (local.set 0x1c2 (i64.load offset=0x1c2 align=1 (i32.const 0)))\n    (local.set 0x1c3 (i64.load offset=0x1c3 align=1 (i32.const 0)))\n    (local.set 0x1c4 (i64.load offset=0x1c4 align=1 (i32.const 0)))\n    (local.set 0x1c5 (i64.load offset=0x1c5 align=1 (i32.const 0)))\n    (local.set 0x1c6 (i64.load offset=0x1c6 align=1 (i32.const 0)))\n    (local.set 0x1c7 (i64.load offset=0x1c7 align=1 (i32.const 0)))\n    (local.set 0x1c8 (i64.load offset=0x1c8 align=1 (i32.const 0)))\n    (local.set 0x1c9 (i64.load offset=0x1c9 align=1 (i32.const 0)))\n    (local.set 0x1ca (i64.load offset=0x1ca align=1 (i32.const 0)))\n    (local.set 0x1cb (i64.load offset=0x1cb align=1 (i32.const 0)))\n    (local.set 0x1cc (i64.load offset=0x1cc align=1 (i32.const 0)))\n    (local.set 0x1cd (i64.load offset=0x1cd align=1 (i32.const 0)))\n    (local.set 0x1ce (i64.load offset=0x1ce align=1 (i32.const 0)))\n    (local.set 0x1cf (i64.load offset=0x1cf align=1 (i32.const 0)))\n    (local.set 0x1d0 (i64.load offset=0x1d0 align=1 (i32.const 0)))\n    (local.set 0x1d1 (i64.load offset=0x1d1 align=1 (i32.const 0)))\n    (local.set 0x1d2 (i64.load offset=0x1d2 align=1 (i32.const 0)))\n    (local.set 0x1d3 (i64.load offset=0x1d3 align=1 (i32.const 0)))\n    (local.set 0x1d4 (i64.load offset=0x1d4 align=1 (i32.const 0)))\n    (local.set 0x1d5 (i64.load offset=0x1d5 align=1 (i32.const 0)))\n    (local.set 0x1d6 (i64.load offset=0x1d6 align=1 (i32.const 0)))\n    (local.set 0x1d7 (i64.load offset=0x1d7 align=1 (i32.const 0)))\n    (local.set 0x1d8 (i64.load offset=0x1d8 align=1 (i32.const 0)))\n    (local.set 0x1d9 (i64.load offset=0x1d9 align=1 (i32.const 0)))\n    (local.set 0x1da (i64.load offset=0x1da align=1 (i32.const 0)))\n    (local.set 0x1db (i64.load offset=0x1db align=1 (i32.const 0)))\n    (local.set 0x1dc (i64.load offset=0x1dc align=1 (i32.const 0)))\n    (local.set 0x1dd (i64.load offset=0x1dd align=1 (i32.const 0)))\n    (local.set 0x1de (i64.load offset=0x1de align=1 (i32.const 0)))\n    (local.set 0x1df (i64.load offset=0x1df align=1 (i32.const 0)))\n    (local.set 0x1e0 (i64.load offset=0x1e0 align=1 (i32.const 0)))\n    (local.set 0x1e1 (i64.load offset=0x1e1 align=1 (i32.const 0)))\n    (local.set 0x1e2 (i64.load offset=0x1e2 align=1 (i32.const 0)))\n    (local.set 0x1e3 (i64.load offset=0x1e3 align=1 (i32.const 0)))\n    (local.set 0x1e4 (i64.load offset=0x1e4 align=1 (i32.const 0)))\n    (local.set 0x1e5 (i64.load offset=0x1e5 align=1 (i32.const 0)))\n    (local.set 0x1e6 (i64.load offset=0x1e6 align=1 (i32.const 0)))\n    (local.set 0x1e7 (i64.load offset=0x1e7 align=1 (i32.const 0)))\n    (local.set 0x1e8 (i64.load offset=0x1e8 align=1 (i32.const 0)))\n    (local.set 0x1e9 (i64.load offset=0x1e9 align=1 (i32.const 0)))\n    (local.set 0x1ea (i64.load offset=0x1ea align=1 (i32.const 0)))\n    (local.set 0x1eb (i64.load offset=0x1eb align=1 (i32.const 0)))\n    (local.set 0x1ec (i64.load offset=0x1ec align=1 (i32.const 0)))\n    (local.set 0x1ed (i64.load offset=0x1ed align=1 (i32.const 0)))\n    (local.set 0x1ee (i64.load offset=0x1ee align=1 (i32.const 0)))\n    (local.set 0x1ef (i64.load offset=0x1ef align=1 (i32.const 0)))\n    (local.set 0x1f0 (i64.load offset=0x1f0 align=1 (i32.const 0)))\n    (local.set 0x1f1 (i64.load offset=0x1f1 align=1 (i32.const 0)))\n    (local.set 0x1f2 (i64.load offset=0x1f2 align=1 (i32.const 0)))\n    (local.set 0x1f3 (i64.load offset=0x1f3 align=1 (i32.const 0)))\n    (local.set 0x1f4 (i64.load offset=0x1f4 align=1 (i32.const 0)))\n    (local.set 0x1f5 (i64.load offset=0x1f5 align=1 (i32.const 0)))\n    (local.set 0x1f6 (i64.load offset=0x1f6 align=1 (i32.const 0)))\n    (local.set 0x1f7 (i64.load offset=0x1f7 align=1 (i32.const 0)))\n    (local.set 0x1f8 (i64.load offset=0x1f8 align=1 (i32.const 0)))\n    (local.set 0x1f9 (i64.load offset=0x1f9 align=1 (i32.const 0)))\n    (local.set 0x1fa (i64.load offset=0x1fa align=1 (i32.const 0)))\n    (local.set 0x1fb (i64.load offset=0x1fb align=1 (i32.const 0)))\n    (local.set 0x1fc (i64.load offset=0x1fc align=1 (i32.const 0)))\n    (local.set 0x1fd (i64.load offset=0x1fd align=1 (i32.const 0)))\n    (local.set 0x1fe (i64.load offset=0x1fe align=1 (i32.const 0)))\n    (local.set 0x1ff (i64.load offset=0x1ff align=1 (i32.const 0)))\n    (local.set 0x200 (i64.load offset=0x200 align=1 (i32.const 0)))\n    (local.set 0x201 (i64.load offset=0x201 align=1 (i32.const 0)))\n    (local.set 0x202 (i64.load offset=0x202 align=1 (i32.const 0)))\n    (local.set 0x203 (i64.load offset=0x203 align=1 (i32.const 0)))\n    (local.set 0x204 (i64.load offset=0x204 align=1 (i32.const 0)))\n    (local.set 0x205 (i64.load offset=0x205 align=1 (i32.const 0)))\n    (local.set 0x206 (i64.load offset=0x206 align=1 (i32.const 0)))\n    (local.set 0x207 (i64.load offset=0x207 align=1 (i32.const 0)))\n    (local.set 0x208 (i64.load offset=0x208 align=1 (i32.const 0)))\n    (local.set 0x209 (i64.load offset=0x209 align=1 (i32.const 0)))\n    (local.set 0x20a (i64.load offset=0x20a align=1 (i32.const 0)))\n    (local.set 0x20b (i64.load offset=0x20b align=1 (i32.const 0)))\n    (local.set 0x20c (i64.load offset=0x20c align=1 (i32.const 0)))\n    (local.set 0x20d (i64.load offset=0x20d align=1 (i32.const 0)))\n    (local.set 0x20e (i64.load offset=0x20e align=1 (i32.const 0)))\n    (local.set 0x20f (i64.load offset=0x20f align=1 (i32.const 0)))\n    (local.set 0x210 (i64.load offset=0x210 align=1 (i32.const 0)))\n    (local.set 0x211 (i64.load offset=0x211 align=1 (i32.const 0)))\n    (local.set 0x212 (i64.load offset=0x212 align=1 (i32.const 0)))\n    (local.set 0x213 (i64.load offset=0x213 align=1 (i32.const 0)))\n    (local.set 0x214 (i64.load offset=0x214 align=1 (i32.const 0)))\n    (local.set 0x215 (i64.load offset=0x215 align=1 (i32.const 0)))\n    (local.set 0x216 (i64.load offset=0x216 align=1 (i32.const 0)))\n    (local.set 0x217 (i64.load offset=0x217 align=1 (i32.const 0)))\n    (local.set 0x218 (i64.load offset=0x218 align=1 (i32.const 0)))\n    (local.set 0x219 (i64.load offset=0x219 align=1 (i32.const 0)))\n    (local.set 0x21a (i64.load offset=0x21a align=1 (i32.const 0)))\n    (local.set 0x21b (i64.load offset=0x21b align=1 (i32.const 0)))\n    (local.set 0x21c (i64.load offset=0x21c align=1 (i32.const 0)))\n    (local.set 0x21d (i64.load offset=0x21d align=1 (i32.const 0)))\n    (local.set 0x21e (i64.load offset=0x21e align=1 (i32.const 0)))\n    (local.set 0x21f (i64.load offset=0x21f align=1 (i32.const 0)))\n    (local.set 0x220 (i64.load offset=0x220 align=1 (i32.const 0)))\n    (local.set 0x221 (i64.load offset=0x221 align=1 (i32.const 0)))\n    (local.set 0x222 (i64.load offset=0x222 align=1 (i32.const 0)))\n    (local.set 0x223 (i64.load offset=0x223 align=1 (i32.const 0)))\n    (local.set 0x224 (i64.load offset=0x224 align=1 (i32.const 0)))\n    (local.set 0x225 (i64.load offset=0x225 align=1 (i32.const 0)))\n    (local.set 0x226 (i64.load offset=0x226 align=1 (i32.const 0)))\n    (local.set 0x227 (i64.load offset=0x227 align=1 (i32.const 0)))\n    (local.set 0x228 (i64.load offset=0x228 align=1 (i32.const 0)))\n    (local.set 0x229 (i64.load offset=0x229 align=1 (i32.const 0)))\n    (local.set 0x22a (i64.load offset=0x22a align=1 (i32.const 0)))\n    (local.set 0x22b (i64.load offset=0x22b align=1 (i32.const 0)))\n    (local.set 0x22c (i64.load offset=0x22c align=1 (i32.const 0)))\n    (local.set 0x22d (i64.load offset=0x22d align=1 (i32.const 0)))\n    (local.set 0x22e (i64.load offset=0x22e align=1 (i32.const 0)))\n    (local.set 0x22f (i64.load offset=0x22f align=1 (i32.const 0)))\n    (local.set 0x230 (i64.load offset=0x230 align=1 (i32.const 0)))\n    (local.set 0x231 (i64.load offset=0x231 align=1 (i32.const 0)))\n    (local.set 0x232 (i64.load offset=0x232 align=1 (i32.const 0)))\n    (local.set 0x233 (i64.load offset=0x233 align=1 (i32.const 0)))\n    (local.set 0x234 (i64.load offset=0x234 align=1 (i32.const 0)))\n    (local.set 0x235 (i64.load offset=0x235 align=1 (i32.const 0)))\n    (local.set 0x236 (i64.load offset=0x236 align=1 (i32.const 0)))\n    (local.set 0x237 (i64.load offset=0x237 align=1 (i32.const 0)))\n    (local.set 0x238 (i64.load offset=0x238 align=1 (i32.const 0)))\n    (local.set 0x239 (i64.load offset=0x239 align=1 (i32.const 0)))\n    (local.set 0x23a (i64.load offset=0x23a align=1 (i32.const 0)))\n    (local.set 0x23b (i64.load offset=0x23b align=1 (i32.const 0)))\n    (local.set 0x23c (i64.load offset=0x23c align=1 (i32.const 0)))\n    (local.set 0x23d (i64.load offset=0x23d align=1 (i32.const 0)))\n    (local.set 0x23e (i64.load offset=0x23e align=1 (i32.const 0)))\n    (local.set 0x23f (i64.load offset=0x23f align=1 (i32.const 0)))\n    (local.set 0x240 (i64.load offset=0x240 align=1 (i32.const 0)))\n    (local.set 0x241 (i64.load offset=0x241 align=1 (i32.const 0)))\n    (local.set 0x242 (i64.load offset=0x242 align=1 (i32.const 0)))\n    (local.set 0x243 (i64.load offset=0x243 align=1 (i32.const 0)))\n    (local.set 0x244 (i64.load offset=0x244 align=1 (i32.const 0)))\n    (local.set 0x245 (i64.load offset=0x245 align=1 (i32.const 0)))\n    (local.set 0x246 (i64.load offset=0x246 align=1 (i32.const 0)))\n    (local.set 0x247 (i64.load offset=0x247 align=1 (i32.const 0)))\n    (local.set 0x248 (i64.load offset=0x248 align=1 (i32.const 0)))\n    (local.set 0x249 (i64.load offset=0x249 align=1 (i32.const 0)))\n    (local.set 0x24a (i64.load offset=0x24a align=1 (i32.const 0)))\n    (local.set 0x24b (i64.load offset=0x24b align=1 (i32.const 0)))\n    (local.set 0x24c (i64.load offset=0x24c align=1 (i32.const 0)))\n    (local.set 0x24d (i64.load offset=0x24d align=1 (i32.const 0)))\n    (local.set 0x24e (i64.load offset=0x24e align=1 (i32.const 0)))\n    (local.set 0x24f (i64.load offset=0x24f align=1 (i32.const 0)))\n    (local.set 0x250 (i64.load offset=0x250 align=1 (i32.const 0)))\n    (local.set 0x251 (i64.load offset=0x251 align=1 (i32.const 0)))\n    (local.set 0x252 (i64.load offset=0x252 align=1 (i32.const 0)))\n    (local.set 0x253 (i64.load offset=0x253 align=1 (i32.const 0)))\n    (local.set 0x254 (i64.load offset=0x254 align=1 (i32.const 0)))\n    (local.set 0x255 (i64.load offset=0x255 align=1 (i32.const 0)))\n    (local.set 0x256 (i64.load offset=0x256 align=1 (i32.const 0)))\n    (local.set 0x257 (i64.load offset=0x257 align=1 (i32.const 0)))\n    (local.set 0x258 (i64.load offset=0x258 align=1 (i32.const 0)))\n    (local.set 0x259 (i64.load offset=0x259 align=1 (i32.const 0)))\n    (local.set 0x25a (i64.load offset=0x25a align=1 (i32.const 0)))\n    (local.set 0x25b (i64.load offset=0x25b align=1 (i32.const 0)))\n    (local.set 0x25c (i64.load offset=0x25c align=1 (i32.const 0)))\n    (local.set 0x25d (i64.load offset=0x25d align=1 (i32.const 0)))\n    (local.set 0x25e (i64.load offset=0x25e align=1 (i32.const 0)))\n    (local.set 0x25f (i64.load offset=0x25f align=1 (i32.const 0)))\n    (local.set 0x260 (i64.load offset=0x260 align=1 (i32.const 0)))\n    (local.set 0x261 (i64.load offset=0x261 align=1 (i32.const 0)))\n    (local.set 0x262 (i64.load offset=0x262 align=1 (i32.const 0)))\n    (local.set 0x263 (i64.load offset=0x263 align=1 (i32.const 0)))\n    (local.set 0x264 (i64.load offset=0x264 align=1 (i32.const 0)))\n    (local.set 0x265 (i64.load offset=0x265 align=1 (i32.const 0)))\n    (local.set 0x266 (i64.load offset=0x266 align=1 (i32.const 0)))\n    (local.set 0x267 (i64.load offset=0x267 align=1 (i32.const 0)))\n    (local.set 0x268 (i64.load offset=0x268 align=1 (i32.const 0)))\n    (local.set 0x269 (i64.load offset=0x269 align=1 (i32.const 0)))\n    (local.set 0x26a (i64.load offset=0x26a align=1 (i32.const 0)))\n    (local.set 0x26b (i64.load offset=0x26b align=1 (i32.const 0)))\n    (local.set 0x26c (i64.load offset=0x26c align=1 (i32.const 0)))\n    (local.set 0x26d (i64.load offset=0x26d align=1 (i32.const 0)))\n    (local.set 0x26e (i64.load offset=0x26e align=1 (i32.const 0)))\n    (local.set 0x26f (i64.load offset=0x26f align=1 (i32.const 0)))\n    (local.set 0x270 (i64.load offset=0x270 align=1 (i32.const 0)))\n    (local.set 0x271 (i64.load offset=0x271 align=1 (i32.const 0)))\n    (local.set 0x272 (i64.load offset=0x272 align=1 (i32.const 0)))\n    (local.set 0x273 (i64.load offset=0x273 align=1 (i32.const 0)))\n    (local.set 0x274 (i64.load offset=0x274 align=1 (i32.const 0)))\n    (local.set 0x275 (i64.load offset=0x275 align=1 (i32.const 0)))\n    (local.set 0x276 (i64.load offset=0x276 align=1 (i32.const 0)))\n    (local.set 0x277 (i64.load offset=0x277 align=1 (i32.const 0)))\n    (local.set 0x278 (i64.load offset=0x278 align=1 (i32.const 0)))\n    (local.set 0x279 (i64.load offset=0x279 align=1 (i32.const 0)))\n    (local.set 0x27a (i64.load offset=0x27a align=1 (i32.const 0)))\n    (local.set 0x27b (i64.load offset=0x27b align=1 (i32.const 0)))\n    (local.set 0x27c (i64.load offset=0x27c align=1 (i32.const 0)))\n    (local.set 0x27d (i64.load offset=0x27d align=1 (i32.const 0)))\n    (local.set 0x27e (i64.load offset=0x27e align=1 (i32.const 0)))\n    (local.set 0x27f (i64.load offset=0x27f align=1 (i32.const 0)))\n    (local.set 0x280 (i64.load offset=0x280 align=1 (i32.const 0)))\n    (local.set 0x281 (i64.load offset=0x281 align=1 (i32.const 0)))\n    (local.set 0x282 (i64.load offset=0x282 align=1 (i32.const 0)))\n    (local.set 0x283 (i64.load offset=0x283 align=1 (i32.const 0)))\n    (local.set 0x284 (i64.load offset=0x284 align=1 (i32.const 0)))\n    (local.set 0x285 (i64.load offset=0x285 align=1 (i32.const 0)))\n    (local.set 0x286 (i64.load offset=0x286 align=1 (i32.const 0)))\n    (local.set 0x287 (i64.load offset=0x287 align=1 (i32.const 0)))\n    (local.set 0x288 (i64.load offset=0x288 align=1 (i32.const 0)))\n    (local.set 0x289 (i64.load offset=0x289 align=1 (i32.const 0)))\n    (local.set 0x28a (i64.load offset=0x28a align=1 (i32.const 0)))\n    (local.set 0x28b (i64.load offset=0x28b align=1 (i32.const 0)))\n    (local.set 0x28c (i64.load offset=0x28c align=1 (i32.const 0)))\n    (local.set 0x28d (i64.load offset=0x28d align=1 (i32.const 0)))\n    (local.set 0x28e (i64.load offset=0x28e align=1 (i32.const 0)))\n    (local.set 0x28f (i64.load offset=0x28f align=1 (i32.const 0)))\n    (local.set 0x290 (i64.load offset=0x290 align=1 (i32.const 0)))\n    (local.set 0x291 (i64.load offset=0x291 align=1 (i32.const 0)))\n    (local.set 0x292 (i64.load offset=0x292 align=1 (i32.const 0)))\n    (local.set 0x293 (i64.load offset=0x293 align=1 (i32.const 0)))\n    (local.set 0x294 (i64.load offset=0x294 align=1 (i32.const 0)))\n    (local.set 0x295 (i64.load offset=0x295 align=1 (i32.const 0)))\n    (local.set 0x296 (i64.load offset=0x296 align=1 (i32.const 0)))\n    (local.set 0x297 (i64.load offset=0x297 align=1 (i32.const 0)))\n    (local.set 0x298 (i64.load offset=0x298 align=1 (i32.const 0)))\n    (local.set 0x299 (i64.load offset=0x299 align=1 (i32.const 0)))\n    (local.set 0x29a (i64.load offset=0x29a align=1 (i32.const 0)))\n    (local.set 0x29b (i64.load offset=0x29b align=1 (i32.const 0)))\n    (local.set 0x29c (i64.load offset=0x29c align=1 (i32.const 0)))\n    (local.set 0x29d (i64.load offset=0x29d align=1 (i32.const 0)))\n    (local.set 0x29e (i64.load offset=0x29e align=1 (i32.const 0)))\n    (local.set 0x29f (i64.load offset=0x29f align=1 (i32.const 0)))\n    (local.set 0x2a0 (i64.load offset=0x2a0 align=1 (i32.const 0)))\n    (local.set 0x2a1 (i64.load offset=0x2a1 align=1 (i32.const 0)))\n    (local.set 0x2a2 (i64.load offset=0x2a2 align=1 (i32.const 0)))\n    (local.set 0x2a3 (i64.load offset=0x2a3 align=1 (i32.const 0)))\n    (local.set 0x2a4 (i64.load offset=0x2a4 align=1 (i32.const 0)))\n    (local.set 0x2a5 (i64.load offset=0x2a5 align=1 (i32.const 0)))\n    (local.set 0x2a6 (i64.load offset=0x2a6 align=1 (i32.const 0)))\n    (local.set 0x2a7 (i64.load offset=0x2a7 align=1 (i32.const 0)))\n    (local.set 0x2a8 (i64.load offset=0x2a8 align=1 (i32.const 0)))\n    (local.set 0x2a9 (i64.load offset=0x2a9 align=1 (i32.const 0)))\n    (local.set 0x2aa (i64.load offset=0x2aa align=1 (i32.const 0)))\n    (local.set 0x2ab (i64.load offset=0x2ab align=1 (i32.const 0)))\n    (local.set 0x2ac (i64.load offset=0x2ac align=1 (i32.const 0)))\n    (local.set 0x2ad (i64.load offset=0x2ad align=1 (i32.const 0)))\n    (local.set 0x2ae (i64.load offset=0x2ae align=1 (i32.const 0)))\n    (local.set 0x2af (i64.load offset=0x2af align=1 (i32.const 0)))\n    (local.set 0x2b0 (i64.load offset=0x2b0 align=1 (i32.const 0)))\n    (local.set 0x2b1 (i64.load offset=0x2b1 align=1 (i32.const 0)))\n    (local.set 0x2b2 (i64.load offset=0x2b2 align=1 (i32.const 0)))\n    (local.set 0x2b3 (i64.load offset=0x2b3 align=1 (i32.const 0)))\n    (local.set 0x2b4 (i64.load offset=0x2b4 align=1 (i32.const 0)))\n    (local.set 0x2b5 (i64.load offset=0x2b5 align=1 (i32.const 0)))\n    (local.set 0x2b6 (i64.load offset=0x2b6 align=1 (i32.const 0)))\n    (local.set 0x2b7 (i64.load offset=0x2b7 align=1 (i32.const 0)))\n    (local.set 0x2b8 (i64.load offset=0x2b8 align=1 (i32.const 0)))\n    (local.set 0x2b9 (i64.load offset=0x2b9 align=1 (i32.const 0)))\n    (local.set 0x2ba (i64.load offset=0x2ba align=1 (i32.const 0)))\n    (local.set 0x2bb (i64.load offset=0x2bb align=1 (i32.const 0)))\n    (local.set 0x2bc (i64.load offset=0x2bc align=1 (i32.const 0)))\n    (local.set 0x2bd (i64.load offset=0x2bd align=1 (i32.const 0)))\n    (local.set 0x2be (i64.load offset=0x2be align=1 (i32.const 0)))\n    (local.set 0x2bf (i64.load offset=0x2bf align=1 (i32.const 0)))\n    (local.set 0x2c0 (i64.load offset=0x2c0 align=1 (i32.const 0)))\n    (local.set 0x2c1 (i64.load offset=0x2c1 align=1 (i32.const 0)))\n    (local.set 0x2c2 (i64.load offset=0x2c2 align=1 (i32.const 0)))\n    (local.set 0x2c3 (i64.load offset=0x2c3 align=1 (i32.const 0)))\n    (local.set 0x2c4 (i64.load offset=0x2c4 align=1 (i32.const 0)))\n    (local.set 0x2c5 (i64.load offset=0x2c5 align=1 (i32.const 0)))\n    (local.set 0x2c6 (i64.load offset=0x2c6 align=1 (i32.const 0)))\n    (local.set 0x2c7 (i64.load offset=0x2c7 align=1 (i32.const 0)))\n    (local.set 0x2c8 (i64.load offset=0x2c8 align=1 (i32.const 0)))\n    (local.set 0x2c9 (i64.load offset=0x2c9 align=1 (i32.const 0)))\n    (local.set 0x2ca (i64.load offset=0x2ca align=1 (i32.const 0)))\n    (local.set 0x2cb (i64.load offset=0x2cb align=1 (i32.const 0)))\n    (local.set 0x2cc (i64.load offset=0x2cc align=1 (i32.const 0)))\n    (local.set 0x2cd (i64.load offset=0x2cd align=1 (i32.const 0)))\n    (local.set 0x2ce (i64.load offset=0x2ce align=1 (i32.const 0)))\n    (local.set 0x2cf (i64.load offset=0x2cf align=1 (i32.const 0)))\n    (local.set 0x2d0 (i64.load offset=0x2d0 align=1 (i32.const 0)))\n    (local.set 0x2d1 (i64.load offset=0x2d1 align=1 (i32.const 0)))\n    (local.set 0x2d2 (i64.load offset=0x2d2 align=1 (i32.const 0)))\n    (local.set 0x2d3 (i64.load offset=0x2d3 align=1 (i32.const 0)))\n    (local.set 0x2d4 (i64.load offset=0x2d4 align=1 (i32.const 0)))\n    (local.set 0x2d5 (i64.load offset=0x2d5 align=1 (i32.const 0)))\n    (local.set 0x2d6 (i64.load offset=0x2d6 align=1 (i32.const 0)))\n    (local.set 0x2d7 (i64.load offset=0x2d7 align=1 (i32.const 0)))\n    (local.set 0x2d8 (i64.load offset=0x2d8 align=1 (i32.const 0)))\n    (local.set 0x2d9 (i64.load offset=0x2d9 align=1 (i32.const 0)))\n    (local.set 0x2da (i64.load offset=0x2da align=1 (i32.const 0)))\n    (local.set 0x2db (i64.load offset=0x2db align=1 (i32.const 0)))\n    (local.set 0x2dc (i64.load offset=0x2dc align=1 (i32.const 0)))\n    (local.set 0x2dd (i64.load offset=0x2dd align=1 (i32.const 0)))\n    (local.set 0x2de (i64.load offset=0x2de align=1 (i32.const 0)))\n    (local.set 0x2df (i64.load offset=0x2df align=1 (i32.const 0)))\n    (local.set 0x2e0 (i64.load offset=0x2e0 align=1 (i32.const 0)))\n    (local.set 0x2e1 (i64.load offset=0x2e1 align=1 (i32.const 0)))\n    (local.set 0x2e2 (i64.load offset=0x2e2 align=1 (i32.const 0)))\n    (local.set 0x2e3 (i64.load offset=0x2e3 align=1 (i32.const 0)))\n    (local.set 0x2e4 (i64.load offset=0x2e4 align=1 (i32.const 0)))\n    (local.set 0x2e5 (i64.load offset=0x2e5 align=1 (i32.const 0)))\n    (local.set 0x2e6 (i64.load offset=0x2e6 align=1 (i32.const 0)))\n    (local.set 0x2e7 (i64.load offset=0x2e7 align=1 (i32.const 0)))\n    (local.set 0x2e8 (i64.load offset=0x2e8 align=1 (i32.const 0)))\n    (local.set 0x2e9 (i64.load offset=0x2e9 align=1 (i32.const 0)))\n    (local.set 0x2ea (i64.load offset=0x2ea align=1 (i32.const 0)))\n    (local.set 0x2eb (i64.load offset=0x2eb align=1 (i32.const 0)))\n    (local.set 0x2ec (i64.load offset=0x2ec align=1 (i32.const 0)))\n    (local.set 0x2ed (i64.load offset=0x2ed align=1 (i32.const 0)))\n    (local.set 0x2ee (i64.load offset=0x2ee align=1 (i32.const 0)))\n    (local.set 0x2ef (i64.load offset=0x2ef align=1 (i32.const 0)))\n    (local.set 0x2f0 (i64.load offset=0x2f0 align=1 (i32.const 0)))\n    (local.set 0x2f1 (i64.load offset=0x2f1 align=1 (i32.const 0)))\n    (local.set 0x2f2 (i64.load offset=0x2f2 align=1 (i32.const 0)))\n    (local.set 0x2f3 (i64.load offset=0x2f3 align=1 (i32.const 0)))\n    (local.set 0x2f4 (i64.load offset=0x2f4 align=1 (i32.const 0)))\n    (local.set 0x2f5 (i64.load offset=0x2f5 align=1 (i32.const 0)))\n    (local.set 0x2f6 (i64.load offset=0x2f6 align=1 (i32.const 0)))\n    (local.set 0x2f7 (i64.load offset=0x2f7 align=1 (i32.const 0)))\n    (local.set 0x2f8 (i64.load offset=0x2f8 align=1 (i32.const 0)))\n    (local.set 0x2f9 (i64.load offset=0x2f9 align=1 (i32.const 0)))\n    (local.set 0x2fa (i64.load offset=0x2fa align=1 (i32.const 0)))\n    (local.set 0x2fb (i64.load offset=0x2fb align=1 (i32.const 0)))\n    (local.set 0x2fc (i64.load offset=0x2fc align=1 (i32.const 0)))\n    (local.set 0x2fd (i64.load offset=0x2fd align=1 (i32.const 0)))\n    (local.set 0x2fe (i64.load offset=0x2fe align=1 (i32.const 0)))\n    (local.set 0x2ff (i64.load offset=0x2ff align=1 (i32.const 0)))\n    (local.set 0x300 (i64.load offset=0x300 align=1 (i32.const 0)))\n    (local.set 0x301 (i64.load offset=0x301 align=1 (i32.const 0)))\n    (local.set 0x302 (i64.load offset=0x302 align=1 (i32.const 0)))\n    (local.set 0x303 (i64.load offset=0x303 align=1 (i32.const 0)))\n    (local.set 0x304 (i64.load offset=0x304 align=1 (i32.const 0)))\n    (local.set 0x305 (i64.load offset=0x305 align=1 (i32.const 0)))\n    (local.set 0x306 (i64.load offset=0x306 align=1 (i32.const 0)))\n    (local.set 0x307 (i64.load offset=0x307 align=1 (i32.const 0)))\n    (local.set 0x308 (i64.load offset=0x308 align=1 (i32.const 0)))\n    (local.set 0x309 (i64.load offset=0x309 align=1 (i32.const 0)))\n    (local.set 0x30a (i64.load offset=0x30a align=1 (i32.const 0)))\n    (local.set 0x30b (i64.load offset=0x30b align=1 (i32.const 0)))\n    (local.set 0x30c (i64.load offset=0x30c align=1 (i32.const 0)))\n    (local.set 0x30d (i64.load offset=0x30d align=1 (i32.const 0)))\n    (local.set 0x30e (i64.load offset=0x30e align=1 (i32.const 0)))\n    (local.set 0x30f (i64.load offset=0x30f align=1 (i32.const 0)))\n    (local.set 0x310 (i64.load offset=0x310 align=1 (i32.const 0)))\n    (local.set 0x311 (i64.load offset=0x311 align=1 (i32.const 0)))\n    (local.set 0x312 (i64.load offset=0x312 align=1 (i32.const 0)))\n    (local.set 0x313 (i64.load offset=0x313 align=1 (i32.const 0)))\n    (local.set 0x314 (i64.load offset=0x314 align=1 (i32.const 0)))\n    (local.set 0x315 (i64.load offset=0x315 align=1 (i32.const 0)))\n    (local.set 0x316 (i64.load offset=0x316 align=1 (i32.const 0)))\n    (local.set 0x317 (i64.load offset=0x317 align=1 (i32.const 0)))\n    (local.set 0x318 (i64.load offset=0x318 align=1 (i32.const 0)))\n    (local.set 0x319 (i64.load offset=0x319 align=1 (i32.const 0)))\n    (local.set 0x31a (i64.load offset=0x31a align=1 (i32.const 0)))\n    (local.set 0x31b (i64.load offset=0x31b align=1 (i32.const 0)))\n    (local.set 0x31c (i64.load offset=0x31c align=1 (i32.const 0)))\n    (local.set 0x31d (i64.load offset=0x31d align=1 (i32.const 0)))\n    (local.set 0x31e (i64.load offset=0x31e align=1 (i32.const 0)))\n    (local.set 0x31f (i64.load offset=0x31f align=1 (i32.const 0)))\n    (local.set 0x320 (i64.load offset=0x320 align=1 (i32.const 0)))\n    (local.set 0x321 (i64.load offset=0x321 align=1 (i32.const 0)))\n    (local.set 0x322 (i64.load offset=0x322 align=1 (i32.const 0)))\n    (local.set 0x323 (i64.load offset=0x323 align=1 (i32.const 0)))\n    (local.set 0x324 (i64.load offset=0x324 align=1 (i32.const 0)))\n    (local.set 0x325 (i64.load offset=0x325 align=1 (i32.const 0)))\n    (local.set 0x326 (i64.load offset=0x326 align=1 (i32.const 0)))\n    (local.set 0x327 (i64.load offset=0x327 align=1 (i32.const 0)))\n    (local.set 0x328 (i64.load offset=0x328 align=1 (i32.const 0)))\n    (local.set 0x329 (i64.load offset=0x329 align=1 (i32.const 0)))\n    (local.set 0x32a (i64.load offset=0x32a align=1 (i32.const 0)))\n    (local.set 0x32b (i64.load offset=0x32b align=1 (i32.const 0)))\n    (local.set 0x32c (i64.load offset=0x32c align=1 (i32.const 0)))\n    (local.set 0x32d (i64.load offset=0x32d align=1 (i32.const 0)))\n    (local.set 0x32e (i64.load offset=0x32e align=1 (i32.const 0)))\n    (local.set 0x32f (i64.load offset=0x32f align=1 (i32.const 0)))\n    (local.set 0x330 (i64.load offset=0x330 align=1 (i32.const 0)))\n    (local.set 0x331 (i64.load offset=0x331 align=1 (i32.const 0)))\n    (local.set 0x332 (i64.load offset=0x332 align=1 (i32.const 0)))\n    (local.set 0x333 (i64.load offset=0x333 align=1 (i32.const 0)))\n    (local.set 0x334 (i64.load offset=0x334 align=1 (i32.const 0)))\n    (local.set 0x335 (i64.load offset=0x335 align=1 (i32.const 0)))\n    (local.set 0x336 (i64.load offset=0x336 align=1 (i32.const 0)))\n    (local.set 0x337 (i64.load offset=0x337 align=1 (i32.const 0)))\n    (local.set 0x338 (i64.load offset=0x338 align=1 (i32.const 0)))\n    (local.set 0x339 (i64.load offset=0x339 align=1 (i32.const 0)))\n    (local.set 0x33a (i64.load offset=0x33a align=1 (i32.const 0)))\n    (local.set 0x33b (i64.load offset=0x33b align=1 (i32.const 0)))\n    (local.set 0x33c (i64.load offset=0x33c align=1 (i32.const 0)))\n    (local.set 0x33d (i64.load offset=0x33d align=1 (i32.const 0)))\n    (local.set 0x33e (i64.load offset=0x33e align=1 (i32.const 0)))\n    (local.set 0x33f (i64.load offset=0x33f align=1 (i32.const 0)))\n    (local.set 0x340 (i64.load offset=0x340 align=1 (i32.const 0)))\n    (local.set 0x341 (i64.load offset=0x341 align=1 (i32.const 0)))\n    (local.set 0x342 (i64.load offset=0x342 align=1 (i32.const 0)))\n    (local.set 0x343 (i64.load offset=0x343 align=1 (i32.const 0)))\n    (local.set 0x344 (i64.load offset=0x344 align=1 (i32.const 0)))\n    (local.set 0x345 (i64.load offset=0x345 align=1 (i32.const 0)))\n    (local.set 0x346 (i64.load offset=0x346 align=1 (i32.const 0)))\n    (local.set 0x347 (i64.load offset=0x347 align=1 (i32.const 0)))\n    (local.set 0x348 (i64.load offset=0x348 align=1 (i32.const 0)))\n    (local.set 0x349 (i64.load offset=0x349 align=1 (i32.const 0)))\n    (local.set 0x34a (i64.load offset=0x34a align=1 (i32.const 0)))\n    (local.set 0x34b (i64.load offset=0x34b align=1 (i32.const 0)))\n    (local.set 0x34c (i64.load offset=0x34c align=1 (i32.const 0)))\n    (local.set 0x34d (i64.load offset=0x34d align=1 (i32.const 0)))\n    (local.set 0x34e (i64.load offset=0x34e align=1 (i32.const 0)))\n    (local.set 0x34f (i64.load offset=0x34f align=1 (i32.const 0)))\n    (local.set 0x350 (i64.load offset=0x350 align=1 (i32.const 0)))\n    (local.set 0x351 (i64.load offset=0x351 align=1 (i32.const 0)))\n    (local.set 0x352 (i64.load offset=0x352 align=1 (i32.const 0)))\n    (local.set 0x353 (i64.load offset=0x353 align=1 (i32.const 0)))\n    (local.set 0x354 (i64.load offset=0x354 align=1 (i32.const 0)))\n    (local.set 0x355 (i64.load offset=0x355 align=1 (i32.const 0)))\n    (local.set 0x356 (i64.load offset=0x356 align=1 (i32.const 0)))\n    (local.set 0x357 (i64.load offset=0x357 align=1 (i32.const 0)))\n    (local.set 0x358 (i64.load offset=0x358 align=1 (i32.const 0)))\n    (local.set 0x359 (i64.load offset=0x359 align=1 (i32.const 0)))\n    (local.set 0x35a (i64.load offset=0x35a align=1 (i32.const 0)))\n    (local.set 0x35b (i64.load offset=0x35b align=1 (i32.const 0)))\n    (local.set 0x35c (i64.load offset=0x35c align=1 (i32.const 0)))\n    (local.set 0x35d (i64.load offset=0x35d align=1 (i32.const 0)))\n    (local.set 0x35e (i64.load offset=0x35e align=1 (i32.const 0)))\n    (local.set 0x35f (i64.load offset=0x35f align=1 (i32.const 0)))\n    (local.set 0x360 (i64.load offset=0x360 align=1 (i32.const 0)))\n    (local.set 0x361 (i64.load offset=0x361 align=1 (i32.const 0)))\n    (local.set 0x362 (i64.load offset=0x362 align=1 (i32.const 0)))\n    (local.set 0x363 (i64.load offset=0x363 align=1 (i32.const 0)))\n    (local.set 0x364 (i64.load offset=0x364 align=1 (i32.const 0)))\n    (local.set 0x365 (i64.load offset=0x365 align=1 (i32.const 0)))\n    (local.set 0x366 (i64.load offset=0x366 align=1 (i32.const 0)))\n    (local.set 0x367 (i64.load offset=0x367 align=1 (i32.const 0)))\n    (local.set 0x368 (i64.load offset=0x368 align=1 (i32.const 0)))\n    (local.set 0x369 (i64.load offset=0x369 align=1 (i32.const 0)))\n    (local.set 0x36a (i64.load offset=0x36a align=1 (i32.const 0)))\n    (local.set 0x36b (i64.load offset=0x36b align=1 (i32.const 0)))\n    (local.set 0x36c (i64.load offset=0x36c align=1 (i32.const 0)))\n    (local.set 0x36d (i64.load offset=0x36d align=1 (i32.const 0)))\n    (local.set 0x36e (i64.load offset=0x36e align=1 (i32.const 0)))\n    (local.set 0x36f (i64.load offset=0x36f align=1 (i32.const 0)))\n    (local.set 0x370 (i64.load offset=0x370 align=1 (i32.const 0)))\n    (local.set 0x371 (i64.load offset=0x371 align=1 (i32.const 0)))\n    (local.set 0x372 (i64.load offset=0x372 align=1 (i32.const 0)))\n    (local.set 0x373 (i64.load offset=0x373 align=1 (i32.const 0)))\n    (local.set 0x374 (i64.load offset=0x374 align=1 (i32.const 0)))\n    (local.set 0x375 (i64.load offset=0x375 align=1 (i32.const 0)))\n    (local.set 0x376 (i64.load offset=0x376 align=1 (i32.const 0)))\n    (local.set 0x377 (i64.load offset=0x377 align=1 (i32.const 0)))\n    (local.set 0x378 (i64.load offset=0x378 align=1 (i32.const 0)))\n    (local.set 0x379 (i64.load offset=0x379 align=1 (i32.const 0)))\n    (local.set 0x37a (i64.load offset=0x37a align=1 (i32.const 0)))\n    (local.set 0x37b (i64.load offset=0x37b align=1 (i32.const 0)))\n    (local.set 0x37c (i64.load offset=0x37c align=1 (i32.const 0)))\n    (local.set 0x37d (i64.load offset=0x37d align=1 (i32.const 0)))\n    (local.set 0x37e (i64.load offset=0x37e align=1 (i32.const 0)))\n    (local.set 0x37f (i64.load offset=0x37f align=1 (i32.const 0)))\n    (local.set 0x380 (i64.load offset=0x380 align=1 (i32.const 0)))\n    (local.set 0x381 (i64.load offset=0x381 align=1 (i32.const 0)))\n    (local.set 0x382 (i64.load offset=0x382 align=1 (i32.const 0)))\n    (local.set 0x383 (i64.load offset=0x383 align=1 (i32.const 0)))\n    (local.set 0x384 (i64.load offset=0x384 align=1 (i32.const 0)))\n    (local.set 0x385 (i64.load offset=0x385 align=1 (i32.const 0)))\n    (local.set 0x386 (i64.load offset=0x386 align=1 (i32.const 0)))\n    (local.set 0x387 (i64.load offset=0x387 align=1 (i32.const 0)))\n    (local.set 0x388 (i64.load offset=0x388 align=1 (i32.const 0)))\n    (local.set 0x389 (i64.load offset=0x389 align=1 (i32.const 0)))\n    (local.set 0x38a (i64.load offset=0x38a align=1 (i32.const 0)))\n    (local.set 0x38b (i64.load offset=0x38b align=1 (i32.const 0)))\n    (local.set 0x38c (i64.load offset=0x38c align=1 (i32.const 0)))\n    (local.set 0x38d (i64.load offset=0x38d align=1 (i32.const 0)))\n    (local.set 0x38e (i64.load offset=0x38e align=1 (i32.const 0)))\n    (local.set 0x38f (i64.load offset=0x38f align=1 (i32.const 0)))\n    (local.set 0x390 (i64.load offset=0x390 align=1 (i32.const 0)))\n    (local.set 0x391 (i64.load offset=0x391 align=1 (i32.const 0)))\n    (local.set 0x392 (i64.load offset=0x392 align=1 (i32.const 0)))\n    (local.set 0x393 (i64.load offset=0x393 align=1 (i32.const 0)))\n    (local.set 0x394 (i64.load offset=0x394 align=1 (i32.const 0)))\n    (local.set 0x395 (i64.load offset=0x395 align=1 (i32.const 0)))\n    (local.set 0x396 (i64.load offset=0x396 align=1 (i32.const 0)))\n    (local.set 0x397 (i64.load offset=0x397 align=1 (i32.const 0)))\n    (local.set 0x398 (i64.load offset=0x398 align=1 (i32.const 0)))\n    (local.set 0x399 (i64.load offset=0x399 align=1 (i32.const 0)))\n    (local.set 0x39a (i64.load offset=0x39a align=1 (i32.const 0)))\n    (local.set 0x39b (i64.load offset=0x39b align=1 (i32.const 0)))\n    (local.set 0x39c (i64.load offset=0x39c align=1 (i32.const 0)))\n    (local.set 0x39d (i64.load offset=0x39d align=1 (i32.const 0)))\n    (local.set 0x39e (i64.load offset=0x39e align=1 (i32.const 0)))\n    (local.set 0x39f (i64.load offset=0x39f align=1 (i32.const 0)))\n    (local.set 0x3a0 (i64.load offset=0x3a0 align=1 (i32.const 0)))\n    (local.set 0x3a1 (i64.load offset=0x3a1 align=1 (i32.const 0)))\n    (local.set 0x3a2 (i64.load offset=0x3a2 align=1 (i32.const 0)))\n    (local.set 0x3a3 (i64.load offset=0x3a3 align=1 (i32.const 0)))\n    (local.set 0x3a4 (i64.load offset=0x3a4 align=1 (i32.const 0)))\n    (local.set 0x3a5 (i64.load offset=0x3a5 align=1 (i32.const 0)))\n    (local.set 0x3a6 (i64.load offset=0x3a6 align=1 (i32.const 0)))\n    (local.set 0x3a7 (i64.load offset=0x3a7 align=1 (i32.const 0)))\n    (local.set 0x3a8 (i64.load offset=0x3a8 align=1 (i32.const 0)))\n    (local.set 0x3a9 (i64.load offset=0x3a9 align=1 (i32.const 0)))\n    (local.set 0x3aa (i64.load offset=0x3aa align=1 (i32.const 0)))\n    (local.set 0x3ab (i64.load offset=0x3ab align=1 (i32.const 0)))\n    (local.set 0x3ac (i64.load offset=0x3ac align=1 (i32.const 0)))\n    (local.set 0x3ad (i64.load offset=0x3ad align=1 (i32.const 0)))\n    (local.set 0x3ae (i64.load offset=0x3ae align=1 (i32.const 0)))\n    (local.set 0x3af (i64.load offset=0x3af align=1 (i32.const 0)))\n    (local.set 0x3b0 (i64.load offset=0x3b0 align=1 (i32.const 0)))\n    (local.set 0x3b1 (i64.load offset=0x3b1 align=1 (i32.const 0)))\n    (local.set 0x3b2 (i64.load offset=0x3b2 align=1 (i32.const 0)))\n    (local.set 0x3b3 (i64.load offset=0x3b3 align=1 (i32.const 0)))\n    (local.set 0x3b4 (i64.load offset=0x3b4 align=1 (i32.const 0)))\n    (local.set 0x3b5 (i64.load offset=0x3b5 align=1 (i32.const 0)))\n    (local.set 0x3b6 (i64.load offset=0x3b6 align=1 (i32.const 0)))\n    (local.set 0x3b7 (i64.load offset=0x3b7 align=1 (i32.const 0)))\n    (local.set 0x3b8 (i64.load offset=0x3b8 align=1 (i32.const 0)))\n    (local.set 0x3b9 (i64.load offset=0x3b9 align=1 (i32.const 0)))\n    (local.set 0x3ba (i64.load offset=0x3ba align=1 (i32.const 0)))\n    (local.set 0x3bb (i64.load offset=0x3bb align=1 (i32.const 0)))\n    (local.set 0x3bc (i64.load offset=0x3bc align=1 (i32.const 0)))\n    (local.set 0x3bd (i64.load offset=0x3bd align=1 (i32.const 0)))\n    (local.set 0x3be (i64.load offset=0x3be align=1 (i32.const 0)))\n    (local.set 0x3bf (i64.load offset=0x3bf align=1 (i32.const 0)))\n    (local.set 0x3c0 (i64.load offset=0x3c0 align=1 (i32.const 0)))\n    (local.set 0x3c1 (i64.load offset=0x3c1 align=1 (i32.const 0)))\n    (local.set 0x3c2 (i64.load offset=0x3c2 align=1 (i32.const 0)))\n    (local.set 0x3c3 (i64.load offset=0x3c3 align=1 (i32.const 0)))\n    (local.set 0x3c4 (i64.load offset=0x3c4 align=1 (i32.const 0)))\n    (local.set 0x3c5 (i64.load offset=0x3c5 align=1 (i32.const 0)))\n    (local.set 0x3c6 (i64.load offset=0x3c6 align=1 (i32.const 0)))\n    (local.set 0x3c7 (i64.load offset=0x3c7 align=1 (i32.const 0)))\n    (local.set 0x3c8 (i64.load offset=0x3c8 align=1 (i32.const 0)))\n    (local.set 0x3c9 (i64.load offset=0x3c9 align=1 (i32.const 0)))\n    (local.set 0x3ca (i64.load offset=0x3ca align=1 (i32.const 0)))\n    (local.set 0x3cb (i64.load offset=0x3cb align=1 (i32.const 0)))\n    (local.set 0x3cc (i64.load offset=0x3cc align=1 (i32.const 0)))\n    (local.set 0x3cd (i64.load offset=0x3cd align=1 (i32.const 0)))\n    (local.set 0x3ce (i64.load offset=0x3ce align=1 (i32.const 0)))\n    (local.set 0x3cf (i64.load offset=0x3cf align=1 (i32.const 0)))\n    (local.set 0x3d0 (i64.load offset=0x3d0 align=1 (i32.const 0)))\n    (local.set 0x3d1 (i64.load offset=0x3d1 align=1 (i32.const 0)))\n    (local.set 0x3d2 (i64.load offset=0x3d2 align=1 (i32.const 0)))\n    (local.set 0x3d3 (i64.load offset=0x3d3 align=1 (i32.const 0)))\n    (local.set 0x3d4 (i64.load offset=0x3d4 align=1 (i32.const 0)))\n    (local.set 0x3d5 (i64.load offset=0x3d5 align=1 (i32.const 0)))\n    (local.set 0x3d6 (i64.load offset=0x3d6 align=1 (i32.const 0)))\n    (local.set 0x3d7 (i64.load offset=0x3d7 align=1 (i32.const 0)))\n    (local.set 0x3d8 (i64.load offset=0x3d8 align=1 (i32.const 0)))\n    (local.set 0x3d9 (i64.load offset=0x3d9 align=1 (i32.const 0)))\n    (local.set 0x3da (i64.load offset=0x3da align=1 (i32.const 0)))\n    (local.set 0x3db (i64.load offset=0x3db align=1 (i32.const 0)))\n    (local.set 0x3dc (i64.load offset=0x3dc align=1 (i32.const 0)))\n    (local.set 0x3dd (i64.load offset=0x3dd align=1 (i32.const 0)))\n    (local.set 0x3de (i64.load offset=0x3de align=1 (i32.const 0)))\n    (local.set 0x3df (i64.load offset=0x3df align=1 (i32.const 0)))\n    (local.set 0x3e0 (i64.load offset=0x3e0 align=1 (i32.const 0)))\n    (local.set 0x3e1 (i64.load offset=0x3e1 align=1 (i32.const 0)))\n    (local.set 0x3e2 (i64.load offset=0x3e2 align=1 (i32.const 0)))\n    (local.set 0x3e3 (i64.load offset=0x3e3 align=1 (i32.const 0)))\n    (local.set 0x3e4 (i64.load offset=0x3e4 align=1 (i32.const 0)))\n    (local.set 0x3e5 (i64.load offset=0x3e5 align=1 (i32.const 0)))\n    (local.set 0x3e6 (i64.load offset=0x3e6 align=1 (i32.const 0)))\n    (local.set 0x3e7 (i64.load offset=0x3e7 align=1 (i32.const 0)))\n    (local.set 0x3e8 (i64.load offset=0x3e8 align=1 (i32.const 0)))\n    (local.set 0x3e9 (i64.load offset=0x3e9 align=1 (i32.const 0)))\n    (local.set 0x3ea (i64.load offset=0x3ea align=1 (i32.const 0)))\n    (local.set 0x3eb (i64.load offset=0x3eb align=1 (i32.const 0)))\n    (local.set 0x3ec (i64.load offset=0x3ec align=1 (i32.const 0)))\n    (local.set 0x3ed (i64.load offset=0x3ed align=1 (i32.const 0)))\n    (local.set 0x3ee (i64.load offset=0x3ee align=1 (i32.const 0)))\n    (local.set 0x3ef (i64.load offset=0x3ef align=1 (i32.const 0)))\n    (local.set 0x3f0 (i64.load offset=0x3f0 align=1 (i32.const 0)))\n    (local.set 0x3f1 (i64.load offset=0x3f1 align=1 (i32.const 0)))\n    (local.set 0x3f2 (i64.load offset=0x3f2 align=1 (i32.const 0)))\n    (local.set 0x3f3 (i64.load offset=0x3f3 align=1 (i32.const 0)))\n    (local.set 0x3f4 (i64.load offset=0x3f4 align=1 (i32.const 0)))\n    (local.set 0x3f5 (i64.load offset=0x3f5 align=1 (i32.const 0)))\n    (local.set 0x3f6 (i64.load offset=0x3f6 align=1 (i32.const 0)))\n    (local.set 0x3f7 (i64.load offset=0x3f7 align=1 (i32.const 0)))\n    (local.set 0x3f8 (i64.load offset=0x3f8 align=1 (i32.const 0)))\n    (local.set 0x3f9 (i64.load offset=0x3f9 align=1 (i32.const 0)))\n    (local.set 0x3fa (i64.load offset=0x3fa align=1 (i32.const 0)))\n    (local.set 0x3fb (i64.load offset=0x3fb align=1 (i32.const 0)))\n    (local.set 0x3fc (i64.load offset=0x3fc align=1 (i32.const 0)))\n    (local.set 0x3fd (i64.load offset=0x3fd align=1 (i32.const 0)))\n    (local.set 0x3fe (i64.load offset=0x3fe align=1 (i32.const 0)))\n    (local.set 0x3ff (i64.load offset=0x3ff align=1 (i32.const 0)))\n    (local.set 0x400 (i64.load offset=0x400 align=1 (i32.const 0)))\n    (local.set 0x401 (i64.load offset=0x401 align=1 (i32.const 0)))\n    (local.set 0x402 (i64.load offset=0x402 align=1 (i32.const 0)))\n    (local.set 0x403 (i64.load offset=0x403 align=1 (i32.const 0)))\n    (local.set 0x404 (i64.load offset=0x404 align=1 (i32.const 0)))\n    (local.set 0x405 (i64.load offset=0x405 align=1 (i32.const 0)))\n    (local.set 0x406 (i64.load offset=0x406 align=1 (i32.const 0)))\n    (local.set 0x407 (i64.load offset=0x407 align=1 (i32.const 0)))\n    (local.set 0x408 (i64.load offset=0x408 align=1 (i32.const 0)))\n    (local.set 0x409 (i64.load offset=0x409 align=1 (i32.const 0)))\n    (local.set 0x40a (i64.load offset=0x40a align=1 (i32.const 0)))\n    (local.set 0x40b (i64.load offset=0x40b align=1 (i32.const 0)))\n    (local.set 0x40c (i64.load offset=0x40c align=1 (i32.const 0)))\n    (local.set 0x40d (i64.load offset=0x40d align=1 (i32.const 0)))\n    (local.set 0x40e (i64.load offset=0x40e align=1 (i32.const 0)))\n    (local.set 0x40f (i64.load offset=0x40f align=1 (i32.const 0)))\n    (local.set 0x410 (i64.load offset=0x410 align=1 (i32.const 0)))\n    (local.set 0x411 (i64.load offset=0x411 align=1 (i32.const 0)))\n    (local.set 0x412 (i64.load offset=0x412 align=1 (i32.const 0)))\n    (local.set 0x413 (i64.load offset=0x413 align=1 (i32.const 0)))\n    (local.set 0x414 (i64.load offset=0x414 align=1 (i32.const 0)))\n    (local.set 0x415 (i64.load offset=0x415 align=1 (i32.const 0)))\n    (local.set 0x416 (i64.load offset=0x416 align=1 (i32.const 0)))\n    (local.set 0x417 (i64.load offset=0x417 align=1 (i32.const 0)))\n    (local.set 0x418 (i64.load offset=0x418 align=1 (i32.const 0)))\n    (local.set 0x419 (i64.load offset=0x419 align=1 (i32.const 0)))\n    (local.set 0x41a (i64.load offset=0x41a align=1 (i32.const 0)))\n    (local.set 0x41b (i64.load offset=0x41b align=1 (i32.const 0)))\n    (local.set 0x41c (i64.load offset=0x41c align=1 (i32.const 0)))\n    (local.set 0x41d (i64.load offset=0x41d align=1 (i32.const 0)))\n    (local.set 0x41e (i64.load offset=0x41e align=1 (i32.const 0)))\n    (local.set 0x41f (i64.load offset=0x41f align=1 (i32.const 0)))\n\n    ;; store the locals back to memory\n    (i64.store offset=0x000 align=1 (i32.const 0) (local.get 0x000))\n    (i64.store offset=0x001 align=1 (i32.const 0) (local.get 0x001))\n    (i64.store offset=0x002 align=1 (i32.const 0) (local.get 0x002))\n    (i64.store offset=0x003 align=1 (i32.const 0) (local.get 0x003))\n    (i64.store offset=0x004 align=1 (i32.const 0) (local.get 0x004))\n    (i64.store offset=0x005 align=1 (i32.const 0) (local.get 0x005))\n    (i64.store offset=0x006 align=1 (i32.const 0) (local.get 0x006))\n    (i64.store offset=0x007 align=1 (i32.const 0) (local.get 0x007))\n    (i64.store offset=0x008 align=1 (i32.const 0) (local.get 0x008))\n    (i64.store offset=0x009 align=1 (i32.const 0) (local.get 0x009))\n    (i64.store offset=0x00a align=1 (i32.const 0) (local.get 0x00a))\n    (i64.store offset=0x00b align=1 (i32.const 0) (local.get 0x00b))\n    (i64.store offset=0x00c align=1 (i32.const 0) (local.get 0x00c))\n    (i64.store offset=0x00d align=1 (i32.const 0) (local.get 0x00d))\n    (i64.store offset=0x00e align=1 (i32.const 0) (local.get 0x00e))\n    (i64.store offset=0x00f align=1 (i32.const 0) (local.get 0x00f))\n    (i64.store offset=0x010 align=1 (i32.const 0) (local.get 0x010))\n    (i64.store offset=0x011 align=1 (i32.const 0) (local.get 0x011))\n    (i64.store offset=0x012 align=1 (i32.const 0) (local.get 0x012))\n    (i64.store offset=0x013 align=1 (i32.const 0) (local.get 0x013))\n    (i64.store offset=0x014 align=1 (i32.const 0) (local.get 0x014))\n    (i64.store offset=0x015 align=1 (i32.const 0) (local.get 0x015))\n    (i64.store offset=0x016 align=1 (i32.const 0) (local.get 0x016))\n    (i64.store offset=0x017 align=1 (i32.const 0) (local.get 0x017))\n    (i64.store offset=0x018 align=1 (i32.const 0) (local.get 0x018))\n    (i64.store offset=0x019 align=1 (i32.const 0) (local.get 0x019))\n    (i64.store offset=0x01a align=1 (i32.const 0) (local.get 0x01a))\n    (i64.store offset=0x01b align=1 (i32.const 0) (local.get 0x01b))\n    (i64.store offset=0x01c align=1 (i32.const 0) (local.get 0x01c))\n    (i64.store offset=0x01d align=1 (i32.const 0) (local.get 0x01d))\n    (i64.store offset=0x01e align=1 (i32.const 0) (local.get 0x01e))\n    (i64.store offset=0x01f align=1 (i32.const 0) (local.get 0x01f))\n    (i64.store offset=0x020 align=1 (i32.const 0) (local.get 0x020))\n    (i64.store offset=0x021 align=1 (i32.const 0) (local.get 0x021))\n    (i64.store offset=0x022 align=1 (i32.const 0) (local.get 0x022))\n    (i64.store offset=0x023 align=1 (i32.const 0) (local.get 0x023))\n    (i64.store offset=0x024 align=1 (i32.const 0) (local.get 0x024))\n    (i64.store offset=0x025 align=1 (i32.const 0) (local.get 0x025))\n    (i64.store offset=0x026 align=1 (i32.const 0) (local.get 0x026))\n    (i64.store offset=0x027 align=1 (i32.const 0) (local.get 0x027))\n    (i64.store offset=0x028 align=1 (i32.const 0) (local.get 0x028))\n    (i64.store offset=0x029 align=1 (i32.const 0) (local.get 0x029))\n    (i64.store offset=0x02a align=1 (i32.const 0) (local.get 0x02a))\n    (i64.store offset=0x02b align=1 (i32.const 0) (local.get 0x02b))\n    (i64.store offset=0x02c align=1 (i32.const 0) (local.get 0x02c))\n    (i64.store offset=0x02d align=1 (i32.const 0) (local.get 0x02d))\n    (i64.store offset=0x02e align=1 (i32.const 0) (local.get 0x02e))\n    (i64.store offset=0x02f align=1 (i32.const 0) (local.get 0x02f))\n    (i64.store offset=0x030 align=1 (i32.const 0) (local.get 0x030))\n    (i64.store offset=0x031 align=1 (i32.const 0) (local.get 0x031))\n    (i64.store offset=0x032 align=1 (i32.const 0) (local.get 0x032))\n    (i64.store offset=0x033 align=1 (i32.const 0) (local.get 0x033))\n    (i64.store offset=0x034 align=1 (i32.const 0) (local.get 0x034))\n    (i64.store offset=0x035 align=1 (i32.const 0) (local.get 0x035))\n    (i64.store offset=0x036 align=1 (i32.const 0) (local.get 0x036))\n    (i64.store offset=0x037 align=1 (i32.const 0) (local.get 0x037))\n    (i64.store offset=0x038 align=1 (i32.const 0) (local.get 0x038))\n    (i64.store offset=0x039 align=1 (i32.const 0) (local.get 0x039))\n    (i64.store offset=0x03a align=1 (i32.const 0) (local.get 0x03a))\n    (i64.store offset=0x03b align=1 (i32.const 0) (local.get 0x03b))\n    (i64.store offset=0x03c align=1 (i32.const 0) (local.get 0x03c))\n    (i64.store offset=0x03d align=1 (i32.const 0) (local.get 0x03d))\n    (i64.store offset=0x03e align=1 (i32.const 0) (local.get 0x03e))\n    (i64.store offset=0x03f align=1 (i32.const 0) (local.get 0x03f))\n    (i64.store offset=0x040 align=1 (i32.const 0) (local.get 0x040))\n    (i64.store offset=0x041 align=1 (i32.const 0) (local.get 0x041))\n    (i64.store offset=0x042 align=1 (i32.const 0) (local.get 0x042))\n    (i64.store offset=0x043 align=1 (i32.const 0) (local.get 0x043))\n    (i64.store offset=0x044 align=1 (i32.const 0) (local.get 0x044))\n    (i64.store offset=0x045 align=1 (i32.const 0) (local.get 0x045))\n    (i64.store offset=0x046 align=1 (i32.const 0) (local.get 0x046))\n    (i64.store offset=0x047 align=1 (i32.const 0) (local.get 0x047))\n    (i64.store offset=0x048 align=1 (i32.const 0) (local.get 0x048))\n    (i64.store offset=0x049 align=1 (i32.const 0) (local.get 0x049))\n    (i64.store offset=0x04a align=1 (i32.const 0) (local.get 0x04a))\n    (i64.store offset=0x04b align=1 (i32.const 0) (local.get 0x04b))\n    (i64.store offset=0x04c align=1 (i32.const 0) (local.get 0x04c))\n    (i64.store offset=0x04d align=1 (i32.const 0) (local.get 0x04d))\n    (i64.store offset=0x04e align=1 (i32.const 0) (local.get 0x04e))\n    (i64.store offset=0x04f align=1 (i32.const 0) (local.get 0x04f))\n    (i64.store offset=0x050 align=1 (i32.const 0) (local.get 0x050))\n    (i64.store offset=0x051 align=1 (i32.const 0) (local.get 0x051))\n    (i64.store offset=0x052 align=1 (i32.const 0) (local.get 0x052))\n    (i64.store offset=0x053 align=1 (i32.const 0) (local.get 0x053))\n    (i64.store offset=0x054 align=1 (i32.const 0) (local.get 0x054))\n    (i64.store offset=0x055 align=1 (i32.const 0) (local.get 0x055))\n    (i64.store offset=0x056 align=1 (i32.const 0) (local.get 0x056))\n    (i64.store offset=0x057 align=1 (i32.const 0) (local.get 0x057))\n    (i64.store offset=0x058 align=1 (i32.const 0) (local.get 0x058))\n    (i64.store offset=0x059 align=1 (i32.const 0) (local.get 0x059))\n    (i64.store offset=0x05a align=1 (i32.const 0) (local.get 0x05a))\n    (i64.store offset=0x05b align=1 (i32.const 0) (local.get 0x05b))\n    (i64.store offset=0x05c align=1 (i32.const 0) (local.get 0x05c))\n    (i64.store offset=0x05d align=1 (i32.const 0) (local.get 0x05d))\n    (i64.store offset=0x05e align=1 (i32.const 0) (local.get 0x05e))\n    (i64.store offset=0x05f align=1 (i32.const 0) (local.get 0x05f))\n    (i64.store offset=0x060 align=1 (i32.const 0) (local.get 0x060))\n    (i64.store offset=0x061 align=1 (i32.const 0) (local.get 0x061))\n    (i64.store offset=0x062 align=1 (i32.const 0) (local.get 0x062))\n    (i64.store offset=0x063 align=1 (i32.const 0) (local.get 0x063))\n    (i64.store offset=0x064 align=1 (i32.const 0) (local.get 0x064))\n    (i64.store offset=0x065 align=1 (i32.const 0) (local.get 0x065))\n    (i64.store offset=0x066 align=1 (i32.const 0) (local.get 0x066))\n    (i64.store offset=0x067 align=1 (i32.const 0) (local.get 0x067))\n    (i64.store offset=0x068 align=1 (i32.const 0) (local.get 0x068))\n    (i64.store offset=0x069 align=1 (i32.const 0) (local.get 0x069))\n    (i64.store offset=0x06a align=1 (i32.const 0) (local.get 0x06a))\n    (i64.store offset=0x06b align=1 (i32.const 0) (local.get 0x06b))\n    (i64.store offset=0x06c align=1 (i32.const 0) (local.get 0x06c))\n    (i64.store offset=0x06d align=1 (i32.const 0) (local.get 0x06d))\n    (i64.store offset=0x06e align=1 (i32.const 0) (local.get 0x06e))\n    (i64.store offset=0x06f align=1 (i32.const 0) (local.get 0x06f))\n    (i64.store offset=0x070 align=1 (i32.const 0) (local.get 0x070))\n    (i64.store offset=0x071 align=1 (i32.const 0) (local.get 0x071))\n    (i64.store offset=0x072 align=1 (i32.const 0) (local.get 0x072))\n    (i64.store offset=0x073 align=1 (i32.const 0) (local.get 0x073))\n    (i64.store offset=0x074 align=1 (i32.const 0) (local.get 0x074))\n    (i64.store offset=0x075 align=1 (i32.const 0) (local.get 0x075))\n    (i64.store offset=0x076 align=1 (i32.const 0) (local.get 0x076))\n    (i64.store offset=0x077 align=1 (i32.const 0) (local.get 0x077))\n    (i64.store offset=0x078 align=1 (i32.const 0) (local.get 0x078))\n    (i64.store offset=0x079 align=1 (i32.const 0) (local.get 0x079))\n    (i64.store offset=0x07a align=1 (i32.const 0) (local.get 0x07a))\n    (i64.store offset=0x07b align=1 (i32.const 0) (local.get 0x07b))\n    (i64.store offset=0x07c align=1 (i32.const 0) (local.get 0x07c))\n    (i64.store offset=0x07d align=1 (i32.const 0) (local.get 0x07d))\n    (i64.store offset=0x07e align=1 (i32.const 0) (local.get 0x07e))\n    (i64.store offset=0x07f align=1 (i32.const 0) (local.get 0x07f))\n    (i64.store offset=0x080 align=1 (i32.const 0) (local.get 0x080))\n    (i64.store offset=0x081 align=1 (i32.const 0) (local.get 0x081))\n    (i64.store offset=0x082 align=1 (i32.const 0) (local.get 0x082))\n    (i64.store offset=0x083 align=1 (i32.const 0) (local.get 0x083))\n    (i64.store offset=0x084 align=1 (i32.const 0) (local.get 0x084))\n    (i64.store offset=0x085 align=1 (i32.const 0) (local.get 0x085))\n    (i64.store offset=0x086 align=1 (i32.const 0) (local.get 0x086))\n    (i64.store offset=0x087 align=1 (i32.const 0) (local.get 0x087))\n    (i64.store offset=0x088 align=1 (i32.const 0) (local.get 0x088))\n    (i64.store offset=0x089 align=1 (i32.const 0) (local.get 0x089))\n    (i64.store offset=0x08a align=1 (i32.const 0) (local.get 0x08a))\n    (i64.store offset=0x08b align=1 (i32.const 0) (local.get 0x08b))\n    (i64.store offset=0x08c align=1 (i32.const 0) (local.get 0x08c))\n    (i64.store offset=0x08d align=1 (i32.const 0) (local.get 0x08d))\n    (i64.store offset=0x08e align=1 (i32.const 0) (local.get 0x08e))\n    (i64.store offset=0x08f align=1 (i32.const 0) (local.get 0x08f))\n    (i64.store offset=0x090 align=1 (i32.const 0) (local.get 0x090))\n    (i64.store offset=0x091 align=1 (i32.const 0) (local.get 0x091))\n    (i64.store offset=0x092 align=1 (i32.const 0) (local.get 0x092))\n    (i64.store offset=0x093 align=1 (i32.const 0) (local.get 0x093))\n    (i64.store offset=0x094 align=1 (i32.const 0) (local.get 0x094))\n    (i64.store offset=0x095 align=1 (i32.const 0) (local.get 0x095))\n    (i64.store offset=0x096 align=1 (i32.const 0) (local.get 0x096))\n    (i64.store offset=0x097 align=1 (i32.const 0) (local.get 0x097))\n    (i64.store offset=0x098 align=1 (i32.const 0) (local.get 0x098))\n    (i64.store offset=0x099 align=1 (i32.const 0) (local.get 0x099))\n    (i64.store offset=0x09a align=1 (i32.const 0) (local.get 0x09a))\n    (i64.store offset=0x09b align=1 (i32.const 0) (local.get 0x09b))\n    (i64.store offset=0x09c align=1 (i32.const 0) (local.get 0x09c))\n    (i64.store offset=0x09d align=1 (i32.const 0) (local.get 0x09d))\n    (i64.store offset=0x09e align=1 (i32.const 0) (local.get 0x09e))\n    (i64.store offset=0x09f align=1 (i32.const 0) (local.get 0x09f))\n    (i64.store offset=0x0a0 align=1 (i32.const 0) (local.get 0x0a0))\n    (i64.store offset=0x0a1 align=1 (i32.const 0) (local.get 0x0a1))\n    (i64.store offset=0x0a2 align=1 (i32.const 0) (local.get 0x0a2))\n    (i64.store offset=0x0a3 align=1 (i32.const 0) (local.get 0x0a3))\n    (i64.store offset=0x0a4 align=1 (i32.const 0) (local.get 0x0a4))\n    (i64.store offset=0x0a5 align=1 (i32.const 0) (local.get 0x0a5))\n    (i64.store offset=0x0a6 align=1 (i32.const 0) (local.get 0x0a6))\n    (i64.store offset=0x0a7 align=1 (i32.const 0) (local.get 0x0a7))\n    (i64.store offset=0x0a8 align=1 (i32.const 0) (local.get 0x0a8))\n    (i64.store offset=0x0a9 align=1 (i32.const 0) (local.get 0x0a9))\n    (i64.store offset=0x0aa align=1 (i32.const 0) (local.get 0x0aa))\n    (i64.store offset=0x0ab align=1 (i32.const 0) (local.get 0x0ab))\n    (i64.store offset=0x0ac align=1 (i32.const 0) (local.get 0x0ac))\n    (i64.store offset=0x0ad align=1 (i32.const 0) (local.get 0x0ad))\n    (i64.store offset=0x0ae align=1 (i32.const 0) (local.get 0x0ae))\n    (i64.store offset=0x0af align=1 (i32.const 0) (local.get 0x0af))\n    (i64.store offset=0x0b0 align=1 (i32.const 0) (local.get 0x0b0))\n    (i64.store offset=0x0b1 align=1 (i32.const 0) (local.get 0x0b1))\n    (i64.store offset=0x0b2 align=1 (i32.const 0) (local.get 0x0b2))\n    (i64.store offset=0x0b3 align=1 (i32.const 0) (local.get 0x0b3))\n    (i64.store offset=0x0b4 align=1 (i32.const 0) (local.get 0x0b4))\n    (i64.store offset=0x0b5 align=1 (i32.const 0) (local.get 0x0b5))\n    (i64.store offset=0x0b6 align=1 (i32.const 0) (local.get 0x0b6))\n    (i64.store offset=0x0b7 align=1 (i32.const 0) (local.get 0x0b7))\n    (i64.store offset=0x0b8 align=1 (i32.const 0) (local.get 0x0b8))\n    (i64.store offset=0x0b9 align=1 (i32.const 0) (local.get 0x0b9))\n    (i64.store offset=0x0ba align=1 (i32.const 0) (local.get 0x0ba))\n    (i64.store offset=0x0bb align=1 (i32.const 0) (local.get 0x0bb))\n    (i64.store offset=0x0bc align=1 (i32.const 0) (local.get 0x0bc))\n    (i64.store offset=0x0bd align=1 (i32.const 0) (local.get 0x0bd))\n    (i64.store offset=0x0be align=1 (i32.const 0) (local.get 0x0be))\n    (i64.store offset=0x0bf align=1 (i32.const 0) (local.get 0x0bf))\n    (i64.store offset=0x0c0 align=1 (i32.const 0) (local.get 0x0c0))\n    (i64.store offset=0x0c1 align=1 (i32.const 0) (local.get 0x0c1))\n    (i64.store offset=0x0c2 align=1 (i32.const 0) (local.get 0x0c2))\n    (i64.store offset=0x0c3 align=1 (i32.const 0) (local.get 0x0c3))\n    (i64.store offset=0x0c4 align=1 (i32.const 0) (local.get 0x0c4))\n    (i64.store offset=0x0c5 align=1 (i32.const 0) (local.get 0x0c5))\n    (i64.store offset=0x0c6 align=1 (i32.const 0) (local.get 0x0c6))\n    (i64.store offset=0x0c7 align=1 (i32.const 0) (local.get 0x0c7))\n    (i64.store offset=0x0c8 align=1 (i32.const 0) (local.get 0x0c8))\n    (i64.store offset=0x0c9 align=1 (i32.const 0) (local.get 0x0c9))\n    (i64.store offset=0x0ca align=1 (i32.const 0) (local.get 0x0ca))\n    (i64.store offset=0x0cb align=1 (i32.const 0) (local.get 0x0cb))\n    (i64.store offset=0x0cc align=1 (i32.const 0) (local.get 0x0cc))\n    (i64.store offset=0x0cd align=1 (i32.const 0) (local.get 0x0cd))\n    (i64.store offset=0x0ce align=1 (i32.const 0) (local.get 0x0ce))\n    (i64.store offset=0x0cf align=1 (i32.const 0) (local.get 0x0cf))\n    (i64.store offset=0x0d0 align=1 (i32.const 0) (local.get 0x0d0))\n    (i64.store offset=0x0d1 align=1 (i32.const 0) (local.get 0x0d1))\n    (i64.store offset=0x0d2 align=1 (i32.const 0) (local.get 0x0d2))\n    (i64.store offset=0x0d3 align=1 (i32.const 0) (local.get 0x0d3))\n    (i64.store offset=0x0d4 align=1 (i32.const 0) (local.get 0x0d4))\n    (i64.store offset=0x0d5 align=1 (i32.const 0) (local.get 0x0d5))\n    (i64.store offset=0x0d6 align=1 (i32.const 0) (local.get 0x0d6))\n    (i64.store offset=0x0d7 align=1 (i32.const 0) (local.get 0x0d7))\n    (i64.store offset=0x0d8 align=1 (i32.const 0) (local.get 0x0d8))\n    (i64.store offset=0x0d9 align=1 (i32.const 0) (local.get 0x0d9))\n    (i64.store offset=0x0da align=1 (i32.const 0) (local.get 0x0da))\n    (i64.store offset=0x0db align=1 (i32.const 0) (local.get 0x0db))\n    (i64.store offset=0x0dc align=1 (i32.const 0) (local.get 0x0dc))\n    (i64.store offset=0x0dd align=1 (i32.const 0) (local.get 0x0dd))\n    (i64.store offset=0x0de align=1 (i32.const 0) (local.get 0x0de))\n    (i64.store offset=0x0df align=1 (i32.const 0) (local.get 0x0df))\n    (i64.store offset=0x0e0 align=1 (i32.const 0) (local.get 0x0e0))\n    (i64.store offset=0x0e1 align=1 (i32.const 0) (local.get 0x0e1))\n    (i64.store offset=0x0e2 align=1 (i32.const 0) (local.get 0x0e2))\n    (i64.store offset=0x0e3 align=1 (i32.const 0) (local.get 0x0e3))\n    (i64.store offset=0x0e4 align=1 (i32.const 0) (local.get 0x0e4))\n    (i64.store offset=0x0e5 align=1 (i32.const 0) (local.get 0x0e5))\n    (i64.store offset=0x0e6 align=1 (i32.const 0) (local.get 0x0e6))\n    (i64.store offset=0x0e7 align=1 (i32.const 0) (local.get 0x0e7))\n    (i64.store offset=0x0e8 align=1 (i32.const 0) (local.get 0x0e8))\n    (i64.store offset=0x0e9 align=1 (i32.const 0) (local.get 0x0e9))\n    (i64.store offset=0x0ea align=1 (i32.const 0) (local.get 0x0ea))\n    (i64.store offset=0x0eb align=1 (i32.const 0) (local.get 0x0eb))\n    (i64.store offset=0x0ec align=1 (i32.const 0) (local.get 0x0ec))\n    (i64.store offset=0x0ed align=1 (i32.const 0) (local.get 0x0ed))\n    (i64.store offset=0x0ee align=1 (i32.const 0) (local.get 0x0ee))\n    (i64.store offset=0x0ef align=1 (i32.const 0) (local.get 0x0ef))\n    (i64.store offset=0x0f0 align=1 (i32.const 0) (local.get 0x0f0))\n    (i64.store offset=0x0f1 align=1 (i32.const 0) (local.get 0x0f1))\n    (i64.store offset=0x0f2 align=1 (i32.const 0) (local.get 0x0f2))\n    (i64.store offset=0x0f3 align=1 (i32.const 0) (local.get 0x0f3))\n    (i64.store offset=0x0f4 align=1 (i32.const 0) (local.get 0x0f4))\n    (i64.store offset=0x0f5 align=1 (i32.const 0) (local.get 0x0f5))\n    (i64.store offset=0x0f6 align=1 (i32.const 0) (local.get 0x0f6))\n    (i64.store offset=0x0f7 align=1 (i32.const 0) (local.get 0x0f7))\n    (i64.store offset=0x0f8 align=1 (i32.const 0) (local.get 0x0f8))\n    (i64.store offset=0x0f9 align=1 (i32.const 0) (local.get 0x0f9))\n    (i64.store offset=0x0fa align=1 (i32.const 0) (local.get 0x0fa))\n    (i64.store offset=0x0fb align=1 (i32.const 0) (local.get 0x0fb))\n    (i64.store offset=0x0fc align=1 (i32.const 0) (local.get 0x0fc))\n    (i64.store offset=0x0fd align=1 (i32.const 0) (local.get 0x0fd))\n    (i64.store offset=0x0fe align=1 (i32.const 0) (local.get 0x0fe))\n    (i64.store offset=0x0ff align=1 (i32.const 0) (local.get 0x0ff))\n    (i64.store offset=0x100 align=1 (i32.const 0) (local.get 0x100))\n    (i64.store offset=0x101 align=1 (i32.const 0) (local.get 0x101))\n    (i64.store offset=0x102 align=1 (i32.const 0) (local.get 0x102))\n    (i64.store offset=0x103 align=1 (i32.const 0) (local.get 0x103))\n    (i64.store offset=0x104 align=1 (i32.const 0) (local.get 0x104))\n    (i64.store offset=0x105 align=1 (i32.const 0) (local.get 0x105))\n    (i64.store offset=0x106 align=1 (i32.const 0) (local.get 0x106))\n    (i64.store offset=0x107 align=1 (i32.const 0) (local.get 0x107))\n    (i64.store offset=0x108 align=1 (i32.const 0) (local.get 0x108))\n    (i64.store offset=0x109 align=1 (i32.const 0) (local.get 0x109))\n    (i64.store offset=0x10a align=1 (i32.const 0) (local.get 0x10a))\n    (i64.store offset=0x10b align=1 (i32.const 0) (local.get 0x10b))\n    (i64.store offset=0x10c align=1 (i32.const 0) (local.get 0x10c))\n    (i64.store offset=0x10d align=1 (i32.const 0) (local.get 0x10d))\n    (i64.store offset=0x10e align=1 (i32.const 0) (local.get 0x10e))\n    (i64.store offset=0x10f align=1 (i32.const 0) (local.get 0x10f))\n    (i64.store offset=0x110 align=1 (i32.const 0) (local.get 0x110))\n    (i64.store offset=0x111 align=1 (i32.const 0) (local.get 0x111))\n    (i64.store offset=0x112 align=1 (i32.const 0) (local.get 0x112))\n    (i64.store offset=0x113 align=1 (i32.const 0) (local.get 0x113))\n    (i64.store offset=0x114 align=1 (i32.const 0) (local.get 0x114))\n    (i64.store offset=0x115 align=1 (i32.const 0) (local.get 0x115))\n    (i64.store offset=0x116 align=1 (i32.const 0) (local.get 0x116))\n    (i64.store offset=0x117 align=1 (i32.const 0) (local.get 0x117))\n    (i64.store offset=0x118 align=1 (i32.const 0) (local.get 0x118))\n    (i64.store offset=0x119 align=1 (i32.const 0) (local.get 0x119))\n    (i64.store offset=0x11a align=1 (i32.const 0) (local.get 0x11a))\n    (i64.store offset=0x11b align=1 (i32.const 0) (local.get 0x11b))\n    (i64.store offset=0x11c align=1 (i32.const 0) (local.get 0x11c))\n    (i64.store offset=0x11d align=1 (i32.const 0) (local.get 0x11d))\n    (i64.store offset=0x11e align=1 (i32.const 0) (local.get 0x11e))\n    (i64.store offset=0x11f align=1 (i32.const 0) (local.get 0x11f))\n    (i64.store offset=0x120 align=1 (i32.const 0) (local.get 0x120))\n    (i64.store offset=0x121 align=1 (i32.const 0) (local.get 0x121))\n    (i64.store offset=0x122 align=1 (i32.const 0) (local.get 0x122))\n    (i64.store offset=0x123 align=1 (i32.const 0) (local.get 0x123))\n    (i64.store offset=0x124 align=1 (i32.const 0) (local.get 0x124))\n    (i64.store offset=0x125 align=1 (i32.const 0) (local.get 0x125))\n    (i64.store offset=0x126 align=1 (i32.const 0) (local.get 0x126))\n    (i64.store offset=0x127 align=1 (i32.const 0) (local.get 0x127))\n    (i64.store offset=0x128 align=1 (i32.const 0) (local.get 0x128))\n    (i64.store offset=0x129 align=1 (i32.const 0) (local.get 0x129))\n    (i64.store offset=0x12a align=1 (i32.const 0) (local.get 0x12a))\n    (i64.store offset=0x12b align=1 (i32.const 0) (local.get 0x12b))\n    (i64.store offset=0x12c align=1 (i32.const 0) (local.get 0x12c))\n    (i64.store offset=0x12d align=1 (i32.const 0) (local.get 0x12d))\n    (i64.store offset=0x12e align=1 (i32.const 0) (local.get 0x12e))\n    (i64.store offset=0x12f align=1 (i32.const 0) (local.get 0x12f))\n    (i64.store offset=0x130 align=1 (i32.const 0) (local.get 0x130))\n    (i64.store offset=0x131 align=1 (i32.const 0) (local.get 0x131))\n    (i64.store offset=0x132 align=1 (i32.const 0) (local.get 0x132))\n    (i64.store offset=0x133 align=1 (i32.const 0) (local.get 0x133))\n    (i64.store offset=0x134 align=1 (i32.const 0) (local.get 0x134))\n    (i64.store offset=0x135 align=1 (i32.const 0) (local.get 0x135))\n    (i64.store offset=0x136 align=1 (i32.const 0) (local.get 0x136))\n    (i64.store offset=0x137 align=1 (i32.const 0) (local.get 0x137))\n    (i64.store offset=0x138 align=1 (i32.const 0) (local.get 0x138))\n    (i64.store offset=0x139 align=1 (i32.const 0) (local.get 0x139))\n    (i64.store offset=0x13a align=1 (i32.const 0) (local.get 0x13a))\n    (i64.store offset=0x13b align=1 (i32.const 0) (local.get 0x13b))\n    (i64.store offset=0x13c align=1 (i32.const 0) (local.get 0x13c))\n    (i64.store offset=0x13d align=1 (i32.const 0) (local.get 0x13d))\n    (i64.store offset=0x13e align=1 (i32.const 0) (local.get 0x13e))\n    (i64.store offset=0x13f align=1 (i32.const 0) (local.get 0x13f))\n    (i64.store offset=0x140 align=1 (i32.const 0) (local.get 0x140))\n    (i64.store offset=0x141 align=1 (i32.const 0) (local.get 0x141))\n    (i64.store offset=0x142 align=1 (i32.const 0) (local.get 0x142))\n    (i64.store offset=0x143 align=1 (i32.const 0) (local.get 0x143))\n    (i64.store offset=0x144 align=1 (i32.const 0) (local.get 0x144))\n    (i64.store offset=0x145 align=1 (i32.const 0) (local.get 0x145))\n    (i64.store offset=0x146 align=1 (i32.const 0) (local.get 0x146))\n    (i64.store offset=0x147 align=1 (i32.const 0) (local.get 0x147))\n    (i64.store offset=0x148 align=1 (i32.const 0) (local.get 0x148))\n    (i64.store offset=0x149 align=1 (i32.const 0) (local.get 0x149))\n    (i64.store offset=0x14a align=1 (i32.const 0) (local.get 0x14a))\n    (i64.store offset=0x14b align=1 (i32.const 0) (local.get 0x14b))\n    (i64.store offset=0x14c align=1 (i32.const 0) (local.get 0x14c))\n    (i64.store offset=0x14d align=1 (i32.const 0) (local.get 0x14d))\n    (i64.store offset=0x14e align=1 (i32.const 0) (local.get 0x14e))\n    (i64.store offset=0x14f align=1 (i32.const 0) (local.get 0x14f))\n    (i64.store offset=0x150 align=1 (i32.const 0) (local.get 0x150))\n    (i64.store offset=0x151 align=1 (i32.const 0) (local.get 0x151))\n    (i64.store offset=0x152 align=1 (i32.const 0) (local.get 0x152))\n    (i64.store offset=0x153 align=1 (i32.const 0) (local.get 0x153))\n    (i64.store offset=0x154 align=1 (i32.const 0) (local.get 0x154))\n    (i64.store offset=0x155 align=1 (i32.const 0) (local.get 0x155))\n    (i64.store offset=0x156 align=1 (i32.const 0) (local.get 0x156))\n    (i64.store offset=0x157 align=1 (i32.const 0) (local.get 0x157))\n    (i64.store offset=0x158 align=1 (i32.const 0) (local.get 0x158))\n    (i64.store offset=0x159 align=1 (i32.const 0) (local.get 0x159))\n    (i64.store offset=0x15a align=1 (i32.const 0) (local.get 0x15a))\n    (i64.store offset=0x15b align=1 (i32.const 0) (local.get 0x15b))\n    (i64.store offset=0x15c align=1 (i32.const 0) (local.get 0x15c))\n    (i64.store offset=0x15d align=1 (i32.const 0) (local.get 0x15d))\n    (i64.store offset=0x15e align=1 (i32.const 0) (local.get 0x15e))\n    (i64.store offset=0x15f align=1 (i32.const 0) (local.get 0x15f))\n    (i64.store offset=0x160 align=1 (i32.const 0) (local.get 0x160))\n    (i64.store offset=0x161 align=1 (i32.const 0) (local.get 0x161))\n    (i64.store offset=0x162 align=1 (i32.const 0) (local.get 0x162))\n    (i64.store offset=0x163 align=1 (i32.const 0) (local.get 0x163))\n    (i64.store offset=0x164 align=1 (i32.const 0) (local.get 0x164))\n    (i64.store offset=0x165 align=1 (i32.const 0) (local.get 0x165))\n    (i64.store offset=0x166 align=1 (i32.const 0) (local.get 0x166))\n    (i64.store offset=0x167 align=1 (i32.const 0) (local.get 0x167))\n    (i64.store offset=0x168 align=1 (i32.const 0) (local.get 0x168))\n    (i64.store offset=0x169 align=1 (i32.const 0) (local.get 0x169))\n    (i64.store offset=0x16a align=1 (i32.const 0) (local.get 0x16a))\n    (i64.store offset=0x16b align=1 (i32.const 0) (local.get 0x16b))\n    (i64.store offset=0x16c align=1 (i32.const 0) (local.get 0x16c))\n    (i64.store offset=0x16d align=1 (i32.const 0) (local.get 0x16d))\n    (i64.store offset=0x16e align=1 (i32.const 0) (local.get 0x16e))\n    (i64.store offset=0x16f align=1 (i32.const 0) (local.get 0x16f))\n    (i64.store offset=0x170 align=1 (i32.const 0) (local.get 0x170))\n    (i64.store offset=0x171 align=1 (i32.const 0) (local.get 0x171))\n    (i64.store offset=0x172 align=1 (i32.const 0) (local.get 0x172))\n    (i64.store offset=0x173 align=1 (i32.const 0) (local.get 0x173))\n    (i64.store offset=0x174 align=1 (i32.const 0) (local.get 0x174))\n    (i64.store offset=0x175 align=1 (i32.const 0) (local.get 0x175))\n    (i64.store offset=0x176 align=1 (i32.const 0) (local.get 0x176))\n    (i64.store offset=0x177 align=1 (i32.const 0) (local.get 0x177))\n    (i64.store offset=0x178 align=1 (i32.const 0) (local.get 0x178))\n    (i64.store offset=0x179 align=1 (i32.const 0) (local.get 0x179))\n    (i64.store offset=0x17a align=1 (i32.const 0) (local.get 0x17a))\n    (i64.store offset=0x17b align=1 (i32.const 0) (local.get 0x17b))\n    (i64.store offset=0x17c align=1 (i32.const 0) (local.get 0x17c))\n    (i64.store offset=0x17d align=1 (i32.const 0) (local.get 0x17d))\n    (i64.store offset=0x17e align=1 (i32.const 0) (local.get 0x17e))\n    (i64.store offset=0x17f align=1 (i32.const 0) (local.get 0x17f))\n    (i64.store offset=0x180 align=1 (i32.const 0) (local.get 0x180))\n    (i64.store offset=0x181 align=1 (i32.const 0) (local.get 0x181))\n    (i64.store offset=0x182 align=1 (i32.const 0) (local.get 0x182))\n    (i64.store offset=0x183 align=1 (i32.const 0) (local.get 0x183))\n    (i64.store offset=0x184 align=1 (i32.const 0) (local.get 0x184))\n    (i64.store offset=0x185 align=1 (i32.const 0) (local.get 0x185))\n    (i64.store offset=0x186 align=1 (i32.const 0) (local.get 0x186))\n    (i64.store offset=0x187 align=1 (i32.const 0) (local.get 0x187))\n    (i64.store offset=0x188 align=1 (i32.const 0) (local.get 0x188))\n    (i64.store offset=0x189 align=1 (i32.const 0) (local.get 0x189))\n    (i64.store offset=0x18a align=1 (i32.const 0) (local.get 0x18a))\n    (i64.store offset=0x18b align=1 (i32.const 0) (local.get 0x18b))\n    (i64.store offset=0x18c align=1 (i32.const 0) (local.get 0x18c))\n    (i64.store offset=0x18d align=1 (i32.const 0) (local.get 0x18d))\n    (i64.store offset=0x18e align=1 (i32.const 0) (local.get 0x18e))\n    (i64.store offset=0x18f align=1 (i32.const 0) (local.get 0x18f))\n    (i64.store offset=0x190 align=1 (i32.const 0) (local.get 0x190))\n    (i64.store offset=0x191 align=1 (i32.const 0) (local.get 0x191))\n    (i64.store offset=0x192 align=1 (i32.const 0) (local.get 0x192))\n    (i64.store offset=0x193 align=1 (i32.const 0) (local.get 0x193))\n    (i64.store offset=0x194 align=1 (i32.const 0) (local.get 0x194))\n    (i64.store offset=0x195 align=1 (i32.const 0) (local.get 0x195))\n    (i64.store offset=0x196 align=1 (i32.const 0) (local.get 0x196))\n    (i64.store offset=0x197 align=1 (i32.const 0) (local.get 0x197))\n    (i64.store offset=0x198 align=1 (i32.const 0) (local.get 0x198))\n    (i64.store offset=0x199 align=1 (i32.const 0) (local.get 0x199))\n    (i64.store offset=0x19a align=1 (i32.const 0) (local.get 0x19a))\n    (i64.store offset=0x19b align=1 (i32.const 0) (local.get 0x19b))\n    (i64.store offset=0x19c align=1 (i32.const 0) (local.get 0x19c))\n    (i64.store offset=0x19d align=1 (i32.const 0) (local.get 0x19d))\n    (i64.store offset=0x19e align=1 (i32.const 0) (local.get 0x19e))\n    (i64.store offset=0x19f align=1 (i32.const 0) (local.get 0x19f))\n    (i64.store offset=0x1a0 align=1 (i32.const 0) (local.get 0x1a0))\n    (i64.store offset=0x1a1 align=1 (i32.const 0) (local.get 0x1a1))\n    (i64.store offset=0x1a2 align=1 (i32.const 0) (local.get 0x1a2))\n    (i64.store offset=0x1a3 align=1 (i32.const 0) (local.get 0x1a3))\n    (i64.store offset=0x1a4 align=1 (i32.const 0) (local.get 0x1a4))\n    (i64.store offset=0x1a5 align=1 (i32.const 0) (local.get 0x1a5))\n    (i64.store offset=0x1a6 align=1 (i32.const 0) (local.get 0x1a6))\n    (i64.store offset=0x1a7 align=1 (i32.const 0) (local.get 0x1a7))\n    (i64.store offset=0x1a8 align=1 (i32.const 0) (local.get 0x1a8))\n    (i64.store offset=0x1a9 align=1 (i32.const 0) (local.get 0x1a9))\n    (i64.store offset=0x1aa align=1 (i32.const 0) (local.get 0x1aa))\n    (i64.store offset=0x1ab align=1 (i32.const 0) (local.get 0x1ab))\n    (i64.store offset=0x1ac align=1 (i32.const 0) (local.get 0x1ac))\n    (i64.store offset=0x1ad align=1 (i32.const 0) (local.get 0x1ad))\n    (i64.store offset=0x1ae align=1 (i32.const 0) (local.get 0x1ae))\n    (i64.store offset=0x1af align=1 (i32.const 0) (local.get 0x1af))\n    (i64.store offset=0x1b0 align=1 (i32.const 0) (local.get 0x1b0))\n    (i64.store offset=0x1b1 align=1 (i32.const 0) (local.get 0x1b1))\n    (i64.store offset=0x1b2 align=1 (i32.const 0) (local.get 0x1b2))\n    (i64.store offset=0x1b3 align=1 (i32.const 0) (local.get 0x1b3))\n    (i64.store offset=0x1b4 align=1 (i32.const 0) (local.get 0x1b4))\n    (i64.store offset=0x1b5 align=1 (i32.const 0) (local.get 0x1b5))\n    (i64.store offset=0x1b6 align=1 (i32.const 0) (local.get 0x1b6))\n    (i64.store offset=0x1b7 align=1 (i32.const 0) (local.get 0x1b7))\n    (i64.store offset=0x1b8 align=1 (i32.const 0) (local.get 0x1b8))\n    (i64.store offset=0x1b9 align=1 (i32.const 0) (local.get 0x1b9))\n    (i64.store offset=0x1ba align=1 (i32.const 0) (local.get 0x1ba))\n    (i64.store offset=0x1bb align=1 (i32.const 0) (local.get 0x1bb))\n    (i64.store offset=0x1bc align=1 (i32.const 0) (local.get 0x1bc))\n    (i64.store offset=0x1bd align=1 (i32.const 0) (local.get 0x1bd))\n    (i64.store offset=0x1be align=1 (i32.const 0) (local.get 0x1be))\n    (i64.store offset=0x1bf align=1 (i32.const 0) (local.get 0x1bf))\n    (i64.store offset=0x1c0 align=1 (i32.const 0) (local.get 0x1c0))\n    (i64.store offset=0x1c1 align=1 (i32.const 0) (local.get 0x1c1))\n    (i64.store offset=0x1c2 align=1 (i32.const 0) (local.get 0x1c2))\n    (i64.store offset=0x1c3 align=1 (i32.const 0) (local.get 0x1c3))\n    (i64.store offset=0x1c4 align=1 (i32.const 0) (local.get 0x1c4))\n    (i64.store offset=0x1c5 align=1 (i32.const 0) (local.get 0x1c5))\n    (i64.store offset=0x1c6 align=1 (i32.const 0) (local.get 0x1c6))\n    (i64.store offset=0x1c7 align=1 (i32.const 0) (local.get 0x1c7))\n    (i64.store offset=0x1c8 align=1 (i32.const 0) (local.get 0x1c8))\n    (i64.store offset=0x1c9 align=1 (i32.const 0) (local.get 0x1c9))\n    (i64.store offset=0x1ca align=1 (i32.const 0) (local.get 0x1ca))\n    (i64.store offset=0x1cb align=1 (i32.const 0) (local.get 0x1cb))\n    (i64.store offset=0x1cc align=1 (i32.const 0) (local.get 0x1cc))\n    (i64.store offset=0x1cd align=1 (i32.const 0) (local.get 0x1cd))\n    (i64.store offset=0x1ce align=1 (i32.const 0) (local.get 0x1ce))\n    (i64.store offset=0x1cf align=1 (i32.const 0) (local.get 0x1cf))\n    (i64.store offset=0x1d0 align=1 (i32.const 0) (local.get 0x1d0))\n    (i64.store offset=0x1d1 align=1 (i32.const 0) (local.get 0x1d1))\n    (i64.store offset=0x1d2 align=1 (i32.const 0) (local.get 0x1d2))\n    (i64.store offset=0x1d3 align=1 (i32.const 0) (local.get 0x1d3))\n    (i64.store offset=0x1d4 align=1 (i32.const 0) (local.get 0x1d4))\n    (i64.store offset=0x1d5 align=1 (i32.const 0) (local.get 0x1d5))\n    (i64.store offset=0x1d6 align=1 (i32.const 0) (local.get 0x1d6))\n    (i64.store offset=0x1d7 align=1 (i32.const 0) (local.get 0x1d7))\n    (i64.store offset=0x1d8 align=1 (i32.const 0) (local.get 0x1d8))\n    (i64.store offset=0x1d9 align=1 (i32.const 0) (local.get 0x1d9))\n    (i64.store offset=0x1da align=1 (i32.const 0) (local.get 0x1da))\n    (i64.store offset=0x1db align=1 (i32.const 0) (local.get 0x1db))\n    (i64.store offset=0x1dc align=1 (i32.const 0) (local.get 0x1dc))\n    (i64.store offset=0x1dd align=1 (i32.const 0) (local.get 0x1dd))\n    (i64.store offset=0x1de align=1 (i32.const 0) (local.get 0x1de))\n    (i64.store offset=0x1df align=1 (i32.const 0) (local.get 0x1df))\n    (i64.store offset=0x1e0 align=1 (i32.const 0) (local.get 0x1e0))\n    (i64.store offset=0x1e1 align=1 (i32.const 0) (local.get 0x1e1))\n    (i64.store offset=0x1e2 align=1 (i32.const 0) (local.get 0x1e2))\n    (i64.store offset=0x1e3 align=1 (i32.const 0) (local.get 0x1e3))\n    (i64.store offset=0x1e4 align=1 (i32.const 0) (local.get 0x1e4))\n    (i64.store offset=0x1e5 align=1 (i32.const 0) (local.get 0x1e5))\n    (i64.store offset=0x1e6 align=1 (i32.const 0) (local.get 0x1e6))\n    (i64.store offset=0x1e7 align=1 (i32.const 0) (local.get 0x1e7))\n    (i64.store offset=0x1e8 align=1 (i32.const 0) (local.get 0x1e8))\n    (i64.store offset=0x1e9 align=1 (i32.const 0) (local.get 0x1e9))\n    (i64.store offset=0x1ea align=1 (i32.const 0) (local.get 0x1ea))\n    (i64.store offset=0x1eb align=1 (i32.const 0) (local.get 0x1eb))\n    (i64.store offset=0x1ec align=1 (i32.const 0) (local.get 0x1ec))\n    (i64.store offset=0x1ed align=1 (i32.const 0) (local.get 0x1ed))\n    (i64.store offset=0x1ee align=1 (i32.const 0) (local.get 0x1ee))\n    (i64.store offset=0x1ef align=1 (i32.const 0) (local.get 0x1ef))\n    (i64.store offset=0x1f0 align=1 (i32.const 0) (local.get 0x1f0))\n    (i64.store offset=0x1f1 align=1 (i32.const 0) (local.get 0x1f1))\n    (i64.store offset=0x1f2 align=1 (i32.const 0) (local.get 0x1f2))\n    (i64.store offset=0x1f3 align=1 (i32.const 0) (local.get 0x1f3))\n    (i64.store offset=0x1f4 align=1 (i32.const 0) (local.get 0x1f4))\n    (i64.store offset=0x1f5 align=1 (i32.const 0) (local.get 0x1f5))\n    (i64.store offset=0x1f6 align=1 (i32.const 0) (local.get 0x1f6))\n    (i64.store offset=0x1f7 align=1 (i32.const 0) (local.get 0x1f7))\n    (i64.store offset=0x1f8 align=1 (i32.const 0) (local.get 0x1f8))\n    (i64.store offset=0x1f9 align=1 (i32.const 0) (local.get 0x1f9))\n    (i64.store offset=0x1fa align=1 (i32.const 0) (local.get 0x1fa))\n    (i64.store offset=0x1fb align=1 (i32.const 0) (local.get 0x1fb))\n    (i64.store offset=0x1fc align=1 (i32.const 0) (local.get 0x1fc))\n    (i64.store offset=0x1fd align=1 (i32.const 0) (local.get 0x1fd))\n    (i64.store offset=0x1fe align=1 (i32.const 0) (local.get 0x1fe))\n    (i64.store offset=0x1ff align=1 (i32.const 0) (local.get 0x1ff))\n    (i64.store offset=0x200 align=1 (i32.const 0) (local.get 0x200))\n    (i64.store offset=0x201 align=1 (i32.const 0) (local.get 0x201))\n    (i64.store offset=0x202 align=1 (i32.const 0) (local.get 0x202))\n    (i64.store offset=0x203 align=1 (i32.const 0) (local.get 0x203))\n    (i64.store offset=0x204 align=1 (i32.const 0) (local.get 0x204))\n    (i64.store offset=0x205 align=1 (i32.const 0) (local.get 0x205))\n    (i64.store offset=0x206 align=1 (i32.const 0) (local.get 0x206))\n    (i64.store offset=0x207 align=1 (i32.const 0) (local.get 0x207))\n    (i64.store offset=0x208 align=1 (i32.const 0) (local.get 0x208))\n    (i64.store offset=0x209 align=1 (i32.const 0) (local.get 0x209))\n    (i64.store offset=0x20a align=1 (i32.const 0) (local.get 0x20a))\n    (i64.store offset=0x20b align=1 (i32.const 0) (local.get 0x20b))\n    (i64.store offset=0x20c align=1 (i32.const 0) (local.get 0x20c))\n    (i64.store offset=0x20d align=1 (i32.const 0) (local.get 0x20d))\n    (i64.store offset=0x20e align=1 (i32.const 0) (local.get 0x20e))\n    (i64.store offset=0x20f align=1 (i32.const 0) (local.get 0x20f))\n    (i64.store offset=0x210 align=1 (i32.const 0) (local.get 0x210))\n    (i64.store offset=0x211 align=1 (i32.const 0) (local.get 0x211))\n    (i64.store offset=0x212 align=1 (i32.const 0) (local.get 0x212))\n    (i64.store offset=0x213 align=1 (i32.const 0) (local.get 0x213))\n    (i64.store offset=0x214 align=1 (i32.const 0) (local.get 0x214))\n    (i64.store offset=0x215 align=1 (i32.const 0) (local.get 0x215))\n    (i64.store offset=0x216 align=1 (i32.const 0) (local.get 0x216))\n    (i64.store offset=0x217 align=1 (i32.const 0) (local.get 0x217))\n    (i64.store offset=0x218 align=1 (i32.const 0) (local.get 0x218))\n    (i64.store offset=0x219 align=1 (i32.const 0) (local.get 0x219))\n    (i64.store offset=0x21a align=1 (i32.const 0) (local.get 0x21a))\n    (i64.store offset=0x21b align=1 (i32.const 0) (local.get 0x21b))\n    (i64.store offset=0x21c align=1 (i32.const 0) (local.get 0x21c))\n    (i64.store offset=0x21d align=1 (i32.const 0) (local.get 0x21d))\n    (i64.store offset=0x21e align=1 (i32.const 0) (local.get 0x21e))\n    (i64.store offset=0x21f align=1 (i32.const 0) (local.get 0x21f))\n    (i64.store offset=0x220 align=1 (i32.const 0) (local.get 0x220))\n    (i64.store offset=0x221 align=1 (i32.const 0) (local.get 0x221))\n    (i64.store offset=0x222 align=1 (i32.const 0) (local.get 0x222))\n    (i64.store offset=0x223 align=1 (i32.const 0) (local.get 0x223))\n    (i64.store offset=0x224 align=1 (i32.const 0) (local.get 0x224))\n    (i64.store offset=0x225 align=1 (i32.const 0) (local.get 0x225))\n    (i64.store offset=0x226 align=1 (i32.const 0) (local.get 0x226))\n    (i64.store offset=0x227 align=1 (i32.const 0) (local.get 0x227))\n    (i64.store offset=0x228 align=1 (i32.const 0) (local.get 0x228))\n    (i64.store offset=0x229 align=1 (i32.const 0) (local.get 0x229))\n    (i64.store offset=0x22a align=1 (i32.const 0) (local.get 0x22a))\n    (i64.store offset=0x22b align=1 (i32.const 0) (local.get 0x22b))\n    (i64.store offset=0x22c align=1 (i32.const 0) (local.get 0x22c))\n    (i64.store offset=0x22d align=1 (i32.const 0) (local.get 0x22d))\n    (i64.store offset=0x22e align=1 (i32.const 0) (local.get 0x22e))\n    (i64.store offset=0x22f align=1 (i32.const 0) (local.get 0x22f))\n    (i64.store offset=0x230 align=1 (i32.const 0) (local.get 0x230))\n    (i64.store offset=0x231 align=1 (i32.const 0) (local.get 0x231))\n    (i64.store offset=0x232 align=1 (i32.const 0) (local.get 0x232))\n    (i64.store offset=0x233 align=1 (i32.const 0) (local.get 0x233))\n    (i64.store offset=0x234 align=1 (i32.const 0) (local.get 0x234))\n    (i64.store offset=0x235 align=1 (i32.const 0) (local.get 0x235))\n    (i64.store offset=0x236 align=1 (i32.const 0) (local.get 0x236))\n    (i64.store offset=0x237 align=1 (i32.const 0) (local.get 0x237))\n    (i64.store offset=0x238 align=1 (i32.const 0) (local.get 0x238))\n    (i64.store offset=0x239 align=1 (i32.const 0) (local.get 0x239))\n    (i64.store offset=0x23a align=1 (i32.const 0) (local.get 0x23a))\n    (i64.store offset=0x23b align=1 (i32.const 0) (local.get 0x23b))\n    (i64.store offset=0x23c align=1 (i32.const 0) (local.get 0x23c))\n    (i64.store offset=0x23d align=1 (i32.const 0) (local.get 0x23d))\n    (i64.store offset=0x23e align=1 (i32.const 0) (local.get 0x23e))\n    (i64.store offset=0x23f align=1 (i32.const 0) (local.get 0x23f))\n    (i64.store offset=0x240 align=1 (i32.const 0) (local.get 0x240))\n    (i64.store offset=0x241 align=1 (i32.const 0) (local.get 0x241))\n    (i64.store offset=0x242 align=1 (i32.const 0) (local.get 0x242))\n    (i64.store offset=0x243 align=1 (i32.const 0) (local.get 0x243))\n    (i64.store offset=0x244 align=1 (i32.const 0) (local.get 0x244))\n    (i64.store offset=0x245 align=1 (i32.const 0) (local.get 0x245))\n    (i64.store offset=0x246 align=1 (i32.const 0) (local.get 0x246))\n    (i64.store offset=0x247 align=1 (i32.const 0) (local.get 0x247))\n    (i64.store offset=0x248 align=1 (i32.const 0) (local.get 0x248))\n    (i64.store offset=0x249 align=1 (i32.const 0) (local.get 0x249))\n    (i64.store offset=0x24a align=1 (i32.const 0) (local.get 0x24a))\n    (i64.store offset=0x24b align=1 (i32.const 0) (local.get 0x24b))\n    (i64.store offset=0x24c align=1 (i32.const 0) (local.get 0x24c))\n    (i64.store offset=0x24d align=1 (i32.const 0) (local.get 0x24d))\n    (i64.store offset=0x24e align=1 (i32.const 0) (local.get 0x24e))\n    (i64.store offset=0x24f align=1 (i32.const 0) (local.get 0x24f))\n    (i64.store offset=0x250 align=1 (i32.const 0) (local.get 0x250))\n    (i64.store offset=0x251 align=1 (i32.const 0) (local.get 0x251))\n    (i64.store offset=0x252 align=1 (i32.const 0) (local.get 0x252))\n    (i64.store offset=0x253 align=1 (i32.const 0) (local.get 0x253))\n    (i64.store offset=0x254 align=1 (i32.const 0) (local.get 0x254))\n    (i64.store offset=0x255 align=1 (i32.const 0) (local.get 0x255))\n    (i64.store offset=0x256 align=1 (i32.const 0) (local.get 0x256))\n    (i64.store offset=0x257 align=1 (i32.const 0) (local.get 0x257))\n    (i64.store offset=0x258 align=1 (i32.const 0) (local.get 0x258))\n    (i64.store offset=0x259 align=1 (i32.const 0) (local.get 0x259))\n    (i64.store offset=0x25a align=1 (i32.const 0) (local.get 0x25a))\n    (i64.store offset=0x25b align=1 (i32.const 0) (local.get 0x25b))\n    (i64.store offset=0x25c align=1 (i32.const 0) (local.get 0x25c))\n    (i64.store offset=0x25d align=1 (i32.const 0) (local.get 0x25d))\n    (i64.store offset=0x25e align=1 (i32.const 0) (local.get 0x25e))\n    (i64.store offset=0x25f align=1 (i32.const 0) (local.get 0x25f))\n    (i64.store offset=0x260 align=1 (i32.const 0) (local.get 0x260))\n    (i64.store offset=0x261 align=1 (i32.const 0) (local.get 0x261))\n    (i64.store offset=0x262 align=1 (i32.const 0) (local.get 0x262))\n    (i64.store offset=0x263 align=1 (i32.const 0) (local.get 0x263))\n    (i64.store offset=0x264 align=1 (i32.const 0) (local.get 0x264))\n    (i64.store offset=0x265 align=1 (i32.const 0) (local.get 0x265))\n    (i64.store offset=0x266 align=1 (i32.const 0) (local.get 0x266))\n    (i64.store offset=0x267 align=1 (i32.const 0) (local.get 0x267))\n    (i64.store offset=0x268 align=1 (i32.const 0) (local.get 0x268))\n    (i64.store offset=0x269 align=1 (i32.const 0) (local.get 0x269))\n    (i64.store offset=0x26a align=1 (i32.const 0) (local.get 0x26a))\n    (i64.store offset=0x26b align=1 (i32.const 0) (local.get 0x26b))\n    (i64.store offset=0x26c align=1 (i32.const 0) (local.get 0x26c))\n    (i64.store offset=0x26d align=1 (i32.const 0) (local.get 0x26d))\n    (i64.store offset=0x26e align=1 (i32.const 0) (local.get 0x26e))\n    (i64.store offset=0x26f align=1 (i32.const 0) (local.get 0x26f))\n    (i64.store offset=0x270 align=1 (i32.const 0) (local.get 0x270))\n    (i64.store offset=0x271 align=1 (i32.const 0) (local.get 0x271))\n    (i64.store offset=0x272 align=1 (i32.const 0) (local.get 0x272))\n    (i64.store offset=0x273 align=1 (i32.const 0) (local.get 0x273))\n    (i64.store offset=0x274 align=1 (i32.const 0) (local.get 0x274))\n    (i64.store offset=0x275 align=1 (i32.const 0) (local.get 0x275))\n    (i64.store offset=0x276 align=1 (i32.const 0) (local.get 0x276))\n    (i64.store offset=0x277 align=1 (i32.const 0) (local.get 0x277))\n    (i64.store offset=0x278 align=1 (i32.const 0) (local.get 0x278))\n    (i64.store offset=0x279 align=1 (i32.const 0) (local.get 0x279))\n    (i64.store offset=0x27a align=1 (i32.const 0) (local.get 0x27a))\n    (i64.store offset=0x27b align=1 (i32.const 0) (local.get 0x27b))\n    (i64.store offset=0x27c align=1 (i32.const 0) (local.get 0x27c))\n    (i64.store offset=0x27d align=1 (i32.const 0) (local.get 0x27d))\n    (i64.store offset=0x27e align=1 (i32.const 0) (local.get 0x27e))\n    (i64.store offset=0x27f align=1 (i32.const 0) (local.get 0x27f))\n    (i64.store offset=0x280 align=1 (i32.const 0) (local.get 0x280))\n    (i64.store offset=0x281 align=1 (i32.const 0) (local.get 0x281))\n    (i64.store offset=0x282 align=1 (i32.const 0) (local.get 0x282))\n    (i64.store offset=0x283 align=1 (i32.const 0) (local.get 0x283))\n    (i64.store offset=0x284 align=1 (i32.const 0) (local.get 0x284))\n    (i64.store offset=0x285 align=1 (i32.const 0) (local.get 0x285))\n    (i64.store offset=0x286 align=1 (i32.const 0) (local.get 0x286))\n    (i64.store offset=0x287 align=1 (i32.const 0) (local.get 0x287))\n    (i64.store offset=0x288 align=1 (i32.const 0) (local.get 0x288))\n    (i64.store offset=0x289 align=1 (i32.const 0) (local.get 0x289))\n    (i64.store offset=0x28a align=1 (i32.const 0) (local.get 0x28a))\n    (i64.store offset=0x28b align=1 (i32.const 0) (local.get 0x28b))\n    (i64.store offset=0x28c align=1 (i32.const 0) (local.get 0x28c))\n    (i64.store offset=0x28d align=1 (i32.const 0) (local.get 0x28d))\n    (i64.store offset=0x28e align=1 (i32.const 0) (local.get 0x28e))\n    (i64.store offset=0x28f align=1 (i32.const 0) (local.get 0x28f))\n    (i64.store offset=0x290 align=1 (i32.const 0) (local.get 0x290))\n    (i64.store offset=0x291 align=1 (i32.const 0) (local.get 0x291))\n    (i64.store offset=0x292 align=1 (i32.const 0) (local.get 0x292))\n    (i64.store offset=0x293 align=1 (i32.const 0) (local.get 0x293))\n    (i64.store offset=0x294 align=1 (i32.const 0) (local.get 0x294))\n    (i64.store offset=0x295 align=1 (i32.const 0) (local.get 0x295))\n    (i64.store offset=0x296 align=1 (i32.const 0) (local.get 0x296))\n    (i64.store offset=0x297 align=1 (i32.const 0) (local.get 0x297))\n    (i64.store offset=0x298 align=1 (i32.const 0) (local.get 0x298))\n    (i64.store offset=0x299 align=1 (i32.const 0) (local.get 0x299))\n    (i64.store offset=0x29a align=1 (i32.const 0) (local.get 0x29a))\n    (i64.store offset=0x29b align=1 (i32.const 0) (local.get 0x29b))\n    (i64.store offset=0x29c align=1 (i32.const 0) (local.get 0x29c))\n    (i64.store offset=0x29d align=1 (i32.const 0) (local.get 0x29d))\n    (i64.store offset=0x29e align=1 (i32.const 0) (local.get 0x29e))\n    (i64.store offset=0x29f align=1 (i32.const 0) (local.get 0x29f))\n    (i64.store offset=0x2a0 align=1 (i32.const 0) (local.get 0x2a0))\n    (i64.store offset=0x2a1 align=1 (i32.const 0) (local.get 0x2a1))\n    (i64.store offset=0x2a2 align=1 (i32.const 0) (local.get 0x2a2))\n    (i64.store offset=0x2a3 align=1 (i32.const 0) (local.get 0x2a3))\n    (i64.store offset=0x2a4 align=1 (i32.const 0) (local.get 0x2a4))\n    (i64.store offset=0x2a5 align=1 (i32.const 0) (local.get 0x2a5))\n    (i64.store offset=0x2a6 align=1 (i32.const 0) (local.get 0x2a6))\n    (i64.store offset=0x2a7 align=1 (i32.const 0) (local.get 0x2a7))\n    (i64.store offset=0x2a8 align=1 (i32.const 0) (local.get 0x2a8))\n    (i64.store offset=0x2a9 align=1 (i32.const 0) (local.get 0x2a9))\n    (i64.store offset=0x2aa align=1 (i32.const 0) (local.get 0x2aa))\n    (i64.store offset=0x2ab align=1 (i32.const 0) (local.get 0x2ab))\n    (i64.store offset=0x2ac align=1 (i32.const 0) (local.get 0x2ac))\n    (i64.store offset=0x2ad align=1 (i32.const 0) (local.get 0x2ad))\n    (i64.store offset=0x2ae align=1 (i32.const 0) (local.get 0x2ae))\n    (i64.store offset=0x2af align=1 (i32.const 0) (local.get 0x2af))\n    (i64.store offset=0x2b0 align=1 (i32.const 0) (local.get 0x2b0))\n    (i64.store offset=0x2b1 align=1 (i32.const 0) (local.get 0x2b1))\n    (i64.store offset=0x2b2 align=1 (i32.const 0) (local.get 0x2b2))\n    (i64.store offset=0x2b3 align=1 (i32.const 0) (local.get 0x2b3))\n    (i64.store offset=0x2b4 align=1 (i32.const 0) (local.get 0x2b4))\n    (i64.store offset=0x2b5 align=1 (i32.const 0) (local.get 0x2b5))\n    (i64.store offset=0x2b6 align=1 (i32.const 0) (local.get 0x2b6))\n    (i64.store offset=0x2b7 align=1 (i32.const 0) (local.get 0x2b7))\n    (i64.store offset=0x2b8 align=1 (i32.const 0) (local.get 0x2b8))\n    (i64.store offset=0x2b9 align=1 (i32.const 0) (local.get 0x2b9))\n    (i64.store offset=0x2ba align=1 (i32.const 0) (local.get 0x2ba))\n    (i64.store offset=0x2bb align=1 (i32.const 0) (local.get 0x2bb))\n    (i64.store offset=0x2bc align=1 (i32.const 0) (local.get 0x2bc))\n    (i64.store offset=0x2bd align=1 (i32.const 0) (local.get 0x2bd))\n    (i64.store offset=0x2be align=1 (i32.const 0) (local.get 0x2be))\n    (i64.store offset=0x2bf align=1 (i32.const 0) (local.get 0x2bf))\n    (i64.store offset=0x2c0 align=1 (i32.const 0) (local.get 0x2c0))\n    (i64.store offset=0x2c1 align=1 (i32.const 0) (local.get 0x2c1))\n    (i64.store offset=0x2c2 align=1 (i32.const 0) (local.get 0x2c2))\n    (i64.store offset=0x2c3 align=1 (i32.const 0) (local.get 0x2c3))\n    (i64.store offset=0x2c4 align=1 (i32.const 0) (local.get 0x2c4))\n    (i64.store offset=0x2c5 align=1 (i32.const 0) (local.get 0x2c5))\n    (i64.store offset=0x2c6 align=1 (i32.const 0) (local.get 0x2c6))\n    (i64.store offset=0x2c7 align=1 (i32.const 0) (local.get 0x2c7))\n    (i64.store offset=0x2c8 align=1 (i32.const 0) (local.get 0x2c8))\n    (i64.store offset=0x2c9 align=1 (i32.const 0) (local.get 0x2c9))\n    (i64.store offset=0x2ca align=1 (i32.const 0) (local.get 0x2ca))\n    (i64.store offset=0x2cb align=1 (i32.const 0) (local.get 0x2cb))\n    (i64.store offset=0x2cc align=1 (i32.const 0) (local.get 0x2cc))\n    (i64.store offset=0x2cd align=1 (i32.const 0) (local.get 0x2cd))\n    (i64.store offset=0x2ce align=1 (i32.const 0) (local.get 0x2ce))\n    (i64.store offset=0x2cf align=1 (i32.const 0) (local.get 0x2cf))\n    (i64.store offset=0x2d0 align=1 (i32.const 0) (local.get 0x2d0))\n    (i64.store offset=0x2d1 align=1 (i32.const 0) (local.get 0x2d1))\n    (i64.store offset=0x2d2 align=1 (i32.const 0) (local.get 0x2d2))\n    (i64.store offset=0x2d3 align=1 (i32.const 0) (local.get 0x2d3))\n    (i64.store offset=0x2d4 align=1 (i32.const 0) (local.get 0x2d4))\n    (i64.store offset=0x2d5 align=1 (i32.const 0) (local.get 0x2d5))\n    (i64.store offset=0x2d6 align=1 (i32.const 0) (local.get 0x2d6))\n    (i64.store offset=0x2d7 align=1 (i32.const 0) (local.get 0x2d7))\n    (i64.store offset=0x2d8 align=1 (i32.const 0) (local.get 0x2d8))\n    (i64.store offset=0x2d9 align=1 (i32.const 0) (local.get 0x2d9))\n    (i64.store offset=0x2da align=1 (i32.const 0) (local.get 0x2da))\n    (i64.store offset=0x2db align=1 (i32.const 0) (local.get 0x2db))\n    (i64.store offset=0x2dc align=1 (i32.const 0) (local.get 0x2dc))\n    (i64.store offset=0x2dd align=1 (i32.const 0) (local.get 0x2dd))\n    (i64.store offset=0x2de align=1 (i32.const 0) (local.get 0x2de))\n    (i64.store offset=0x2df align=1 (i32.const 0) (local.get 0x2df))\n    (i64.store offset=0x2e0 align=1 (i32.const 0) (local.get 0x2e0))\n    (i64.store offset=0x2e1 align=1 (i32.const 0) (local.get 0x2e1))\n    (i64.store offset=0x2e2 align=1 (i32.const 0) (local.get 0x2e2))\n    (i64.store offset=0x2e3 align=1 (i32.const 0) (local.get 0x2e3))\n    (i64.store offset=0x2e4 align=1 (i32.const 0) (local.get 0x2e4))\n    (i64.store offset=0x2e5 align=1 (i32.const 0) (local.get 0x2e5))\n    (i64.store offset=0x2e6 align=1 (i32.const 0) (local.get 0x2e6))\n    (i64.store offset=0x2e7 align=1 (i32.const 0) (local.get 0x2e7))\n    (i64.store offset=0x2e8 align=1 (i32.const 0) (local.get 0x2e8))\n    (i64.store offset=0x2e9 align=1 (i32.const 0) (local.get 0x2e9))\n    (i64.store offset=0x2ea align=1 (i32.const 0) (local.get 0x2ea))\n    (i64.store offset=0x2eb align=1 (i32.const 0) (local.get 0x2eb))\n    (i64.store offset=0x2ec align=1 (i32.const 0) (local.get 0x2ec))\n    (i64.store offset=0x2ed align=1 (i32.const 0) (local.get 0x2ed))\n    (i64.store offset=0x2ee align=1 (i32.const 0) (local.get 0x2ee))\n    (i64.store offset=0x2ef align=1 (i32.const 0) (local.get 0x2ef))\n    (i64.store offset=0x2f0 align=1 (i32.const 0) (local.get 0x2f0))\n    (i64.store offset=0x2f1 align=1 (i32.const 0) (local.get 0x2f1))\n    (i64.store offset=0x2f2 align=1 (i32.const 0) (local.get 0x2f2))\n    (i64.store offset=0x2f3 align=1 (i32.const 0) (local.get 0x2f3))\n    (i64.store offset=0x2f4 align=1 (i32.const 0) (local.get 0x2f4))\n    (i64.store offset=0x2f5 align=1 (i32.const 0) (local.get 0x2f5))\n    (i64.store offset=0x2f6 align=1 (i32.const 0) (local.get 0x2f6))\n    (i64.store offset=0x2f7 align=1 (i32.const 0) (local.get 0x2f7))\n    (i64.store offset=0x2f8 align=1 (i32.const 0) (local.get 0x2f8))\n    (i64.store offset=0x2f9 align=1 (i32.const 0) (local.get 0x2f9))\n    (i64.store offset=0x2fa align=1 (i32.const 0) (local.get 0x2fa))\n    (i64.store offset=0x2fb align=1 (i32.const 0) (local.get 0x2fb))\n    (i64.store offset=0x2fc align=1 (i32.const 0) (local.get 0x2fc))\n    (i64.store offset=0x2fd align=1 (i32.const 0) (local.get 0x2fd))\n    (i64.store offset=0x2fe align=1 (i32.const 0) (local.get 0x2fe))\n    (i64.store offset=0x2ff align=1 (i32.const 0) (local.get 0x2ff))\n    (i64.store offset=0x300 align=1 (i32.const 0) (local.get 0x300))\n    (i64.store offset=0x301 align=1 (i32.const 0) (local.get 0x301))\n    (i64.store offset=0x302 align=1 (i32.const 0) (local.get 0x302))\n    (i64.store offset=0x303 align=1 (i32.const 0) (local.get 0x303))\n    (i64.store offset=0x304 align=1 (i32.const 0) (local.get 0x304))\n    (i64.store offset=0x305 align=1 (i32.const 0) (local.get 0x305))\n    (i64.store offset=0x306 align=1 (i32.const 0) (local.get 0x306))\n    (i64.store offset=0x307 align=1 (i32.const 0) (local.get 0x307))\n    (i64.store offset=0x308 align=1 (i32.const 0) (local.get 0x308))\n    (i64.store offset=0x309 align=1 (i32.const 0) (local.get 0x309))\n    (i64.store offset=0x30a align=1 (i32.const 0) (local.get 0x30a))\n    (i64.store offset=0x30b align=1 (i32.const 0) (local.get 0x30b))\n    (i64.store offset=0x30c align=1 (i32.const 0) (local.get 0x30c))\n    (i64.store offset=0x30d align=1 (i32.const 0) (local.get 0x30d))\n    (i64.store offset=0x30e align=1 (i32.const 0) (local.get 0x30e))\n    (i64.store offset=0x30f align=1 (i32.const 0) (local.get 0x30f))\n    (i64.store offset=0x310 align=1 (i32.const 0) (local.get 0x310))\n    (i64.store offset=0x311 align=1 (i32.const 0) (local.get 0x311))\n    (i64.store offset=0x312 align=1 (i32.const 0) (local.get 0x312))\n    (i64.store offset=0x313 align=1 (i32.const 0) (local.get 0x313))\n    (i64.store offset=0x314 align=1 (i32.const 0) (local.get 0x314))\n    (i64.store offset=0x315 align=1 (i32.const 0) (local.get 0x315))\n    (i64.store offset=0x316 align=1 (i32.const 0) (local.get 0x316))\n    (i64.store offset=0x317 align=1 (i32.const 0) (local.get 0x317))\n    (i64.store offset=0x318 align=1 (i32.const 0) (local.get 0x318))\n    (i64.store offset=0x319 align=1 (i32.const 0) (local.get 0x319))\n    (i64.store offset=0x31a align=1 (i32.const 0) (local.get 0x31a))\n    (i64.store offset=0x31b align=1 (i32.const 0) (local.get 0x31b))\n    (i64.store offset=0x31c align=1 (i32.const 0) (local.get 0x31c))\n    (i64.store offset=0x31d align=1 (i32.const 0) (local.get 0x31d))\n    (i64.store offset=0x31e align=1 (i32.const 0) (local.get 0x31e))\n    (i64.store offset=0x31f align=1 (i32.const 0) (local.get 0x31f))\n    (i64.store offset=0x320 align=1 (i32.const 0) (local.get 0x320))\n    (i64.store offset=0x321 align=1 (i32.const 0) (local.get 0x321))\n    (i64.store offset=0x322 align=1 (i32.const 0) (local.get 0x322))\n    (i64.store offset=0x323 align=1 (i32.const 0) (local.get 0x323))\n    (i64.store offset=0x324 align=1 (i32.const 0) (local.get 0x324))\n    (i64.store offset=0x325 align=1 (i32.const 0) (local.get 0x325))\n    (i64.store offset=0x326 align=1 (i32.const 0) (local.get 0x326))\n    (i64.store offset=0x327 align=1 (i32.const 0) (local.get 0x327))\n    (i64.store offset=0x328 align=1 (i32.const 0) (local.get 0x328))\n    (i64.store offset=0x329 align=1 (i32.const 0) (local.get 0x329))\n    (i64.store offset=0x32a align=1 (i32.const 0) (local.get 0x32a))\n    (i64.store offset=0x32b align=1 (i32.const 0) (local.get 0x32b))\n    (i64.store offset=0x32c align=1 (i32.const 0) (local.get 0x32c))\n    (i64.store offset=0x32d align=1 (i32.const 0) (local.get 0x32d))\n    (i64.store offset=0x32e align=1 (i32.const 0) (local.get 0x32e))\n    (i64.store offset=0x32f align=1 (i32.const 0) (local.get 0x32f))\n    (i64.store offset=0x330 align=1 (i32.const 0) (local.get 0x330))\n    (i64.store offset=0x331 align=1 (i32.const 0) (local.get 0x331))\n    (i64.store offset=0x332 align=1 (i32.const 0) (local.get 0x332))\n    (i64.store offset=0x333 align=1 (i32.const 0) (local.get 0x333))\n    (i64.store offset=0x334 align=1 (i32.const 0) (local.get 0x334))\n    (i64.store offset=0x335 align=1 (i32.const 0) (local.get 0x335))\n    (i64.store offset=0x336 align=1 (i32.const 0) (local.get 0x336))\n    (i64.store offset=0x337 align=1 (i32.const 0) (local.get 0x337))\n    (i64.store offset=0x338 align=1 (i32.const 0) (local.get 0x338))\n    (i64.store offset=0x339 align=1 (i32.const 0) (local.get 0x339))\n    (i64.store offset=0x33a align=1 (i32.const 0) (local.get 0x33a))\n    (i64.store offset=0x33b align=1 (i32.const 0) (local.get 0x33b))\n    (i64.store offset=0x33c align=1 (i32.const 0) (local.get 0x33c))\n    (i64.store offset=0x33d align=1 (i32.const 0) (local.get 0x33d))\n    (i64.store offset=0x33e align=1 (i32.const 0) (local.get 0x33e))\n    (i64.store offset=0x33f align=1 (i32.const 0) (local.get 0x33f))\n    (i64.store offset=0x340 align=1 (i32.const 0) (local.get 0x340))\n    (i64.store offset=0x341 align=1 (i32.const 0) (local.get 0x341))\n    (i64.store offset=0x342 align=1 (i32.const 0) (local.get 0x342))\n    (i64.store offset=0x343 align=1 (i32.const 0) (local.get 0x343))\n    (i64.store offset=0x344 align=1 (i32.const 0) (local.get 0x344))\n    (i64.store offset=0x345 align=1 (i32.const 0) (local.get 0x345))\n    (i64.store offset=0x346 align=1 (i32.const 0) (local.get 0x346))\n    (i64.store offset=0x347 align=1 (i32.const 0) (local.get 0x347))\n    (i64.store offset=0x348 align=1 (i32.const 0) (local.get 0x348))\n    (i64.store offset=0x349 align=1 (i32.const 0) (local.get 0x349))\n    (i64.store offset=0x34a align=1 (i32.const 0) (local.get 0x34a))\n    (i64.store offset=0x34b align=1 (i32.const 0) (local.get 0x34b))\n    (i64.store offset=0x34c align=1 (i32.const 0) (local.get 0x34c))\n    (i64.store offset=0x34d align=1 (i32.const 0) (local.get 0x34d))\n    (i64.store offset=0x34e align=1 (i32.const 0) (local.get 0x34e))\n    (i64.store offset=0x34f align=1 (i32.const 0) (local.get 0x34f))\n    (i64.store offset=0x350 align=1 (i32.const 0) (local.get 0x350))\n    (i64.store offset=0x351 align=1 (i32.const 0) (local.get 0x351))\n    (i64.store offset=0x352 align=1 (i32.const 0) (local.get 0x352))\n    (i64.store offset=0x353 align=1 (i32.const 0) (local.get 0x353))\n    (i64.store offset=0x354 align=1 (i32.const 0) (local.get 0x354))\n    (i64.store offset=0x355 align=1 (i32.const 0) (local.get 0x355))\n    (i64.store offset=0x356 align=1 (i32.const 0) (local.get 0x356))\n    (i64.store offset=0x357 align=1 (i32.const 0) (local.get 0x357))\n    (i64.store offset=0x358 align=1 (i32.const 0) (local.get 0x358))\n    (i64.store offset=0x359 align=1 (i32.const 0) (local.get 0x359))\n    (i64.store offset=0x35a align=1 (i32.const 0) (local.get 0x35a))\n    (i64.store offset=0x35b align=1 (i32.const 0) (local.get 0x35b))\n    (i64.store offset=0x35c align=1 (i32.const 0) (local.get 0x35c))\n    (i64.store offset=0x35d align=1 (i32.const 0) (local.get 0x35d))\n    (i64.store offset=0x35e align=1 (i32.const 0) (local.get 0x35e))\n    (i64.store offset=0x35f align=1 (i32.const 0) (local.get 0x35f))\n    (i64.store offset=0x360 align=1 (i32.const 0) (local.get 0x360))\n    (i64.store offset=0x361 align=1 (i32.const 0) (local.get 0x361))\n    (i64.store offset=0x362 align=1 (i32.const 0) (local.get 0x362))\n    (i64.store offset=0x363 align=1 (i32.const 0) (local.get 0x363))\n    (i64.store offset=0x364 align=1 (i32.const 0) (local.get 0x364))\n    (i64.store offset=0x365 align=1 (i32.const 0) (local.get 0x365))\n    (i64.store offset=0x366 align=1 (i32.const 0) (local.get 0x366))\n    (i64.store offset=0x367 align=1 (i32.const 0) (local.get 0x367))\n    (i64.store offset=0x368 align=1 (i32.const 0) (local.get 0x368))\n    (i64.store offset=0x369 align=1 (i32.const 0) (local.get 0x369))\n    (i64.store offset=0x36a align=1 (i32.const 0) (local.get 0x36a))\n    (i64.store offset=0x36b align=1 (i32.const 0) (local.get 0x36b))\n    (i64.store offset=0x36c align=1 (i32.const 0) (local.get 0x36c))\n    (i64.store offset=0x36d align=1 (i32.const 0) (local.get 0x36d))\n    (i64.store offset=0x36e align=1 (i32.const 0) (local.get 0x36e))\n    (i64.store offset=0x36f align=1 (i32.const 0) (local.get 0x36f))\n    (i64.store offset=0x370 align=1 (i32.const 0) (local.get 0x370))\n    (i64.store offset=0x371 align=1 (i32.const 0) (local.get 0x371))\n    (i64.store offset=0x372 align=1 (i32.const 0) (local.get 0x372))\n    (i64.store offset=0x373 align=1 (i32.const 0) (local.get 0x373))\n    (i64.store offset=0x374 align=1 (i32.const 0) (local.get 0x374))\n    (i64.store offset=0x375 align=1 (i32.const 0) (local.get 0x375))\n    (i64.store offset=0x376 align=1 (i32.const 0) (local.get 0x376))\n    (i64.store offset=0x377 align=1 (i32.const 0) (local.get 0x377))\n    (i64.store offset=0x378 align=1 (i32.const 0) (local.get 0x378))\n    (i64.store offset=0x379 align=1 (i32.const 0) (local.get 0x379))\n    (i64.store offset=0x37a align=1 (i32.const 0) (local.get 0x37a))\n    (i64.store offset=0x37b align=1 (i32.const 0) (local.get 0x37b))\n    (i64.store offset=0x37c align=1 (i32.const 0) (local.get 0x37c))\n    (i64.store offset=0x37d align=1 (i32.const 0) (local.get 0x37d))\n    (i64.store offset=0x37e align=1 (i32.const 0) (local.get 0x37e))\n    (i64.store offset=0x37f align=1 (i32.const 0) (local.get 0x37f))\n    (i64.store offset=0x380 align=1 (i32.const 0) (local.get 0x380))\n    (i64.store offset=0x381 align=1 (i32.const 0) (local.get 0x381))\n    (i64.store offset=0x382 align=1 (i32.const 0) (local.get 0x382))\n    (i64.store offset=0x383 align=1 (i32.const 0) (local.get 0x383))\n    (i64.store offset=0x384 align=1 (i32.const 0) (local.get 0x384))\n    (i64.store offset=0x385 align=1 (i32.const 0) (local.get 0x385))\n    (i64.store offset=0x386 align=1 (i32.const 0) (local.get 0x386))\n    (i64.store offset=0x387 align=1 (i32.const 0) (local.get 0x387))\n    (i64.store offset=0x388 align=1 (i32.const 0) (local.get 0x388))\n    (i64.store offset=0x389 align=1 (i32.const 0) (local.get 0x389))\n    (i64.store offset=0x38a align=1 (i32.const 0) (local.get 0x38a))\n    (i64.store offset=0x38b align=1 (i32.const 0) (local.get 0x38b))\n    (i64.store offset=0x38c align=1 (i32.const 0) (local.get 0x38c))\n    (i64.store offset=0x38d align=1 (i32.const 0) (local.get 0x38d))\n    (i64.store offset=0x38e align=1 (i32.const 0) (local.get 0x38e))\n    (i64.store offset=0x38f align=1 (i32.const 0) (local.get 0x38f))\n    (i64.store offset=0x390 align=1 (i32.const 0) (local.get 0x390))\n    (i64.store offset=0x391 align=1 (i32.const 0) (local.get 0x391))\n    (i64.store offset=0x392 align=1 (i32.const 0) (local.get 0x392))\n    (i64.store offset=0x393 align=1 (i32.const 0) (local.get 0x393))\n    (i64.store offset=0x394 align=1 (i32.const 0) (local.get 0x394))\n    (i64.store offset=0x395 align=1 (i32.const 0) (local.get 0x395))\n    (i64.store offset=0x396 align=1 (i32.const 0) (local.get 0x396))\n    (i64.store offset=0x397 align=1 (i32.const 0) (local.get 0x397))\n    (i64.store offset=0x398 align=1 (i32.const 0) (local.get 0x398))\n    (i64.store offset=0x399 align=1 (i32.const 0) (local.get 0x399))\n    (i64.store offset=0x39a align=1 (i32.const 0) (local.get 0x39a))\n    (i64.store offset=0x39b align=1 (i32.const 0) (local.get 0x39b))\n    (i64.store offset=0x39c align=1 (i32.const 0) (local.get 0x39c))\n    (i64.store offset=0x39d align=1 (i32.const 0) (local.get 0x39d))\n    (i64.store offset=0x39e align=1 (i32.const 0) (local.get 0x39e))\n    (i64.store offset=0x39f align=1 (i32.const 0) (local.get 0x39f))\n    (i64.store offset=0x3a0 align=1 (i32.const 0) (local.get 0x3a0))\n    (i64.store offset=0x3a1 align=1 (i32.const 0) (local.get 0x3a1))\n    (i64.store offset=0x3a2 align=1 (i32.const 0) (local.get 0x3a2))\n    (i64.store offset=0x3a3 align=1 (i32.const 0) (local.get 0x3a3))\n    (i64.store offset=0x3a4 align=1 (i32.const 0) (local.get 0x3a4))\n    (i64.store offset=0x3a5 align=1 (i32.const 0) (local.get 0x3a5))\n    (i64.store offset=0x3a6 align=1 (i32.const 0) (local.get 0x3a6))\n    (i64.store offset=0x3a7 align=1 (i32.const 0) (local.get 0x3a7))\n    (i64.store offset=0x3a8 align=1 (i32.const 0) (local.get 0x3a8))\n    (i64.store offset=0x3a9 align=1 (i32.const 0) (local.get 0x3a9))\n    (i64.store offset=0x3aa align=1 (i32.const 0) (local.get 0x3aa))\n    (i64.store offset=0x3ab align=1 (i32.const 0) (local.get 0x3ab))\n    (i64.store offset=0x3ac align=1 (i32.const 0) (local.get 0x3ac))\n    (i64.store offset=0x3ad align=1 (i32.const 0) (local.get 0x3ad))\n    (i64.store offset=0x3ae align=1 (i32.const 0) (local.get 0x3ae))\n    (i64.store offset=0x3af align=1 (i32.const 0) (local.get 0x3af))\n    (i64.store offset=0x3b0 align=1 (i32.const 0) (local.get 0x3b0))\n    (i64.store offset=0x3b1 align=1 (i32.const 0) (local.get 0x3b1))\n    (i64.store offset=0x3b2 align=1 (i32.const 0) (local.get 0x3b2))\n    (i64.store offset=0x3b3 align=1 (i32.const 0) (local.get 0x3b3))\n    (i64.store offset=0x3b4 align=1 (i32.const 0) (local.get 0x3b4))\n    (i64.store offset=0x3b5 align=1 (i32.const 0) (local.get 0x3b5))\n    (i64.store offset=0x3b6 align=1 (i32.const 0) (local.get 0x3b6))\n    (i64.store offset=0x3b7 align=1 (i32.const 0) (local.get 0x3b7))\n    (i64.store offset=0x3b8 align=1 (i32.const 0) (local.get 0x3b8))\n    (i64.store offset=0x3b9 align=1 (i32.const 0) (local.get 0x3b9))\n    (i64.store offset=0x3ba align=1 (i32.const 0) (local.get 0x3ba))\n    (i64.store offset=0x3bb align=1 (i32.const 0) (local.get 0x3bb))\n    (i64.store offset=0x3bc align=1 (i32.const 0) (local.get 0x3bc))\n    (i64.store offset=0x3bd align=1 (i32.const 0) (local.get 0x3bd))\n    (i64.store offset=0x3be align=1 (i32.const 0) (local.get 0x3be))\n    (i64.store offset=0x3bf align=1 (i32.const 0) (local.get 0x3bf))\n    (i64.store offset=0x3c0 align=1 (i32.const 0) (local.get 0x3c0))\n    (i64.store offset=0x3c1 align=1 (i32.const 0) (local.get 0x3c1))\n    (i64.store offset=0x3c2 align=1 (i32.const 0) (local.get 0x3c2))\n    (i64.store offset=0x3c3 align=1 (i32.const 0) (local.get 0x3c3))\n    (i64.store offset=0x3c4 align=1 (i32.const 0) (local.get 0x3c4))\n    (i64.store offset=0x3c5 align=1 (i32.const 0) (local.get 0x3c5))\n    (i64.store offset=0x3c6 align=1 (i32.const 0) (local.get 0x3c6))\n    (i64.store offset=0x3c7 align=1 (i32.const 0) (local.get 0x3c7))\n    (i64.store offset=0x3c8 align=1 (i32.const 0) (local.get 0x3c8))\n    (i64.store offset=0x3c9 align=1 (i32.const 0) (local.get 0x3c9))\n    (i64.store offset=0x3ca align=1 (i32.const 0) (local.get 0x3ca))\n    (i64.store offset=0x3cb align=1 (i32.const 0) (local.get 0x3cb))\n    (i64.store offset=0x3cc align=1 (i32.const 0) (local.get 0x3cc))\n    (i64.store offset=0x3cd align=1 (i32.const 0) (local.get 0x3cd))\n    (i64.store offset=0x3ce align=1 (i32.const 0) (local.get 0x3ce))\n    (i64.store offset=0x3cf align=1 (i32.const 0) (local.get 0x3cf))\n    (i64.store offset=0x3d0 align=1 (i32.const 0) (local.get 0x3d0))\n    (i64.store offset=0x3d1 align=1 (i32.const 0) (local.get 0x3d1))\n    (i64.store offset=0x3d2 align=1 (i32.const 0) (local.get 0x3d2))\n    (i64.store offset=0x3d3 align=1 (i32.const 0) (local.get 0x3d3))\n    (i64.store offset=0x3d4 align=1 (i32.const 0) (local.get 0x3d4))\n    (i64.store offset=0x3d5 align=1 (i32.const 0) (local.get 0x3d5))\n    (i64.store offset=0x3d6 align=1 (i32.const 0) (local.get 0x3d6))\n    (i64.store offset=0x3d7 align=1 (i32.const 0) (local.get 0x3d7))\n    (i64.store offset=0x3d8 align=1 (i32.const 0) (local.get 0x3d8))\n    (i64.store offset=0x3d9 align=1 (i32.const 0) (local.get 0x3d9))\n    (i64.store offset=0x3da align=1 (i32.const 0) (local.get 0x3da))\n    (i64.store offset=0x3db align=1 (i32.const 0) (local.get 0x3db))\n    (i64.store offset=0x3dc align=1 (i32.const 0) (local.get 0x3dc))\n    (i64.store offset=0x3dd align=1 (i32.const 0) (local.get 0x3dd))\n    (i64.store offset=0x3de align=1 (i32.const 0) (local.get 0x3de))\n    (i64.store offset=0x3df align=1 (i32.const 0) (local.get 0x3df))\n    (i64.store offset=0x3e0 align=1 (i32.const 0) (local.get 0x3e0))\n    (i64.store offset=0x3e1 align=1 (i32.const 0) (local.get 0x3e1))\n    (i64.store offset=0x3e2 align=1 (i32.const 0) (local.get 0x3e2))\n    (i64.store offset=0x3e3 align=1 (i32.const 0) (local.get 0x3e3))\n    (i64.store offset=0x3e4 align=1 (i32.const 0) (local.get 0x3e4))\n    (i64.store offset=0x3e5 align=1 (i32.const 0) (local.get 0x3e5))\n    (i64.store offset=0x3e6 align=1 (i32.const 0) (local.get 0x3e6))\n    (i64.store offset=0x3e7 align=1 (i32.const 0) (local.get 0x3e7))\n    (i64.store offset=0x3e8 align=1 (i32.const 0) (local.get 0x3e8))\n    (i64.store offset=0x3e9 align=1 (i32.const 0) (local.get 0x3e9))\n    (i64.store offset=0x3ea align=1 (i32.const 0) (local.get 0x3ea))\n    (i64.store offset=0x3eb align=1 (i32.const 0) (local.get 0x3eb))\n    (i64.store offset=0x3ec align=1 (i32.const 0) (local.get 0x3ec))\n    (i64.store offset=0x3ed align=1 (i32.const 0) (local.get 0x3ed))\n    (i64.store offset=0x3ee align=1 (i32.const 0) (local.get 0x3ee))\n    (i64.store offset=0x3ef align=1 (i32.const 0) (local.get 0x3ef))\n    (i64.store offset=0x3f0 align=1 (i32.const 0) (local.get 0x3f0))\n    (i64.store offset=0x3f1 align=1 (i32.const 0) (local.get 0x3f1))\n    (i64.store offset=0x3f2 align=1 (i32.const 0) (local.get 0x3f2))\n    (i64.store offset=0x3f3 align=1 (i32.const 0) (local.get 0x3f3))\n    (i64.store offset=0x3f4 align=1 (i32.const 0) (local.get 0x3f4))\n    (i64.store offset=0x3f5 align=1 (i32.const 0) (local.get 0x3f5))\n    (i64.store offset=0x3f6 align=1 (i32.const 0) (local.get 0x3f6))\n    (i64.store offset=0x3f7 align=1 (i32.const 0) (local.get 0x3f7))\n    (i64.store offset=0x3f8 align=1 (i32.const 0) (local.get 0x3f8))\n    (i64.store offset=0x3f9 align=1 (i32.const 0) (local.get 0x3f9))\n    (i64.store offset=0x3fa align=1 (i32.const 0) (local.get 0x3fa))\n    (i64.store offset=0x3fb align=1 (i32.const 0) (local.get 0x3fb))\n    (i64.store offset=0x3fc align=1 (i32.const 0) (local.get 0x3fc))\n    (i64.store offset=0x3fd align=1 (i32.const 0) (local.get 0x3fd))\n    (i64.store offset=0x3fe align=1 (i32.const 0) (local.get 0x3fe))\n    (i64.store offset=0x3ff align=1 (i32.const 0) (local.get 0x3ff))\n    (i64.store offset=0x400 align=1 (i32.const 0) (local.get 0x400))\n    (i64.store offset=0x401 align=1 (i32.const 0) (local.get 0x401))\n    (i64.store offset=0x402 align=1 (i32.const 0) (local.get 0x402))\n    (i64.store offset=0x403 align=1 (i32.const 0) (local.get 0x403))\n    (i64.store offset=0x404 align=1 (i32.const 0) (local.get 0x404))\n    (i64.store offset=0x405 align=1 (i32.const 0) (local.get 0x405))\n    (i64.store offset=0x406 align=1 (i32.const 0) (local.get 0x406))\n    (i64.store offset=0x407 align=1 (i32.const 0) (local.get 0x407))\n    (i64.store offset=0x408 align=1 (i32.const 0) (local.get 0x408))\n    (i64.store offset=0x409 align=1 (i32.const 0) (local.get 0x409))\n    (i64.store offset=0x40a align=1 (i32.const 0) (local.get 0x40a))\n    (i64.store offset=0x40b align=1 (i32.const 0) (local.get 0x40b))\n    (i64.store offset=0x40c align=1 (i32.const 0) (local.get 0x40c))\n    (i64.store offset=0x40d align=1 (i32.const 0) (local.get 0x40d))\n    (i64.store offset=0x40e align=1 (i32.const 0) (local.get 0x40e))\n    (i64.store offset=0x40f align=1 (i32.const 0) (local.get 0x40f))\n    (i64.store offset=0x410 align=1 (i32.const 0) (local.get 0x410))\n    (i64.store offset=0x411 align=1 (i32.const 0) (local.get 0x411))\n    (i64.store offset=0x412 align=1 (i32.const 0) (local.get 0x412))\n    (i64.store offset=0x413 align=1 (i32.const 0) (local.get 0x413))\n    (i64.store offset=0x414 align=1 (i32.const 0) (local.get 0x414))\n    (i64.store offset=0x415 align=1 (i32.const 0) (local.get 0x415))\n    (i64.store offset=0x416 align=1 (i32.const 0) (local.get 0x416))\n    (i64.store offset=0x417 align=1 (i32.const 0) (local.get 0x417))\n    (i64.store offset=0x418 align=1 (i32.const 0) (local.get 0x418))\n    (i64.store offset=0x419 align=1 (i32.const 0) (local.get 0x419))\n    (i64.store offset=0x41a align=1 (i32.const 0) (local.get 0x41a))\n    (i64.store offset=0x41b align=1 (i32.const 0) (local.get 0x41b))\n    (i64.store offset=0x41c align=1 (i32.const 0) (local.get 0x41c))\n    (i64.store offset=0x41d align=1 (i32.const 0) (local.get 0x41d))\n    (i64.store offset=0x41e align=1 (i32.const 0) (local.get 0x41e))\n    (i64.store offset=0x41f align=1 (i32.const 0) (local.get 0x41f))\n  )\n)\n\n(assert_exhaustion (invoke \"test-guard-page-skip\" (i32.const 0)) \"call stack exhausted\")\n(assert_exhaustion (invoke \"test-guard-page-skip\" (i32.const 100)) \"call stack exhausted\")\n(assert_exhaustion (invoke \"test-guard-page-skip\" (i32.const 200)) \"call stack exhausted\")\n(assert_exhaustion (invoke \"test-guard-page-skip\" (i32.const 300)) \"call stack exhausted\")\n(assert_exhaustion (invoke \"test-guard-page-skip\" (i32.const 400)) \"call stack exhausted\")\n(assert_exhaustion (invoke \"test-guard-page-skip\" (i32.const 500)) \"call stack exhausted\")\n(assert_exhaustion (invoke \"test-guard-page-skip\" (i32.const 600)) \"call stack exhausted\")\n(assert_exhaustion (invoke \"test-guard-page-skip\" (i32.const 700)) \"call stack exhausted\")\n(assert_exhaustion (invoke \"test-guard-page-skip\" (i32.const 800)) \"call stack exhausted\")\n(assert_exhaustion (invoke \"test-guard-page-skip\" (i32.const 900)) \"call stack exhausted\")\n"
  },
  {
    "path": "test/core/stack.wast",
    "content": "(module\n  (func (export \"fac-expr\") (param $n i64) (result i64)\n    (local $i i64)\n    (local $res i64)\n    (local.set $i (local.get $n))\n    (local.set $res (i64.const 1))\n    (block $done\n      (loop $loop\n        (if\n          (i64.eq (local.get $i) (i64.const 0))\n          (then (br $done))\n          (else\n            (local.set $res (i64.mul (local.get $i) (local.get $res)))\n            (local.set $i (i64.sub (local.get $i) (i64.const 1)))\n          )\n        )\n        (br $loop)\n      )\n    )\n    (local.get $res)\n  )\n\n  (func (export \"fac-stack\") (param $n i64) (result i64)\n    (local $i i64)\n    (local $res i64)\n    (local.get $n)\n    (local.set $i)\n    (i64.const 1)\n    (local.set $res)\n    (block $done\n      (loop $loop\n        (local.get $i)\n        (i64.const 0)\n        (i64.eq)\n        (if\n          (then (br $done))\n          (else\n            (local.get $i)\n            (local.get $res)\n            (i64.mul)\n            (local.set $res)\n            (local.get $i)\n            (i64.const 1)\n            (i64.sub)\n            (local.set $i)\n          )\n        )\n        (br $loop)\n      )\n    )\n    (local.get $res)\n  )\n\n  (func (export \"fac-stack-raw\") (param $n i64) (result i64)\n    (local $i i64)\n    (local $res i64)\n    local.get $n\n    local.set $i\n    i64.const 1\n    local.set $res\n    block $done\n      loop $loop\n        local.get $i\n        i64.const 0\n        i64.eq\n        if $body\n          br $done\n        else $body\n          local.get $i\n          local.get $res\n          i64.mul\n          local.set $res\n          local.get $i\n          i64.const 1\n          i64.sub\n          local.set $i\n        end $body\n        br $loop\n      end $loop\n    end $done\n    local.get $res\n  )\n\n  (func (export \"fac-mixed\") (param $n i64) (result i64)\n    (local $i i64)\n    (local $res i64)\n    (local.set $i (local.get $n))\n    (local.set $res (i64.const 1))\n    (block $done\n      (loop $loop\n        (i64.eq (local.get $i) (i64.const 0))\n        (if\n          (then (br $done))\n          (else\n            (i64.mul (local.get $i) (local.get $res))\n            (local.set $res)\n            (i64.sub (local.get $i) (i64.const 1))\n            (local.set $i)\n          )\n        )\n        (br $loop)\n      )\n    )\n    (local.get $res)\n  )\n\n  (func (export \"fac-mixed-raw\") (param $n i64) (result i64)\n    (local $i i64)\n    (local $res i64)\n    (local.set $i (local.get $n))\n    (local.set $res (i64.const 1))\n    block $done\n      loop $loop\n        (i64.eq (local.get $i) (i64.const 0))\n        if\n          br $done\n        else\n          (i64.mul (local.get $i) (local.get $res))\n          local.set $res\n          (i64.sub (local.get $i) (i64.const 1))\n          local.set $i\n        end\n        br $loop\n      end\n    end\n    local.get $res\n  )\n\n  (global $temp (mut i32) (i32.const 0))\n  (func $add_one_to_global (result i32)\n    (local i32)\n    (global.set $temp (i32.add (i32.const 1) (global.get $temp)))\n    (global.get $temp)\n  )\n  (func $add_one_to_global_and_drop\n    (drop (call $add_one_to_global))\n  )\n  (func (export \"not-quite-a-tree\") (result i32)\n    call $add_one_to_global\n    call $add_one_to_global\n    call $add_one_to_global_and_drop\n    i32.add\n  )\n)\n\n(assert_return (invoke \"fac-expr\" (i64.const 25)) (i64.const 7034535277573963776))\n(assert_return (invoke \"fac-stack\" (i64.const 25)) (i64.const 7034535277573963776))\n(assert_return (invoke \"fac-mixed\" (i64.const 25)) (i64.const 7034535277573963776))\n\n(assert_return (invoke \"not-quite-a-tree\") (i32.const 3))\n(assert_return (invoke \"not-quite-a-tree\") (i32.const 9))\n\n\n;; Syntax of flat call_indirect\n\n(module\n  (type $proc (func))\n  (table 1 funcref)\n\n  (func\n    (block i32.const 0 call_indirect)\n    (loop i32.const 0 call_indirect)\n    (if (i32.const 0) (then i32.const 0 call_indirect))\n    (if (i32.const 0)\n      (then i32.const 0 call_indirect)\n      (else i32.const 0 call_indirect)\n    )\n    (block i32.const 0 call_indirect (type $proc))\n    (loop i32.const 0 call_indirect (type $proc))\n    (if (i32.const 0) (then i32.const 0 call_indirect (type $proc)))\n    (if (i32.const 0)\n      (then i32.const 0 call_indirect (type $proc))\n      (else i32.const 0 call_indirect (type $proc))\n    )\n    (block i32.const 0 i32.const 0 call_indirect (param i32))\n    (loop i32.const 0 i32.const 0 call_indirect (param i32))\n    (if (i32.const 0) (then i32.const 0 i32.const 0 call_indirect (param i32)))\n    (if (i32.const 0)\n      (then i32.const 0 i32.const 0 call_indirect (param i32))\n      (else i32.const 0 i32.const 0 call_indirect (param i32))\n    )\n    (block (result i32) i32.const 0 call_indirect (result i32)) (drop)\n    (loop (result i32) i32.const 0 call_indirect (result i32)) (drop)\n    (if (result i32) (i32.const 0)\n      (then i32.const 0 call_indirect (result i32))\n      (else i32.const 0 call_indirect (result i32))\n    ) (drop)\n    (block i32.const 0 call_indirect (type $proc) (param) (result))\n    (loop i32.const 0 call_indirect (type $proc) (param) (result))\n    (if (i32.const 0)\n      (then i32.const 0 call_indirect (type $proc) (param) (result))\n    )\n    (if (i32.const 0)\n      (then i32.const 0 call_indirect (type $proc) (param) (param) (result))\n      (else i32.const 0 call_indirect (type $proc) (param) (result) (result))\n    )\n\n    block i32.const 0 call_indirect end\n    loop i32.const 0 call_indirect end\n    i32.const 0 if i32.const 0 call_indirect end\n    i32.const 0 if i32.const 0 call_indirect else i32.const 0 call_indirect end\n    block i32.const 0 call_indirect (type $proc) end\n    loop i32.const 0 call_indirect (type $proc) end\n    i32.const 0 if i32.const 0 call_indirect (type $proc) end\n    i32.const 0\n    if\n      i32.const 0 call_indirect (type $proc)\n    else\n      i32.const 0 call_indirect (type $proc)\n    end\n    block i32.const 0 i32.const 0 call_indirect (param i32) end\n    loop i32.const 0 i32.const 0 call_indirect (param i32) end\n    i32.const 0 if i32.const 0 i32.const 0 call_indirect (param i32) end\n    i32.const 0\n    if\n      i32.const 0 i32.const 0 call_indirect (param i32)\n    else\n      i32.const 0 i32.const 0 call_indirect (param i32)\n    end\n    block (result i32) i32.const 0 call_indirect (result i32) end drop\n    loop (result i32) i32.const 0 call_indirect (result i32) end drop\n    i32.const 0\n    if (result i32)\n      i32.const 0 call_indirect (result i32)\n    else\n      i32.const 0 call_indirect (result i32)\n    end drop\n    block i32.const 0 call_indirect (type $proc) (param) (result) end\n    loop i32.const 0 call_indirect (type $proc) (param) (result) end\n    i32.const 0 if i32.const 0 call_indirect (type $proc) (param) (result) end\n    i32.const 0\n    if\n      i32.const 0 call_indirect (type $proc) (param) (result)\n    else\n      i32.const 0 call_indirect (type $proc) (param) (param) (result) (result)\n    end\n    i32.const 0 call_indirect\n  )\n)\n"
  },
  {
    "path": "test/core/start.wast",
    "content": "(assert_invalid\n  (module (func) (start 1))\n  \"unknown function\"\n)\n\n(assert_invalid\n  (module\n    (func $main (result i32) (return (i32.const 0)))\n    (start $main)\n  )\n  \"start function\"\n)\n(assert_invalid\n  (module\n    (func $main (param $a i32))\n    (start $main)\n  )\n  \"start function\"\n)\n\n(module\n  (memory (data \"A\"))\n  (func $inc\n    (i32.store8\n      (i32.const 0)\n      (i32.add\n        (i32.load8_u (i32.const 0))\n        (i32.const 1)\n      )\n    )\n  )\n  (func $get (result i32)\n    (return (i32.load8_u (i32.const 0)))\n  )\n  (func $main\n    (call $inc)\n    (call $inc)\n    (call $inc)\n  )\n\n  (start $main)\n  (export \"inc\" (func $inc))\n  (export \"get\" (func $get))\n)\n(assert_return (invoke \"get\") (i32.const 68))\n(invoke \"inc\")\n(assert_return (invoke \"get\") (i32.const 69))\n(invoke \"inc\")\n(assert_return (invoke \"get\") (i32.const 70))\n\n(module\n  (memory (data \"A\"))\n  (func $inc\n    (i32.store8\n      (i32.const 0)\n      (i32.add\n        (i32.load8_u (i32.const 0))\n        (i32.const 1)\n      )\n    )\n  )\n  (func $get (result i32)\n    (return (i32.load8_u (i32.const 0)))\n  )\n  (func $main\n    (call $inc)\n    (call $inc)\n    (call $inc)\n  )\n  (start 2)\n  (export \"inc\" (func $inc))\n  (export \"get\" (func $get))\n)\n(assert_return (invoke \"get\") (i32.const 68))\n(invoke \"inc\")\n(assert_return (invoke \"get\") (i32.const 69))\n(invoke \"inc\")\n(assert_return (invoke \"get\") (i32.const 70))\n\n(module\n  (func $print_i32 (import \"spectest\" \"print_i32\") (param i32))\n  (func $main (call $print_i32 (i32.const 1)))\n  (start 1)\n)\n\n(module\n  (func $print_i32 (import \"spectest\" \"print_i32\") (param i32))\n  (func $main (call $print_i32 (i32.const 2)))\n  (start $main)\n)\n\n(module\n  (func $print (import \"spectest\" \"print\"))\n  (start $print)\n)\n\n(assert_trap\n  (module (func $main (unreachable)) (start $main))\n  \"unreachable\"\n)\n\n(assert_malformed\n  (module quote \"(module (func $a (unreachable)) (func $b (unreachable)) (start $a) (start $b))\")\n  \"multiple start sections\"\n)\n"
  },
  {
    "path": "test/core/store.wast",
    "content": ";; Store operator as the argument of control constructs and instructions\n\n(module\n  (memory 1)\n\n  (func (export \"as-block-value\")\n    (block (i32.store (i32.const 0) (i32.const 1)))\n  )\n  (func (export \"as-loop-value\")\n    (loop (i32.store (i32.const 0) (i32.const 1)))\n  )\n\n  (func (export \"as-br-value\")\n    (block (br 0 (i32.store (i32.const 0) (i32.const 1))))\n  )\n  (func (export \"as-br_if-value\")\n    (block\n      (br_if 0 (i32.store (i32.const 0) (i32.const 1)) (i32.const 1))\n    )\n  )\n  (func (export \"as-br_if-value-cond\")\n    (block\n      (br_if 0 (i32.const 6) (i32.store (i32.const 0) (i32.const 1)))\n    )\n  )\n  (func (export \"as-br_table-value\")\n    (block\n      (br_table 0 (i32.store (i32.const 0) (i32.const 1)) (i32.const 1))\n    )\n  )\n\n  (func (export \"as-return-value\")\n    (return (i32.store (i32.const 0) (i32.const 1)))\n  )\n\n  (func (export \"as-if-then\")\n    (if (i32.const 1) (then (i32.store (i32.const 0) (i32.const 1))))\n  )\n  (func (export \"as-if-else\")\n    (if (i32.const 0) (then) (else (i32.store (i32.const 0) (i32.const 1))))\n  )\n)\n\n(assert_return (invoke \"as-block-value\"))\n(assert_return (invoke \"as-loop-value\"))\n\n(assert_return (invoke \"as-br-value\"))\n(assert_return (invoke \"as-br_if-value\"))\n(assert_return (invoke \"as-br_if-value-cond\"))\n(assert_return (invoke \"as-br_table-value\"))\n\n(assert_return (invoke \"as-return-value\"))\n\n(assert_return (invoke \"as-if-then\"))\n(assert_return (invoke \"as-if-else\"))\n\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (i32.store32 (local.get 0) (i32.const 0)))\"\n  )\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (i32.store64 (local.get 0) (i64.const 0)))\"\n  )\n  \"unknown operator\"\n)\n\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (i64.store64 (local.get 0) (i64.const 0)))\"\n  )\n  \"unknown operator\"\n)\n\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (f32.store32 (local.get 0) (f32.const 0)))\"\n  )\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (f32.store64 (local.get 0) (f64.const 0)))\"\n  )\n  \"unknown operator\"\n)\n\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (f64.store32 (local.get 0) (f32.const 0)))\"\n  )\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote\n    \"(memory 1)\"\n    \"(func (param i32) (f64.store64 (local.get 0) (f64.const 0)))\"\n  )\n  \"unknown operator\"\n)\n;; store should have no retval\n\n(assert_invalid\n  (module (memory 1) (func (param i32) (result i32) (i32.store (i32.const 0) (i32.const 1))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func (param i64) (result i64) (i64.store (i32.const 0) (i64.const 1))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func (param f32) (result f32) (f32.store (i32.const 0) (f32.const 1))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func (param f64) (result f64) (f64.store (i32.const 0) (f64.const 1))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func (param i32) (result i32) (i32.store8 (i32.const 0) (i32.const 1))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func (param i32) (result i32) (i32.store16 (i32.const 0) (i32.const 1))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func (param i64) (result i64) (i64.store8 (i32.const 0) (i64.const 1))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func (param i64) (result i64) (i64.store16 (i32.const 0) (i64.const 1))))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (memory 1) (func (param i64) (result i64) (i64.store32 (i32.const 0) (i64.const 1))))\n  \"type mismatch\"\n)\n\n\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-address-empty\n      (i32.store)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-value-empty\n     (i32.const 0) (i32.store)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-address-empty-in-block\n      (i32.const 0) (i32.const 0)\n      (block (i32.store))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-value-empty-in-block\n      (i32.const 0)\n      (block (i32.const 0) (i32.store))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-address-empty-in-loop\n      (i32.const 0) (i32.const 0)\n      (loop (i32.store))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-value-empty-in-loop\n      (i32.const 0)\n      (loop (i32.const 0) (i32.store))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-address-empty-in-then\n      (i32.const 0) (i32.const 0)\n      (if (then (i32.store)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-value-empty-in-then\n      (i32.const 0)\n      (if (then (i32.const 0) (i32.store)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-address-empty-in-else\n      (i32.const 0) (i32.const 0)\n      (if (result i32) (then (i32.const 0)) (else (i32.store)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-value-empty-in-else\n      (i32.const 0)\n      (if (result i32) (then (i32.const 0)) (else (i32.const 0) (i32.store)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-address-empty-in-br\n      (i32.const 0) (i32.const 0)\n      (block (br 0 (i32.store)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-value-empty-in-br\n      (i32.const 0)\n      (block (br 0 (i32.const 0) (i32.store)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-address-empty-in-br_if\n      (i32.const 0) (i32.const 0)\n      (block (br_if 0 (i32.store) (i32.const 1)) )\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-value-empty-in-br_if\n      (i32.const 0)\n      (block (br_if 0 (i32.const 0) (i32.store) (i32.const 1)) )\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-address-empty-in-br_table\n      (i32.const 0) (i32.const 0)\n      (block (br_table 0 (i32.store)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-value-empty-in-br_table\n      (i32.const 0)\n      (block (br_table 0 (i32.const 0) (i32.store)))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-address-empty-in-return\n      (return (i32.store))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-value-empty-in-return\n      (return (i32.const 0) (i32.store))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-address-empty-in-select\n      (select (i32.store) (i32.const 1) (i32.const 2))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-value-empty-in-select\n      (select (i32.const 0) (i32.store) (i32.const 1) (i32.const 2))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-address-empty-in-call\n      (call 1 (i32.store))\n    )\n    (func (param i32) (result i32) (local.get 0))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $type-value-empty-in-call\n      (call 1 (i32.const 0) (i32.store))\n    )\n    (func (param i32) (result i32) (local.get 0))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $f (param i32) (result i32) (local.get 0))\n    (type $sig (func (param i32) (result i32)))\n    (table funcref (elem $f))\n    (func $type-address-empty-in-call_indirect\n      (block (result i32)\n        (call_indirect (type $sig)\n          (i32.store) (i32.const 0)\n        )\n      )\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (memory 1)\n    (func $f (param i32) (result i32) (local.get 0))\n    (type $sig (func (param i32) (result i32)))\n    (table funcref (elem $f))\n    (func $type-value-empty-in-call_indirect\n      (block (result i32)\n        (call_indirect (type $sig)\n          (i32.const 0) (i32.store) (i32.const 0)\n        )\n      )\n    )\n  )\n  \"type mismatch\"\n)\n\n\n;; Type check\n\n(assert_invalid (module (memory 1) (func (i32.store (f32.const 0) (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (i32.store8 (f32.const 0) (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (i32.store16 (f32.const 0) (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (i64.store (f32.const 0) (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (i64.store8 (f32.const 0) (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (i64.store16 (f32.const 0) (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (i64.store32 (f32.const 0) (i64.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (f32.store (f32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (f64.store (f32.const 0) (f64.const 0)))) \"type mismatch\")\n\n(assert_invalid (module (memory 1) (func (i32.store (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (i32.store8 (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (i32.store16 (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (i64.store (i32.const 0) (f32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (i64.store8 (i32.const 0) (f64.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (i64.store16 (i32.const 0) (f64.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (i64.store32 (i32.const 0) (f64.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (f32.store (i32.const 0) (i32.const 0)))) \"type mismatch\")\n(assert_invalid (module (memory 1) (func (f64.store (i32.const 0) (i64.const 0)))) \"type mismatch\")\n"
  },
  {
    "path": "test/core/switch.wast",
    "content": "(module\n  ;; Statement switch\n  (func (export \"stmt\") (param $i i32) (result i32)\n    (local $j i32)\n    (local.set $j (i32.const 100))\n    (block $switch\n      (block $7\n        (block $default\n          (block $6\n            (block $5\n              (block $4\n                (block $3\n                  (block $2\n                    (block $1\n                      (block $0\n                        (br_table $0 $1 $2 $3 $4 $5 $6 $7 $default\n                          (local.get $i)\n                        )\n                      ) ;; 0\n                      (return (local.get $i))\n                    ) ;; 1\n                    (nop)\n                    ;; fallthrough\n                  ) ;; 2\n                  ;; fallthrough\n                ) ;; 3\n                (local.set $j (i32.sub (i32.const 0) (local.get $i)))\n                (br $switch)\n              ) ;; 4\n              (br $switch)\n            ) ;; 5\n            (local.set $j (i32.const 101))\n            (br $switch)\n          ) ;; 6\n          (local.set $j (i32.const 101))\n          ;; fallthrough\n        ) ;; default\n        (local.set $j (i32.const 102))\n      ) ;; 7\n      ;; fallthrough\n    )\n    (return (local.get $j))\n  )\n\n  ;; Expression switch\n  (func (export \"expr\") (param $i i64) (result i64)\n    (local $j i64)\n    (local.set $j (i64.const 100))\n    (return\n      (block $switch (result i64)\n        (block $7\n          (block $default\n            (block $4\n              (block $5\n                (block $6\n                  (block $3\n                    (block $2\n                      (block $1\n                        (block $0\n                          (br_table $0 $1 $2 $3 $4 $5 $6 $7 $default\n                            (i32.wrap_i64 (local.get $i))\n                          )\n                        ) ;; 0\n                        (return (local.get $i))\n                      ) ;; 1\n                      (nop)\n                      ;; fallthrough\n                    ) ;; 2\n                    ;; fallthrough\n                  ) ;; 3\n                  (br $switch (i64.sub (i64.const 0) (local.get $i)))\n                ) ;; 6\n                (local.set $j (i64.const 101))\n                ;; fallthrough\n              ) ;; 4\n              ;; fallthrough\n            ) ;; 5\n            ;; fallthrough\n          ) ;; default\n          (br $switch (local.get $j))\n        ) ;; 7\n        (i64.const -5)\n      )\n    )\n  )\n\n  ;; Argument switch\n  (func (export \"arg\") (param $i i32) (result i32)\n    (return\n      (block $2 (result i32)\n        (i32.add (i32.const 10)\n          (block $1 (result i32)\n            (i32.add (i32.const 100)\n              (block $0 (result i32)\n                (i32.add (i32.const 1000)\n                  (block $default (result i32)\n                    (br_table $0 $1 $2 $default\n                      (i32.mul (i32.const 2) (local.get $i))\n                      (i32.and (i32.const 3) (local.get $i))\n                    )\n                  )\n                )\n              )\n            )\n          )\n        )\n      )\n    )\n  )\n\n  ;; Corner cases\n  (func (export \"corner\") (result i32)\n    (block\n      (br_table 0 (i32.const 0))\n    )\n    (i32.const 1)\n  )\n)\n\n(assert_return (invoke \"stmt\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"stmt\" (i32.const 1)) (i32.const -1))\n(assert_return (invoke \"stmt\" (i32.const 2)) (i32.const -2))\n(assert_return (invoke \"stmt\" (i32.const 3)) (i32.const -3))\n(assert_return (invoke \"stmt\" (i32.const 4)) (i32.const 100))\n(assert_return (invoke \"stmt\" (i32.const 5)) (i32.const 101))\n(assert_return (invoke \"stmt\" (i32.const 6)) (i32.const 102))\n(assert_return (invoke \"stmt\" (i32.const 7)) (i32.const 100))\n(assert_return (invoke \"stmt\" (i32.const -10)) (i32.const 102))\n\n(assert_return (invoke \"expr\" (i64.const 0)) (i64.const 0))\n(assert_return (invoke \"expr\" (i64.const 1)) (i64.const -1))\n(assert_return (invoke \"expr\" (i64.const 2)) (i64.const -2))\n(assert_return (invoke \"expr\" (i64.const 3)) (i64.const -3))\n(assert_return (invoke \"expr\" (i64.const 6)) (i64.const 101))\n(assert_return (invoke \"expr\" (i64.const 7)) (i64.const -5))\n(assert_return (invoke \"expr\" (i64.const -10)) (i64.const 100))\n\n(assert_return (invoke \"arg\" (i32.const 0)) (i32.const 110))\n(assert_return (invoke \"arg\" (i32.const 1)) (i32.const 12))\n(assert_return (invoke \"arg\" (i32.const 2)) (i32.const 4))\n(assert_return (invoke \"arg\" (i32.const 3)) (i32.const 1116))\n(assert_return (invoke \"arg\" (i32.const 4)) (i32.const 118))\n(assert_return (invoke \"arg\" (i32.const 5)) (i32.const 20))\n(assert_return (invoke \"arg\" (i32.const 6)) (i32.const 12))\n(assert_return (invoke \"arg\" (i32.const 7)) (i32.const 1124))\n(assert_return (invoke \"arg\" (i32.const 8)) (i32.const 126))\n\n(assert_return (invoke \"corner\") (i32.const 1))\n\n(assert_invalid (module (func (br_table 3 (i32.const 0)))) \"unknown label\")\n"
  },
  {
    "path": "test/core/table-sub.wast",
    "content": "(assert_invalid\n  (module\n    (table $t1 10 funcref)\n    (table $t2 10 externref)\n    (func $f\n      (table.copy $t1 $t2 (i32.const 0) (i32.const 1) (i32.const 2))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (table $t 10 funcref)\n    (elem $el externref)\n    (func $f\n      (table.init $t $el (i32.const 0) (i32.const 1) (i32.const 2))\n    )\n  )\n  \"type mismatch\"\n)\n"
  },
  {
    "path": "test/core/table.wast",
    "content": ";; Test table section structure\n\n(module (table 0 funcref))\n(module (table 1 funcref))\n(module (table 0 0 funcref))\n(module (table 0 1 funcref))\n(module (table 1 256 funcref))\n(module (table 0 65536 funcref))\n(module (table 0 0xffff_ffff funcref))\n\n(module (table 0 funcref) (table 0 funcref))\n(module (table (import \"spectest\" \"table\") 0 funcref) (table 0 funcref))\n\n(assert_invalid (module (elem (i32.const 0))) \"unknown table\")\n(assert_invalid (module (elem (i32.const 0) $f) (func $f)) \"unknown table\")\n\n\n(assert_invalid\n  (module (table 1 0 funcref))\n  \"size minimum must not be greater than maximum\"\n)\n(assert_invalid\n  (module (table 0xffff_ffff 0 funcref))\n  \"size minimum must not be greater than maximum\"\n)\n\n(assert_malformed\n  (module quote \"(table 0x1_0000_0000 funcref)\")\n  \"i32 constant out of range\"\n)\n(assert_malformed\n  (module quote \"(table 0x1_0000_0000 0x1_0000_0000 funcref)\")\n  \"i32 constant out of range\"\n)\n(assert_malformed\n  (module quote \"(table 0 0x1_0000_0000 funcref)\")\n  \"i32 constant out of range\"\n)\n\n\n;; Duplicate table identifiers\n\n(assert_malformed (module quote\n  \"(table $foo 1 funcref)\"\n  \"(table $foo 1 funcref)\")\n  \"duplicate table\")\n(assert_malformed (module quote\n  \"(import \\\"\\\" \\\"\\\" (table $foo 1 funcref))\"\n  \"(table $foo 1 funcref)\")\n  \"duplicate table\")\n(assert_malformed (module quote\n  \"(import \\\"\\\" \\\"\\\" (table $foo 1 funcref))\"\n  \"(import \\\"\\\" \\\"\\\" (table $foo 1 funcref))\")\n  \"duplicate table\")\n"
  },
  {
    "path": "test/core/table_copy.wast",
    "content": ";;\n;; Generated by ../meta/generate_table_copy.js\n;; DO NOT EDIT THIS FILE.  CHANGE THE SOURCE AND REGENERATE.\n;;\n\n(module\n  (func (export \"ef0\") (result i32) (i32.const 0))\n  (func (export \"ef1\") (result i32) (i32.const 1))\n  (func (export \"ef2\") (result i32) (i32.const 2))\n  (func (export \"ef3\") (result i32) (i32.const 3))\n  (func (export \"ef4\") (result i32) (i32.const 4))\n)\n(register \"a\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t1) (i32.const 3) func 1 3 1 4)\n  (elem (table $t1) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (nop))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"check_t0\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"check_t0\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"check_t0\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 16)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 11)) (i32.const 6))\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 7))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t1) (i32.const 3) func 1 3 1 4)\n  (elem (table $t1) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 13) (i32.const 2) (i32.const 3)))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"check_t0\" (i32.const 13)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 14)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 15)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 16)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 11)) (i32.const 6))\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 7))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t1) (i32.const 3) func 1 3 1 4)\n  (elem (table $t1) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 25) (i32.const 15) (i32.const 2)))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"check_t0\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"check_t0\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"check_t0\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 16)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 25)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 26)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 11)) (i32.const 6))\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 7))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t1) (i32.const 3) func 1 3 1 4)\n  (elem (table $t1) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 13) (i32.const 25) (i32.const 3)))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 12)) (i32.const 7))\n(assert_trap (invoke \"check_t0\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 15)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 16)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 11)) (i32.const 6))\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 7))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t1) (i32.const 3) func 1 3 1 4)\n  (elem (table $t1) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 20) (i32.const 22) (i32.const 4)))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"check_t0\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"check_t0\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"check_t0\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 16)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 11)) (i32.const 6))\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 7))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t1) (i32.const 3) func 1 3 1 4)\n  (elem (table $t1) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 25) (i32.const 1) (i32.const 3)))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"check_t0\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"check_t0\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"check_t0\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 16)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 25)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 26)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 27)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 11)) (i32.const 6))\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 7))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t1) (i32.const 3) func 1 3 1 4)\n  (elem (table $t1) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 10) (i32.const 12) (i32.const 7)))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 10)) (i32.const 7))\n(assert_return (invoke \"check_t0\" (i32.const 11)) (i32.const 5))\n(assert_return (invoke \"check_t0\" (i32.const 12)) (i32.const 2))\n(assert_return (invoke \"check_t0\" (i32.const 13)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 14)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 15)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 11)) (i32.const 6))\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 7))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t1) (i32.const 3) func 1 3 1 4)\n  (elem (table $t1) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 12) (i32.const 10) (i32.const 7)))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 13)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 14)) (i32.const 7))\n(assert_return (invoke \"check_t0\" (i32.const 15)) (i32.const 5))\n(assert_return (invoke \"check_t0\" (i32.const 16)) (i32.const 2))\n(assert_return (invoke \"check_t0\" (i32.const 17)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 18)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 11)) (i32.const 6))\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 7))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t1) (i32.const 3) func 1 3 1 4)\n  (elem (table $t1) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.copy $t1 $t0 (i32.const 10) (i32.const 0) (i32.const 20)))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"check_t0\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"check_t0\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"check_t0\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 16)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 4))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 1))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 22)) (i32.const 7))\n(assert_return (invoke \"check_t1\" (i32.const 23)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 24)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 25)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 26)) (i32.const 6))\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t0) (i32.const 3) func 1 3 1 4)\n  (elem (table $t0) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (nop))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"check_t0\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"check_t0\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"check_t0\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 16)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 11)) (i32.const 6))\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 7))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t0) (i32.const 3) func 1 3 1 4)\n  (elem (table $t0) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.copy $t1 $t1 (i32.const 13) (i32.const 2) (i32.const 3)))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"check_t0\" (i32.const 13)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 14)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 15)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 16)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 11)) (i32.const 6))\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 7))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t0) (i32.const 3) func 1 3 1 4)\n  (elem (table $t0) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.copy $t1 $t1 (i32.const 25) (i32.const 15) (i32.const 2)))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"check_t0\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"check_t0\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"check_t0\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 16)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 25)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 26)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 11)) (i32.const 6))\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 7))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t0) (i32.const 3) func 1 3 1 4)\n  (elem (table $t0) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.copy $t1 $t1 (i32.const 13) (i32.const 25) (i32.const 3)))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 12)) (i32.const 7))\n(assert_trap (invoke \"check_t0\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 15)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 16)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 11)) (i32.const 6))\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 7))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t0) (i32.const 3) func 1 3 1 4)\n  (elem (table $t0) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.copy $t1 $t1 (i32.const 20) (i32.const 22) (i32.const 4)))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"check_t0\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"check_t0\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"check_t0\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 16)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 11)) (i32.const 6))\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 7))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t0) (i32.const 3) func 1 3 1 4)\n  (elem (table $t0) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.copy $t1 $t1 (i32.const 25) (i32.const 1) (i32.const 3)))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"check_t0\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"check_t0\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"check_t0\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 16)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 25)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 26)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 27)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 11)) (i32.const 6))\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 7))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t0) (i32.const 3) func 1 3 1 4)\n  (elem (table $t0) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.copy $t1 $t1 (i32.const 10) (i32.const 12) (i32.const 7)))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 10)) (i32.const 7))\n(assert_return (invoke \"check_t0\" (i32.const 11)) (i32.const 5))\n(assert_return (invoke \"check_t0\" (i32.const 12)) (i32.const 2))\n(assert_return (invoke \"check_t0\" (i32.const 13)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 14)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 15)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 11)) (i32.const 6))\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 7))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t0) (i32.const 3) func 1 3 1 4)\n  (elem (table $t0) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.copy $t1 $t1 (i32.const 12) (i32.const 10) (i32.const 7)))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 13)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 14)) (i32.const 7))\n(assert_return (invoke \"check_t0\" (i32.const 15)) (i32.const 5))\n(assert_return (invoke \"check_t0\" (i32.const 16)) (i32.const 2))\n(assert_return (invoke \"check_t0\" (i32.const 17)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 18)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 11)) (i32.const 6))\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 7))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t0) (i32.const 3) func 1 3 1 4)\n  (elem (table $t0) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.copy $t0 $t1 (i32.const 10) (i32.const 0) (i32.const 20)))\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check_t0\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t0\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check_t0\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check_t0\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check_t0\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"check_t0\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"check_t0\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"check_t0\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"check_t0\" (i32.const 16)) (i32.const 6))\n(assert_trap (invoke \"check_t0\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t0\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 2)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 4)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 5)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 6)) (i32.const 4))\n(assert_trap (invoke \"check_t1\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 12)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 13)) (i32.const 1))\n(assert_return (invoke \"check_t1\" (i32.const 14)) (i32.const 4))\n(assert_return (invoke \"check_t1\" (i32.const 15)) (i32.const 1))\n(assert_trap (invoke \"check_t1\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 21)) \"uninitialized element\")\n(assert_return (invoke \"check_t1\" (i32.const 22)) (i32.const 7))\n(assert_return (invoke \"check_t1\" (i32.const 23)) (i32.const 5))\n(assert_return (invoke \"check_t1\" (i32.const 24)) (i32.const 2))\n(assert_return (invoke \"check_t1\" (i32.const 25)) (i32.const 3))\n(assert_return (invoke \"check_t1\" (i32.const 26)) (i32.const 6))\n(assert_trap (invoke \"check_t1\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check_t1\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 28) (i32.const 1) (i32.const 3))\n    ))\n\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 0xFFFFFFFE) (i32.const 1) (i32.const 2))\n    ))\n\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 15) (i32.const 25) (i32.const 6))\n    ))\n\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 15) (i32.const 0xFFFFFFFE) (i32.const 2))\n    ))\n\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 15) (i32.const 25) (i32.const 0))\n    ))\n\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 30) (i32.const 15) (i32.const 0))\n    ))\n\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 31) (i32.const 15) (i32.const 0))\n    ))\n\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 15) (i32.const 30) (i32.const 0))\n    ))\n\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 15) (i32.const 31) (i32.const 0))\n    ))\n\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 30) (i32.const 30) (i32.const 0))\n    ))\n\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t0 $t0 (i32.const 31) (i32.const 31) (i32.const 0))\n    ))\n\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t1 $t0 (i32.const 28) (i32.const 1) (i32.const 3))\n    ))\n\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t1 $t0 (i32.const 0xFFFFFFFE) (i32.const 1) (i32.const 2))\n    ))\n\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t1 $t0 (i32.const 15) (i32.const 25) (i32.const 6))\n    ))\n\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t1 $t0 (i32.const 15) (i32.const 0xFFFFFFFE) (i32.const 2))\n    ))\n\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t1 $t0 (i32.const 15) (i32.const 25) (i32.const 0))\n    ))\n\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t1 $t0 (i32.const 30) (i32.const 15) (i32.const 0))\n    ))\n\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t1 $t0 (i32.const 31) (i32.const 15) (i32.const 0))\n    ))\n\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t1 $t0 (i32.const 15) (i32.const 30) (i32.const 0))\n    ))\n\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t1 $t0 (i32.const 15) (i32.const 31) (i32.const 0))\n    ))\n\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t1 $t0 (i32.const 30) (i32.const 30) (i32.const 0))\n    ))\n\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.copy $t1 $t0 (i32.const 31) (i32.const 31) (i32.const 0))\n    ))\n\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (type (func (result i32)))\n  (table 32 64 funcref)\n  (elem (i32.const 0)\n         $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7)\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 24) (i32.const 0) (i32.const 16))\n             \"out of bounds table access\")\n(assert_return (invoke \"test\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"test\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"test\" (i32.const 2)) (i32.const 2))\n(assert_return (invoke \"test\" (i32.const 3)) (i32.const 3))\n(assert_return (invoke \"test\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"test\" (i32.const 5)) (i32.const 5))\n(assert_return (invoke \"test\" (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"test\" (i32.const 7)) (i32.const 7))\n(assert_trap (invoke \"test\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 15)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 30)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 31)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))\n  (table 32 64 funcref)\n  (elem (i32.const 0)\n         $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8)\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 23) (i32.const 0) (i32.const 15))\n             \"out of bounds table access\")\n(assert_return (invoke \"test\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"test\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"test\" (i32.const 2)) (i32.const 2))\n(assert_return (invoke \"test\" (i32.const 3)) (i32.const 3))\n(assert_return (invoke \"test\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"test\" (i32.const 5)) (i32.const 5))\n(assert_return (invoke \"test\" (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"test\" (i32.const 7)) (i32.const 7))\n(assert_return (invoke \"test\" (i32.const 8)) (i32.const 8))\n(assert_trap (invoke \"test\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 15)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 30)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 31)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))\n  (table 32 64 funcref)\n  (elem (i32.const 24)\n         $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7)\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 0) (i32.const 24) (i32.const 16))\n             \"out of bounds table access\")\n(assert_trap (invoke \"test\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 2)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 3)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 4)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 5)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 15)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 23)) \"uninitialized element\")\n(assert_return (invoke \"test\" (i32.const 24)) (i32.const 0))\n(assert_return (invoke \"test\" (i32.const 25)) (i32.const 1))\n(assert_return (invoke \"test\" (i32.const 26)) (i32.const 2))\n(assert_return (invoke \"test\" (i32.const 27)) (i32.const 3))\n(assert_return (invoke \"test\" (i32.const 28)) (i32.const 4))\n(assert_return (invoke \"test\" (i32.const 29)) (i32.const 5))\n(assert_return (invoke \"test\" (i32.const 30)) (i32.const 6))\n(assert_return (invoke \"test\" (i32.const 31)) (i32.const 7))\n\n(module\n  (type (func (result i32)))\n  (table 32 64 funcref)\n  (elem (i32.const 23)\n         $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8)\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 0) (i32.const 23) (i32.const 15))\n             \"out of bounds table access\")\n(assert_trap (invoke \"test\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 2)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 3)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 4)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 5)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 15)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 22)) \"uninitialized element\")\n(assert_return (invoke \"test\" (i32.const 23)) (i32.const 0))\n(assert_return (invoke \"test\" (i32.const 24)) (i32.const 1))\n(assert_return (invoke \"test\" (i32.const 25)) (i32.const 2))\n(assert_return (invoke \"test\" (i32.const 26)) (i32.const 3))\n(assert_return (invoke \"test\" (i32.const 27)) (i32.const 4))\n(assert_return (invoke \"test\" (i32.const 28)) (i32.const 5))\n(assert_return (invoke \"test\" (i32.const 29)) (i32.const 6))\n(assert_return (invoke \"test\" (i32.const 30)) (i32.const 7))\n(assert_return (invoke \"test\" (i32.const 31)) (i32.const 8))\n\n(module\n  (type (func (result i32)))\n  (table 32 64 funcref)\n  (elem (i32.const 11)\n         $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7)\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 24) (i32.const 11) (i32.const 16))\n             \"out of bounds table access\")\n(assert_trap (invoke \"test\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 2)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 3)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 4)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 5)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 10)) \"uninitialized element\")\n(assert_return (invoke \"test\" (i32.const 11)) (i32.const 0))\n(assert_return (invoke \"test\" (i32.const 12)) (i32.const 1))\n(assert_return (invoke \"test\" (i32.const 13)) (i32.const 2))\n(assert_return (invoke \"test\" (i32.const 14)) (i32.const 3))\n(assert_return (invoke \"test\" (i32.const 15)) (i32.const 4))\n(assert_return (invoke \"test\" (i32.const 16)) (i32.const 5))\n(assert_return (invoke \"test\" (i32.const 17)) (i32.const 6))\n(assert_return (invoke \"test\" (i32.const 18)) (i32.const 7))\n(assert_trap (invoke \"test\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 30)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 31)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))\n  (table 32 64 funcref)\n  (elem (i32.const 24)\n         $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7)\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 11) (i32.const 24) (i32.const 16))\n             \"out of bounds table access\")\n(assert_trap (invoke \"test\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 2)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 3)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 4)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 5)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 15)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 23)) \"uninitialized element\")\n(assert_return (invoke \"test\" (i32.const 24)) (i32.const 0))\n(assert_return (invoke \"test\" (i32.const 25)) (i32.const 1))\n(assert_return (invoke \"test\" (i32.const 26)) (i32.const 2))\n(assert_return (invoke \"test\" (i32.const 27)) (i32.const 3))\n(assert_return (invoke \"test\" (i32.const 28)) (i32.const 4))\n(assert_return (invoke \"test\" (i32.const 29)) (i32.const 5))\n(assert_return (invoke \"test\" (i32.const 30)) (i32.const 6))\n(assert_return (invoke \"test\" (i32.const 31)) (i32.const 7))\n\n(module\n  (type (func (result i32)))\n  (table 32 64 funcref)\n  (elem (i32.const 21)\n         $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7)\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 24) (i32.const 21) (i32.const 16))\n             \"out of bounds table access\")\n(assert_trap (invoke \"test\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 2)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 3)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 4)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 5)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 15)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 20)) \"uninitialized element\")\n(assert_return (invoke \"test\" (i32.const 21)) (i32.const 0))\n(assert_return (invoke \"test\" (i32.const 22)) (i32.const 1))\n(assert_return (invoke \"test\" (i32.const 23)) (i32.const 2))\n(assert_return (invoke \"test\" (i32.const 24)) (i32.const 3))\n(assert_return (invoke \"test\" (i32.const 25)) (i32.const 4))\n(assert_return (invoke \"test\" (i32.const 26)) (i32.const 5))\n(assert_return (invoke \"test\" (i32.const 27)) (i32.const 6))\n(assert_return (invoke \"test\" (i32.const 28)) (i32.const 7))\n(assert_trap (invoke \"test\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 30)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 31)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))\n  (table 32 64 funcref)\n  (elem (i32.const 24)\n         $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7)\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 21) (i32.const 24) (i32.const 16))\n             \"out of bounds table access\")\n(assert_trap (invoke \"test\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 2)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 3)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 4)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 5)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 15)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 23)) \"uninitialized element\")\n(assert_return (invoke \"test\" (i32.const 24)) (i32.const 0))\n(assert_return (invoke \"test\" (i32.const 25)) (i32.const 1))\n(assert_return (invoke \"test\" (i32.const 26)) (i32.const 2))\n(assert_return (invoke \"test\" (i32.const 27)) (i32.const 3))\n(assert_return (invoke \"test\" (i32.const 28)) (i32.const 4))\n(assert_return (invoke \"test\" (i32.const 29)) (i32.const 5))\n(assert_return (invoke \"test\" (i32.const 30)) (i32.const 6))\n(assert_return (invoke \"test\" (i32.const 31)) (i32.const 7))\n\n(module\n  (type (func (result i32)))\n  (table 32 64 funcref)\n  (elem (i32.const 21)\n         $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10)\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 21) (i32.const 21) (i32.const 16))\n             \"out of bounds table access\")\n(assert_trap (invoke \"test\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 2)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 3)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 4)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 5)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 15)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 20)) \"uninitialized element\")\n(assert_return (invoke \"test\" (i32.const 21)) (i32.const 0))\n(assert_return (invoke \"test\" (i32.const 22)) (i32.const 1))\n(assert_return (invoke \"test\" (i32.const 23)) (i32.const 2))\n(assert_return (invoke \"test\" (i32.const 24)) (i32.const 3))\n(assert_return (invoke \"test\" (i32.const 25)) (i32.const 4))\n(assert_return (invoke \"test\" (i32.const 26)) (i32.const 5))\n(assert_return (invoke \"test\" (i32.const 27)) (i32.const 6))\n(assert_return (invoke \"test\" (i32.const 28)) (i32.const 7))\n(assert_return (invoke \"test\" (i32.const 29)) (i32.const 8))\n(assert_return (invoke \"test\" (i32.const 30)) (i32.const 9))\n(assert_return (invoke \"test\" (i32.const 31)) (i32.const 10))\n\n(module\n  (type (func (result i32)))\n  (table 128 128 funcref)\n  (elem (i32.const 112)\n         $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15)\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 0) (i32.const 112) (i32.const 4294967264))\n             \"out of bounds table access\")\n(assert_trap (invoke \"test\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 2)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 3)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 4)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 5)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 15)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 30)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 31)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 32)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 33)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 34)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 35)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 36)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 37)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 38)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 39)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 40)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 41)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 42)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 43)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 44)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 45)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 46)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 47)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 48)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 49)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 50)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 51)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 52)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 53)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 54)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 55)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 56)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 57)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 58)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 59)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 60)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 61)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 62)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 63)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 64)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 65)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 66)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 67)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 68)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 69)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 70)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 71)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 72)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 73)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 74)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 75)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 76)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 77)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 78)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 79)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 80)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 81)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 82)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 83)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 84)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 85)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 86)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 87)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 88)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 89)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 90)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 91)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 92)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 93)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 94)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 95)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 96)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 97)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 98)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 99)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 100)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 101)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 102)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 103)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 104)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 105)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 106)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 107)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 108)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 109)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 110)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 111)) \"uninitialized element\")\n(assert_return (invoke \"test\" (i32.const 112)) (i32.const 0))\n(assert_return (invoke \"test\" (i32.const 113)) (i32.const 1))\n(assert_return (invoke \"test\" (i32.const 114)) (i32.const 2))\n(assert_return (invoke \"test\" (i32.const 115)) (i32.const 3))\n(assert_return (invoke \"test\" (i32.const 116)) (i32.const 4))\n(assert_return (invoke \"test\" (i32.const 117)) (i32.const 5))\n(assert_return (invoke \"test\" (i32.const 118)) (i32.const 6))\n(assert_return (invoke \"test\" (i32.const 119)) (i32.const 7))\n(assert_return (invoke \"test\" (i32.const 120)) (i32.const 8))\n(assert_return (invoke \"test\" (i32.const 121)) (i32.const 9))\n(assert_return (invoke \"test\" (i32.const 122)) (i32.const 10))\n(assert_return (invoke \"test\" (i32.const 123)) (i32.const 11))\n(assert_return (invoke \"test\" (i32.const 124)) (i32.const 12))\n(assert_return (invoke \"test\" (i32.const 125)) (i32.const 13))\n(assert_return (invoke \"test\" (i32.const 126)) (i32.const 14))\n(assert_return (invoke \"test\" (i32.const 127)) (i32.const 15))\n\n(module\n  (type (func (result i32)))\n  (table 128 128 funcref)\n  (elem (i32.const 0)\n         $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15)\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))\n\n(assert_trap (invoke \"run\" (i32.const 112) (i32.const 0) (i32.const 4294967264))\n             \"out of bounds table access\")\n(assert_return (invoke \"test\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"test\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"test\" (i32.const 2)) (i32.const 2))\n(assert_return (invoke \"test\" (i32.const 3)) (i32.const 3))\n(assert_return (invoke \"test\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"test\" (i32.const 5)) (i32.const 5))\n(assert_return (invoke \"test\" (i32.const 6)) (i32.const 6))\n(assert_return (invoke \"test\" (i32.const 7)) (i32.const 7))\n(assert_return (invoke \"test\" (i32.const 8)) (i32.const 8))\n(assert_return (invoke \"test\" (i32.const 9)) (i32.const 9))\n(assert_return (invoke \"test\" (i32.const 10)) (i32.const 10))\n(assert_return (invoke \"test\" (i32.const 11)) (i32.const 11))\n(assert_return (invoke \"test\" (i32.const 12)) (i32.const 12))\n(assert_return (invoke \"test\" (i32.const 13)) (i32.const 13))\n(assert_return (invoke \"test\" (i32.const 14)) (i32.const 14))\n(assert_return (invoke \"test\" (i32.const 15)) (i32.const 15))\n(assert_trap (invoke \"test\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 30)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 31)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 32)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 33)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 34)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 35)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 36)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 37)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 38)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 39)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 40)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 41)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 42)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 43)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 44)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 45)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 46)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 47)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 48)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 49)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 50)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 51)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 52)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 53)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 54)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 55)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 56)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 57)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 58)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 59)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 60)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 61)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 62)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 63)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 64)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 65)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 66)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 67)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 68)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 69)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 70)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 71)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 72)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 73)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 74)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 75)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 76)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 77)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 78)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 79)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 80)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 81)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 82)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 83)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 84)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 85)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 86)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 87)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 88)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 89)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 90)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 91)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 92)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 93)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 94)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 95)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 96)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 97)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 98)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 99)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 100)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 101)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 102)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 103)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 104)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 105)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 106)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 107)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 108)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 109)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 110)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 111)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 112)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 113)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 114)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 115)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 116)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 117)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 118)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 119)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 120)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 121)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 122)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 123)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 124)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 125)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 126)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 127)) \"uninitialized element\")\n"
  },
  {
    "path": "test/core/table_fill.wast",
    "content": "(module\n  (table $t 10 externref)\n\n  (func (export \"fill\") (param $i i32) (param $r externref) (param $n i32)\n    (table.fill $t (local.get $i) (local.get $r) (local.get $n))\n  )\n\n  (func (export \"get\") (param $i i32) (result externref)\n    (table.get $t (local.get $i))\n  )\n)\n\n(assert_return (invoke \"get\" (i32.const 1)) (ref.null extern))\n(assert_return (invoke \"get\" (i32.const 2)) (ref.null extern))\n(assert_return (invoke \"get\" (i32.const 3)) (ref.null extern))\n(assert_return (invoke \"get\" (i32.const 4)) (ref.null extern))\n(assert_return (invoke \"get\" (i32.const 5)) (ref.null extern))\n\n(assert_return (invoke \"fill\" (i32.const 2) (ref.extern 1) (i32.const 3)))\n(assert_return (invoke \"get\" (i32.const 1)) (ref.null extern))\n(assert_return (invoke \"get\" (i32.const 2)) (ref.extern 1))\n(assert_return (invoke \"get\" (i32.const 3)) (ref.extern 1))\n(assert_return (invoke \"get\" (i32.const 4)) (ref.extern 1))\n(assert_return (invoke \"get\" (i32.const 5)) (ref.null extern))\n\n(assert_return (invoke \"fill\" (i32.const 4) (ref.extern 2) (i32.const 2)))\n(assert_return (invoke \"get\" (i32.const 3)) (ref.extern 1))\n(assert_return (invoke \"get\" (i32.const 4)) (ref.extern 2))\n(assert_return (invoke \"get\" (i32.const 5)) (ref.extern 2))\n(assert_return (invoke \"get\" (i32.const 6)) (ref.null extern))\n\n(assert_return (invoke \"fill\" (i32.const 4) (ref.extern 3) (i32.const 0)))\n(assert_return (invoke \"get\" (i32.const 3)) (ref.extern 1))\n(assert_return (invoke \"get\" (i32.const 4)) (ref.extern 2))\n(assert_return (invoke \"get\" (i32.const 5)) (ref.extern 2))\n\n(assert_return (invoke \"fill\" (i32.const 8) (ref.extern 4) (i32.const 2)))\n(assert_return (invoke \"get\" (i32.const 7)) (ref.null extern))\n(assert_return (invoke \"get\" (i32.const 8)) (ref.extern 4))\n(assert_return (invoke \"get\" (i32.const 9)) (ref.extern 4))\n\n(assert_return (invoke \"fill\" (i32.const 9) (ref.null extern) (i32.const 1)))\n(assert_return (invoke \"get\" (i32.const 8)) (ref.extern 4))\n(assert_return (invoke \"get\" (i32.const 9)) (ref.null extern))\n\n(assert_return (invoke \"fill\" (i32.const 10) (ref.extern 5) (i32.const 0)))\n(assert_return (invoke \"get\" (i32.const 9)) (ref.null extern))\n\n(assert_trap\n  (invoke \"fill\" (i32.const 8) (ref.extern 6) (i32.const 3))\n  \"out of bounds table access\"\n)\n(assert_return (invoke \"get\" (i32.const 7)) (ref.null extern))\n(assert_return (invoke \"get\" (i32.const 8)) (ref.extern 4))\n(assert_return (invoke \"get\" (i32.const 9)) (ref.null extern))\n\n(assert_trap\n  (invoke \"fill\" (i32.const 11) (ref.null extern) (i32.const 0))\n  \"out of bounds table access\"\n)\n\n(assert_trap\n  (invoke \"fill\" (i32.const 11) (ref.null extern) (i32.const 10))\n  \"out of bounds table access\"\n)\n\n\n;; Type errors\n\n(assert_invalid\n  (module\n    (table $t 10 externref)\n    (func $type-index-value-length-empty-vs-i32-i32\n      (table.fill $t)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 10 externref)\n    (func $type-index-empty-vs-i32\n      (table.fill $t (ref.null extern) (i32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 10 externref)\n    (func $type-value-empty-vs\n      (table.fill $t (i32.const 1) (i32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 10 externref)\n    (func $type-length-empty-vs-i32\n      (table.fill $t (i32.const 1) (ref.null extern))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 0 externref)\n    (func $type-index-f32-vs-i32\n      (table.fill $t (f32.const 1) (ref.null extern) (i32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 0 funcref)\n    (func $type-value-vs-funcref (param $r externref)\n      (table.fill $t (i32.const 1) (local.get $r) (i32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 0 externref)\n    (func $type-length-f32-vs-i32\n      (table.fill $t (i32.const 1) (ref.null extern) (f32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (table $t1 1 externref)\n    (table $t2 1 funcref)\n    (func $type-value-externref-vs-funcref-multi (param $r externref)\n      (table.fill $t2 (i32.const 0) (local.get $r) (i32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (table $t 1 externref)\n    (func $type-result-empty-vs-num (result i32)\n      (table.fill $t (i32.const 0) (ref.null extern) (i32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n"
  },
  {
    "path": "test/core/table_get.wast",
    "content": "(module\n  (table $t2 2 externref)\n  (table $t3 3 funcref)\n  (elem (table $t3) (i32.const 1) func $dummy)\n  (func $dummy)\n\n  (func (export \"init\") (param $r externref)\n    (table.set $t2 (i32.const 1) (local.get $r))\n    (table.set $t3 (i32.const 2) (table.get $t3 (i32.const 1)))\n  )\n\n  (func (export \"get-externref\") (param $i i32) (result externref)\n    (table.get $t2 (local.get $i))\n  )\n  (func $f3 (export \"get-funcref\") (param $i i32) (result funcref)\n    (table.get $t3 (local.get $i))\n  )\n\n  (func (export \"is_null-funcref\") (param $i i32) (result i32)\n    (ref.is_null (call $f3 (local.get $i)))\n  )\n)\n\n(invoke \"init\" (ref.extern 1))\n\n(assert_return (invoke \"get-externref\" (i32.const 0)) (ref.null extern))\n(assert_return (invoke \"get-externref\" (i32.const 1)) (ref.extern 1))\n\n(assert_return (invoke \"get-funcref\" (i32.const 0)) (ref.null func))\n(assert_return (invoke \"is_null-funcref\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"is_null-funcref\" (i32.const 2)) (i32.const 0))\n\n(assert_trap (invoke \"get-externref\" (i32.const 2)) \"out of bounds table access\")\n(assert_trap (invoke \"get-funcref\" (i32.const 3)) \"out of bounds table access\")\n(assert_trap (invoke \"get-externref\" (i32.const -1)) \"out of bounds table access\")\n(assert_trap (invoke \"get-funcref\" (i32.const -1)) \"out of bounds table access\")\n\n\n;; Type errors\n\n(assert_invalid\n  (module\n    (table $t 10 externref)\n    (func $type-index-empty-vs-i32 (result externref)\n      (table.get $t)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 10 externref)\n    (func $type-index-f32-vs-i32 (result externref)\n      (table.get $t (f32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (table $t 10 externref)\n    (func $type-result-externref-vs-empty\n      (table.get $t (i32.const 0))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 10 externref)\n    (func $type-result-externref-vs-funcref (result funcref)\n      (table.get $t (i32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (table $t1 1 funcref)\n    (table $t2 1 externref)\n    (func $type-result-externref-vs-funcref-multi (result funcref)\n      (table.get $t2 (i32.const 0))\n    )\n  )\n  \"type mismatch\"\n)\n"
  },
  {
    "path": "test/core/table_grow.wast",
    "content": "(module\n  (table $t 0 externref)\n\n  (func (export \"get\") (param $i i32) (result externref) (table.get $t (local.get $i)))\n  (func (export \"set\") (param $i i32) (param $r externref) (table.set $t (local.get $i) (local.get $r)))\n\n  (func (export \"grow\") (param $sz i32) (param $init externref) (result i32)\n    (table.grow $t (local.get $init) (local.get $sz))\n  )\n  (func (export \"size\") (result i32) (table.size $t))\n)\n\n(assert_return (invoke \"size\") (i32.const 0))\n(assert_trap (invoke \"set\" (i32.const 0) (ref.extern 2)) \"out of bounds table access\")\n(assert_trap (invoke \"get\" (i32.const 0)) \"out of bounds table access\")\n\n(assert_return (invoke \"grow\" (i32.const 1) (ref.null extern)) (i32.const 0))\n(assert_return (invoke \"size\") (i32.const 1))\n(assert_return (invoke \"get\" (i32.const 0)) (ref.null extern))\n(assert_return (invoke \"set\" (i32.const 0) (ref.extern 2)))\n(assert_return (invoke \"get\" (i32.const 0)) (ref.extern 2))\n(assert_trap (invoke \"set\" (i32.const 1) (ref.extern 2)) \"out of bounds table access\")\n(assert_trap (invoke \"get\" (i32.const 1)) \"out of bounds table access\")\n\n(assert_return (invoke \"grow\" (i32.const 4) (ref.extern 3)) (i32.const 1))\n(assert_return (invoke \"size\") (i32.const 5))\n(assert_return (invoke \"get\" (i32.const 0)) (ref.extern 2))\n(assert_return (invoke \"set\" (i32.const 0) (ref.extern 2)))\n(assert_return (invoke \"get\" (i32.const 0)) (ref.extern 2))\n(assert_return (invoke \"get\" (i32.const 1)) (ref.extern 3))\n(assert_return (invoke \"get\" (i32.const 4)) (ref.extern 3))\n(assert_return (invoke \"set\" (i32.const 4) (ref.extern 4)))\n(assert_return (invoke \"get\" (i32.const 4)) (ref.extern 4))\n(assert_trap (invoke \"set\" (i32.const 5) (ref.extern 2)) \"out of bounds table access\")\n(assert_trap (invoke \"get\" (i32.const 5)) \"out of bounds table access\")\n\n\n;; Reject growing to size outside i32 value range\n(module\n  (table $t 0x10 funcref)\n  (elem declare func $f)\n  (func $f (export \"grow\") (result i32)\n    (table.grow $t (ref.func $f) (i32.const 0xffff_fff0))\n  )\n)\n\n(assert_return (invoke \"grow\") (i32.const -1))\n\n\n(module\n  (table $t 0 externref)\n  (func (export \"grow\") (param i32) (result i32)\n    (table.grow $t (ref.null extern) (local.get 0))\n  )\n)\n\n(assert_return (invoke \"grow\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"grow\" (i32.const 0)) (i32.const 1))\n(assert_return (invoke \"grow\" (i32.const 2)) (i32.const 1))\n(assert_return (invoke \"grow\" (i32.const 800)) (i32.const 3))\n\n\n(module\n  (table $t 0 10 externref)\n  (func (export \"grow\") (param i32) (result i32)\n    (table.grow $t (ref.null extern) (local.get 0))\n  )\n)\n\n(assert_return (invoke \"grow\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const 0))\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const 1))\n(assert_return (invoke \"grow\" (i32.const 2)) (i32.const 2))\n(assert_return (invoke \"grow\" (i32.const 6)) (i32.const 4))\n(assert_return (invoke \"grow\" (i32.const 0)) (i32.const 10))\n(assert_return (invoke \"grow\" (i32.const 1)) (i32.const -1))\n(assert_return (invoke \"grow\" (i32.const 0x10000)) (i32.const -1))\n\n\n(module\n  (table $t 10 funcref)\n  (func (export \"grow\") (param i32) (result i32)\n    (table.grow $t (ref.null func) (local.get 0))\n  )\n  (elem declare func 1)\n  (func (export \"check-table-null\") (param i32 i32) (result funcref)\n    (local funcref)\n    (local.set 2 (ref.func 1))\n    (block\n      (loop\n        (local.set 2 (table.get $t (local.get 0)))\n        (br_if 1 (i32.eqz (ref.is_null (local.get 2))))\n        (br_if 1 (i32.ge_u (local.get 0) (local.get 1)))\n        (local.set 0 (i32.add (local.get 0) (i32.const 1)))\n        (br_if 0 (i32.le_u (local.get 0) (local.get 1)))\n      )\n    )\n    (local.get 2)\n  )\n)\n\n(assert_return (invoke \"check-table-null\" (i32.const 0) (i32.const 9)) (ref.null func))\n(assert_return (invoke \"grow\" (i32.const 10)) (i32.const 10))\n(assert_return (invoke \"check-table-null\" (i32.const 0) (i32.const 19)) (ref.null func))\n\n\n;; Type errors\n\n(assert_invalid\n  (module\n    (table $t 0 externref)\n    (func $type-init-size-empty-vs-i32-externref (result i32)\n      (table.grow $t)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 0 externref)\n    (func $type-size-empty-vs-i32 (result i32)\n      (table.grow $t (ref.null extern))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 0 externref)\n    (func $type-init-empty-vs-externref (result i32)\n      (table.grow $t (i32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 0 externref)\n    (func $type-size-f32-vs-i32 (result i32)\n      (table.grow $t (ref.null extern) (f32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 0 funcref)\n    (func $type-init-externref-vs-funcref (param $r externref) (result i32)\n      (table.grow $t (local.get $r) (i32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (table $t 1 externref)\n    (func $type-result-i32-vs-empty\n      (table.grow $t (ref.null extern) (i32.const 0))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 1 externref)\n    (func $type-result-i32-vs-f32 (result f32)\n      (table.grow $t (ref.null extern) (i32.const 0))\n    )\n  )\n  \"type mismatch\"\n)\n"
  },
  {
    "path": "test/core/table_init.wast",
    "content": ";;\n;; Generated by ../meta/generate_table_init.js\n;; DO NOT EDIT THIS FILE.  CHANGE THE SOURCE AND REGENERATE.\n;;\n\n(module\n  (func (export \"ef0\") (result i32) (i32.const 0))\n  (func (export \"ef1\") (result i32) (i32.const 1))\n  (func (export \"ef2\") (result i32) (i32.const 2))\n  (func (export \"ef3\") (result i32) (i32.const 3))\n  (func (export \"ef4\") (result i32) (i32.const 4))\n)\n(register \"a\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.init $t0 1 (i32.const 7) (i32.const 0) (i32.const 4)))\n  (func (export \"check\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check\" (i32.const 6)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 7)) (i32.const 2))\n(assert_return (invoke \"check\" (i32.const 8)) (i32.const 7))\n(assert_return (invoke \"check\" (i32.const 9)) (i32.const 1))\n(assert_return (invoke \"check\" (i32.const 10)) (i32.const 8))\n(assert_trap (invoke \"check\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"check\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"check\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"check\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"check\" (i32.const 16)) (i32.const 6))\n(assert_trap (invoke \"check\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.init $t0 3 (i32.const 15) (i32.const 1) (i32.const 3)))\n  (func (export \"check\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"check\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"check\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"check\" (i32.const 15)) (i32.const 9))\n(assert_return (invoke \"check\" (i32.const 16)) (i32.const 2))\n(assert_return (invoke \"check\" (i32.const 17)) (i32.const 7))\n(assert_trap (invoke \"check\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.init $t0 1 (i32.const 7) (i32.const 0) (i32.const 4))\n         (elem.drop 1)\n         (table.init $t0 3 (i32.const 15) (i32.const 1) (i32.const 3))\n         (elem.drop 3)\n         (table.copy $t0 0 (i32.const 20) (i32.const 15) (i32.const 5))\n         (table.copy $t0 0 (i32.const 21) (i32.const 29) (i32.const 1))\n         (table.copy $t0 0 (i32.const 24) (i32.const 10) (i32.const 1))\n         (table.copy $t0 0 (i32.const 13) (i32.const 11) (i32.const 4))\n         (table.copy $t0 0 (i32.const 19) (i32.const 20) (i32.const 5)))\n  (func (export \"check\") (param i32) (result i32)\n    (call_indirect $t0 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check\" (i32.const 6)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 7)) (i32.const 2))\n(assert_return (invoke \"check\" (i32.const 8)) (i32.const 7))\n(assert_return (invoke \"check\" (i32.const 9)) (i32.const 1))\n(assert_return (invoke \"check\" (i32.const 10)) (i32.const 8))\n(assert_trap (invoke \"check\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 12)) (i32.const 7))\n(assert_trap (invoke \"check\" (i32.const 13)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 14)) (i32.const 7))\n(assert_return (invoke \"check\" (i32.const 15)) (i32.const 5))\n(assert_return (invoke \"check\" (i32.const 16)) (i32.const 2))\n(assert_return (invoke \"check\" (i32.const 17)) (i32.const 7))\n(assert_trap (invoke \"check\" (i32.const 18)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 19)) (i32.const 9))\n(assert_trap (invoke \"check\" (i32.const 20)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 21)) (i32.const 7))\n(assert_trap (invoke \"check\" (i32.const 22)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 23)) (i32.const 8))\n(assert_return (invoke \"check\" (i32.const 24)) (i32.const 8))\n(assert_trap (invoke \"check\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.init $t1 1 (i32.const 7) (i32.const 0) (i32.const 4)))\n  (func (export \"check\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check\" (i32.const 6)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 7)) (i32.const 2))\n(assert_return (invoke \"check\" (i32.const 8)) (i32.const 7))\n(assert_return (invoke \"check\" (i32.const 9)) (i32.const 1))\n(assert_return (invoke \"check\" (i32.const 10)) (i32.const 8))\n(assert_trap (invoke \"check\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"check\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"check\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"check\" (i32.const 15)) (i32.const 3))\n(assert_return (invoke \"check\" (i32.const 16)) (i32.const 6))\n(assert_trap (invoke \"check\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.init $t1 3 (i32.const 15) (i32.const 1) (i32.const 3)))\n  (func (export \"check\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 12)) (i32.const 7))\n(assert_return (invoke \"check\" (i32.const 13)) (i32.const 5))\n(assert_return (invoke \"check\" (i32.const 14)) (i32.const 2))\n(assert_return (invoke \"check\" (i32.const 15)) (i32.const 9))\n(assert_return (invoke \"check\" (i32.const 16)) (i32.const 2))\n(assert_return (invoke \"check\" (i32.const 17)) (i32.const 7))\n(assert_trap (invoke \"check\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 29)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    (table.init $t1 1 (i32.const 7) (i32.const 0) (i32.const 4))\n         (elem.drop 1)\n         (table.init $t1 3 (i32.const 15) (i32.const 1) (i32.const 3))\n         (elem.drop 3)\n         (table.copy $t1 1 (i32.const 20) (i32.const 15) (i32.const 5))\n         (table.copy $t1 1 (i32.const 21) (i32.const 29) (i32.const 1))\n         (table.copy $t1 1 (i32.const 24) (i32.const 10) (i32.const 1))\n         (table.copy $t1 1 (i32.const 13) (i32.const 11) (i32.const 4))\n         (table.copy $t1 1 (i32.const 19) (i32.const 20) (i32.const 5)))\n  (func (export \"check\") (param i32) (result i32)\n    (call_indirect $t1 (type 0) (local.get 0)))\n)\n\n(invoke \"test\")\n(assert_trap (invoke \"check\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 1)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 2)) (i32.const 3))\n(assert_return (invoke \"check\" (i32.const 3)) (i32.const 1))\n(assert_return (invoke \"check\" (i32.const 4)) (i32.const 4))\n(assert_return (invoke \"check\" (i32.const 5)) (i32.const 1))\n(assert_trap (invoke \"check\" (i32.const 6)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 7)) (i32.const 2))\n(assert_return (invoke \"check\" (i32.const 8)) (i32.const 7))\n(assert_return (invoke \"check\" (i32.const 9)) (i32.const 1))\n(assert_return (invoke \"check\" (i32.const 10)) (i32.const 8))\n(assert_trap (invoke \"check\" (i32.const 11)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 12)) (i32.const 7))\n(assert_trap (invoke \"check\" (i32.const 13)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 14)) (i32.const 7))\n(assert_return (invoke \"check\" (i32.const 15)) (i32.const 5))\n(assert_return (invoke \"check\" (i32.const 16)) (i32.const 2))\n(assert_return (invoke \"check\" (i32.const 17)) (i32.const 7))\n(assert_trap (invoke \"check\" (i32.const 18)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 19)) (i32.const 9))\n(assert_trap (invoke \"check\" (i32.const 20)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 21)) (i32.const 7))\n(assert_trap (invoke \"check\" (i32.const 22)) \"uninitialized element\")\n(assert_return (invoke \"check\" (i32.const 23)) (i32.const 8))\n(assert_return (invoke \"check\" (i32.const 24)) (i32.const 8))\n(assert_trap (invoke \"check\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"check\" (i32.const 29)) \"uninitialized element\")\n(assert_invalid\n  (module\n    (func (export \"test\")\n      (elem.drop 0)))\n  \"unknown elem segment 0\")\n\n(assert_invalid\n  (module\n    (func (export \"test\")\n      (table.init 0 (i32.const 12) (i32.const 1) (i32.const 1))))\n  \"unknown table 0\")\n\n(assert_invalid\n  (module\n    (elem funcref (ref.func 0))\n    (func (result i32) (i32.const 0))\n    (func (export \"test\")\n      (elem.drop 4)))\n  \"unknown elem segment 4\")\n\n(assert_invalid\n  (module\n    (elem funcref (ref.func 0))\n    (func (result i32) (i32.const 0))\n    (func (export \"test\")\n      (table.init 4 (i32.const 12) (i32.const 1) (i32.const 1))))\n  \"unknown table 0\")\n\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (elem.drop 2)\n    ))\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init 2 (i32.const 12) (i32.const 1) (i32.const 1))\n    ))\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init 1 (i32.const 12) (i32.const 1) (i32.const 1))\n    (table.init 1 (i32.const 21) (i32.const 1) (i32.const 1))))\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (elem.drop 1)\n    (elem.drop 1)))\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (elem.drop 1)\n    (table.init 1 (i32.const 12) (i32.const 1) (i32.const 1))))\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init 1 (i32.const 12) (i32.const 0) (i32.const 5))\n    ))\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init 1 (i32.const 12) (i32.const 2) (i32.const 3))\n    ))\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init $t0 1 (i32.const 28) (i32.const 1) (i32.const 3))\n    ))\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init $t0 1 (i32.const 12) (i32.const 4) (i32.const 0))\n    ))\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init $t0 1 (i32.const 12) (i32.const 5) (i32.const 0))\n    ))\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init $t0 1 (i32.const 30) (i32.const 2) (i32.const 0))\n    ))\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init $t0 1 (i32.const 31) (i32.const 2) (i32.const 0))\n    ))\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init $t0 1 (i32.const 30) (i32.const 4) (i32.const 0))\n    ))\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init $t0 1 (i32.const 31) (i32.const 5) (i32.const 0))\n    ))\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init $t1 1 (i32.const 26) (i32.const 1) (i32.const 3))\n    ))\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init $t1 1 (i32.const 12) (i32.const 4) (i32.const 0))\n    ))\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init $t1 1 (i32.const 12) (i32.const 5) (i32.const 0))\n    ))\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init $t1 1 (i32.const 28) (i32.const 2) (i32.const 0))\n    ))\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init $t1 1 (i32.const 29) (i32.const 2) (i32.const 0))\n    ))\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init $t1 1 (i32.const 28) (i32.const 4) (i32.const 0))\n    ))\n(invoke \"test\")\n\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 28 28 funcref)\n  (elem (table $t1) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t1) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    (table.init $t1 1 (i32.const 29) (i32.const 5) (i32.const 0))\n    ))\n(assert_trap (invoke \"test\") \"out of bounds table access\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i32.const 1) (i32.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i32.const 1) (i32.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i32.const 1) (i32.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i32.const 1) (f32.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i32.const 1) (f32.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i32.const 1) (f32.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i32.const 1) (f32.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i32.const 1) (i64.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i32.const 1) (i64.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i32.const 1) (i64.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i32.const 1) (i64.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i32.const 1) (f64.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i32.const 1) (f64.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i32.const 1) (f64.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i32.const 1) (f64.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f32.const 1) (i32.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f32.const 1) (i32.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f32.const 1) (i32.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f32.const 1) (i32.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f32.const 1) (f32.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f32.const 1) (f32.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f32.const 1) (f32.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f32.const 1) (f32.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f32.const 1) (i64.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f32.const 1) (i64.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f32.const 1) (i64.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f32.const 1) (i64.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f32.const 1) (f64.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f32.const 1) (f64.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f32.const 1) (f64.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f32.const 1) (f64.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i64.const 1) (i32.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i64.const 1) (i32.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i64.const 1) (i32.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i64.const 1) (i32.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i64.const 1) (f32.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i64.const 1) (f32.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i64.const 1) (f32.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i64.const 1) (f32.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i64.const 1) (i64.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i64.const 1) (i64.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i64.const 1) (i64.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i64.const 1) (i64.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i64.const 1) (f64.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i64.const 1) (f64.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i64.const 1) (f64.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (i64.const 1) (f64.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f64.const 1) (i32.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f64.const 1) (i32.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f64.const 1) (i32.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f64.const 1) (i32.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f64.const 1) (f32.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f64.const 1) (f32.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f64.const 1) (f32.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f64.const 1) (f32.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f64.const 1) (i64.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f64.const 1) (i64.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f64.const 1) (i64.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f64.const 1) (i64.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f64.const 1) (f64.const 1) (i32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f64.const 1) (f64.const 1) (f32.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f64.const 1) (f64.const 1) (i64.const 1))))\n  \"type mismatch\")\n\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (f64.const 1) (f64.const 1) (f64.const 1))))\n  \"type mismatch\")\n\n(module\n  (type (func (result i32)))\n  (table 32 64 funcref)\n  (elem funcref\n    (ref.func $f0) (ref.func $f1) (ref.func $f2) (ref.func $f3)\n    (ref.func $f4) (ref.func $f5) (ref.func $f6) (ref.func $f7)\n    (ref.func $f8) (ref.func $f9) (ref.func $f10) (ref.func $f11)\n    (ref.func $f12) (ref.func $f13) (ref.func $f14) (ref.func $f15))\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $offs i32) (param $len i32)\n    (table.init 0 (local.get $offs) (i32.const 0) (local.get $len))))\n(assert_trap (invoke \"run\" (i32.const 24) (i32.const 16)) \"out of bounds table access\")\n(assert_trap (invoke \"test\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 2)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 3)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 4)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 5)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 15)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 30)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 31)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))\n  (table 32 64 funcref)\n  (elem funcref\n    (ref.func $f0) (ref.func $f1) (ref.func $f2) (ref.func $f3)\n    (ref.func $f4) (ref.func $f5) (ref.func $f6) (ref.func $f7)\n    (ref.func $f8) (ref.func $f9) (ref.func $f10) (ref.func $f11)\n    (ref.func $f12) (ref.func $f13) (ref.func $f14) (ref.func $f15))\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $offs i32) (param $len i32)\n    (table.init 0 (local.get $offs) (i32.const 0) (local.get $len))))\n(assert_trap (invoke \"run\" (i32.const 25) (i32.const 16)) \"out of bounds table access\")\n(assert_trap (invoke \"test\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 2)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 3)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 4)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 5)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 15)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 30)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 31)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))\n  (table 160 320 funcref)\n  (elem funcref\n    (ref.func $f0) (ref.func $f1) (ref.func $f2) (ref.func $f3)\n    (ref.func $f4) (ref.func $f5) (ref.func $f6) (ref.func $f7)\n    (ref.func $f8) (ref.func $f9) (ref.func $f10) (ref.func $f11)\n    (ref.func $f12) (ref.func $f13) (ref.func $f14) (ref.func $f15))\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $offs i32) (param $len i32)\n    (table.init 0 (local.get $offs) (i32.const 0) (local.get $len))))\n(assert_trap (invoke \"run\" (i32.const 96) (i32.const 32)) \"out of bounds table access\")\n(assert_trap (invoke \"test\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 2)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 3)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 4)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 5)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 15)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 30)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 31)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 32)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 33)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 34)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 35)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 36)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 37)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 38)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 39)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 40)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 41)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 42)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 43)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 44)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 45)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 46)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 47)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 48)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 49)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 50)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 51)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 52)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 53)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 54)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 55)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 56)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 57)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 58)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 59)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 60)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 61)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 62)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 63)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 64)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 65)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 66)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 67)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 68)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 69)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 70)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 71)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 72)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 73)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 74)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 75)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 76)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 77)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 78)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 79)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 80)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 81)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 82)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 83)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 84)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 85)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 86)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 87)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 88)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 89)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 90)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 91)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 92)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 93)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 94)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 95)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 96)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 97)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 98)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 99)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 100)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 101)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 102)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 103)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 104)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 105)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 106)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 107)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 108)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 109)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 110)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 111)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 112)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 113)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 114)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 115)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 116)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 117)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 118)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 119)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 120)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 121)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 122)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 123)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 124)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 125)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 126)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 127)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 128)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 129)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 130)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 131)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 132)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 133)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 134)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 135)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 136)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 137)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 138)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 139)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 140)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 141)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 142)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 143)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 144)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 145)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 146)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 147)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 148)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 149)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 150)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 151)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 152)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 153)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 154)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 155)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 156)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 157)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 158)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 159)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))\n  (table 160 320 funcref)\n  (elem funcref\n    (ref.func $f0) (ref.func $f1) (ref.func $f2) (ref.func $f3)\n    (ref.func $f4) (ref.func $f5) (ref.func $f6) (ref.func $f7)\n    (ref.func $f8) (ref.func $f9) (ref.func $f10) (ref.func $f11)\n    (ref.func $f12) (ref.func $f13) (ref.func $f14) (ref.func $f15))\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $offs i32) (param $len i32)\n    (table.init 0 (local.get $offs) (i32.const 0) (local.get $len))))\n(assert_trap (invoke \"run\" (i32.const 97) (i32.const 31)) \"out of bounds table access\")\n(assert_trap (invoke \"test\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 2)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 3)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 4)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 5)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 15)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 30)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 31)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 32)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 33)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 34)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 35)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 36)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 37)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 38)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 39)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 40)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 41)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 42)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 43)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 44)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 45)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 46)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 47)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 48)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 49)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 50)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 51)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 52)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 53)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 54)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 55)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 56)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 57)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 58)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 59)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 60)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 61)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 62)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 63)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 64)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 65)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 66)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 67)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 68)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 69)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 70)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 71)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 72)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 73)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 74)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 75)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 76)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 77)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 78)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 79)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 80)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 81)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 82)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 83)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 84)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 85)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 86)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 87)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 88)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 89)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 90)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 91)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 92)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 93)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 94)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 95)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 96)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 97)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 98)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 99)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 100)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 101)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 102)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 103)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 104)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 105)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 106)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 107)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 108)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 109)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 110)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 111)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 112)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 113)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 114)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 115)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 116)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 117)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 118)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 119)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 120)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 121)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 122)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 123)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 124)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 125)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 126)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 127)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 128)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 129)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 130)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 131)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 132)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 133)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 134)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 135)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 136)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 137)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 138)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 139)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 140)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 141)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 142)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 143)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 144)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 145)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 146)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 147)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 148)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 149)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 150)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 151)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 152)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 153)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 154)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 155)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 156)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 157)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 158)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 159)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))\n  (table 64 64 funcref)\n  (elem funcref\n    (ref.func $f0) (ref.func $f1) (ref.func $f2) (ref.func $f3)\n    (ref.func $f4) (ref.func $f5) (ref.func $f6) (ref.func $f7)\n    (ref.func $f8) (ref.func $f9) (ref.func $f10) (ref.func $f11)\n    (ref.func $f12) (ref.func $f13) (ref.func $f14) (ref.func $f15))\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $offs i32) (param $len i32)\n    (table.init 0 (local.get $offs) (i32.const 0) (local.get $len))))\n(assert_trap (invoke \"run\" (i32.const 48) (i32.const 4294967280)) \"out of bounds table access\")\n(assert_trap (invoke \"test\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 2)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 3)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 4)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 5)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 15)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 16)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 17)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 18)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 19)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 20)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 21)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 22)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 23)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 24)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 25)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 26)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 27)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 28)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 29)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 30)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 31)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 32)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 33)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 34)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 35)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 36)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 37)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 38)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 39)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 40)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 41)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 42)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 43)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 44)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 45)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 46)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 47)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 48)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 49)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 50)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 51)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 52)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 53)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 54)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 55)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 56)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 57)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 58)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 59)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 60)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 61)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 62)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 63)) \"uninitialized element\")\n\n(module\n  (type (func (result i32)))\n  (table 16 16 funcref)\n  (elem funcref\n    (ref.func $f0) (ref.func $f1) (ref.func $f2) (ref.func $f3)\n    (ref.func $f4) (ref.func $f5) (ref.func $f6) (ref.func $f7)\n    (ref.func $f8) (ref.func $f9) (ref.func $f10) (ref.func $f11)\n    (ref.func $f12) (ref.func $f13) (ref.func $f14) (ref.func $f15))\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $offs i32) (param $len i32)\n    (table.init 0 (local.get $offs) (i32.const 8) (local.get $len))))\n(assert_trap (invoke \"run\" (i32.const 0) (i32.const 4294967292)) \"out of bounds table access\")\n(assert_trap (invoke \"test\" (i32.const 0)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 1)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 2)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 3)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 4)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 5)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 6)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 7)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 8)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 9)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 10)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 11)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 12)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 13)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 14)) \"uninitialized element\")\n(assert_trap (invoke \"test\" (i32.const 15)) \"uninitialized element\")\n\n(module\n  (table 1 funcref)\n  ;; 65 elem segments. 64 is the smallest positive number that is encoded\n  ;; differently as a signed LEB.\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref)\n  (func (table.init 64 (i32.const 0) (i32.const 0) (i32.const 0))))\n"
  },
  {
    "path": "test/core/table_set.wast",
    "content": "(module\n  (table $t2 1 externref)\n  (table $t3 2 funcref)\n  (elem (table $t3) (i32.const 1) func $dummy)\n  (func $dummy)\n\n  (func (export \"get-externref\") (param $i i32) (result externref)\n    (table.get $t2 (local.get $i))\n  )\n  (func $f3 (export \"get-funcref\") (param $i i32) (result funcref)\n    (table.get $t3 (local.get $i))\n  )\n\n  (func (export \"set-externref\") (param $i i32) (param $r externref)\n    (table.set $t2 (local.get $i) (local.get $r))\n  )\n  (func (export \"set-funcref\") (param $i i32) (param $r funcref)\n    (table.set $t3 (local.get $i) (local.get $r))\n  )\n  (func (export \"set-funcref-from\") (param $i i32) (param $j i32)\n    (table.set $t3 (local.get $i) (table.get $t3 (local.get $j)))\n  )\n\n  (func (export \"is_null-funcref\") (param $i i32) (result i32)\n    (ref.is_null (call $f3 (local.get $i)))\n  )\n)\n\n(assert_return (invoke \"get-externref\" (i32.const 0)) (ref.null extern))\n(assert_return (invoke \"set-externref\" (i32.const 0) (ref.extern 1)))\n(assert_return (invoke \"get-externref\" (i32.const 0)) (ref.extern 1))\n(assert_return (invoke \"set-externref\" (i32.const 0) (ref.null extern)))\n(assert_return (invoke \"get-externref\" (i32.const 0)) (ref.null extern))\n\n(assert_return (invoke \"get-funcref\" (i32.const 0)) (ref.null func))\n(assert_return (invoke \"set-funcref-from\" (i32.const 0) (i32.const 1)))\n(assert_return (invoke \"is_null-funcref\" (i32.const 0)) (i32.const 0))\n(assert_return (invoke \"set-funcref\" (i32.const 0) (ref.null func)))\n(assert_return (invoke \"get-funcref\" (i32.const 0)) (ref.null func))\n\n(assert_trap (invoke \"set-externref\" (i32.const 2) (ref.null extern)) \"out of bounds table access\")\n(assert_trap (invoke \"set-funcref\" (i32.const 3) (ref.null func)) \"out of bounds table access\")\n(assert_trap (invoke \"set-externref\" (i32.const -1) (ref.null extern)) \"out of bounds table access\")\n(assert_trap (invoke \"set-funcref\" (i32.const -1) (ref.null func)) \"out of bounds table access\")\n\n(assert_trap (invoke \"set-externref\" (i32.const 2) (ref.extern 0)) \"out of bounds table access\")\n(assert_trap (invoke \"set-funcref-from\" (i32.const 3) (i32.const 1)) \"out of bounds table access\")\n(assert_trap (invoke \"set-externref\" (i32.const -1) (ref.extern 0)) \"out of bounds table access\")\n(assert_trap (invoke \"set-funcref-from\" (i32.const -1) (i32.const 1)) \"out of bounds table access\")\n\n\n;; Type errors\n\n(assert_invalid\n  (module\n    (table $t 10 externref)\n    (func $type-index-value-empty-vs-i32-externref\n      (table.set $t)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 10 externref)\n    (func $type-index-empty-vs-i32\n      (table.set $t (ref.null extern))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 10 externref)\n    (func $type-value-empty-vs-externref\n      (table.set $t (i32.const 1))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 10 externref)\n    (func $type-size-f32-vs-i32\n      (table.set $t (f32.const 1) (ref.null extern))\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 10 funcref)\n    (func $type-value-externref-vs-funcref (param $r externref)\n      (table.set $t (i32.const 1) (local.get $r))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (table $t1 1 externref)\n    (table $t2 1 funcref)\n    (func $type-value-externref-vs-funcref-multi (param $r externref)\n      (table.set $t2 (i32.const 0) (local.get $r))\n    )\n  )\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module\n    (table $t 10 externref)\n    (func $type-result-empty-vs-num (result i32)\n      (table.set $t (i32.const 0) (ref.null extern))\n    )\n  )\n  \"type mismatch\"\n)\n"
  },
  {
    "path": "test/core/table_size.wast",
    "content": "(module\n  (table $t0 0 externref)\n  (table $t1 1 externref)\n  (table $t2 0 2 externref)\n  (table $t3 3 8 externref)\n\n  (func (export \"size-t0\") (result i32) (table.size $t0))\n  (func (export \"size-t1\") (result i32) (table.size $t1))\n  (func (export \"size-t2\") (result i32) (table.size $t2))\n  (func (export \"size-t3\") (result i32) (table.size $t3))\n\n  (func (export \"grow-t0\") (param $sz i32)\n    (drop (table.grow $t0 (ref.null extern) (local.get $sz)))\n  )\n  (func (export \"grow-t1\") (param $sz i32)\n    (drop (table.grow $t1 (ref.null extern) (local.get $sz)))\n  )\n  (func (export \"grow-t2\") (param $sz i32)\n    (drop (table.grow $t2 (ref.null extern) (local.get $sz)))\n  )\n  (func (export \"grow-t3\") (param $sz i32)\n    (drop (table.grow $t3 (ref.null extern) (local.get $sz)))\n  )\n)\n\n(assert_return (invoke \"size-t0\") (i32.const 0))\n(assert_return (invoke \"grow-t0\" (i32.const 1)))\n(assert_return (invoke \"size-t0\") (i32.const 1))\n(assert_return (invoke \"grow-t0\" (i32.const 4)))\n(assert_return (invoke \"size-t0\") (i32.const 5))\n(assert_return (invoke \"grow-t0\" (i32.const 0)))\n(assert_return (invoke \"size-t0\") (i32.const 5))\n\n(assert_return (invoke \"size-t1\") (i32.const 1))\n(assert_return (invoke \"grow-t1\" (i32.const 1)))\n(assert_return (invoke \"size-t1\") (i32.const 2))\n(assert_return (invoke \"grow-t1\" (i32.const 4)))\n(assert_return (invoke \"size-t1\") (i32.const 6))\n(assert_return (invoke \"grow-t1\" (i32.const 0)))\n(assert_return (invoke \"size-t1\") (i32.const 6))\n\n(assert_return (invoke \"size-t2\") (i32.const 0))\n(assert_return (invoke \"grow-t2\" (i32.const 3)))\n(assert_return (invoke \"size-t2\") (i32.const 0))\n(assert_return (invoke \"grow-t2\" (i32.const 1)))\n(assert_return (invoke \"size-t2\") (i32.const 1))\n(assert_return (invoke \"grow-t2\" (i32.const 0)))\n(assert_return (invoke \"size-t2\") (i32.const 1))\n(assert_return (invoke \"grow-t2\" (i32.const 4)))\n(assert_return (invoke \"size-t2\") (i32.const 1))\n(assert_return (invoke \"grow-t2\" (i32.const 1)))\n(assert_return (invoke \"size-t2\") (i32.const 2))\n\n(assert_return (invoke \"size-t3\") (i32.const 3))\n(assert_return (invoke \"grow-t3\" (i32.const 1)))\n(assert_return (invoke \"size-t3\") (i32.const 4))\n(assert_return (invoke \"grow-t3\" (i32.const 3)))\n(assert_return (invoke \"size-t3\") (i32.const 7))\n(assert_return (invoke \"grow-t3\" (i32.const 0)))\n(assert_return (invoke \"size-t3\") (i32.const 7))\n(assert_return (invoke \"grow-t3\" (i32.const 2)))\n(assert_return (invoke \"size-t3\") (i32.const 7))\n(assert_return (invoke \"grow-t3\" (i32.const 1)))\n(assert_return (invoke \"size-t3\") (i32.const 8))\n\n\n;; Type errors\n\n(assert_invalid\n  (module\n    (table $t 1 externref)\n    (func $type-result-i32-vs-empty\n      (table.size $t)\n    )\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module\n    (table $t 1 externref)\n    (func $type-result-i32-vs-f32 (result f32)\n      (table.size $t)\n    )\n  )\n  \"type mismatch\"\n)\n"
  },
  {
    "path": "test/core/token.wast",
    "content": ";; Test tokenization\n\n(assert_malformed\n  (module quote \"(func (drop (i32.const0)))\")\n  \"unknown operator\"\n)\n(assert_malformed\n  (module quote \"(func br 0drop)\")\n  \"unknown operator\"\n)\n"
  },
  {
    "path": "test/core/traps.wast",
    "content": ";; Test that traps are preserved even in instructions which might otherwise\n;; be dead-code-eliminated. These functions all perform an operation and\n;; discard its return value.\n\n(module\n  (func (export \"no_dce.i32.div_s\") (param $x i32) (param $y i32)\n    (drop (i32.div_s (local.get $x) (local.get $y))))\n  (func (export \"no_dce.i32.div_u\") (param $x i32) (param $y i32)\n    (drop (i32.div_u (local.get $x) (local.get $y))))\n  (func (export \"no_dce.i64.div_s\") (param $x i64) (param $y i64)\n    (drop (i64.div_s (local.get $x) (local.get $y))))\n  (func (export \"no_dce.i64.div_u\") (param $x i64) (param $y i64)\n    (drop (i64.div_u (local.get $x) (local.get $y))))\n)\n\n(assert_trap (invoke \"no_dce.i32.div_s\" (i32.const 1) (i32.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"no_dce.i32.div_u\" (i32.const 1) (i32.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"no_dce.i64.div_s\" (i64.const 1) (i64.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"no_dce.i64.div_u\" (i64.const 1) (i64.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"no_dce.i32.div_s\" (i32.const 0x80000000) (i32.const -1)) \"integer overflow\")\n(assert_trap (invoke \"no_dce.i64.div_s\" (i64.const 0x8000000000000000) (i64.const -1)) \"integer overflow\")\n\n(module\n  (func (export \"no_dce.i32.rem_s\") (param $x i32) (param $y i32)\n    (drop (i32.rem_s (local.get $x) (local.get $y))))\n  (func (export \"no_dce.i32.rem_u\") (param $x i32) (param $y i32)\n    (drop (i32.rem_u (local.get $x) (local.get $y))))\n  (func (export \"no_dce.i64.rem_s\") (param $x i64) (param $y i64)\n    (drop (i64.rem_s (local.get $x) (local.get $y))))\n  (func (export \"no_dce.i64.rem_u\") (param $x i64) (param $y i64)\n    (drop (i64.rem_u (local.get $x) (local.get $y))))\n)\n\n(assert_trap (invoke \"no_dce.i32.rem_s\" (i32.const 1) (i32.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"no_dce.i32.rem_u\" (i32.const 1) (i32.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"no_dce.i64.rem_s\" (i64.const 1) (i64.const 0)) \"integer divide by zero\")\n(assert_trap (invoke \"no_dce.i64.rem_u\" (i64.const 1) (i64.const 0)) \"integer divide by zero\")\n\n(module\n  (func (export \"no_dce.i32.trunc_f32_s\") (param $x f32) (drop (i32.trunc_f32_s (local.get $x))))\n  (func (export \"no_dce.i32.trunc_f32_u\") (param $x f32) (drop (i32.trunc_f32_u (local.get $x))))\n  (func (export \"no_dce.i32.trunc_f64_s\") (param $x f64) (drop (i32.trunc_f64_s (local.get $x))))\n  (func (export \"no_dce.i32.trunc_f64_u\") (param $x f64) (drop (i32.trunc_f64_u (local.get $x))))\n  (func (export \"no_dce.i64.trunc_f32_s\") (param $x f32) (drop (i64.trunc_f32_s (local.get $x))))\n  (func (export \"no_dce.i64.trunc_f32_u\") (param $x f32) (drop (i64.trunc_f32_u (local.get $x))))\n  (func (export \"no_dce.i64.trunc_f64_s\") (param $x f64) (drop (i64.trunc_f64_s (local.get $x))))\n  (func (export \"no_dce.i64.trunc_f64_u\") (param $x f64) (drop (i64.trunc_f64_u (local.get $x))))\n)\n\n(assert_trap (invoke \"no_dce.i32.trunc_f32_s\" (f32.const nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"no_dce.i32.trunc_f32_u\" (f32.const nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"no_dce.i32.trunc_f64_s\" (f64.const nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"no_dce.i32.trunc_f64_u\" (f64.const nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"no_dce.i64.trunc_f32_s\" (f32.const nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"no_dce.i64.trunc_f32_u\" (f32.const nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"no_dce.i64.trunc_f64_s\" (f64.const nan)) \"invalid conversion to integer\")\n(assert_trap (invoke \"no_dce.i64.trunc_f64_u\" (f64.const nan)) \"invalid conversion to integer\")\n\n(module\n    (memory 1)\n\n    (func (export \"no_dce.i32.load\") (param $i i32) (drop (i32.load (local.get $i))))\n    (func (export \"no_dce.i32.load16_s\") (param $i i32) (drop (i32.load16_s (local.get $i))))\n    (func (export \"no_dce.i32.load16_u\") (param $i i32) (drop (i32.load16_u (local.get $i))))\n    (func (export \"no_dce.i32.load8_s\") (param $i i32) (drop (i32.load8_s (local.get $i))))\n    (func (export \"no_dce.i32.load8_u\") (param $i i32) (drop (i32.load8_u (local.get $i))))\n    (func (export \"no_dce.i64.load\") (param $i i32) (drop (i64.load (local.get $i))))\n    (func (export \"no_dce.i64.load32_s\") (param $i i32) (drop (i64.load32_s (local.get $i))))\n    (func (export \"no_dce.i64.load32_u\") (param $i i32) (drop (i64.load32_u (local.get $i))))\n    (func (export \"no_dce.i64.load16_s\") (param $i i32) (drop (i64.load16_s (local.get $i))))\n    (func (export \"no_dce.i64.load16_u\") (param $i i32) (drop (i64.load16_u (local.get $i))))\n    (func (export \"no_dce.i64.load8_s\") (param $i i32) (drop (i64.load8_s (local.get $i))))\n    (func (export \"no_dce.i64.load8_u\") (param $i i32) (drop (i64.load8_u (local.get $i))))\n    (func (export \"no_dce.f32.load\") (param $i i32) (drop (f32.load (local.get $i))))\n    (func (export \"no_dce.f64.load\") (param $i i32) (drop (f64.load (local.get $i))))\n)\n\n(assert_trap (invoke \"no_dce.i32.load\" (i32.const 65536)) \"out of bounds memory access\")\n(assert_trap (invoke \"no_dce.i32.load16_s\" (i32.const 65536)) \"out of bounds memory access\")\n(assert_trap (invoke \"no_dce.i32.load16_u\" (i32.const 65536)) \"out of bounds memory access\")\n(assert_trap (invoke \"no_dce.i32.load8_s\" (i32.const 65536)) \"out of bounds memory access\")\n(assert_trap (invoke \"no_dce.i32.load8_u\" (i32.const 65536)) \"out of bounds memory access\")\n(assert_trap (invoke \"no_dce.i64.load\" (i32.const 65536)) \"out of bounds memory access\")\n(assert_trap (invoke \"no_dce.i64.load32_s\" (i32.const 65536)) \"out of bounds memory access\")\n(assert_trap (invoke \"no_dce.i64.load32_u\" (i32.const 65536)) \"out of bounds memory access\")\n(assert_trap (invoke \"no_dce.i64.load16_s\" (i32.const 65536)) \"out of bounds memory access\")\n(assert_trap (invoke \"no_dce.i64.load16_u\" (i32.const 65536)) \"out of bounds memory access\")\n(assert_trap (invoke \"no_dce.i64.load8_s\" (i32.const 65536)) \"out of bounds memory access\")\n(assert_trap (invoke \"no_dce.i64.load8_u\" (i32.const 65536)) \"out of bounds memory access\")\n(assert_trap (invoke \"no_dce.f32.load\" (i32.const 65536)) \"out of bounds memory access\")\n(assert_trap (invoke \"no_dce.f64.load\" (i32.const 65536)) \"out of bounds memory access\")\n"
  },
  {
    "path": "test/core/type.wast",
    "content": ";; Test type definitions\n\n(module\n  (type (func))\n  (type $t (func))\n\n  (type (func (param i32)))\n  (type (func (param $x i32)))\n  (type (func (result i32)))\n  (type (func (param i32) (result i32)))\n  (type (func (param $x i32) (result i32)))\n\n  (type (func (param f32 f64)))\n  (type (func (result i64 f32)))\n  (type (func (param i32 i64) (result f32 f64)))\n\n  (type (func (param f32) (param f64)))\n  (type (func (param $x f32) (param f64)))\n  (type (func (param f32) (param $y f64)))\n  (type (func (param $x f32) (param $y f64)))\n  (type (func (result i64) (result f32)))\n  (type (func (param i32) (param i64) (result f32) (result f64)))\n  (type (func (param $x i32) (param $y i64) (result f32) (result f64)))\n\n  (type (func (param f32 f64) (param $x i32) (param f64 i32 i32)))\n  (type (func (result i64 i64 f32) (result f32 i32)))\n  (type\n    (func (param i32 i32) (param i64 i32) (result f32 f64) (result f64 i32))\n  )\n\n  (type (func (param) (param $x f32) (param) (param) (param f64 i32) (param)))\n  (type\n    (func (result) (result) (result i64 i64) (result) (result f32) (result))\n  )\n  (type\n    (func\n      (param i32 i32) (param i64 i32) (param) (param $x i32) (param)\n      (result) (result f32 f64) (result f64 i32) (result)\n    )\n  )\n)\n\n(assert_malformed\n  (module quote \"(type (func (result i32) (param i32)))\")\n  \"result before parameter\"\n)\n(assert_malformed\n  (module quote \"(type (func (result $x i32)))\")\n  \"unexpected token\"\n)\n"
  },
  {
    "path": "test/core/unreachable.wast",
    "content": ";; Test `unreachable` operator\n\n(module\n  ;; Auxiliary definitions\n  (func $dummy)\n  (func $dummy3 (param i32 i32 i32))\n\n  (func (export \"type-i32\") (result i32) (unreachable))\n  (func (export \"type-i64\") (result i32) (unreachable))\n  (func (export \"type-f32\") (result f64) (unreachable))\n  (func (export \"type-f64\") (result f64) (unreachable))\n\n  (func (export \"as-func-first\") (result i32)\n    (unreachable) (i32.const -1)\n  )\n  (func (export \"as-func-mid\") (result i32)\n    (call $dummy) (unreachable) (i32.const -1)\n  )\n  (func (export \"as-func-last\")\n    (call $dummy) (unreachable)\n  )\n  (func (export \"as-func-value\") (result i32)\n    (call $dummy) (unreachable)\n  )\n\n  (func (export \"as-block-first\") (result i32)\n    (block (result i32) (unreachable) (i32.const 2))\n  )\n  (func (export \"as-block-mid\") (result i32)\n    (block (result i32) (call $dummy) (unreachable) (i32.const 2))\n  )\n  (func (export \"as-block-last\")\n    (block (nop) (call $dummy) (unreachable))\n  )\n  (func (export \"as-block-value\") (result i32)\n    (block (result i32) (nop) (call $dummy) (unreachable))\n  )\n  (func (export \"as-block-broke\") (result i32)\n    (block (result i32) (call $dummy) (br 0 (i32.const 1)) (unreachable))\n  )\n\n  (func (export \"as-loop-first\") (result i32)\n    (loop (result i32) (unreachable) (i32.const 2))\n  )\n  (func (export \"as-loop-mid\") (result i32)\n    (loop (result i32) (call $dummy) (unreachable) (i32.const 2))\n  )\n  (func (export \"as-loop-last\")\n    (loop (nop) (call $dummy) (unreachable))\n  )\n  (func (export \"as-loop-broke\") (result i32)\n    (block (result i32)\n      (loop (result i32) (call $dummy) (br 1 (i32.const 1)) (unreachable))\n    )\n  )\n\n  (func (export \"as-br-value\") (result i32)\n    (block (result i32) (br 0 (unreachable)))\n  )\n\n  (func (export \"as-br_if-cond\")\n    (block (br_if 0 (unreachable)))\n  )\n  (func (export \"as-br_if-value\") (result i32)\n    (block (result i32)\n      (drop (br_if 0 (unreachable) (i32.const 1))) (i32.const 7)\n    )\n  )\n  (func (export \"as-br_if-value-cond\") (result i32)\n    (block (result i32)\n      (drop (br_if 0 (i32.const 6) (unreachable))) (i32.const 7)\n    )\n  )\n\n  (func (export \"as-br_table-index\")\n    (block (br_table 0 0 0 (unreachable)))\n  )\n  (func (export \"as-br_table-value\") (result i32)\n    (block (result i32)\n      (br_table 0 0 0 (unreachable) (i32.const 1)) (i32.const 7)\n    )\n  )\n  (func (export \"as-br_table-value-2\") (result i32)\n    (block (result i32)\n      (block (result i32) (br_table 0 1 (unreachable) (i32.const 1)))\n    )\n  )\n  (func (export \"as-br_table-value-index\") (result i32)\n    (block (result i32)\n      (br_table 0 0 (i32.const 6) (unreachable)) (i32.const 7)\n    )\n  )\n  (func (export \"as-br_table-value-and-index\") (result i32)\n    (block (result i32) (br_table 0 0 (unreachable)) (i32.const 8))\n  )\n\n  (func (export \"as-return-value\") (result i64)\n    (return (unreachable))\n  )\n\n  (func (export \"as-if-cond\") (result i32)\n    (if (result i32) (unreachable) (then (i32.const 0)) (else (i32.const 1)))\n  )\n  (func (export \"as-if-then\") (param i32 i32) (result i32)\n    (if (result i32) (local.get 0) (then (unreachable)) (else (local.get 1)))\n  )\n  (func (export \"as-if-else\") (param i32 i32) (result i32)\n    (if (result i32) (local.get 0) (then (local.get 1)) (else (unreachable)))\n  )\n  (func (export \"as-if-then-no-else\") (param i32 i32) (result i32)\n    (if (local.get 0) (then (unreachable))) (local.get 1)\n  )\n\n  (func (export \"as-select-first\") (param i32 i32) (result i32)\n    (select (unreachable) (local.get 0) (local.get 1))\n  )\n  (func (export \"as-select-second\") (param i32 i32) (result i32)\n    (select (local.get 0) (unreachable) (local.get 1))\n  )\n  (func (export \"as-select-cond\") (result i32)\n    (select (i32.const 0) (i32.const 1) (unreachable))\n  )\n\n  (func (export \"as-call-first\")\n    (call $dummy3 (unreachable) (i32.const 2) (i32.const 3))\n  )\n  (func (export \"as-call-mid\")\n    (call $dummy3 (i32.const 1) (unreachable) (i32.const 3))\n  )\n  (func (export \"as-call-last\")\n    (call $dummy3 (i32.const 1) (i32.const 2) (unreachable))\n  )\n\n  (type $sig (func (param i32 i32 i32)))\n  (table funcref (elem $dummy3))\n  (func (export \"as-call_indirect-func\")\n    (call_indirect (type $sig)\n      (unreachable) (i32.const 1) (i32.const 2) (i32.const 3)\n    )\n  )\n  (func (export \"as-call_indirect-first\")\n    (call_indirect (type $sig)\n      (i32.const 0) (unreachable) (i32.const 2) (i32.const 3)\n    )\n  )\n  (func (export \"as-call_indirect-mid\")\n    (call_indirect (type $sig)\n      (i32.const 0) (i32.const 1) (unreachable) (i32.const 3)\n    )\n  )\n  (func (export \"as-call_indirect-last\")\n    (call_indirect (type $sig)\n      (i32.const 0) (i32.const 1) (i32.const 2) (unreachable)\n    )\n  )\n\n  (func (export \"as-local.set-value\") (local f32)\n    (local.set 0 (unreachable))\n  )\n  (func (export \"as-local.tee-value\") (result f32) (local f32)\n    (local.tee 0 (unreachable))\n  )\n  (global $a (mut f32) (f32.const 0))\n  (func (export \"as-global.set-value\") (result f32)\n    (global.set $a (unreachable))\n  )\n\n  (memory 1)\n  (func (export \"as-load-address\") (result f32)\n    (f32.load (unreachable))\n  )\n  (func (export \"as-loadN-address\") (result i64)\n    (i64.load8_s (unreachable))\n  )\n\n  (func (export \"as-store-address\")\n    (f64.store (unreachable) (f64.const 7))\n  )\n  (func (export \"as-store-value\")\n    (i64.store (i32.const 2) (unreachable))\n  )\n\n  (func (export \"as-storeN-address\")\n    (i32.store8 (unreachable) (i32.const 7))\n  )\n  (func (export \"as-storeN-value\")\n    (i64.store16 (i32.const 2) (unreachable))\n  )\n\n  (func (export \"as-unary-operand\") (result f32)\n    (f32.neg (unreachable))\n  )\n\n  (func (export \"as-binary-left\") (result i32)\n    (i32.add (unreachable) (i32.const 10))\n  )\n  (func (export \"as-binary-right\") (result i64)\n    (i64.sub (i64.const 10) (unreachable))\n  )\n\n  (func (export \"as-test-operand\") (result i32)\n    (i32.eqz (unreachable))\n  )\n\n  (func (export \"as-compare-left\") (result i32)\n    (f64.le (unreachable) (f64.const 10))\n  )\n  (func (export \"as-compare-right\") (result i32)\n    (f32.ne (f32.const 10) (unreachable))\n  )\n\n  (func (export \"as-convert-operand\") (result i32)\n    (i32.wrap_i64 (unreachable))\n  )\n\n  (func (export \"as-memory.grow-size\") (result i32)\n    (memory.grow (unreachable))\n  )\n)\n\n(assert_trap (invoke \"type-i32\") \"unreachable\")\n(assert_trap (invoke \"type-i64\") \"unreachable\")\n(assert_trap (invoke \"type-f32\") \"unreachable\")\n(assert_trap (invoke \"type-f64\") \"unreachable\")\n\n(assert_trap (invoke \"as-func-first\") \"unreachable\")\n(assert_trap (invoke \"as-func-mid\") \"unreachable\")\n(assert_trap (invoke \"as-func-last\") \"unreachable\")\n(assert_trap (invoke \"as-func-value\") \"unreachable\")\n\n(assert_trap (invoke \"as-block-first\") \"unreachable\")\n(assert_trap (invoke \"as-block-mid\") \"unreachable\")\n(assert_trap (invoke \"as-block-last\") \"unreachable\")\n(assert_trap (invoke \"as-block-value\") \"unreachable\")\n(assert_return (invoke \"as-block-broke\") (i32.const 1))\n\n(assert_trap (invoke \"as-loop-first\") \"unreachable\")\n(assert_trap (invoke \"as-loop-mid\") \"unreachable\")\n(assert_trap (invoke \"as-loop-last\") \"unreachable\")\n(assert_return (invoke \"as-loop-broke\") (i32.const 1))\n\n(assert_trap (invoke \"as-br-value\") \"unreachable\")\n\n(assert_trap (invoke \"as-br_if-cond\") \"unreachable\")\n(assert_trap (invoke \"as-br_if-value\") \"unreachable\")\n(assert_trap (invoke \"as-br_if-value-cond\") \"unreachable\")\n\n(assert_trap (invoke \"as-br_table-index\") \"unreachable\")\n(assert_trap (invoke \"as-br_table-value\") \"unreachable\")\n(assert_trap (invoke \"as-br_table-value-2\") \"unreachable\")\n(assert_trap (invoke \"as-br_table-value-index\") \"unreachable\")\n(assert_trap (invoke \"as-br_table-value-and-index\") \"unreachable\")\n\n(assert_trap (invoke \"as-return-value\") \"unreachable\")\n\n(assert_trap (invoke \"as-if-cond\") \"unreachable\")\n(assert_trap (invoke \"as-if-then\" (i32.const 1) (i32.const 6)) \"unreachable\")\n(assert_return (invoke \"as-if-then\" (i32.const 0) (i32.const 6)) (i32.const 6))\n(assert_trap (invoke \"as-if-else\" (i32.const 0) (i32.const 6)) \"unreachable\")\n(assert_return (invoke \"as-if-else\" (i32.const 1) (i32.const 6)) (i32.const 6))\n(assert_trap (invoke \"as-if-then-no-else\" (i32.const 1) (i32.const 6)) \"unreachable\")\n(assert_return (invoke \"as-if-then-no-else\" (i32.const 0) (i32.const 6)) (i32.const 6))\n\n(assert_trap (invoke \"as-select-first\" (i32.const 0) (i32.const 6)) \"unreachable\")\n(assert_trap (invoke \"as-select-first\" (i32.const 1) (i32.const 6)) \"unreachable\")\n(assert_trap (invoke \"as-select-second\" (i32.const 0) (i32.const 6)) \"unreachable\")\n(assert_trap (invoke \"as-select-second\" (i32.const 1) (i32.const 6)) \"unreachable\")\n(assert_trap (invoke \"as-select-cond\") \"unreachable\")\n\n(assert_trap (invoke \"as-call-first\") \"unreachable\")\n(assert_trap (invoke \"as-call-mid\") \"unreachable\")\n(assert_trap (invoke \"as-call-last\") \"unreachable\")\n\n(assert_trap (invoke \"as-call_indirect-func\") \"unreachable\")\n(assert_trap (invoke \"as-call_indirect-first\") \"unreachable\")\n(assert_trap (invoke \"as-call_indirect-mid\") \"unreachable\")\n(assert_trap (invoke \"as-call_indirect-last\") \"unreachable\")\n\n(assert_trap (invoke \"as-local.set-value\") \"unreachable\")\n(assert_trap (invoke \"as-local.tee-value\") \"unreachable\")\n(assert_trap (invoke \"as-global.set-value\") \"unreachable\")\n\n(assert_trap (invoke \"as-load-address\") \"unreachable\")\n(assert_trap (invoke \"as-loadN-address\") \"unreachable\")\n\n(assert_trap (invoke \"as-store-address\") \"unreachable\")\n(assert_trap (invoke \"as-store-value\") \"unreachable\")\n(assert_trap (invoke \"as-storeN-address\") \"unreachable\")\n(assert_trap (invoke \"as-storeN-value\") \"unreachable\")\n\n(assert_trap (invoke \"as-unary-operand\") \"unreachable\")\n\n(assert_trap (invoke \"as-binary-left\") \"unreachable\")\n(assert_trap (invoke \"as-binary-right\") \"unreachable\")\n\n(assert_trap (invoke \"as-test-operand\") \"unreachable\")\n\n(assert_trap (invoke \"as-compare-left\") \"unreachable\")\n(assert_trap (invoke \"as-compare-right\") \"unreachable\")\n\n(assert_trap (invoke \"as-convert-operand\") \"unreachable\")\n\n(assert_trap (invoke \"as-memory.grow-size\") \"unreachable\")\n\n"
  },
  {
    "path": "test/core/unreached-invalid.wast",
    "content": ";; Failures in unreachable code.\n\n(assert_invalid\n  (module (func $local-index (unreachable) (drop (local.get 0))))\n  \"unknown local\"\n)\n(assert_invalid\n  (module (func $global-index (unreachable) (drop (global.get 0))))\n  \"unknown global\"\n)\n(assert_invalid\n  (module (func $func-index (unreachable) (call 1)))\n  \"unknown function\"\n)\n(assert_invalid\n  (module (func $label-index (unreachable) (br 1)))\n  \"unknown label\"\n)\n\n(assert_invalid\n  (module (func $type-num-vs-num\n    (unreachable) (drop (i64.eqz (i32.const 0))))\n  )\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-poly-num-vs-num (result i32)\n    (unreachable) (i64.const 0) (i32.const 0) (select)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-poly-transitive-num-vs-num (result i32)\n    (unreachable)\n    (i64.const 0) (i32.const 0) (select)\n    (i32.const 0) (i32.const 0) (select)\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-unconsumed-const (unreachable) (i32.const 0)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-unconsumed-result (unreachable) (i32.eqz)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-unconsumed-result2\n    (unreachable) (i32.const 0) (i32.add)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-unconsumed-poly0 (unreachable) (select)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-unconsumed-poly1 (unreachable) (i32.const 0) (select)))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-unconsumed-poly2\n    (unreachable) (i32.const 0) (i32.const 0) (select)\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-unary-num-vs-void-after-break\n    (block (br 0) (block (drop (i32.eqz (nop)))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-unary-num-vs-num-after-break\n    (block (br 0) (drop (i32.eqz (f32.const 1))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-binary-num-vs-void-after-break\n    (block (br 0) (block (drop (f32.eq (i32.const 1)))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-binary-num-vs-num-after-break\n    (block (br 0) (drop (f32.eq (i32.const 1) (f32.const 0))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-num-vs-void-after-break\n    (block (br 0) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-num-vs-num-after-break (result i32)\n    (block (result i32) (i32.const 1) (br 0) (f32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-loop-value-num-vs-void-after-break\n    (block (loop (br 1) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-loop-value-num-vs-num-after-break (result i32)\n    (loop (result i32) (br 1 (i32.const 1)) (f32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-func-value-num-vs-void-after-break\n    (br 0) (i32.const 1)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-func-value-num-vs-num-after-break (result i32)\n    (br 0 (i32.const 1)) (f32.const 0)\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-unary-num-vs-void-after-return\n    (return) (block (drop (i32.eqz (nop))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-unary-num-vs-num-after-return\n    (return) (drop (i32.eqz (f32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-binary-num-vs-void-after-return\n    (return) (block (drop (f32.eq (i32.const 1))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-binary-num-vs-num-after-return\n    (return) (drop (f32.eq (i32.const 1) (f32.const 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-num-vs-void-after-return\n    (block (return) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-num-vs-num-after-return (result i32)\n    (block (result i32) (i32.const 1) (return (i32.const 0)) (f32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-loop-value-num-vs-void-after-return\n    (block (loop (return) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-loop-value-num-vs-num-after-return (result i32)\n    (loop (result i32) (return (i32.const 1)) (f32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-func-value-num-vs-void-after-return\n    (return) (i32.const 1)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-func-value-num-vs-num-after-return (result i32)\n    (return (i32.const 1)) (f32.const 0)\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-unary-num-vs-void-after-unreachable\n    (unreachable) (block (drop (i32.eqz (nop))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-unary-num-vs-void-in-loop-after-unreachable\n    (unreachable) (loop (drop (i32.eqz (nop))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-unary-num-vs-void-in-i32-loop-after-unreachable\n    (unreachable) (loop (result i32) (i32.eqz (nop)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-unary-num-vs-num-after-unreachable\n    (unreachable) (drop (i32.eqz (f32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-binary-num-vs-void-after-unreachable\n    (unreachable) (block (drop (f32.eq (i32.const 1))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-binary-num-vs-num-after-unreachable\n    (unreachable) (drop (f32.eq (i32.const 1) (f32.const 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-num-vs-void-after-unreachable\n    (block (unreachable) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-num-vs-num-after-unreachable (result i32)\n    (block (result i32) (i32.const 1) (unreachable) (f32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-loop-value-num-vs-void-after-unreachable\n    (block (loop (unreachable) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-loop-value-num-vs-num-after-unreachable (result i32)\n    (loop (result i32) (unreachable) (f32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-func-value-num-vs-void-after-unreachable\n    (unreachable) (i32.const 1)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-func-value-num-vs-num-after-unreachable (result i32)\n    (unreachable) (f32.const 0)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-unary-num-vs-void-in-if-after-unreachable\n    (unreachable) (if (i32.const 0) (then (drop (i32.eqz (nop)))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-unary-num-vs-void-in-else-after-unreachable\n    (unreachable) (if (i32.const 0) (then (nop)) (else (drop (i32.eqz (nop)))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-unary-num-vs-void-in-else-after-unreachable-if\n    (if (i32.const 0) (then (unreachable)) (else (drop (i32.eqz (nop)))))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-unary-num-vs-void-after-nested-unreachable\n    (block (unreachable)) (block (drop (i32.eqz (nop))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-unary-num-vs-num-after-nested-unreachable\n    (block (unreachable)) (drop (i32.eqz (f32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-binary-num-vs-void-after-nested-unreachable\n    (block (unreachable)) (block (drop (f32.eq (i32.const 1))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-binary-num-vs-num-after-nested-unreachable\n    (block (unreachable)) (drop (f32.eq (i32.const 1) (f32.const 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-num-vs-void-after-nested-unreachable\n    (block (block (unreachable)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-num-vs-num-after-nested-unreachable\n    (result i32)\n    (block (result i32) (i32.const 1) (block (unreachable)) (f32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-loop-value-num-vs-void-after-nested-unreachable\n    (block (loop (block (unreachable)) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-loop-value-num-vs-num-after-nested-unreachable\n    (result i32)\n    (loop (result i32) (block (unreachable)) (f32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-func-value-num-vs-void-after-nested-unreachable\n    (block (unreachable)) (i32.const 1)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-func-value-num-vs-num-after-nested-unreachable\n    (result i32)\n    (block (unreachable)) (f32.const 0)\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-unary-num-vs-void-after-infinite-loop\n    (loop (br 0)) (block (drop (i32.eqz (nop))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-unary-num-vs-num-after-infinite-loop\n    (loop (br 0)) (drop (i32.eqz (f32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-binary-num-vs-void-after-infinite-loop\n    (loop (br 0)) (block (drop (f32.eq (i32.const 1))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-binary-num-vs-num-after-infinite-loop\n    (loop (br 0)) (drop (f32.eq (i32.const 1) (f32.const 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-num-vs-void-after-infinite-loop\n    (block (loop (br 0)) (i32.const 1))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-num-vs-num-after-infinite-loop (result i32)\n    (block (result i32) (i32.const 1) (loop (br 0)) (f32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-loop-value-num-vs-void-after-infinite-loop\n    (block (loop (loop (br 0)) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-loop-value-num-vs-num-after-infinite-loop (result i32)\n    (loop (result i32) (loop (br 0)) (f32.const 0))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-func-value-num-vs-void-after-infinite-loop\n    (loop (br 0)) (i32.const 1)\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-func-value-num-vs-num-after-infinite-loop (result i32)\n    (loop (br 0)) (f32.const 0)\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-unary-num-vs-void-in-dead-body\n    (if (i32.const 0) (then (drop (i32.eqz (nop)))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-unary-num-vs-num-in-dead-body\n    (if (i32.const 0) (then (drop (i32.eqz (f32.const 1)))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-binary-num-vs-void-in-dead-body\n    (if (i32.const 0) (then (drop (f32.eq (i32.const 1)))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-binary-num-vs-num-in-dead-body\n    (if (i32.const 0) (then (drop (f32.eq (i32.const 1) (f32.const 0)))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-if-value-num-vs-void-in-dead-body\n    (if (i32.const 0) (then (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-if-value-num-vs-num-in-dead-body (result i32)\n    (if (result i32) (i32.const 0) (then (f32.const 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-num-vs-void-in-dead-body\n    (if (i32.const 0) (then (block (i32.const 1))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-num-vs-num-in-dead-body (result i32)\n    (if (result i32) (i32.const 0) (then (block (result i32) (f32.const 0))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-num-vs-void-in-dead-body\n    (if (i32.const 0) (then (loop (i32.const 1))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-num-vs-num-in-dead-body (result i32)\n    (if (result i32) (i32.const 0) (then (loop (result i32) (f32.const 0))))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-return-second-num-vs-num (result i32)\n    (return (i32.const 1)) (return (f64.const 1))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-br-second-num-vs-num (result i32)\n    (block (result i32) (br 0 (i32.const 1)) (br 0 (f64.const 1)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-br_if-cond-num-vs-num-after-unreachable\n    (block (br_if 0 (unreachable) (f32.const 0)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-br_if-num-vs-void-after-unreachable (result i32)\n    (block (result i32)\n      (block (unreachable) (br_if 1 (i32.const 0) (i32.const 0)))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-br_if-num-vs-num-after-unreachable (result i32)\n    (block (result i32)\n      (block (result f32) (unreachable) (br_if 1 (i32.const 0) (i32.const 0)))\n      (drop) (i32.const 0)\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-br_if-num2-vs-num-after-unreachable (result i32)\n    (block (result i32)\n      (unreachable) (br_if 0 (i32.const 0) (i32.const 0)) (i32.const 0)\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-br_table-num-vs-num-after-unreachable\n    (block (br_table 0 (unreachable) (f32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-br_table-label-num-vs-num-after-unreachable (result i32)\n    (block (result i32) (unreachable) (br_table 0 (f32.const 0) (i32.const 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-br_table-label-num-vs-label-void-after-unreachable\n    (block\n      (block (result f32)\n        (unreachable)\n        (br_table 0 1 0 (i32.const 1))\n      )\n      (drop)\n    )\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-block-value-nested-unreachable-num-vs-void\n    (block (i32.const 3) (block (unreachable)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-nested-unreachable-void-vs-num (result i32)\n    (block (block (unreachable)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-nested-unreachable-num-vs-num (result i32)\n    (block (result i64) (i64.const 0) (block (unreachable)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-nested-unreachable-num2-vs-void (result i32)\n    (block (i32.const 3) (block (i64.const 1) (unreachable))) (i32.const 9)\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-block-value-nested-br-num-vs-void\n    (block (i32.const 3) (block (br 1)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-nested-br-void-vs-num (result i32)\n    (block (result i32) (block (br 1 (i32.const 0))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-nested-br-num-vs-num (result i32)\n    (block (result i32) (i64.const 0) (block (br 1 (i32.const 0))))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-block-value-nested2-br-num-vs-void\n    (block (block (i32.const 3) (block (br 2))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-nested2-br-void-vs-num (result i32)\n    (block (result i32) (block (block (br 2 (i32.const 0)))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-nested2-br-num-vs-num (result i32)\n    (block (result i32)\n      (block (result i64) (i64.const 0) (block (br 2 (i32.const 0))))\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-nested2-br-num2-vs-void (result i32)\n    (block (i32.const 3) (block (i64.const 1) (br 1))) (i32.const 9)\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-block-value-nested-return-num-vs-void\n    (block (i32.const 3) (block (return)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-nested-return-void-vs-num (result i32)\n    (block (block (return (i32.const 0))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-nested-return-num-vs-num (result i32)\n    (block (result i64) (i64.const 0) (block (return (i32.const 0))))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-block-value-nested-return-num2-vs-void (result i32)\n    (block (i32.const 3) (block (i64.const 1) (return (i32.const 0))))\n    (i32.const 9)\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-loop-value-nested-unreachable-num-vs-void\n    (loop (i32.const 3) (block (unreachable)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-loop-value-nested-unreachable-void-vs-num (result i32)\n    (loop (block (unreachable)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-loop-value-nested-unreachable-num-vs-num (result i32)\n    (loop (result i64) (i64.const 0) (block (unreachable)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $type-cont-last-void-vs-empty (result i32)\n    (loop (br 0 (nop)))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $type-cont-last-num-vs-empty (result i32)\n    (loop (br 0 (i32.const 0)))\n  ))\n  \"type mismatch\"\n)\n\n(assert_invalid\n  (module (func $tee-local-unreachable-value\n    (local i32)\n    (local.tee 0 (unreachable))\n  ))\n  \"type mismatch\"\n)\n(assert_invalid\n  (module (func $br_if-unreachable (result i32)\n    (block (result i32)\n      (block\n        (br_if 1 (unreachable) (i32.const 0))\n      )\n      (i32.const 0)\n    )\n  ))\n  \"type mismatch\"\n)\n(assert_invalid \n  (module\n    (func $type-br_if-after-unreachable (result i64)\n      unreachable\n      br_if 0\n      i64.extend_i32_u\n    )\n  )\n \"type mismatch\"\n)\n"
  },
  {
    "path": "test/core/unwind.wast",
    "content": ";; Test that control-flow transfer unwinds stack and it can be anything after.\n\n(module\n  (func (export \"func-unwind-by-unreachable\")\n    (i32.const 3) (i64.const 1) (unreachable)\n  )\n  (func (export \"func-unwind-by-br\")\n    (i32.const 3) (i64.const 1) (br 0)\n  )\n  (func (export \"func-unwind-by-br-value\") (result i32)\n    (i32.const 3) (i64.const 1) (br 0 (i32.const 9))\n  )\n  (func (export \"func-unwind-by-br_if\")\n    (i32.const 3) (i64.const 1) (drop (drop (br_if 0 (i32.const 1))))\n  )\n  (func (export \"func-unwind-by-br_if-value\") (result i32)\n    (i32.const 3) (i64.const 1) (drop (drop (br_if 0 (i32.const 9) (i32.const 1))))\n  )\n  (func (export \"func-unwind-by-br_table\")\n    (i32.const 3) (i64.const 1) (br_table 0 (i32.const 0))\n  )\n  (func (export \"func-unwind-by-br_table-value\") (result i32)\n    (i32.const 3) (i64.const 1) (br_table 0 (i32.const 9) (i32.const 0))\n  )\n  (func (export \"func-unwind-by-return\") (result i32)\n    (i32.const 3) (i64.const 1) (return (i32.const 9))\n  )\n\n  (func (export \"block-unwind-by-unreachable\")\n    (block (i32.const 3) (i64.const 1) (unreachable))\n  )\n  (func (export \"block-unwind-by-br\") (result i32)\n    (block (i32.const 3) (i64.const 1) (br 0)) (i32.const 9)\n  )\n  (func (export \"block-unwind-by-br-value\") (result i32)\n    (block (result i32) (i32.const 3) (i64.const 1) (br 0 (i32.const 9)))\n  )\n  (func (export \"block-unwind-by-br_if\") (result i32)\n    (block (i32.const 3) (i64.const 1) (drop (drop (br_if 0 (i32.const 1))))) (i32.const 9)\n  )\n  (func (export \"block-unwind-by-br_if-value\") (result i32)\n    (block (result i32)\n      (i32.const 3) (i64.const 1) (drop (drop (br_if 0 (i32.const 9) (i32.const 1))))\n    )\n  )\n  (func (export \"block-unwind-by-br_table\") (result i32)\n    (block (i32.const 3) (i64.const 1) (br_table 0 (i32.const 0))) (i32.const 9)\n  )\n  (func (export \"block-unwind-by-br_table-value\") (result i32)\n    (block (result i32)\n      (i32.const 3) (i64.const 1) (br_table 0 (i32.const 9) (i32.const 0))\n    )\n  )\n  (func (export \"block-unwind-by-return\") (result i32)\n    (block (result i32) (i32.const 3) (i64.const 1) (return (i32.const 9)))\n  )\n\n  (func (export \"block-nested-unwind-by-unreachable\") (result i32)\n    (block (result i32) (i32.const 3) (block (i64.const 1) (unreachable)))\n  )\n  (func (export \"block-nested-unwind-by-br\") (result i32)\n    (block (i32.const 3) (block (i64.const 1) (br 1)) (drop)) (i32.const 9)\n  )\n  (func (export \"block-nested-unwind-by-br-value\") (result i32)\n    (block (result i32)\n      (i32.const 3) (block (i64.const 1) (br 1 (i32.const 9)))\n    )\n  )\n  (func (export \"block-nested-unwind-by-br_if\") (result i32)\n    (block (i32.const 3) (block (i64.const 1) (drop (br_if 1 (i32.const 1)))) (drop)) (i32.const 9)\n  )\n  (func (export \"block-nested-unwind-by-br_if-value\") (result i32)\n    (block (result i32)\n      (i32.const 3) (block (i64.const 1) (drop (drop (br_if 1 (i32.const 9) (i32.const 1)))))\n    )\n  )\n  (func (export \"block-nested-unwind-by-br_table\") (result i32)\n    (block\n      (i32.const 3) (block (i64.const 1) (br_table 1 (i32.const 1)))\n      (drop)\n    )\n    (i32.const 9)\n  )\n  (func (export \"block-nested-unwind-by-br_table-value\") (result i32)\n    (block (result i32)\n      (i32.const 3)\n      (block (i64.const 1) (br_table 1 (i32.const 9) (i32.const 1)))\n    )\n  )\n  (func (export \"block-nested-unwind-by-return\") (result i32)\n    (block (result i32)\n      (i32.const 3) (block (i64.const 1) (return (i32.const 9)))\n    )\n  )\n\n  (func (export \"unary-after-unreachable\") (result i32)\n    (f32.const 0) (unreachable) (i64.eqz)\n  )\n  (func (export \"unary-after-br\") (result i32)\n    (block (result i32) (f32.const 0) (br 0 (i32.const 9)) (i64.eqz))\n  )\n  (func (export \"unary-after-br_if\") (result i32)\n    (block (result i32)\n      (i64.const 0) (drop (br_if 0 (i32.const 9) (i32.const 1))) (i64.eqz)\n    )\n  )\n  (func (export \"unary-after-br_table\") (result i32)\n    (block (result i32)\n      (f32.const 0) (br_table 0 0 (i32.const 9) (i32.const 0)) (i64.eqz)\n    )\n  )\n  (func (export \"unary-after-return\") (result i32)\n    (f32.const 0) (return (i32.const 9)) (i64.eqz)\n  )\n\n  (func (export \"binary-after-unreachable\") (result i32)\n    (f32.const 0) (f64.const 1) (unreachable) (i64.eq)\n  )\n  (func (export \"binary-after-br\") (result i32)\n    (block (result i32)\n      (f32.const 0) (f64.const 1) (br 0 (i32.const 9)) (i64.eq)\n    )\n  )\n  (func (export \"binary-after-br_if\") (result i32)\n    (block (result i32)\n      (i64.const 0) (i64.const 1) (drop (br_if 0 (i32.const 9) (i32.const 1)))\n      (i64.eq)\n    )\n  )\n  (func (export \"binary-after-br_table\") (result i32)\n    (block (result i32)\n      (f32.const 0) (f64.const 1) (br_table 0 (i32.const 9) (i32.const 0))\n      (i64.eq)\n    )\n  )\n  (func (export \"binary-after-return\") (result i32)\n    (f32.const 0) (f64.const 1) (return (i32.const 9)) (i64.eq)\n  )\n\n  (func (export \"select-after-unreachable\") (result i32)\n    (f32.const 0) (f64.const 1) (i64.const 0) (unreachable) (select)\n  )\n  (func (export \"select-after-br\") (result i32)\n    (block (result i32)\n      (f32.const 0) (f64.const 1) (i64.const 0) (br 0 (i32.const 9)) (select)\n    )\n  )\n  (func (export \"select-after-br_if\") (result i32)\n    (block (result i32)\n      (i32.const 0) (i32.const 1) (i32.const 0)\n      (drop (br_if 0 (i32.const 9) (i32.const 1)))\n      (select)\n    )\n  )\n  (func (export \"select-after-br_table\") (result i32)\n    (block (result i32)\n      (f32.const 0) (f64.const 1) (i64.const 0)\n      (br_table 0 (i32.const 9) (i32.const 0))\n      (select)\n    )\n  )\n  (func (export \"select-after-return\") (result i32)\n    (f32.const 0) (f64.const 1) (i64.const 1) (return (i32.const 9)) (select)\n  )\n\n  (func (export \"block-value-after-unreachable\") (result i32)\n    (block (result i32) (f32.const 0) (unreachable))\n  )\n  (func (export \"block-value-after-br\") (result i32)\n    (block (result i32) (f32.const 0) (br 0 (i32.const 9)))\n  )\n  (func (export \"block-value-after-br_if\") (result i32)\n    (block (result i32)\n      (i32.const 0) (drop (br_if 0 (i32.const 9) (i32.const 1)))\n    )\n  )\n  (func (export \"block-value-after-br_table\") (result i32)\n    (block (result i32)\n      (f32.const 0) (br_table 0 0 (i32.const 9) (i32.const 0))\n    )\n  )\n  (func (export \"block-value-after-return\") (result i32)\n    (block (result i32) (f32.const 0) (return (i32.const 9)))\n  )\n\n  (func (export \"loop-value-after-unreachable\") (result i32)\n    (loop (result i32) (f32.const 0) (unreachable))\n  )\n  (func (export \"loop-value-after-br\") (result i32)\n    (block (result i32) (loop (result i32) (f32.const 0) (br 1 (i32.const 9))))\n  )\n  (func (export \"loop-value-after-br_if\") (result i32)\n    (block (result i32)\n      (loop (result i32)\n        (i32.const 0) (drop (br_if 1 (i32.const 9) (i32.const 1)))\n      )\n    )\n  )\n\n  (func (export \"loop-value-after-br_table\") (result i32)\n    (block (result i32)\n      (loop (result i32)\n        (f32.const 0) (br_table 1 1 (i32.const 9) (i32.const 0))\n      )\n    )\n  )\n  (func (export \"loop-value-after-return\") (result i32)\n    (loop (result i32) (f32.const 0) (return (i32.const 9)))\n  )\n)\n\n(assert_trap (invoke \"func-unwind-by-unreachable\") \"unreachable\")\n(assert_return (invoke \"func-unwind-by-br\"))\n(assert_return (invoke \"func-unwind-by-br-value\") (i32.const 9))\n(assert_return (invoke \"func-unwind-by-br_if\"))\n(assert_return (invoke \"func-unwind-by-br_if-value\") (i32.const 9))\n(assert_return (invoke \"func-unwind-by-br_table\"))\n(assert_return (invoke \"func-unwind-by-br_table-value\") (i32.const 9))\n(assert_return (invoke \"func-unwind-by-return\") (i32.const 9))\n\n(assert_trap (invoke \"block-unwind-by-unreachable\") \"unreachable\")\n(assert_return (invoke \"block-unwind-by-br\") (i32.const 9))\n(assert_return (invoke \"block-unwind-by-br-value\") (i32.const 9))\n(assert_return (invoke \"block-unwind-by-br_if\") (i32.const 9))\n(assert_return (invoke \"block-unwind-by-br_if-value\") (i32.const 9))\n(assert_return (invoke \"block-unwind-by-br_table\") (i32.const 9))\n(assert_return (invoke \"block-unwind-by-br_table-value\") (i32.const 9))\n(assert_return (invoke \"block-unwind-by-return\") (i32.const 9))\n\n(assert_trap (invoke \"block-nested-unwind-by-unreachable\") \"unreachable\")\n(assert_return (invoke \"block-nested-unwind-by-br\") (i32.const 9))\n(assert_return (invoke \"block-nested-unwind-by-br-value\") (i32.const 9))\n(assert_return (invoke \"block-nested-unwind-by-br_if\") (i32.const 9))\n(assert_return (invoke \"block-nested-unwind-by-br_if-value\") (i32.const 9))\n(assert_return (invoke \"block-nested-unwind-by-br_table\") (i32.const 9))\n(assert_return (invoke \"block-nested-unwind-by-br_table-value\") (i32.const 9))\n(assert_return (invoke \"block-nested-unwind-by-return\") (i32.const 9))\n\n(assert_trap (invoke \"unary-after-unreachable\") \"unreachable\")\n(assert_return (invoke \"unary-after-br\") (i32.const 9))\n(assert_return (invoke \"unary-after-br_if\") (i32.const 9))\n(assert_return (invoke \"unary-after-br_table\") (i32.const 9))\n(assert_return (invoke \"unary-after-return\") (i32.const 9))\n\n(assert_trap (invoke \"binary-after-unreachable\") \"unreachable\")\n(assert_return (invoke \"binary-after-br\") (i32.const 9))\n(assert_return (invoke \"binary-after-br_if\") (i32.const 9))\n(assert_return (invoke \"binary-after-br_table\") (i32.const 9))\n(assert_return (invoke \"binary-after-return\") (i32.const 9))\n\n(assert_trap (invoke \"select-after-unreachable\") \"unreachable\")\n(assert_return (invoke \"select-after-br\") (i32.const 9))\n(assert_return (invoke \"select-after-br_if\") (i32.const 9))\n(assert_return (invoke \"select-after-br_table\") (i32.const 9))\n(assert_return (invoke \"select-after-return\") (i32.const 9))\n\n(assert_trap (invoke \"block-value-after-unreachable\") \"unreachable\")\n(assert_return (invoke \"block-value-after-br\") (i32.const 9))\n(assert_return (invoke \"block-value-after-br_if\") (i32.const 9))\n(assert_return (invoke \"block-value-after-br_table\") (i32.const 9))\n(assert_return (invoke \"block-value-after-return\") (i32.const 9))\n\n(assert_trap (invoke \"loop-value-after-unreachable\") \"unreachable\")\n(assert_return (invoke \"loop-value-after-br\") (i32.const 9))\n(assert_return (invoke \"loop-value-after-br_if\") (i32.const 9))\n(assert_return (invoke \"loop-value-after-br_table\") (i32.const 9))\n(assert_return (invoke \"loop-value-after-return\") (i32.const 9))\n"
  },
  {
    "path": "test/core/utf8-custom-section-id.wast",
    "content": ";;;;;; Invalid UTF-8 custom section names\n\n;;;; Continuation bytes not preceded by prefixes\n\n;; encoding starts with (first) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\02\"                       ;; custom section\n    \"\\01\\80\"                       ;; \"\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; encoding starts with (0x8f) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\02\"                       ;; custom section\n    \"\\01\\8f\"                       ;; \"\\8f\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; encoding starts with (0x90) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\02\"                       ;; custom section\n    \"\\01\\90\"                       ;; \"\\90\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; encoding starts with (0x9f) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\02\"                       ;; custom section\n    \"\\01\\9f\"                       ;; \"\\9f\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; encoding starts with (0xa0) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\02\"                       ;; custom section\n    \"\\01\\a0\"                       ;; \"\\a0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; encoding starts with (last) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\02\"                       ;; custom section\n    \"\\01\\bf\"                       ;; \"\\bf\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 2-byte sequences\n\n;; 2-byte sequence contains 3 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\c2\\80\\80\"                 ;; \"\\c2\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 2-byte sequence contains 1 byte at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\02\"                       ;; custom section\n    \"\\01\\c2\"                       ;; \"\\c2\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 2-byte sequence contains 1 byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\c2\\2e\"                    ;; \"\\c2.\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 2-byte sequence contents\n\n;; overlong encoding after 0xc0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\c0\\80\"                    ;; \"\\c0\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xc0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\c0\\bf\"                    ;; \"\\c0\\bf\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xc1 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\c1\\80\"                    ;; \"\\c1\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xc1 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\c1\\bf\"                    ;; \"\\c1\\bf\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (first) 2-byte prefix not a contination byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\c2\\00\"                    ;; \"\\c2\\00\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (first) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\c2\\7f\"                    ;; \"\\c2\\7f\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (first) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\c2\\c0\"                    ;; \"\\c2\\c0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (first) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\c2\\fd\"                    ;; \"\\c2\\fd\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (last) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\df\\00\"                    ;; \"\\df\\00\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (last) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\df\\7f\"                    ;; \"\\df\\7f\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (last) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\df\\c0\"                    ;; \"\\df\\c0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (last) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\df\\fd\"                    ;; \"\\df\\fd\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 3-byte sequences\n\n;; 3-byte sequence contains 4 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\e1\\80\\80\\80\"              ;; \"\\e1\\80\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 3-byte sequence contains 2 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\e1\\80\"                    ;; \"\\e1\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 3-byte sequence contains 2 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e1\\80\\2e\"                 ;; \"\\e1\\80.\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 3-byte sequence contains 1 byte at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\02\"                       ;; custom section\n    \"\\01\\e1\"                       ;; \"\\e1\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 3-byte sequence contains 1 byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\e1\\2e\"                    ;; \"\\e1.\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 3-byte sequence contents\n\n;; first byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e0\\00\\a0\"                 ;; \"\\e0\\00\\a0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e0\\7f\\a0\"                 ;; \"\\e0\\7f\\a0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xe0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e0\\80\\80\"                 ;; \"\\e0\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xe0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e0\\80\\a0\"                 ;; \"\\e0\\80\\a0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xe0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e0\\9f\\a0\"                 ;; \"\\e0\\9f\\a0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xe0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e0\\9f\\bf\"                 ;; \"\\e0\\9f\\bf\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e0\\c0\\a0\"                 ;; \"\\e0\\c0\\a0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e0\\fd\\a0\"                 ;; \"\\e0\\fd\\a0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e1\\00\\80\"                 ;; \"\\e1\\00\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e1\\7f\\80\"                 ;; \"\\e1\\7f\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e1\\c0\\80\"                 ;; \"\\e1\\c0\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e1\\fd\\80\"                 ;; \"\\e1\\fd\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ec\\00\\80\"                 ;; \"\\ec\\00\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ec\\7f\\80\"                 ;; \"\\ec\\7f\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ec\\c0\\80\"                 ;; \"\\ec\\c0\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ec\\fd\\80\"                 ;; \"\\ec\\fd\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ed\\00\\80\"                 ;; \"\\ed\\00\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ed\\7f\\80\"                 ;; \"\\ed\\7f\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte sequence reserved for UTF-16 surrogate half\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ed\\a0\\80\"                 ;; \"\\ed\\a0\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte sequence reserved for UTF-16 surrogate half\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ed\\a0\\bf\"                 ;; \"\\ed\\a0\\bf\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte sequence reserved for UTF-16 surrogate half\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ed\\bf\\80\"                 ;; \"\\ed\\bf\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte sequence reserved for UTF-16 surrogate half\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ed\\bf\\bf\"                 ;; \"\\ed\\bf\\bf\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ed\\c0\\80\"                 ;; \"\\ed\\c0\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ed\\fd\\80\"                 ;; \"\\ed\\fd\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ee\\00\\80\"                 ;; \"\\ee\\00\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ee\\7f\\80\"                 ;; \"\\ee\\7f\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ee\\c0\\80\"                 ;; \"\\ee\\c0\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ee\\fd\\80\"                 ;; \"\\ee\\fd\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ef\\00\\80\"                 ;; \"\\ef\\00\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ef\\7f\\80\"                 ;; \"\\ef\\7f\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ef\\c0\\80\"                 ;; \"\\ef\\c0\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ef\\fd\\80\"                 ;; \"\\ef\\fd\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 3-byte sequence contents (third byte)\n\n;; second byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e0\\a0\\00\"                 ;; \"\\e0\\a0\\00\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e0\\a0\\7f\"                 ;; \"\\e0\\a0\\7f\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e0\\a0\\c0\"                 ;; \"\\e0\\a0\\c0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e0\\a0\\fd\"                 ;; \"\\e0\\a0\\fd\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e1\\80\\00\"                 ;; \"\\e1\\80\\00\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e1\\80\\7f\"                 ;; \"\\e1\\80\\7f\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e1\\80\\c0\"                 ;; \"\\e1\\80\\c0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\e1\\80\\fd\"                 ;; \"\\e1\\80\\fd\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ec\\80\\00\"                 ;; \"\\ec\\80\\00\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ec\\80\\7f\"                 ;; \"\\ec\\80\\7f\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ec\\80\\c0\"                 ;; \"\\ec\\80\\c0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ec\\80\\fd\"                 ;; \"\\ec\\80\\fd\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ed\\80\\00\"                 ;; \"\\ed\\80\\00\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ed\\80\\7f\"                 ;; \"\\ed\\80\\7f\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ed\\80\\c0\"                 ;; \"\\ed\\80\\c0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ed\\80\\fd\"                 ;; \"\\ed\\80\\fd\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ee\\80\\00\"                 ;; \"\\ee\\80\\00\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ee\\80\\7f\"                 ;; \"\\ee\\80\\7f\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ee\\80\\c0\"                 ;; \"\\ee\\80\\c0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ee\\80\\fd\"                 ;; \"\\ee\\80\\fd\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ef\\80\\00\"                 ;; \"\\ef\\80\\00\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ef\\80\\7f\"                 ;; \"\\ef\\80\\7f\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ef\\80\\c0\"                 ;; \"\\ef\\80\\c0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\ef\\80\\fd\"                 ;; \"\\ef\\80\\fd\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 4-byte sequences\n\n;; 4-byte sequence contains 5 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\06\"                       ;; custom section\n    \"\\05\\f1\\80\\80\\80\\80\"           ;; \"\\f1\\80\\80\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 3 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\f1\\80\\80\"                 ;; \"\\f1\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 3 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f1\\80\\80\\23\"              ;; \"\\f1\\80\\80#\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 2 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\f1\\80\"                    ;; \"\\f1\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 2 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\f1\\80\\23\"                 ;; \"\\f1\\80#\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 1 byte at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\02\"                       ;; custom section\n    \"\\01\\f1\"                       ;; \"\\f1\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 1 byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\f1\\23\"                    ;; \"\\f1#\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 4-byte sequence contents\n\n;; first byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f0\\00\\90\\90\"              ;; \"\\f0\\00\\90\\90\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f0\\7f\\90\\90\"              ;; \"\\f0\\7f\\90\\90\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xf0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f0\\80\\80\\80\"              ;; \"\\f0\\80\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xf0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f0\\80\\90\\90\"              ;; \"\\f0\\80\\90\\90\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xf0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f0\\8f\\90\\90\"              ;; \"\\f0\\8f\\90\\90\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xf0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f0\\8f\\bf\\bf\"              ;; \"\\f0\\8f\\bf\\bf\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f0\\c0\\90\\90\"              ;; \"\\f0\\c0\\90\\90\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f0\\fd\\90\\90\"              ;; \"\\f0\\fd\\90\\90\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f1\\00\\80\\80\"              ;; \"\\f1\\00\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f1\\7f\\80\\80\"              ;; \"\\f1\\7f\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f1\\c0\\80\\80\"              ;; \"\\f1\\c0\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f1\\fd\\80\\80\"              ;; \"\\f1\\fd\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f3\\00\\80\\80\"              ;; \"\\f3\\00\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f3\\7f\\80\\80\"              ;; \"\\f3\\7f\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f3\\c0\\80\\80\"              ;; \"\\f3\\c0\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f3\\fd\\80\\80\"              ;; \"\\f3\\fd\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f4\\00\\80\\80\"              ;; \"\\f4\\00\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f4\\7f\\80\\80\"              ;; \"\\f4\\7f\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (first) malformed code point\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f4\\90\\80\\80\"              ;; \"\\f4\\90\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; malformed code point\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f4\\bf\\80\\80\"              ;; \"\\f4\\bf\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f4\\c0\\80\\80\"              ;; \"\\f4\\c0\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f4\\fd\\80\\80\"              ;; \"\\f4\\fd\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (first) malformed 4-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f5\\80\\80\\80\"              ;; \"\\f5\\80\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (last) malformed 4-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f7\\80\\80\\80\"              ;; \"\\f7\\80\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (last) malformed 4-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f7\\bf\\bf\\bf\"              ;; \"\\f7\\bf\\bf\\bf\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 4-byte sequence contents (third byte)\n\n;; second byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f0\\90\\00\\90\"              ;; \"\\f0\\90\\00\\90\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f0\\90\\7f\\90\"              ;; \"\\f0\\90\\7f\\90\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f0\\90\\c0\\90\"              ;; \"\\f0\\90\\c0\\90\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f0\\90\\fd\\90\"              ;; \"\\f0\\90\\fd\\90\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f1\\80\\00\\80\"              ;; \"\\f1\\80\\00\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f1\\80\\7f\\80\"              ;; \"\\f1\\80\\7f\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f1\\80\\c0\\80\"              ;; \"\\f1\\80\\c0\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f1\\80\\fd\\80\"              ;; \"\\f1\\80\\fd\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f3\\80\\00\\80\"              ;; \"\\f3\\80\\00\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f3\\80\\7f\\80\"              ;; \"\\f3\\80\\7f\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f3\\80\\c0\\80\"              ;; \"\\f3\\80\\c0\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f3\\80\\fd\\80\"              ;; \"\\f3\\80\\fd\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f4\\80\\00\\80\"              ;; \"\\f4\\80\\00\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f4\\80\\7f\\80\"              ;; \"\\f4\\80\\7f\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f4\\80\\c0\\80\"              ;; \"\\f4\\80\\c0\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f4\\80\\fd\\80\"              ;; \"\\f4\\80\\fd\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 4-byte sequence contents (fourth byte)\n\n;; third byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f0\\90\\90\\00\"              ;; \"\\f0\\90\\90\\00\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f0\\90\\90\\7f\"              ;; \"\\f0\\90\\90\\7f\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f0\\90\\90\\c0\"              ;; \"\\f0\\90\\90\\c0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f0\\90\\90\\fd\"              ;; \"\\f0\\90\\90\\fd\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f1\\80\\80\\00\"              ;; \"\\f1\\80\\80\\00\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f1\\80\\80\\7f\"              ;; \"\\f1\\80\\80\\7f\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f1\\80\\80\\c0\"              ;; \"\\f1\\80\\80\\c0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f1\\80\\80\\fd\"              ;; \"\\f1\\80\\80\\fd\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f3\\80\\80\\00\"              ;; \"\\f3\\80\\80\\00\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f3\\80\\80\\7f\"              ;; \"\\f3\\80\\80\\7f\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f3\\80\\80\\c0\"              ;; \"\\f3\\80\\80\\c0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f3\\80\\80\\fd\"              ;; \"\\f3\\80\\80\\fd\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f4\\80\\80\\00\"              ;; \"\\f4\\80\\80\\00\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f4\\80\\80\\7f\"              ;; \"\\f4\\80\\80\\7f\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f4\\80\\80\\c0\"              ;; \"\\f4\\80\\80\\c0\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f4\\80\\80\\fd\"              ;; \"\\f4\\80\\80\\fd\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 5-byte sequences\n\n;; 5-byte sequence contains 6 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\07\"                       ;; custom section\n    \"\\06\\f8\\80\\80\\80\\80\\80\"        ;; \"\\f8\\80\\80\\80\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 4 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f8\\80\\80\\80\"              ;; \"\\f8\\80\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 4 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\06\"                       ;; custom section\n    \"\\05\\f8\\80\\80\\80\\23\"           ;; \"\\f8\\80\\80\\80#\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 3 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\f8\\80\\80\"                 ;; \"\\f8\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 3 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\f8\\80\\80\\23\"              ;; \"\\f8\\80\\80#\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 2 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\f8\\80\"                    ;; \"\\f8\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 2 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\f8\\80\\23\"                 ;; \"\\f8\\80#\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 1 byte at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\02\"                       ;; custom section\n    \"\\01\\f8\"                       ;; \"\\f8\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 1 byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\f8\\23\"                    ;; \"\\f8#\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 5-byte sequence contents\n\n;; (first) malformed 5-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\06\"                       ;; custom section\n    \"\\05\\f8\\80\\80\\80\\80\"           ;; \"\\f8\\80\\80\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (last) malformed 5-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\06\"                       ;; custom section\n    \"\\05\\fb\\bf\\bf\\bf\\bf\"           ;; \"\\fb\\bf\\bf\\bf\\bf\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 6-byte sequences\n\n;; 6-byte sequence contains 7 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\08\"                       ;; custom section\n    \"\\07\\fc\\80\\80\\80\\80\\80\\80\"     ;; \"\\fc\\80\\80\\80\\80\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 5 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\06\"                       ;; custom section\n    \"\\05\\fc\\80\\80\\80\\80\"           ;; \"\\fc\\80\\80\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 5 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\07\"                       ;; custom section\n    \"\\06\\fc\\80\\80\\80\\80\\23\"        ;; \"\\fc\\80\\80\\80\\80#\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 4 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\fc\\80\\80\\80\"              ;; \"\\fc\\80\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 4 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\06\"                       ;; custom section\n    \"\\05\\fc\\80\\80\\80\\23\"           ;; \"\\fc\\80\\80\\80#\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 3 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\fc\\80\\80\"                 ;; \"\\fc\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 3 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\fc\\80\\80\\23\"              ;; \"\\fc\\80\\80#\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 2 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\fc\\80\"                    ;; \"\\fc\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 2 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\04\"                       ;; custom section\n    \"\\03\\fc\\80\\23\"                 ;; \"\\fc\\80#\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 1 byte at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\02\"                       ;; custom section\n    \"\\01\\fc\"                       ;; \"\\fc\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 1 byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\fc\\23\"                    ;; \"\\fc#\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 6-byte sequence contents\n\n;; (first) malformed 6-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\07\"                       ;; custom section\n    \"\\06\\fc\\80\\80\\80\\80\\80\"        ;; \"\\fc\\80\\80\\80\\80\\80\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (last) malformed 6-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\07\"                       ;; custom section\n    \"\\06\\fd\\bf\\bf\\bf\\bf\\bf\"        ;; \"\\fd\\bf\\bf\\bf\\bf\\bf\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; Miscellaneous malformed bytes\n\n;; malformed byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\02\"                       ;; custom section\n    \"\\01\\fe\"                       ;; \"\\fe\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; malformed byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\02\"                       ;; custom section\n    \"\\01\\ff\"                       ;; \"\\ff\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; UTF-16BE BOM\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\fe\\ff\"                    ;; \"\\fe\\ff\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; UTF-32BE BOM\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\00\\00\\fe\\ff\"              ;; \"\\00\\00\\fe\\ff\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; UTF-16LE BOM\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\03\"                       ;; custom section\n    \"\\02\\ff\\fe\"                    ;; \"\\ff\\fe\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; UTF-32LE BOM\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\00\\05\"                       ;; custom section\n    \"\\04\\ff\\fe\\00\\00\"              ;; \"\\ff\\fe\\00\\00\"\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n"
  },
  {
    "path": "test/core/utf8-import-field.wast",
    "content": ";;;;;; Invalid UTF-8 import field names\n\n;;;; Continuation bytes not preceded by prefixes\n\n;; encoding starts with (first) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\01\\80\"                       ;; \"\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; encoding starts with (0x8f) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\01\\8f\"                       ;; \"\\8f\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; encoding starts with (0x90) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\01\\90\"                       ;; \"\\90\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; encoding starts with (0x9f) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\01\\9f\"                       ;; \"\\9f\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; encoding starts with (0xa0) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\01\\a0\"                       ;; \"\\a0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; encoding starts with (last) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\01\\bf\"                       ;; \"\\bf\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 2-byte sequences\n\n;; 2-byte sequence contains 3 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\c2\\80\\80\"                 ;; \"\\c2\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 2-byte sequence contains 1 byte at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\01\\c2\"                       ;; \"\\c2\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 2-byte sequence contains 1 byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\c2\\2e\"                    ;; \"\\c2.\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 2-byte sequence contents\n\n;; overlong encoding after 0xc0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\c0\\80\"                    ;; \"\\c0\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xc0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\c0\\bf\"                    ;; \"\\c0\\bf\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xc1 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\c1\\80\"                    ;; \"\\c1\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xc1 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\c1\\bf\"                    ;; \"\\c1\\bf\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (first) 2-byte prefix not a contination byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\c2\\00\"                    ;; \"\\c2\\00\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (first) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\c2\\7f\"                    ;; \"\\c2\\7f\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (first) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\c2\\c0\"                    ;; \"\\c2\\c0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (first) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\c2\\fd\"                    ;; \"\\c2\\fd\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (last) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\df\\00\"                    ;; \"\\df\\00\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (last) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\df\\7f\"                    ;; \"\\df\\7f\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (last) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\df\\c0\"                    ;; \"\\df\\c0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (last) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\df\\fd\"                    ;; \"\\df\\fd\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 3-byte sequences\n\n;; 3-byte sequence contains 4 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\e1\\80\\80\\80\"              ;; \"\\e1\\80\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 3-byte sequence contains 2 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\e1\\80\"                    ;; \"\\e1\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 3-byte sequence contains 2 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e1\\80\\2e\"                 ;; \"\\e1\\80.\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 3-byte sequence contains 1 byte at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\01\\e1\"                       ;; \"\\e1\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 3-byte sequence contains 1 byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\e1\\2e\"                    ;; \"\\e1.\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 3-byte sequence contents\n\n;; first byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e0\\00\\a0\"                 ;; \"\\e0\\00\\a0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e0\\7f\\a0\"                 ;; \"\\e0\\7f\\a0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xe0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e0\\80\\80\"                 ;; \"\\e0\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xe0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e0\\80\\a0\"                 ;; \"\\e0\\80\\a0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xe0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e0\\9f\\a0\"                 ;; \"\\e0\\9f\\a0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xe0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e0\\9f\\bf\"                 ;; \"\\e0\\9f\\bf\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e0\\c0\\a0\"                 ;; \"\\e0\\c0\\a0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e0\\fd\\a0\"                 ;; \"\\e0\\fd\\a0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e1\\00\\80\"                 ;; \"\\e1\\00\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e1\\7f\\80\"                 ;; \"\\e1\\7f\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e1\\c0\\80\"                 ;; \"\\e1\\c0\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e1\\fd\\80\"                 ;; \"\\e1\\fd\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ec\\00\\80\"                 ;; \"\\ec\\00\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ec\\7f\\80\"                 ;; \"\\ec\\7f\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ec\\c0\\80\"                 ;; \"\\ec\\c0\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ec\\fd\\80\"                 ;; \"\\ec\\fd\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ed\\00\\80\"                 ;; \"\\ed\\00\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ed\\7f\\80\"                 ;; \"\\ed\\7f\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte sequence reserved for UTF-16 surrogate half\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ed\\a0\\80\"                 ;; \"\\ed\\a0\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte sequence reserved for UTF-16 surrogate half\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ed\\a0\\bf\"                 ;; \"\\ed\\a0\\bf\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte sequence reserved for UTF-16 surrogate half\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ed\\bf\\80\"                 ;; \"\\ed\\bf\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte sequence reserved for UTF-16 surrogate half\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ed\\bf\\bf\"                 ;; \"\\ed\\bf\\bf\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ed\\c0\\80\"                 ;; \"\\ed\\c0\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ed\\fd\\80\"                 ;; \"\\ed\\fd\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ee\\00\\80\"                 ;; \"\\ee\\00\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ee\\7f\\80\"                 ;; \"\\ee\\7f\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ee\\c0\\80\"                 ;; \"\\ee\\c0\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ee\\fd\\80\"                 ;; \"\\ee\\fd\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ef\\00\\80\"                 ;; \"\\ef\\00\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ef\\7f\\80\"                 ;; \"\\ef\\7f\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ef\\c0\\80\"                 ;; \"\\ef\\c0\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ef\\fd\\80\"                 ;; \"\\ef\\fd\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 3-byte sequence contents (third byte)\n\n;; second byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e0\\a0\\00\"                 ;; \"\\e0\\a0\\00\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e0\\a0\\7f\"                 ;; \"\\e0\\a0\\7f\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e0\\a0\\c0\"                 ;; \"\\e0\\a0\\c0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e0\\a0\\fd\"                 ;; \"\\e0\\a0\\fd\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e1\\80\\00\"                 ;; \"\\e1\\80\\00\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e1\\80\\7f\"                 ;; \"\\e1\\80\\7f\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e1\\80\\c0\"                 ;; \"\\e1\\80\\c0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\e1\\80\\fd\"                 ;; \"\\e1\\80\\fd\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ec\\80\\00\"                 ;; \"\\ec\\80\\00\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ec\\80\\7f\"                 ;; \"\\ec\\80\\7f\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ec\\80\\c0\"                 ;; \"\\ec\\80\\c0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ec\\80\\fd\"                 ;; \"\\ec\\80\\fd\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ed\\80\\00\"                 ;; \"\\ed\\80\\00\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ed\\80\\7f\"                 ;; \"\\ed\\80\\7f\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ed\\80\\c0\"                 ;; \"\\ed\\80\\c0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ed\\80\\fd\"                 ;; \"\\ed\\80\\fd\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ee\\80\\00\"                 ;; \"\\ee\\80\\00\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ee\\80\\7f\"                 ;; \"\\ee\\80\\7f\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ee\\80\\c0\"                 ;; \"\\ee\\80\\c0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ee\\80\\fd\"                 ;; \"\\ee\\80\\fd\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ef\\80\\00\"                 ;; \"\\ef\\80\\00\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ef\\80\\7f\"                 ;; \"\\ef\\80\\7f\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ef\\80\\c0\"                 ;; \"\\ef\\80\\c0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\ef\\80\\fd\"                 ;; \"\\ef\\80\\fd\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 4-byte sequences\n\n;; 4-byte sequence contains 5 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0f\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\05\\f1\\80\\80\\80\\80\"           ;; \"\\f1\\80\\80\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 3 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\f1\\80\\80\"                 ;; \"\\f1\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 3 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f1\\80\\80\\23\"              ;; \"\\f1\\80\\80#\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 2 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\f1\\80\"                    ;; \"\\f1\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 2 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\f1\\80\\23\"                 ;; \"\\f1\\80#\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 1 byte at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\01\\f1\"                       ;; \"\\f1\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 1 byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\f1\\23\"                    ;; \"\\f1#\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 4-byte sequence contents\n\n;; first byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f0\\00\\90\\90\"              ;; \"\\f0\\00\\90\\90\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f0\\7f\\90\\90\"              ;; \"\\f0\\7f\\90\\90\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xf0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f0\\80\\80\\80\"              ;; \"\\f0\\80\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xf0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f0\\80\\90\\90\"              ;; \"\\f0\\80\\90\\90\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xf0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f0\\8f\\90\\90\"              ;; \"\\f0\\8f\\90\\90\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xf0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f0\\8f\\bf\\bf\"              ;; \"\\f0\\8f\\bf\\bf\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f0\\c0\\90\\90\"              ;; \"\\f0\\c0\\90\\90\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f0\\fd\\90\\90\"              ;; \"\\f0\\fd\\90\\90\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f1\\00\\80\\80\"              ;; \"\\f1\\00\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f1\\7f\\80\\80\"              ;; \"\\f1\\7f\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f1\\c0\\80\\80\"              ;; \"\\f1\\c0\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f1\\fd\\80\\80\"              ;; \"\\f1\\fd\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f3\\00\\80\\80\"              ;; \"\\f3\\00\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f3\\7f\\80\\80\"              ;; \"\\f3\\7f\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f3\\c0\\80\\80\"              ;; \"\\f3\\c0\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f3\\fd\\80\\80\"              ;; \"\\f3\\fd\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f4\\00\\80\\80\"              ;; \"\\f4\\00\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f4\\7f\\80\\80\"              ;; \"\\f4\\7f\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (first) malformed code point\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f4\\90\\80\\80\"              ;; \"\\f4\\90\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; malformed code point\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f4\\bf\\80\\80\"              ;; \"\\f4\\bf\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f4\\c0\\80\\80\"              ;; \"\\f4\\c0\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f4\\fd\\80\\80\"              ;; \"\\f4\\fd\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (first) malformed 4-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f5\\80\\80\\80\"              ;; \"\\f5\\80\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (last) malformed 4-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f7\\80\\80\\80\"              ;; \"\\f7\\80\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (last) malformed 4-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f7\\bf\\bf\\bf\"              ;; \"\\f7\\bf\\bf\\bf\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 4-byte sequence contents (third byte)\n\n;; second byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f0\\90\\00\\90\"              ;; \"\\f0\\90\\00\\90\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f0\\90\\7f\\90\"              ;; \"\\f0\\90\\7f\\90\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f0\\90\\c0\\90\"              ;; \"\\f0\\90\\c0\\90\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f0\\90\\fd\\90\"              ;; \"\\f0\\90\\fd\\90\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f1\\80\\00\\80\"              ;; \"\\f1\\80\\00\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f1\\80\\7f\\80\"              ;; \"\\f1\\80\\7f\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f1\\80\\c0\\80\"              ;; \"\\f1\\80\\c0\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f1\\80\\fd\\80\"              ;; \"\\f1\\80\\fd\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f3\\80\\00\\80\"              ;; \"\\f3\\80\\00\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f3\\80\\7f\\80\"              ;; \"\\f3\\80\\7f\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f3\\80\\c0\\80\"              ;; \"\\f3\\80\\c0\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f3\\80\\fd\\80\"              ;; \"\\f3\\80\\fd\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f4\\80\\00\\80\"              ;; \"\\f4\\80\\00\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f4\\80\\7f\\80\"              ;; \"\\f4\\80\\7f\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f4\\80\\c0\\80\"              ;; \"\\f4\\80\\c0\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f4\\80\\fd\\80\"              ;; \"\\f4\\80\\fd\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 4-byte sequence contents (fourth byte)\n\n;; third byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f0\\90\\90\\00\"              ;; \"\\f0\\90\\90\\00\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f0\\90\\90\\7f\"              ;; \"\\f0\\90\\90\\7f\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f0\\90\\90\\c0\"              ;; \"\\f0\\90\\90\\c0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f0\\90\\90\\fd\"              ;; \"\\f0\\90\\90\\fd\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f1\\80\\80\\00\"              ;; \"\\f1\\80\\80\\00\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f1\\80\\80\\7f\"              ;; \"\\f1\\80\\80\\7f\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f1\\80\\80\\c0\"              ;; \"\\f1\\80\\80\\c0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f1\\80\\80\\fd\"              ;; \"\\f1\\80\\80\\fd\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f3\\80\\80\\00\"              ;; \"\\f3\\80\\80\\00\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f3\\80\\80\\7f\"              ;; \"\\f3\\80\\80\\7f\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f3\\80\\80\\c0\"              ;; \"\\f3\\80\\80\\c0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f3\\80\\80\\fd\"              ;; \"\\f3\\80\\80\\fd\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f4\\80\\80\\00\"              ;; \"\\f4\\80\\80\\00\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f4\\80\\80\\7f\"              ;; \"\\f4\\80\\80\\7f\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f4\\80\\80\\c0\"              ;; \"\\f4\\80\\80\\c0\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f4\\80\\80\\fd\"              ;; \"\\f4\\80\\80\\fd\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 5-byte sequences\n\n;; 5-byte sequence contains 6 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\10\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\06\\f8\\80\\80\\80\\80\\80\"        ;; \"\\f8\\80\\80\\80\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 4 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f8\\80\\80\\80\"              ;; \"\\f8\\80\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 4 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0f\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\05\\f8\\80\\80\\80\\23\"           ;; \"\\f8\\80\\80\\80#\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 3 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\f8\\80\\80\"                 ;; \"\\f8\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 3 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\f8\\80\\80\\23\"              ;; \"\\f8\\80\\80#\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 2 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\f8\\80\"                    ;; \"\\f8\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 2 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\f8\\80\\23\"                 ;; \"\\f8\\80#\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 1 byte at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\01\\f8\"                       ;; \"\\f8\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 1 byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\f8\\23\"                    ;; \"\\f8#\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 5-byte sequence contents\n\n;; (first) malformed 5-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0f\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\05\\f8\\80\\80\\80\\80\"           ;; \"\\f8\\80\\80\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (last) malformed 5-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0f\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\05\\fb\\bf\\bf\\bf\\bf\"           ;; \"\\fb\\bf\\bf\\bf\\bf\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 6-byte sequences\n\n;; 6-byte sequence contains 7 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\11\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\07\\fc\\80\\80\\80\\80\\80\\80\"     ;; \"\\fc\\80\\80\\80\\80\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 5 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0f\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\05\\fc\\80\\80\\80\\80\"           ;; \"\\fc\\80\\80\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 5 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\10\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\06\\fc\\80\\80\\80\\80\\23\"        ;; \"\\fc\\80\\80\\80\\80#\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 4 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\fc\\80\\80\\80\"              ;; \"\\fc\\80\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 4 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0f\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\05\\fc\\80\\80\\80\\23\"           ;; \"\\fc\\80\\80\\80#\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 3 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\fc\\80\\80\"                 ;; \"\\fc\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 3 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\fc\\80\\80\\23\"              ;; \"\\fc\\80\\80#\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 2 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\fc\\80\"                    ;; \"\\fc\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 2 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\03\\fc\\80\\23\"                 ;; \"\\fc\\80#\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 1 byte at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\01\\fc\"                       ;; \"\\fc\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 1 byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\fc\\23\"                    ;; \"\\fc#\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 6-byte sequence contents\n\n;; (first) malformed 6-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\10\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\06\\fc\\80\\80\\80\\80\\80\"        ;; \"\\fc\\80\\80\\80\\80\\80\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (last) malformed 6-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\10\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\06\\fd\\bf\\bf\\bf\\bf\\bf\"        ;; \"\\fd\\bf\\bf\\bf\\bf\\bf\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; Miscellaneous malformed bytes\n\n;; malformed byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\01\\fe\"                       ;; \"\\fe\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; malformed byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\01\\ff\"                       ;; \"\\ff\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; UTF-16BE BOM\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\fe\\ff\"                    ;; \"\\fe\\ff\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; UTF-32BE BOM\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\00\\00\\fe\\ff\"              ;; \"\\00\\00\\fe\\ff\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; UTF-16LE BOM\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\02\\ff\\fe\"                    ;; \"\\ff\\fe\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; UTF-32LE BOM\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\ff\\fe\\00\\00\"              ;; \"\\ff\\fe\\00\\00\"\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n"
  },
  {
    "path": "test/core/utf8-import-module.wast",
    "content": ";;;;;; Invalid UTF-8 import module names\n\n;;;; Continuation bytes not preceded by prefixes\n\n;; encoding starts with (first) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\01\\80\"                       ;; \"\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; encoding starts with (0x8f) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\01\\8f\"                       ;; \"\\8f\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; encoding starts with (0x90) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\01\\90\"                       ;; \"\\90\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; encoding starts with (0x9f) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\01\\9f\"                       ;; \"\\9f\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; encoding starts with (0xa0) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\01\\a0\"                       ;; \"\\a0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; encoding starts with (last) continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\01\\bf\"                       ;; \"\\bf\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 2-byte sequences\n\n;; 2-byte sequence contains 3 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\c2\\80\\80\"                 ;; \"\\c2\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 2-byte sequence contains 1 byte at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\01\\c2\"                       ;; \"\\c2\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 2-byte sequence contains 1 byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\c2\\2e\"                    ;; \"\\c2.\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 2-byte sequence contents\n\n;; overlong encoding after 0xc0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\c0\\80\"                    ;; \"\\c0\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xc0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\c0\\bf\"                    ;; \"\\c0\\bf\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xc1 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\c1\\80\"                    ;; \"\\c1\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xc1 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\c1\\bf\"                    ;; \"\\c1\\bf\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (first) 2-byte prefix not a contination byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\c2\\00\"                    ;; \"\\c2\\00\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (first) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\c2\\7f\"                    ;; \"\\c2\\7f\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (first) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\c2\\c0\"                    ;; \"\\c2\\c0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (first) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\c2\\fd\"                    ;; \"\\c2\\fd\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (last) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\df\\00\"                    ;; \"\\df\\00\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (last) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\df\\7f\"                    ;; \"\\df\\7f\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (last) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\df\\c0\"                    ;; \"\\df\\c0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte after (last) 2-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\df\\fd\"                    ;; \"\\df\\fd\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 3-byte sequences\n\n;; 3-byte sequence contains 4 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\e1\\80\\80\\80\"              ;; \"\\e1\\80\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 3-byte sequence contains 2 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\e1\\80\"                    ;; \"\\e1\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 3-byte sequence contains 2 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e1\\80\\2e\"                 ;; \"\\e1\\80.\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 3-byte sequence contains 1 byte at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\01\\e1\"                       ;; \"\\e1\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 3-byte sequence contains 1 byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\e1\\2e\"                    ;; \"\\e1.\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 3-byte sequence contents\n\n;; first byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e0\\00\\a0\"                 ;; \"\\e0\\00\\a0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e0\\7f\\a0\"                 ;; \"\\e0\\7f\\a0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xe0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e0\\80\\80\"                 ;; \"\\e0\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xe0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e0\\80\\a0\"                 ;; \"\\e0\\80\\a0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xe0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e0\\9f\\a0\"                 ;; \"\\e0\\9f\\a0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xe0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e0\\9f\\bf\"                 ;; \"\\e0\\9f\\bf\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e0\\c0\\a0\"                 ;; \"\\e0\\c0\\a0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e0\\fd\\a0\"                 ;; \"\\e0\\fd\\a0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e1\\00\\80\"                 ;; \"\\e1\\00\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e1\\7f\\80\"                 ;; \"\\e1\\7f\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e1\\c0\\80\"                 ;; \"\\e1\\c0\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e1\\fd\\80\"                 ;; \"\\e1\\fd\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ec\\00\\80\"                 ;; \"\\ec\\00\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ec\\7f\\80\"                 ;; \"\\ec\\7f\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ec\\c0\\80\"                 ;; \"\\ec\\c0\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ec\\fd\\80\"                 ;; \"\\ec\\fd\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ed\\00\\80\"                 ;; \"\\ed\\00\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ed\\7f\\80\"                 ;; \"\\ed\\7f\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte sequence reserved for UTF-16 surrogate half\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ed\\a0\\80\"                 ;; \"\\ed\\a0\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte sequence reserved for UTF-16 surrogate half\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ed\\a0\\bf\"                 ;; \"\\ed\\a0\\bf\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte sequence reserved for UTF-16 surrogate half\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ed\\bf\\80\"                 ;; \"\\ed\\bf\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; byte sequence reserved for UTF-16 surrogate half\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ed\\bf\\bf\"                 ;; \"\\ed\\bf\\bf\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ed\\c0\\80\"                 ;; \"\\ed\\c0\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ed\\fd\\80\"                 ;; \"\\ed\\fd\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ee\\00\\80\"                 ;; \"\\ee\\00\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ee\\7f\\80\"                 ;; \"\\ee\\7f\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ee\\c0\\80\"                 ;; \"\\ee\\c0\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ee\\fd\\80\"                 ;; \"\\ee\\fd\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ef\\00\\80\"                 ;; \"\\ef\\00\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ef\\7f\\80\"                 ;; \"\\ef\\7f\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ef\\c0\\80\"                 ;; \"\\ef\\c0\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ef\\fd\\80\"                 ;; \"\\ef\\fd\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 3-byte sequence contents (third byte)\n\n;; second byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e0\\a0\\00\"                 ;; \"\\e0\\a0\\00\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e0\\a0\\7f\"                 ;; \"\\e0\\a0\\7f\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e0\\a0\\c0\"                 ;; \"\\e0\\a0\\c0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xe0) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e0\\a0\\fd\"                 ;; \"\\e0\\a0\\fd\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e1\\80\\00\"                 ;; \"\\e1\\80\\00\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e1\\80\\7f\"                 ;; \"\\e1\\80\\7f\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e1\\80\\c0\"                 ;; \"\\e1\\80\\c0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\e1\\80\\fd\"                 ;; \"\\e1\\80\\fd\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ec\\80\\00\"                 ;; \"\\ec\\80\\00\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ec\\80\\7f\"                 ;; \"\\ec\\80\\7f\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ec\\80\\c0\"                 ;; \"\\ec\\80\\c0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ec\\80\\fd\"                 ;; \"\\ec\\80\\fd\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ed\\80\\00\"                 ;; \"\\ed\\80\\00\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ed\\80\\7f\"                 ;; \"\\ed\\80\\7f\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ed\\80\\c0\"                 ;; \"\\ed\\80\\c0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xed) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ed\\80\\fd\"                 ;; \"\\ed\\80\\fd\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ee\\80\\00\"                 ;; \"\\ee\\80\\00\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ee\\80\\7f\"                 ;; \"\\ee\\80\\7f\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ee\\80\\c0\"                 ;; \"\\ee\\80\\c0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ee\\80\\fd\"                 ;; \"\\ee\\80\\fd\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ef\\80\\00\"                 ;; \"\\ef\\80\\00\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ef\\80\\7f\"                 ;; \"\\ef\\80\\7f\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ef\\80\\c0\"                 ;; \"\\ef\\80\\c0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 3-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\ef\\80\\fd\"                 ;; \"\\ef\\80\\fd\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 4-byte sequences\n\n;; 4-byte sequence contains 5 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0f\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\05\\f1\\80\\80\\80\\80\"           ;; \"\\f1\\80\\80\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 3 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\f1\\80\\80\"                 ;; \"\\f1\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 3 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f1\\80\\80\\23\"              ;; \"\\f1\\80\\80#\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 2 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\f1\\80\"                    ;; \"\\f1\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 2 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\f1\\80\\23\"                 ;; \"\\f1\\80#\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 1 byte at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\01\\f1\"                       ;; \"\\f1\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 4-byte sequence contains 1 byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\f1\\23\"                    ;; \"\\f1#\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 4-byte sequence contents\n\n;; first byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f0\\00\\90\\90\"              ;; \"\\f0\\00\\90\\90\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f0\\7f\\90\\90\"              ;; \"\\f0\\7f\\90\\90\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xf0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f0\\80\\80\\80\"              ;; \"\\f0\\80\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xf0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f0\\80\\90\\90\"              ;; \"\\f0\\80\\90\\90\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xf0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f0\\8f\\90\\90\"              ;; \"\\f0\\8f\\90\\90\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; overlong encoding after 0xf0 prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f0\\8f\\bf\\bf\"              ;; \"\\f0\\8f\\bf\\bf\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f0\\c0\\90\\90\"              ;; \"\\f0\\c0\\90\\90\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f0\\fd\\90\\90\"              ;; \"\\f0\\fd\\90\\90\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f1\\00\\80\\80\"              ;; \"\\f1\\00\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f1\\7f\\80\\80\"              ;; \"\\f1\\7f\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f1\\c0\\80\\80\"              ;; \"\\f1\\c0\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f1\\fd\\80\\80\"              ;; \"\\f1\\fd\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f3\\00\\80\\80\"              ;; \"\\f3\\00\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f3\\7f\\80\\80\"              ;; \"\\f3\\7f\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f3\\c0\\80\\80\"              ;; \"\\f3\\c0\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f3\\fd\\80\\80\"              ;; \"\\f3\\fd\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f4\\00\\80\\80\"              ;; \"\\f4\\00\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f4\\7f\\80\\80\"              ;; \"\\f4\\7f\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (first) malformed code point\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f4\\90\\80\\80\"              ;; \"\\f4\\90\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; malformed code point\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f4\\bf\\80\\80\"              ;; \"\\f4\\bf\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f4\\c0\\80\\80\"              ;; \"\\f4\\c0\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; first byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f4\\fd\\80\\80\"              ;; \"\\f4\\fd\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (first) malformed 4-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f5\\80\\80\\80\"              ;; \"\\f5\\80\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (last) malformed 4-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f7\\80\\80\\80\"              ;; \"\\f7\\80\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (last) malformed 4-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f7\\bf\\bf\\bf\"              ;; \"\\f7\\bf\\bf\\bf\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 4-byte sequence contents (third byte)\n\n;; second byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f0\\90\\00\\90\"              ;; \"\\f0\\90\\00\\90\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f0\\90\\7f\\90\"              ;; \"\\f0\\90\\7f\\90\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f0\\90\\c0\\90\"              ;; \"\\f0\\90\\c0\\90\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f0\\90\\fd\\90\"              ;; \"\\f0\\90\\fd\\90\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f1\\80\\00\\80\"              ;; \"\\f1\\80\\00\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f1\\80\\7f\\80\"              ;; \"\\f1\\80\\7f\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f1\\80\\c0\\80\"              ;; \"\\f1\\80\\c0\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f1\\80\\fd\\80\"              ;; \"\\f1\\80\\fd\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f3\\80\\00\\80\"              ;; \"\\f3\\80\\00\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f3\\80\\7f\\80\"              ;; \"\\f3\\80\\7f\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f3\\80\\c0\\80\"              ;; \"\\f3\\80\\c0\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f3\\80\\fd\\80\"              ;; \"\\f3\\80\\fd\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f4\\80\\00\\80\"              ;; \"\\f4\\80\\00\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f4\\80\\7f\\80\"              ;; \"\\f4\\80\\7f\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f4\\80\\c0\\80\"              ;; \"\\f4\\80\\c0\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; second byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f4\\80\\fd\\80\"              ;; \"\\f4\\80\\fd\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 4-byte sequence contents (fourth byte)\n\n;; third byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f0\\90\\90\\00\"              ;; \"\\f0\\90\\90\\00\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f0\\90\\90\\7f\"              ;; \"\\f0\\90\\90\\7f\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f0\\90\\90\\c0\"              ;; \"\\f0\\90\\90\\c0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf0) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f0\\90\\90\\fd\"              ;; \"\\f0\\90\\90\\fd\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f1\\80\\80\\00\"              ;; \"\\f1\\80\\80\\00\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f1\\80\\80\\7f\"              ;; \"\\f1\\80\\80\\7f\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f1\\80\\80\\c0\"              ;; \"\\f1\\80\\80\\c0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (first normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f1\\80\\80\\fd\"              ;; \"\\f1\\80\\80\\fd\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f3\\80\\80\\00\"              ;; \"\\f3\\80\\80\\00\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f3\\80\\80\\7f\"              ;; \"\\f3\\80\\80\\7f\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f3\\80\\80\\c0\"              ;; \"\\f3\\80\\80\\c0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (last normal) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f3\\80\\80\\fd\"              ;; \"\\f3\\80\\80\\fd\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f4\\80\\80\\00\"              ;; \"\\f4\\80\\80\\00\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f4\\80\\80\\7f\"              ;; \"\\f4\\80\\80\\7f\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f4\\80\\80\\c0\"              ;; \"\\f4\\80\\80\\c0\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; third byte after (0xf4) 4-byte prefix not a continuation byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f4\\80\\80\\fd\"              ;; \"\\f4\\80\\80\\fd\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 5-byte sequences\n\n;; 5-byte sequence contains 6 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\10\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\06\\f8\\80\\80\\80\\80\\80\"        ;; \"\\f8\\80\\80\\80\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 4 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f8\\80\\80\\80\"              ;; \"\\f8\\80\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 4 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0f\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\05\\f8\\80\\80\\80\\23\"           ;; \"\\f8\\80\\80\\80#\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 3 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\f8\\80\\80\"                 ;; \"\\f8\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 3 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\f8\\80\\80\\23\"              ;; \"\\f8\\80\\80#\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 2 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\f8\\80\"                    ;; \"\\f8\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 2 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\f8\\80\\23\"                 ;; \"\\f8\\80#\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 1 byte at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\01\\f8\"                       ;; \"\\f8\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 5-byte sequence contains 1 byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\f8\\23\"                    ;; \"\\f8#\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 5-byte sequence contents\n\n;; (first) malformed 5-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0f\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\05\\f8\\80\\80\\80\\80\"           ;; \"\\f8\\80\\80\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (last) malformed 5-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0f\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\05\\fb\\bf\\bf\\bf\\bf\"           ;; \"\\fb\\bf\\bf\\bf\\bf\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 6-byte sequences\n\n;; 6-byte sequence contains 7 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\11\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\07\\fc\\80\\80\\80\\80\\80\\80\"     ;; \"\\fc\\80\\80\\80\\80\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 5 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0f\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\05\\fc\\80\\80\\80\\80\"           ;; \"\\fc\\80\\80\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 5 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\10\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\06\\fc\\80\\80\\80\\80\\23\"        ;; \"\\fc\\80\\80\\80\\80#\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 4 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\fc\\80\\80\\80\"              ;; \"\\fc\\80\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 4 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0f\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\05\\fc\\80\\80\\80\\23\"           ;; \"\\fc\\80\\80\\80#\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 3 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\fc\\80\\80\"                 ;; \"\\fc\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 3 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\fc\\80\\80\\23\"              ;; \"\\fc\\80\\80#\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 2 bytes at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\fc\\80\"                    ;; \"\\fc\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 2 bytes\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0d\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\03\\fc\\80\\23\"                 ;; \"\\fc\\80#\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 1 byte at end of string\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\01\\fc\"                       ;; \"\\fc\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; 6-byte sequence contains 1 byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\fc\\23\"                    ;; \"\\fc#\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; 6-byte sequence contents\n\n;; (first) malformed 6-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\10\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\06\\fc\\80\\80\\80\\80\\80\"        ;; \"\\fc\\80\\80\\80\\80\\80\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; (last) malformed 6-byte prefix\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\10\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\06\\fd\\bf\\bf\\bf\\bf\\bf\"        ;; \"\\fd\\bf\\bf\\bf\\bf\\bf\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;;;; Miscellaneous malformed bytes\n\n;; malformed byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\01\\fe\"                       ;; \"\\fe\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; malformed byte\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0b\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\01\\ff\"                       ;; \"\\ff\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; UTF-16BE BOM\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\fe\\ff\"                    ;; \"\\fe\\ff\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; UTF-32BE BOM\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\00\\00\\fe\\ff\"              ;; \"\\00\\00\\fe\\ff\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; UTF-16LE BOM\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0c\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\02\\ff\\fe\"                    ;; \"\\ff\\fe\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n;; UTF-32LE BOM\n(assert_malformed\n  (module binary\n    \"\\00asm\" \"\\01\\00\\00\\00\"\n    \"\\02\\0e\"                       ;; import section\n    \"\\01\"                          ;; length 1\n    \"\\04\\74\\65\\73\\74\"              ;; \"test\"\n    \"\\04\\ff\\fe\\00\\00\"              ;; \"\\ff\\fe\\00\\00\"\n    \"\\03\"                          ;; GlobalImport\n    \"\\7f\"                          ;; i32\n    \"\\00\"                          ;; immutable\n  )\n  \"malformed UTF-8 encoding\"\n)\n\n"
  },
  {
    "path": "test/core/utf8-invalid-encoding.wast",
    "content": "(assert_malformed (module quote \"(func (export \\\"\\\\00\\\\00\\\\fe\\\\ff\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\8f\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\90\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\9f\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\a0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\bf\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\c0\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\c0\\\\bf\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\c1\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\c1\\\\bf\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\c2\\\\00\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\c2\\\\2e\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\c2\\\\7f\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\c2\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\c2\\\\c0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\c2\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\c2\\\\fd\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\df\\\\00\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\df\\\\7f\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\df\\\\c0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\df\\\\fd\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e0\\\\00\\\\a0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e0\\\\7f\\\\a0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e0\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e0\\\\80\\\\a0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e0\\\\9f\\\\a0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e0\\\\9f\\\\bf\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e0\\\\a0\\\\00\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e0\\\\a0\\\\7f\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e0\\\\a0\\\\c0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e0\\\\a0\\\\fd\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e0\\\\c0\\\\a0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e0\\\\fd\\\\a0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e1\\\\00\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e1\\\\2e\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e1\\\\7f\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e1\\\\80\\\\00\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e1\\\\80\\\\2e\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e1\\\\80\\\\7f\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e1\\\\80\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e1\\\\80\\\\c0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e1\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e1\\\\80\\\\fd\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e1\\\\c0\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e1\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\e1\\\\fd\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ec\\\\00\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ec\\\\7f\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ec\\\\80\\\\00\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ec\\\\80\\\\7f\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ec\\\\80\\\\c0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ec\\\\80\\\\fd\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ec\\\\c0\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ec\\\\fd\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ed\\\\00\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ed\\\\7f\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ed\\\\80\\\\00\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ed\\\\80\\\\7f\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ed\\\\80\\\\c0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ed\\\\80\\\\fd\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ed\\\\a0\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ed\\\\a0\\\\bf\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ed\\\\bf\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ed\\\\bf\\\\bf\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ed\\\\c0\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ed\\\\fd\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ee\\\\00\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ee\\\\7f\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ee\\\\80\\\\00\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ee\\\\80\\\\7f\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ee\\\\80\\\\c0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ee\\\\80\\\\fd\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ee\\\\c0\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ee\\\\fd\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ef\\\\00\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ef\\\\7f\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ef\\\\80\\\\00\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ef\\\\80\\\\7f\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ef\\\\80\\\\c0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ef\\\\80\\\\fd\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ef\\\\c0\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ef\\\\fd\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f0\\\\00\\\\90\\\\90\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f0\\\\7f\\\\90\\\\90\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f0\\\\80\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f0\\\\80\\\\90\\\\90\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f0\\\\8f\\\\90\\\\90\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f0\\\\8f\\\\bf\\\\bf\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f0\\\\90\\\\00\\\\90\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f0\\\\90\\\\7f\\\\90\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f0\\\\90\\\\90\\\\00\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f0\\\\90\\\\90\\\\7f\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f0\\\\90\\\\90\\\\c0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f0\\\\90\\\\90\\\\fd\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f0\\\\90\\\\c0\\\\90\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f0\\\\90\\\\fd\\\\90\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f0\\\\c0\\\\90\\\\90\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f0\\\\fd\\\\90\\\\90\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\00\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\23\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\7f\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\80\\\\00\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\80\\\\23\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\80\\\\7f\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\80\\\\80\\\\00\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\80\\\\80\\\\23\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\80\\\\80\\\\7f\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\80\\\\80\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\80\\\\80\\\\c0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\80\\\\80\\\\fd\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\80\\\\c0\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\80\\\\fd\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\c0\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f1\\\\fd\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f3\\\\00\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f3\\\\7f\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f3\\\\80\\\\00\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f3\\\\80\\\\7f\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f3\\\\80\\\\80\\\\00\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f3\\\\80\\\\80\\\\7f\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f3\\\\80\\\\80\\\\c0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f3\\\\80\\\\80\\\\fd\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f3\\\\80\\\\c0\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f3\\\\80\\\\fd\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f3\\\\c0\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f3\\\\fd\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f4\\\\00\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f4\\\\7f\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f4\\\\80\\\\00\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f4\\\\80\\\\7f\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f4\\\\80\\\\80\\\\00\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f4\\\\80\\\\80\\\\7f\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f4\\\\80\\\\80\\\\c0\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f4\\\\80\\\\80\\\\fd\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f4\\\\80\\\\c0\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f4\\\\80\\\\fd\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f4\\\\90\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f4\\\\bf\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f4\\\\c0\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f4\\\\fd\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f5\\\\80\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f7\\\\80\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f7\\\\bf\\\\bf\\\\bf\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f8\\\\23\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f8\\\\80\\\\23\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f8\\\\80\\\\80\\\\23\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f8\\\\80\\\\80\\\\80\\\\23\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f8\\\\80\\\\80\\\\80\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f8\\\\80\\\\80\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f8\\\\80\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f8\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f8\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\f8\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\fb\\\\bf\\\\bf\\\\bf\\\\bf\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\fc\\\\23\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\fc\\\\80\\\\23\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\fc\\\\80\\\\80\\\\23\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\fc\\\\80\\\\80\\\\80\\\\23\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\fc\\\\80\\\\80\\\\80\\\\80\\\\23\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\fc\\\\80\\\\80\\\\80\\\\80\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\fc\\\\80\\\\80\\\\80\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\fc\\\\80\\\\80\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\fc\\\\80\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\fc\\\\80\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\fc\\\\80\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\fc\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\fd\\\\bf\\\\bf\\\\bf\\\\bf\\\\bf\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\fe\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\fe\\\\ff\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ff\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ff\\\\fe\\\\00\\\\00\\\"))\") \"malformed UTF-8 encoding\")\n(assert_malformed (module quote \"(func (export \\\"\\\\ff\\\\fe\\\"))\") \"malformed UTF-8 encoding\")\n"
  },
  {
    "path": "test/harness/async_index.js",
    "content": "/*\n * Copyright 2018 WebAssembly Community Group participants\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\"use strict\";\n\nlet testNum = (function() {\n  let count = 1;\n  return function() {\n    return `#${count++} `;\n  };\n})();\n\nfunction uniqueTest(func, desc) {\n  test(func, testNum() + desc);\n}\n\n// WPT's assert_throw uses a list of predefined, hardcoded known errors. Since\n// it is not aware of the WebAssembly error types (yet), implement our own\n// version.\nfunction assertThrows(func, err) {\n  let caught = false;\n  try {\n    func();\n  } catch (e) {\n    assert_true(\n      e instanceof err,\n      `expected ${err.name}, observed ${e.constructor.name}`\n    );\n    caught = true;\n  }\n  assert_true(caught, testNum() + \"assertThrows must catch any error.\");\n}\n\n/******************************************************************************\n ***************************** WAST HARNESS ************************************\n ******************************************************************************/\n\nconst EXPECT_INVALID = false;\n\n/* DATA **********************************************************************/\n\nlet externrefs = {};\nlet externsym = Symbol(\"externref\");\nfunction externref(s) {\n  if (! (s in externrefs)) externrefs[s] = {[externsym]: s};\n  return externrefs[s];\n}\nfunction is_externref(x) {\n  return (x !== null && externsym in x) ? 1 : 0;\n}\nfunction is_funcref(x) {\n  return typeof x === \"function\" ? 1 : 0;\n}\nfunction eq_externref(x, y) {\n  return x === y ? 1 : 0;\n}\nfunction eq_funcref(x, y) {\n  return x === y ? 1 : 0;\n}\n\n// Default imports.\nvar registry = {};\n\n// All tests run asynchronously and return their results as promises. To ensure\n// that all tests execute in the correct order, we chain the promises together\n// so that a test is only executed when all previous tests have finished their\n// execution.\nlet chain = Promise.resolve();\n\n// Resets the registry between two different WPT tests.\nfunction reinitializeRegistry() {\n  if (typeof WebAssembly === \"undefined\") return;\n\n  chain = chain.then(_ => {\n    let spectest = {\n      externref: externref,\n      is_externref: is_externref,\n      is_funcref: is_funcref,\n      eq_externref: eq_externref,\n      eq_funcref: eq_funcref,\n      print: console.log.bind(console),\n      print_i32: console.log.bind(console),\n      print_i32_f32: console.log.bind(console),\n      print_f64_f64: console.log.bind(console),\n      print_f32: console.log.bind(console),\n      print_f64: console.log.bind(console),\n      global_i32: 666,\n      global_f32: 666,\n      global_f64: 666,\n      table: new WebAssembly.Table({\n        initial: 10,\n        maximum: 20,\n        element: \"anyfunc\"\n      }),\n      memory: new WebAssembly.Memory({ initial: 1, maximum: 2 })\n    };\n    let handler = {\n      get(target, prop) {\n        return prop in target ? target[prop] : {};\n      }\n    };\n    registry = new Proxy({ spectest }, handler);\n  });\n\n  // This function is called at the end of every generated js test file. By\n  // adding the chain as a promise_test here we make sure that the WPT harness\n  // waits for all tests in the chain to finish.\n  promise_test(_ => chain, testNum() + \"Reinitialize the default imports\");\n}\n\nreinitializeRegistry();\n\n/* WAST POLYFILL *************************************************************/\n\nfunction binary(bytes) {\n  let buffer = new ArrayBuffer(bytes.length);\n  let view = new Uint8Array(buffer);\n  for (let i = 0; i < bytes.length; ++i) {\n    view[i] = bytes.charCodeAt(i);\n  }\n  return buffer;\n}\n\n/**\n * Returns a compiled module, or throws if there was an error at compilation.\n */\nfunction module(bytes, valid = true) {\n  const test = valid\n    ? \"Test that WebAssembly compilation succeeds\"\n    : \"Test that WebAssembly compilation fails\";\n  const loc = new Error().stack.toString().replace(\"Error\", \"\");\n  let buffer = binary(bytes);\n  let validated = WebAssembly.validate(buffer);\n\n  uniqueTest(_ => {\n    assert_equals(valid, validated);\n  }, test);\n\n  chain = chain.then(_ => WebAssembly.compile(buffer)).then(\n    module => {\n      uniqueTest(_ => {\n        assert_true(valid, loc);\n      }, test);\n      return module;\n    },\n    error => {\n      uniqueTest(_ => {\n        assert_true(\n          !valid,\n          `WebAssembly.compile failed unexpectedly with ${error} at {loc}`\n        );\n      }, test);\n    }\n  );\n  return chain;\n}\n\nfunction assert_invalid(bytes) {\n  module(bytes, EXPECT_INVALID);\n}\n\nconst assert_malformed = assert_invalid;\n\nfunction instance(bytes, imports, valid = true) {\n  const test = valid\n    ? \"Test that WebAssembly instantiation succeeds\"\n    : \"Test that WebAssembly instantiation fails\";\n  const loc = new Error().stack.toString().replace(\"Error\", \"\");\n  chain = Promise.all([imports, chain])\n    .then(values => {\n      let imports = values[0] ? values[0] : registry;\n      return WebAssembly.instantiate(binary(bytes), imports);\n    })\n    .then(\n      pair => {\n        uniqueTest(_ => {\n          assert_true(valid, loc);\n        }, test);\n        return pair.instance;\n      },\n      error => {\n        uniqueTest(_ => {\n          assert_true(\n            !valid,\n            `unexpected instantiation error, observed ${error} ${loc}`\n          );\n        }, test);\n        return error;\n      }\n    );\n  return chain;\n}\n\nfunction exports(instance) {\n  return instance.then(inst => {\n    return { module: inst.exports, spectest: registry.spectest };\n  });\n}\n\nfunction call(instance, name, args) {\n  return Promise.all([instance, chain]).then(values => {\n    return values[0].exports[name](...args);\n  });\n}\n\nfunction run(action) {\n  const test = \"Run a WebAssembly test without special assertions\";\n  const loc = new Error().stack.toString().replace(\"Error\", \"\");\n  chain = Promise.all([chain, action()])\n    .then(\n      _ => {\n        uniqueTest(_ => {}, test);\n      },\n      error => {\n        uniqueTest(_ => {\n          assert_true(\n            false,\n            `unexpected runtime error, observed ${error} ${loc}`\n          );\n        }, \"run\");\n      }\n    )\n    // Clear all exceptions, so that subsequent tests get executed.\n    .catch(_ => {});\n}\n\nfunction assert_trap(action) {\n  const test = \"Test that a WebAssembly code traps\";\n  const loc = new Error().stack.toString().replace(\"Error\", \"\");\n  chain = Promise.all([chain, action()])\n    .then(\n      result => {\n        uniqueTest(_ => {\n          assert_true(false, loc);\n        }, test);\n      },\n      error => {\n        uniqueTest(_ => {\n          assert_true(\n            error instanceof WebAssembly.RuntimeError,\n            `expected runtime error, observed ${error} ${loc}`\n          );\n        }, test);\n      }\n    )\n    // Clear all exceptions, so that subsequent tests get executed.\n    .catch(_ => {});\n}\n\nfunction assert_return(action, ...expected) {\n  const test = \"Test that a WebAssembly code returns a specific result\";\n  const loc = new Error().stack.toString().replace(\"Error\", \"\");\n  chain = Promise.all([action(), chain])\n    .then(\n      values => {\n        uniqueTest(_ => {\n          if (actual === undefined) {\n            actual = [];\n          } else if (!Array.isArray(actual)) {\n            actual = [actual];\n          }\n          if (actual.length !== expected.length) {\n            throw new Error(expected.length + \" value(s) expected, got \" + actual.length);\n          }\n          for (let i = 0; i < actual.length; ++i) {\n            switch (expected[i]) {\n              case \"nan:canonical\":\n              case \"nan:arithmetic\":\n              case \"nan:any\":\n                // Note that JS can't reliably distinguish different NaN values,\n                // so there's no good way to test that it's a canonical NaN.\n                assert_true(Number.isNaN(actual[i]), `expected NaN, observed ${actual[i]}.`);\n                return;\n              case \"ref.func\":\n                assert_true(typeof actual[i] === \"function\", `expected Wasm function, got ${actual[i]}`);\n                return;\n              case \"ref.extern\":\n                assert_true(actual[i] !== null, `expected Wasm reference, got ${actual[i]}`);\n                return;\n              default:\n                assert_equals(actual[i], expected[i], loc);\n            }\n          }\n        }, test);\n      },\n      error => {\n        uniqueTest(_ => {\n          assert_true(\n            false,\n            `unexpected runtime error, observed ${error} ${loc}`\n          );\n        }, test);\n      }\n    )\n    // Clear all exceptions, so that subsequent tests get executed.\n    .catch(_ => {});\n}\n\nlet StackOverflow;\ntry {\n  (function f() {\n    1 + f();\n  })();\n} catch (e) {\n  StackOverflow = e.constructor;\n}\n\nfunction assert_exhaustion(action) {\n  const test = \"Test that a WebAssembly code exhauts the stack space\";\n  const loc = new Error().stack.toString().replace(\"Error\", \"\");\n  chain = Promise.all([action(), chain])\n    .then(\n      _ => {\n        uniqueTest(_ => {\n          assert_true(false, loc);\n        }, test);\n      },\n      error => {\n        uniqueTest(_ => {\n          assert_true(\n            error instanceof StackOverflow,\n            `expected runtime error, observed ${error} ${loc}`\n          );\n        }, test);\n      }\n    )\n    // Clear all exceptions, so that subsequent tests get executed.\n    .catch(_ => {});\n}\n\nfunction assert_unlinkable(bytes) {\n  const test = \"Test that a WebAssembly module is unlinkable\";\n  const loc = new Error().stack.toString().replace(\"Error\", \"\");\n  instance(bytes, registry, EXPECT_INVALID)\n    .then(\n      result => {\n        uniqueTest(_ => {\n          assert_true(\n            result instanceof WebAssembly.LinkError,\n            `expected link error, observed ${result} ${loc}`\n          );\n        }, test);\n      },\n      _ => {\n        uniqueTest(_ => {\n          assert_true(false, loc);\n        }, test);\n      }\n    )\n    // Clear all exceptions, so that subsequent tests get executed.\n    .catch(_ => {});\n}\n\nfunction assert_uninstantiable(bytes) {\n  const test = \"Test that a WebAssembly module is uninstantiable\";\n  const loc = new Error().stack.toString().replace(\"Error\", \"\");\n  instance(bytes, registry, EXPECT_INVALID)\n    .then(\n      result => {\n        uniqueTest(_ => {\n          assert_true(\n            result instanceof WebAssembly.RuntimeError,\n            `expected link error, observed ${result} ${loc}`\n          );\n        }, test);\n      },\n      _ => {\n        uniqueTest(_ => {\n          assert_true(false, loc);\n        }, test);\n      }\n    )\n    // Clear all exceptions, so that subsequent tests get executed.\n    .catch(_ => {});\n}\n\nfunction register(name, instance) {\n  const test =\n    \"Test that the exports of a WebAssembly module can be registered\";\n  const loc = new Error().stack.toString().replace(\"Error\", \"\");\n  let stack = new Error();\n  chain = Promise.all([instance, chain])\n    .then(\n      values => {\n        registry[name] = values[0].exports;\n      },\n      _ => {\n        uniqueTest(_ => {\n          assert_true(false, loc);\n        }, test);\n      }\n    )\n    // Clear all exceptions, so that subsequent tests get executed.\n    .catch(_ => {});\n}\n\nfunction get(instance, name) {\n  const test = \"Test that an export of a WebAssembly instance can be acquired\";\n  const loc = new Error().stack.toString().replace(\"Error\", \"\");\n  chain = Promise.all([instance, chain]).then(\n    values => {\n      let v = values[0].exports[name];\n      return (v instanceof WebAssembly.Global) ? v.value : v;\n    },\n    _ => {\n      uniqueTest(_ => {\n        assert_true(false, loc);\n      }, test);\n    }\n  );\n  return chain;\n}\n\n"
  },
  {
    "path": "test/harness/sync_index.js",
    "content": "/*\n * Copyright 2017 WebAssembly Community Group participants\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n*/\n\n'use strict';\n\nlet testNum = (function() {\n    let count = 1;\n    return function() {\n        return `#${count++} `;\n    }\n})();\n\n// WPT's assert_throw uses a list of predefined, hardcoded known errors. Since\n// it is not aware of the WebAssembly error types (yet), implement our own\n// version.\nfunction assertThrows(func, err) {\n    let caught = false;\n    try {\n        func();\n    } catch(e) {\n        assert_true(e instanceof err, `expected ${err.name}, observed ${e.constructor.name}`);\n        caught = true;\n    }\n    assert_true(caught, testNum() + \"assertThrows must catch any error.\")\n}\n\n/******************************************************************************\n***************************** WAST HARNESS ************************************\n******************************************************************************/\n\n// For assertions internal to our test harness.\nfunction _assert(x) {\n    if (!x) {\n        throw new Error(`Assertion failure: ${x}`);\n    }\n}\n\n// A simple sum type that can either be a valid Value or an Error.\nfunction Result(type, maybeValue) {\n    this.value = maybeValue;\n    this.type = type;\n};\n\nResult.VALUE = 'VALUE';\nResult.ERROR = 'ERROR';\n\nfunction ValueResult(val) { return new Result(Result.VALUE, val); }\nfunction ErrorResult(err) { return new Result(Result.ERROR, err); }\n\nResult.prototype.isError = function() { return this.type === Result.ERROR; }\n\nconst EXPECT_INVALID = false;\n\n/* DATA **********************************************************************/\n\nlet externrefs = {};\nlet externsym = Symbol(\"externref\");\nfunction externref(s) {\n  if (! (s in externrefs)) externrefs[s] = {[externsym]: s};\n  return externrefs[s];\n}\nfunction is_externref(x) {\n  return (x !== null && externsym in x) ? 1 : 0;\n}\nfunction is_funcref(x) {\n  return typeof x === \"function\" ? 1 : 0;\n}\nfunction eq_externref(x, y) {\n  return x === y ? 1 : 0;\n}\nfunction eq_funcref(x, y) {\n  return x === y ? 1 : 0;\n}\n\nlet $$;\n\n// Default imports.\nvar registry = {};\n\n// Resets the registry between two different WPT tests.\nfunction reinitializeRegistry() {\n    if (typeof WebAssembly === 'undefined')\n        return;\n\n    let spectest = {\n        externref: externref,\n        is_externref: is_externref,\n        is_funcref: is_funcref,\n        eq_externref: eq_externref,\n        eq_funcref: eq_funcref,\n        print: console.log.bind(console),\n        print_i32: console.log.bind(console),\n        print_i32_f32: console.log.bind(console),\n        print_f64_f64: console.log.bind(console),\n        print_f32: console.log.bind(console),\n        print_f64: console.log.bind(console),\n        global_i32: 666,\n        global_f32: 666,\n        global_f64: 666,\n        table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),\n        memory: new WebAssembly.Memory({initial: 1, maximum: 2})\n    };\n    let handler = {\n        get(target, prop) {\n        return (prop in target) ?  target[prop] : {};\n      }\n    };\n    registry = new Proxy({spectest}, handler);\n}\n\nreinitializeRegistry();\n\n/* WAST POLYFILL *************************************************************/\n\nfunction binary(bytes) {\n    let buffer = new ArrayBuffer(bytes.length);\n    let view = new Uint8Array(buffer);\n    for (let i = 0; i < bytes.length; ++i) {\n        view[i] = bytes.charCodeAt(i);\n    }\n    return buffer;\n}\n\n/**\n * Returns a compiled module, or throws if there was an error at compilation.\n */\nfunction module(bytes, valid = true) {\n    let buffer = binary(bytes);\n    let validated;\n\n    try {\n        validated = WebAssembly.validate(buffer);\n    } catch (e) {\n        throw new Error(`WebAssembly.validate throws ${typeof e}: ${e}${e.stack}`);\n    }\n\n    if (validated !== valid) {\n        // Try to get a more precise error message from the WebAssembly.CompileError.\n        try {\n            new WebAssembly.Module(buffer);\n        } catch (e) {\n            if (e instanceof WebAssembly.CompileError)\n                throw new WebAssembly.CompileError(`WebAssembly.validate error: ${e.toString()}${e.stack}\\n`);\n            else\n                throw new Error(`WebAssembly.validate throws ${typeof e}: ${e}${e.stack}`);\n        }\n        throw new Error(`WebAssembly.validate was expected to fail, but didn't`);\n    }\n\n    let module;\n    try {\n        module = new WebAssembly.Module(buffer);\n    } catch(e) {\n        if (valid)\n            throw new Error('WebAssembly.Module ctor unexpectedly throws ${typeof e}: ${e}${e.stack}');\n        throw e;\n    }\n\n    return module;\n}\n\nfunction uniqueTest(func, desc) {\n    test(func, testNum() + desc);\n}\n\nfunction assert_invalid(bytes) {\n    uniqueTest(() => {\n        try {\n            module(bytes, /* valid */ false);\n            throw new Error('did not fail');\n        } catch(e) {\n            assert_true(e instanceof WebAssembly.CompileError, \"expected invalid failure:\");\n        }\n    }, \"A wast module that should be invalid or malformed.\");\n}\n\nconst assert_malformed = assert_invalid;\n\nfunction instance(bytes, imports = registry, valid = true) {\n    if (imports instanceof Result) {\n        if (imports.isError())\n            return imports;\n        imports = imports.value;\n    }\n\n    let err = null;\n\n    let m, i;\n    try {\n        let m = module(bytes);\n        i = new WebAssembly.Instance(m, imports);\n    } catch(e) {\n        err = e;\n    }\n\n    if (valid) {\n        uniqueTest(() => {\n            let instantiated = err === null;\n            assert_true(instantiated, err);\n        }, \"module successfully instantiated\");\n    }\n\n    return err !== null ? ErrorResult(err) : ValueResult(i);\n}\n\nfunction register(name, instance) {\n    _assert(instance instanceof Result);\n\n    if (instance.isError())\n        return;\n\n    registry[name] = instance.value.exports;\n}\n\nfunction call(instance, name, args) {\n    _assert(instance instanceof Result);\n\n    if (instance.isError())\n        return instance;\n\n    let err = null;\n    let result;\n    try {\n        result = instance.value.exports[name](...args);\n    } catch(e) {\n        err = e;\n    }\n\n    return err !== null ? ErrorResult(err) : ValueResult(result);\n};\n\nfunction get(instance, name) {\n    _assert(instance instanceof Result);\n\n    if (instance.isError())\n        return instance;\n\n    let v = instance.value.exports[name];\n    return ValueResult((v instanceof WebAssembly.Global) ? v.value : v);\n}\n\nfunction exports(instance) {\n    _assert(instance instanceof Result);\n\n    if (instance.isError())\n        return instance;\n\n    return ValueResult({ module: instance.value.exports, spectest: registry.spectest });\n}\n\nfunction run(action) {\n    let result = action();\n\n    _assert(result instanceof Result);\n\n    uniqueTest(() => {\n        if (result.isError())\n            throw result.value;\n    }, \"A wast test that runs without any special assertion.\");\n}\n\nfunction assert_unlinkable(bytes) {\n    let result = instance(bytes, registry, EXPECT_INVALID);\n\n    _assert(result instanceof Result);\n\n    uniqueTest(() => {\n        assert_true(result.isError(), 'expected error result');\n        if (result.isError()) {\n            let e = result.value;\n            assert_true(e instanceof WebAssembly.LinkError, `expected link error, observed ${e}:`);\n        }\n    }, \"A wast module that is unlinkable.\");\n}\n\nfunction assert_uninstantiable(bytes) {\n    let result = instance(bytes, registry, EXPECT_INVALID);\n\n    _assert(result instanceof Result);\n\n    uniqueTest(() => {\n        assert_true(result.isError(), 'expected error result');\n        if (result.isError()) {\n            let e = result.value;\n            assert_true(e instanceof WebAssembly.RuntimeError, `expected runtime error, observed ${e}:`);\n        }\n    }, \"A wast module that is uninstantiable.\");\n}\n\nfunction assert_trap(action) {\n    let result = action();\n\n    _assert(result instanceof Result);\n\n    uniqueTest(() => {\n        assert_true(result.isError(), 'expected error result');\n        if (result.isError()) {\n            let e = result.value;\n            assert_true(e instanceof WebAssembly.RuntimeError, `expected runtime error, observed ${e}:`);\n        }\n    }, \"A wast module that must trap at runtime.\");\n}\n\nlet StackOverflow;\ntry { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }\n\nfunction assert_exhaustion(action) {\n    let result = action();\n\n    _assert(result instanceof Result);\n\n    uniqueTest(() => {\n        assert_true(result.isError(), 'expected error result');\n        if (result.isError()) {\n            let e = result.value;\n            assert_true(e instanceof StackOverflow, `expected stack overflow error, observed ${e}:`);\n        }\n    }, \"A wast module that must exhaust the stack space.\");\n}\n\nfunction assert_return(action, ...expected) {\n    let result = action();\n    _assert(result instanceof Result);\n\n    uniqueTest(() => {\n        assert_true(!result.isError(), `expected success result, got: ${result.value}.`);\n        let actual = result.value;\n        if (actual === undefined) {\n            actual = [];\n        } else if (!Array.isArray(actual)) {\n            actual = [actual];\n        }\n        if (actual.length !== expected.length) {\n            throw new Error(expected.length + \" value(s) expected, got \" + actual.length);\n        }\n        for (let i = 0; i < actual.length; ++i) {\n            if (expected[i] instanceof Result) {\n                if (expected[i].isError())\n                    return;\n                expected[i] = expected[i].value;\n            }\n            switch (expected[i]) {\n                case \"nan:canonical\":\n                case \"nan:arithmetic\":\n                case \"nan:any\":\n                    // Note that JS can't reliably distinguish different NaN values,\n                    // so there's no good way to test that it's a canonical NaN.\n                    assert_true(Number.isNaN(actual[i]), `expected NaN, observed ${actual[i]}.`);\n                    return;\n                case \"ref.func\":\n                    assert_true(typeof actual[i] === \"function\", `expected Wasm function, got ${actual[i]}`);\n                    return;\n                case \"ref.extern\":\n                    assert_true(actual[i] !== null, `expected Wasm reference, got ${actual[i]}`);\n                    return;\n                default:\n                    assert_equals(actual[i], expected[i]);\n            }\n        }\n    }, \"A wast module that must return a particular value.\");\n}\n\nfunction assert_return_nan(action) {\n    let result = action();\n\n    _assert(result instanceof Result);\n\n    uniqueTest(() => {\n        assert_true(!result.isError(), 'expected success result');\n        if (!result.isError()) {\n            assert_true(Number.isNaN(result.value), `expected NaN, observed ${result.value}.`);\n        };\n    }, \"A wast module that must return NaN.\");\n}\n"
  },
  {
    "path": "test/harness/testharness.css",
    "content": "html {\n    font-family:DejaVu Sans, Bitstream Vera Sans, Arial, Sans;\n}\n\n#log .warning,\n#log .warning a {\n  color: black;\n  background: yellow;\n}\n\n#log .error,\n#log .error a {\n  color: white;\n  background: red;\n}\n\nsection#summary {\n    margin-bottom:1em;\n}\n\ntable#results {\n    border-collapse:collapse;\n    table-layout:fixed;\n    width:100%;\n}\n\ntable#results th:first-child,\ntable#results td:first-child {\n    width:4em;\n}\n\ntable#results th:last-child,\ntable#results td:last-child {\n    width:50%;\n}\n\ntable#results.assertions th:last-child,\ntable#results.assertions td:last-child {\n    width:35%;\n}\n\ntable#results th {\n    padding:0;\n    padding-bottom:0.5em;\n    border-bottom:medium solid black;\n}\n\ntable#results td {\n    padding:1em;\n    padding-bottom:0.5em;\n    border-bottom:thin solid black;\n}\n\ntr.pass > td:first-child {\n    color:green;\n}\n\ntr.fail > td:first-child {\n    color:red;\n}\n\ntr.timeout > td:first-child {\n    color:red;\n}\n\ntr.notrun > td:first-child {\n    color:blue;\n}\n\n.pass > td:first-child, .fail > td:first-child, .timeout > td:first-child, .notrun > td:first-child {\n    font-variant:small-caps;\n}\n\ntable#results span {\n    display:block;\n}\n\ntable#results span.expected {\n    font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;\n    white-space:pre;\n}\n\ntable#results span.actual {\n    font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;\n    white-space:pre;\n}\n\nspan.ok {\n    color:green;\n}\n\ntr.error {\n    color:red;\n}\n\nspan.timeout {\n    color:red;\n}\n\nspan.ok, span.timeout, span.error {\n    font-variant:small-caps;\n}"
  },
  {
    "path": "test/harness/testharness.js",
    "content": "/*global self*/\n/*jshint latedef: nofunc*/\n/*\nDistributed under both the W3C Test Suite License [1] and the W3C\n3-clause BSD License [2]. To contribute to a W3C Test Suite, see the\npolicies and contribution forms [3].\n\n[1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license\n[2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license\n[3] http://www.w3.org/2004/10/27-testcases\n*/\n\n/* Documentation is in docs/api.md */\n\n(function ()\n{\n    var debug = false;\n    // default timeout is 10 seconds, test can override if needed\n    var settings = {\n        output:true,\n        harness_timeout:{\n            \"normal\":10000,\n            \"long\":60000\n        },\n        test_timeout:null,\n        message_events: [\"start\", \"test_state\", \"result\", \"completion\"]\n    };\n\n    var xhtml_ns = \"http://www.w3.org/1999/xhtml\";\n\n    /*\n     * TestEnvironment is an abstraction for the environment in which the test\n     * harness is used. Each implementation of a test environment has to provide\n     * the following interface:\n     *\n     * interface TestEnvironment {\n     *   // Invoked after the global 'tests' object has been created and it's\n     *   // safe to call add_*_callback() to register event handlers.\n     *   void on_tests_ready();\n     *\n     *   // Invoked after setup() has been called to notify the test environment\n     *   // of changes to the test harness properties.\n     *   void on_new_harness_properties(object properties);\n     *\n     *   // Should return a new unique default test name.\n     *   DOMString next_default_test_name();\n     *\n     *   // Should return the test harness timeout duration in milliseconds.\n     *   float test_timeout();\n     *\n     *   // Should return the global scope object.\n     *   object global_scope();\n     * };\n     */\n\n    /*\n     * A test environment with a DOM. The global object is 'window'. By default\n     * test results are displayed in a table. Any parent windows receive\n     * callbacks or messages via postMessage() when test events occur. See\n     * apisample11.html and apisample12.html.\n     */\n    function WindowTestEnvironment() {\n        this.name_counter = 0;\n        this.window_cache = null;\n        this.output_handler = null;\n        this.all_loaded = false;\n        var this_obj = this;\n        this.message_events = [];\n\n        this.message_functions = {\n            start: [add_start_callback, remove_start_callback,\n                    function (properties) {\n                        this_obj._dispatch(\"start_callback\", [properties],\n                                           {type: \"start\", properties: properties});\n                    }],\n\n            test_state: [add_test_state_callback, remove_test_state_callback,\n                         function(test) {\n                             this_obj._dispatch(\"test_state_callback\", [test],\n                                                {type: \"test_state\",\n                                                 test: test.structured_clone()});\n                         }],\n            result: [add_result_callback, remove_result_callback,\n                     function (test) {\n                         this_obj.output_handler.show_status();\n                         this_obj._dispatch(\"result_callback\", [test],\n                                            {type: \"result\",\n                                             test: test.structured_clone()});\n                     }],\n            completion: [add_completion_callback, remove_completion_callback,\n                         function (tests, harness_status) {\n                             var cloned_tests = map(tests, function(test) {\n                                 return test.structured_clone();\n                             });\n                             this_obj._dispatch(\"completion_callback\", [tests, harness_status],\n                                                {type: \"complete\",\n                                                 tests: cloned_tests,\n                                                 status: harness_status.structured_clone()});\n                         }]\n        }\n\n        on_event(window, 'load', function() {\n            this_obj.all_loaded = true;\n        });\n    }\n\n    WindowTestEnvironment.prototype._dispatch = function(selector, callback_args, message_arg) {\n        this._forEach_windows(\n                function(w, same_origin) {\n                    if (same_origin) {\n                        try {\n                            var has_selector = selector in w;\n                        } catch(e) {\n                            // If document.domain was set at some point same_origin can be\n                            // wrong and the above will fail.\n                            has_selector = false;\n                        }\n                        if (has_selector) {\n                            try {\n                                w[selector].apply(undefined, callback_args);\n                            } catch (e) {\n                                if (debug) {\n                                    throw e;\n                                }\n                            }\n                        }\n                    }\n                    if (supports_post_message(w) && w !== self) {\n                        w.postMessage(message_arg, \"*\");\n                    }\n                });\n    };\n\n    WindowTestEnvironment.prototype._forEach_windows = function(callback) {\n        // Iterate of the the windows [self ... top, opener]. The callback is passed\n        // two objects, the first one is the windows object itself, the second one\n        // is a boolean indicating whether or not its on the same origin as the\n        // current window.\n        var cache = this.window_cache;\n        if (!cache) {\n            cache = [[self, true]];\n            var w = self;\n            var i = 0;\n            var so;\n            var origins = location.ancestorOrigins;\n            while (w != w.parent) {\n                w = w.parent;\n                // In WebKit, calls to parent windows' properties that aren't on the same\n                // origin cause an error message to be displayed in the error console but\n                // don't throw an exception. This is a deviation from the current HTML5\n                // spec. See: https://bugs.webkit.org/show_bug.cgi?id=43504\n                // The problem with WebKit's behavior is that it pollutes the error console\n                // with error messages that can't be caught.\n                //\n                // This issue can be mitigated by relying on the (for now) proprietary\n                // `location.ancestorOrigins` property which returns an ordered list of\n                // the origins of enclosing windows. See:\n                // http://trac.webkit.org/changeset/113945.\n                if (origins) {\n                    so = (location.origin == origins[i]);\n                } else {\n                    so = is_same_origin(w);\n                }\n                cache.push([w, so]);\n                i++;\n            }\n            w = window.opener;\n            if (w) {\n                // window.opener isn't included in the `location.ancestorOrigins` prop.\n                // We'll just have to deal with a simple check and an error msg on WebKit\n                // browsers in this case.\n                cache.push([w, is_same_origin(w)]);\n            }\n            this.window_cache = cache;\n        }\n\n        forEach(cache,\n                function(a) {\n                    callback.apply(null, a);\n                });\n    };\n\n    WindowTestEnvironment.prototype.on_tests_ready = function() {\n        var output = new Output();\n        this.output_handler = output;\n\n        var this_obj = this;\n\n        add_start_callback(function (properties) {\n            this_obj.output_handler.init(properties);\n        });\n\n        add_test_state_callback(function(test) {\n            this_obj.output_handler.show_status();\n        });\n\n        add_result_callback(function (test) {\n            this_obj.output_handler.show_status();\n        });\n\n        add_completion_callback(function (tests, harness_status) {\n            this_obj.output_handler.show_results(tests, harness_status);\n        });\n        this.setup_messages(settings.message_events);\n    };\n\n    WindowTestEnvironment.prototype.setup_messages = function(new_events) {\n        var this_obj = this;\n        forEach(settings.message_events, function(x) {\n            var current_dispatch = this_obj.message_events.indexOf(x) !== -1;\n            var new_dispatch = new_events.indexOf(x) !== -1;\n            if (!current_dispatch && new_dispatch) {\n                this_obj.message_functions[x][0](this_obj.message_functions[x][2]);\n            } else if (current_dispatch && !new_dispatch) {\n                this_obj.message_functions[x][1](this_obj.message_functions[x][2]);\n            }\n        });\n        this.message_events = new_events;\n    }\n\n    WindowTestEnvironment.prototype.next_default_test_name = function() {\n        //Don't use document.title to work around an Opera bug in XHTML documents\n        var title = document.getElementsByTagName(\"title\")[0];\n        var prefix = (title && title.firstChild && title.firstChild.data) || \"Untitled\";\n        var suffix = this.name_counter > 0 ? \" \" + this.name_counter : \"\";\n        this.name_counter++;\n        return prefix + suffix;\n    };\n\n    WindowTestEnvironment.prototype.on_new_harness_properties = function(properties) {\n        this.output_handler.setup(properties);\n        if (properties.hasOwnProperty(\"message_events\")) {\n            this.setup_messages(properties.message_events);\n        }\n    };\n\n    WindowTestEnvironment.prototype.add_on_loaded_callback = function(callback) {\n        on_event(window, 'load', callback);\n    };\n\n    WindowTestEnvironment.prototype.test_timeout = function() {\n        var metas = document.getElementsByTagName(\"meta\");\n        for (var i = 0; i < metas.length; i++) {\n            if (metas[i].name == \"timeout\") {\n                if (metas[i].content == \"long\") {\n                    return settings.harness_timeout.long;\n                }\n                break;\n            }\n        }\n        return settings.harness_timeout.normal;\n    };\n\n    WindowTestEnvironment.prototype.global_scope = function() {\n        return window;\n    };\n\n    /*\n     * Base TestEnvironment implementation for a generic web worker.\n     *\n     * Workers accumulate test results. One or more clients can connect and\n     * retrieve results from a worker at any time.\n     *\n     * WorkerTestEnvironment supports communicating with a client via a\n     * MessagePort.  The mechanism for determining the appropriate MessagePort\n     * for communicating with a client depends on the type of worker and is\n     * implemented by the various specializations of WorkerTestEnvironment\n     * below.\n     *\n     * A client document using testharness can use fetch_tests_from_worker() to\n     * retrieve results from a worker. See apisample16.html.\n     */\n    function WorkerTestEnvironment() {\n        this.name_counter = 0;\n        this.all_loaded = true;\n        this.message_list = [];\n        this.message_ports = [];\n    }\n\n    WorkerTestEnvironment.prototype._dispatch = function(message) {\n        this.message_list.push(message);\n        for (var i = 0; i < this.message_ports.length; ++i)\n        {\n            this.message_ports[i].postMessage(message);\n        }\n    };\n\n    // The only requirement is that port has a postMessage() method. It doesn't\n    // have to be an instance of a MessagePort, and often isn't.\n    WorkerTestEnvironment.prototype._add_message_port = function(port) {\n        this.message_ports.push(port);\n        for (var i = 0; i < this.message_list.length; ++i)\n        {\n            port.postMessage(this.message_list[i]);\n        }\n    };\n\n    WorkerTestEnvironment.prototype.next_default_test_name = function() {\n        var suffix = this.name_counter > 0 ? \" \" + this.name_counter : \"\";\n        this.name_counter++;\n        return \"Untitled\" + suffix;\n    };\n\n    WorkerTestEnvironment.prototype.on_new_harness_properties = function() {};\n\n    WorkerTestEnvironment.prototype.on_tests_ready = function() {\n        var this_obj = this;\n        add_start_callback(\n                function(properties) {\n                    this_obj._dispatch({\n                        type: \"start\",\n                        properties: properties,\n                    });\n                });\n        add_test_state_callback(\n                function(test) {\n                    this_obj._dispatch({\n                        type: \"test_state\",\n                        test: test.structured_clone()\n                    });\n                });\n        add_result_callback(\n                function(test) {\n                    this_obj._dispatch({\n                        type: \"result\",\n                        test: test.structured_clone()\n                    });\n                });\n        add_completion_callback(\n                function(tests, harness_status) {\n                    this_obj._dispatch({\n                        type: \"complete\",\n                        tests: map(tests,\n                            function(test) {\n                                return test.structured_clone();\n                            }),\n                        status: harness_status.structured_clone()\n                    });\n                });\n    };\n\n    WorkerTestEnvironment.prototype.add_on_loaded_callback = function() {};\n\n    WorkerTestEnvironment.prototype.test_timeout = function() {\n        // Tests running in a worker don't have a default timeout. I.e. all\n        // worker tests behave as if settings.explicit_timeout is true.\n        return null;\n    };\n\n    WorkerTestEnvironment.prototype.global_scope = function() {\n        return self;\n    };\n\n    /*\n     * Dedicated web workers.\n     * https://html.spec.whatwg.org/multipage/workers.html#dedicatedworkerglobalscope\n     *\n     * This class is used as the test_environment when testharness is running\n     * inside a dedicated worker.\n     */\n    function DedicatedWorkerTestEnvironment() {\n        WorkerTestEnvironment.call(this);\n        // self is an instance of DedicatedWorkerGlobalScope which exposes\n        // a postMessage() method for communicating via the message channel\n        // established when the worker is created.\n        this._add_message_port(self);\n    }\n    DedicatedWorkerTestEnvironment.prototype = Object.create(WorkerTestEnvironment.prototype);\n\n    DedicatedWorkerTestEnvironment.prototype.on_tests_ready = function() {\n        WorkerTestEnvironment.prototype.on_tests_ready.call(this);\n        // In the absence of an onload notification, we a require dedicated\n        // workers to explicitly signal when the tests are done.\n        tests.wait_for_finish = true;\n    };\n\n    /*\n     * Shared web workers.\n     * https://html.spec.whatwg.org/multipage/workers.html#sharedworkerglobalscope\n     *\n     * This class is used as the test_environment when testharness is running\n     * inside a shared web worker.\n     */\n    function SharedWorkerTestEnvironment() {\n        WorkerTestEnvironment.call(this);\n        var this_obj = this;\n        // Shared workers receive message ports via the 'onconnect' event for\n        // each connection.\n        self.addEventListener(\"connect\",\n                function(message_event) {\n                    this_obj._add_message_port(message_event.source);\n                });\n    }\n    SharedWorkerTestEnvironment.prototype = Object.create(WorkerTestEnvironment.prototype);\n\n    SharedWorkerTestEnvironment.prototype.on_tests_ready = function() {\n        WorkerTestEnvironment.prototype.on_tests_ready.call(this);\n        // In the absence of an onload notification, we a require shared\n        // workers to explicitly signal when the tests are done.\n        tests.wait_for_finish = true;\n    };\n\n    /*\n     * Service workers.\n     * http://www.w3.org/TR/service-workers/\n     *\n     * This class is used as the test_environment when testharness is running\n     * inside a service worker.\n     */\n    function ServiceWorkerTestEnvironment() {\n        WorkerTestEnvironment.call(this);\n        this.all_loaded = false;\n        this.on_loaded_callback = null;\n        var this_obj = this;\n        self.addEventListener(\"message\",\n                function(event) {\n                    if (event.data.type && event.data.type === \"connect\") {\n                        if (event.ports && event.ports[0]) {\n                            // If a MessageChannel was passed, then use it to\n                            // send results back to the main window.  This\n                            // allows the tests to work even if the browser\n                            // does not fully support MessageEvent.source in\n                            // ServiceWorkers yet.\n                            this_obj._add_message_port(event.ports[0]);\n                            event.ports[0].start();\n                        } else {\n                            // If there is no MessageChannel, then attempt to\n                            // use the MessageEvent.source to send results\n                            // back to the main window.\n                            this_obj._add_message_port(event.source);\n                        }\n                    }\n                });\n\n        // The oninstall event is received after the service worker script and\n        // all imported scripts have been fetched and executed. It's the\n        // equivalent of an onload event for a document. All tests should have\n        // been added by the time this event is received, thus it's not\n        // necessary to wait until the onactivate event.\n        on_event(self, \"install\",\n                function(event) {\n                    this_obj.all_loaded = true;\n                    if (this_obj.on_loaded_callback) {\n                        this_obj.on_loaded_callback();\n                    }\n                });\n    }\n    ServiceWorkerTestEnvironment.prototype = Object.create(WorkerTestEnvironment.prototype);\n\n    ServiceWorkerTestEnvironment.prototype.add_on_loaded_callback = function(callback) {\n        if (this.all_loaded) {\n            callback();\n        } else {\n            this.on_loaded_callback = callback;\n        }\n    };\n\n    function create_test_environment() {\n        if ('document' in self) {\n            return new WindowTestEnvironment();\n        }\n        if ('DedicatedWorkerGlobalScope' in self &&\n            self instanceof DedicatedWorkerGlobalScope) {\n            return new DedicatedWorkerTestEnvironment();\n        }\n        if ('SharedWorkerGlobalScope' in self &&\n            self instanceof SharedWorkerGlobalScope) {\n            return new SharedWorkerTestEnvironment();\n        }\n        if ('ServiceWorkerGlobalScope' in self &&\n            self instanceof ServiceWorkerGlobalScope) {\n            return new ServiceWorkerTestEnvironment();\n        }\n        if ('WorkerGlobalScope' in self &&\n            self instanceof WorkerGlobalScope) {\n            return new DedicatedWorkerTestEnvironment();\n        }\n\n        throw new Error(\"Unsupported test environment\");\n    }\n\n    var test_environment = create_test_environment();\n\n    function is_shared_worker(worker) {\n        return 'SharedWorker' in self && worker instanceof SharedWorker;\n    }\n\n    function is_service_worker(worker) {\n        return 'ServiceWorker' in self && worker instanceof ServiceWorker;\n    }\n\n    /*\n     * API functions\n     */\n\n    function test(func, name, properties)\n    {\n        var test_name = name ? name : test_environment.next_default_test_name();\n        properties = properties ? properties : {};\n        var test_obj = new Test(test_name, properties);\n        test_obj.step(func, test_obj, test_obj);\n        if (test_obj.phase === test_obj.phases.STARTED) {\n            test_obj.done();\n        }\n    }\n\n    function async_test(func, name, properties)\n    {\n        if (typeof func !== \"function\") {\n            properties = name;\n            name = func;\n            func = null;\n        }\n        var test_name = name ? name : test_environment.next_default_test_name();\n        properties = properties ? properties : {};\n        var test_obj = new Test(test_name, properties);\n        if (func) {\n            test_obj.step(func, test_obj, test_obj);\n        }\n        return test_obj;\n    }\n\n    function promise_test(func, name, properties) {\n        var test = async_test(name, properties);\n        // If there is no promise tests queue make one.\n        if (!tests.promise_tests) {\n            tests.promise_tests = Promise.resolve();\n        }\n        tests.promise_tests = tests.promise_tests.then(function() {\n            var promise = test.step(func, test, test);\n            test.step(function() {\n                assert_not_equals(promise, undefined);\n            });\n            return Promise.resolve(promise)\n                .then(\n                    function() {\n                        test.done();\n                    })\n                .catch(test.step_func(\n                    function(value) {\n                        if (value instanceof AssertionError) {\n                            throw value;\n                        }\n                        assert(false, \"promise_test\", null,\n                               \"Unhandled rejection with value: ${value}\", {value:value});\n                    }));\n        });\n    }\n\n    function promise_rejects(test, expected, promise, description) {\n        return promise.then(test.unreached_func(\"Should have rejected: \" + description)).catch(function(e) {\n            assert_throws(expected, function() { throw e }, description);\n        });\n    }\n\n    /**\n     * This constructor helper allows DOM events to be handled using Promises,\n     * which can make it a lot easier to test a very specific series of events,\n     * including ensuring that unexpected events are not fired at any point.\n     */\n    function EventWatcher(test, watchedNode, eventTypes)\n    {\n        if (typeof eventTypes == 'string') {\n            eventTypes = [eventTypes];\n        }\n\n        var waitingFor = null;\n\n        var eventHandler = test.step_func(function(evt) {\n            assert_true(!!waitingFor,\n                        'Not expecting event, but got ' + evt.type + ' event');\n            assert_equals(evt.type, waitingFor.types[0],\n                          'Expected ' + waitingFor.types[0] + ' event, but got ' +\n                          evt.type + ' event instead');\n            if (waitingFor.types.length > 1) {\n                // Pop first event from array\n                waitingFor.types.shift();\n                return;\n            }\n            // We need to null out waitingFor before calling the resolve function\n            // since the Promise's resolve handlers may call wait_for() which will\n            // need to set waitingFor.\n            var resolveFunc = waitingFor.resolve;\n            waitingFor = null;\n            resolveFunc(evt);\n        });\n\n        for (var i = 0; i < eventTypes.length; i++) {\n            watchedNode.addEventListener(eventTypes[i], eventHandler);\n        }\n\n        /**\n         * Returns a Promise that will resolve after the specified event or\n         * series of events has occurred.\n         */\n        this.wait_for = function(types) {\n            if (waitingFor) {\n                return Promise.reject('Already waiting for an event or events');\n            }\n            if (typeof types == 'string') {\n                types = [types];\n            }\n            return new Promise(function(resolve, reject) {\n                waitingFor = {\n                    types: types,\n                    resolve: resolve,\n                    reject: reject\n                };\n            });\n        };\n\n        function stop_watching() {\n            for (var i = 0; i < eventTypes.length; i++) {\n                watchedNode.removeEventListener(eventTypes[i], eventHandler);\n            }\n        };\n\n        test.add_cleanup(stop_watching);\n\n        return this;\n    }\n    expose(EventWatcher, 'EventWatcher');\n\n    function setup(func_or_properties, maybe_properties)\n    {\n        var func = null;\n        var properties = {};\n        if (arguments.length === 2) {\n            func = func_or_properties;\n            properties = maybe_properties;\n        } else if (func_or_properties instanceof Function) {\n            func = func_or_properties;\n        } else {\n            properties = func_or_properties;\n        }\n        tests.setup(func, properties);\n        test_environment.on_new_harness_properties(properties);\n    }\n\n    function done() {\n        if (tests.tests.length === 0) {\n            tests.set_file_is_test();\n        }\n        if (tests.file_is_test) {\n            tests.tests[0].done();\n        }\n        tests.end_wait();\n    }\n\n    function generate_tests(func, args, properties) {\n        forEach(args, function(x, i)\n                {\n                    var name = x[0];\n                    test(function()\n                         {\n                             func.apply(this, x.slice(1));\n                         },\n                         name,\n                         Array.isArray(properties) ? properties[i] : properties);\n                });\n    }\n\n    function on_event(object, event, callback)\n    {\n        object.addEventListener(event, callback, false);\n    }\n\n    function step_timeout(f, t) {\n        var outer_this = this;\n        var args = Array.prototype.slice.call(arguments, 2);\n        return setTimeout(function() {\n            f.apply(outer_this, args);\n        }, t * tests.timeout_multiplier);\n    }\n\n    expose(test, 'test');\n    expose(async_test, 'async_test');\n    expose(promise_test, 'promise_test');\n    expose(promise_rejects, 'promise_rejects');\n    expose(generate_tests, 'generate_tests');\n    expose(setup, 'setup');\n    expose(done, 'done');\n    expose(on_event, 'on_event');\n    expose(step_timeout, 'step_timeout');\n\n    /*\n     * Return a string truncated to the given length, with ... added at the end\n     * if it was longer.\n     */\n    function truncate(s, len)\n    {\n        if (s.length > len) {\n            return s.substring(0, len - 3) + \"...\";\n        }\n        return s;\n    }\n\n    /*\n     * Return true if object is probably a Node object.\n     */\n    function is_node(object)\n    {\n        // I use duck-typing instead of instanceof, because\n        // instanceof doesn't work if the node is from another window (like an\n        // iframe's contentWindow):\n        // http://www.w3.org/Bugs/Public/show_bug.cgi?id=12295\n        try {\n            var has_node_properties = (\"nodeType\" in object &&\n                                       \"nodeName\" in object &&\n                                       \"nodeValue\" in object &&\n                                       \"childNodes\" in object);\n        } catch (e) {\n            // We're probably cross-origin, which means we aren't a node\n            return false;\n        }\n\n        if (has_node_properties) {\n            try {\n                object.nodeType;\n            } catch (e) {\n                // The object is probably Node.prototype or another prototype\n                // object that inherits from it, and not a Node instance.\n                return false;\n            }\n            return true;\n        }\n        return false;\n    }\n\n    var replacements = {\n        \"0\": \"0\",\n        \"1\": \"x01\",\n        \"2\": \"x02\",\n        \"3\": \"x03\",\n        \"4\": \"x04\",\n        \"5\": \"x05\",\n        \"6\": \"x06\",\n        \"7\": \"x07\",\n        \"8\": \"b\",\n        \"9\": \"t\",\n        \"10\": \"n\",\n        \"11\": \"v\",\n        \"12\": \"f\",\n        \"13\": \"r\",\n        \"14\": \"x0e\",\n        \"15\": \"x0f\",\n        \"16\": \"x10\",\n        \"17\": \"x11\",\n        \"18\": \"x12\",\n        \"19\": \"x13\",\n        \"20\": \"x14\",\n        \"21\": \"x15\",\n        \"22\": \"x16\",\n        \"23\": \"x17\",\n        \"24\": \"x18\",\n        \"25\": \"x19\",\n        \"26\": \"x1a\",\n        \"27\": \"x1b\",\n        \"28\": \"x1c\",\n        \"29\": \"x1d\",\n        \"30\": \"x1e\",\n        \"31\": \"x1f\",\n        \"0xfffd\": \"ufffd\",\n        \"0xfffe\": \"ufffe\",\n        \"0xffff\": \"uffff\",\n    };\n\n    /*\n     * Convert a value to a nice, human-readable string\n     */\n    function format_value(val, seen)\n    {\n        if (!seen) {\n            seen = [];\n        }\n        if (typeof val === \"object\" && val !== null) {\n            if (seen.indexOf(val) >= 0) {\n                return \"[...]\";\n            }\n            seen.push(val);\n        }\n        if (Array.isArray(val)) {\n            return \"[\" + val.map(function(x) {return format_value(x, seen);}).join(\", \") + \"]\";\n        }\n\n        switch (typeof val) {\n        case \"string\":\n            val = val.replace(\"\\\\\", \"\\\\\\\\\");\n            for (var p in replacements) {\n                var replace = \"\\\\\" + replacements[p];\n                val = val.replace(RegExp(String.fromCharCode(p), \"g\"), replace);\n            }\n            return '\"' + val.replace(/\"/g, '\\\\\"') + '\"';\n        case \"boolean\":\n        case \"undefined\":\n            return String(val);\n        case \"number\":\n            // In JavaScript, -0 === 0 and String(-0) == \"0\", so we have to\n            // special-case.\n            if (val === -0 && 1/val === -Infinity) {\n                return \"-0\";\n            }\n            return String(val);\n        case \"object\":\n            if (val === null) {\n                return \"null\";\n            }\n\n            // Special-case Node objects, since those come up a lot in my tests.  I\n            // ignore namespaces.\n            if (is_node(val)) {\n                switch (val.nodeType) {\n                case Node.ELEMENT_NODE:\n                    var ret = \"<\" + val.localName;\n                    for (var i = 0; i < val.attributes.length; i++) {\n                        ret += \" \" + val.attributes[i].name + '=\"' + val.attributes[i].value + '\"';\n                    }\n                    ret += \">\" + val.innerHTML + \"</\" + val.localName + \">\";\n                    return \"Element node \" + truncate(ret, 60);\n                case Node.TEXT_NODE:\n                    return 'Text node \"' + truncate(val.data, 60) + '\"';\n                case Node.PROCESSING_INSTRUCTION_NODE:\n                    return \"ProcessingInstruction node with target \" + format_value(truncate(val.target, 60)) + \" and data \" + format_value(truncate(val.data, 60));\n                case Node.COMMENT_NODE:\n                    return \"Comment node <!--\" + truncate(val.data, 60) + \"-->\";\n                case Node.DOCUMENT_NODE:\n                    return \"Document node with \" + val.childNodes.length + (val.childNodes.length == 1 ? \" child\" : \" children\");\n                case Node.DOCUMENT_TYPE_NODE:\n                    return \"DocumentType node\";\n                case Node.DOCUMENT_FRAGMENT_NODE:\n                    return \"DocumentFragment node with \" + val.childNodes.length + (val.childNodes.length == 1 ? \" child\" : \" children\");\n                default:\n                    return \"Node object of unknown type\";\n                }\n            }\n\n        /* falls through */\n        default:\n            try {\n                return typeof val + ' \"' + truncate(String(val), 1000) + '\"';\n            } catch(e) {\n                return (\"[stringifying object threw \" + String(e) +\n                        \" with type \" + String(typeof e) + \"]\");\n            }\n        }\n    }\n    expose(format_value, \"format_value\");\n\n    /*\n     * Assertions\n     */\n\n    function assert_true(actual, description)\n    {\n        assert(actual === true, \"assert_true\", description,\n                                \"expected true got ${actual}\", {actual:actual});\n    }\n    expose(assert_true, \"assert_true\");\n\n    function assert_false(actual, description)\n    {\n        assert(actual === false, \"assert_false\", description,\n                                 \"expected false got ${actual}\", {actual:actual});\n    }\n    expose(assert_false, \"assert_false\");\n\n    function same_value(x, y) {\n        if (y !== y) {\n            //NaN case\n            return x !== x;\n        }\n        if (x === 0 && y === 0) {\n            //Distinguish +0 and -0\n            return 1/x === 1/y;\n        }\n        return x === y;\n    }\n\n    function assert_equals(actual, expected, description)\n    {\n         /*\n          * Test if two primitives are equal or two objects\n          * are the same object\n          */\n        if (typeof actual != typeof expected) {\n            assert(false, \"assert_equals\", description,\n                          \"expected (\" + typeof expected + \") ${expected} but got (\" + typeof actual + \") ${actual}\",\n                          {expected:expected, actual:actual});\n            return;\n        }\n        assert(same_value(actual, expected), \"assert_equals\", description,\n                                             \"expected ${expected} but got ${actual}\",\n                                             {expected:expected, actual:actual});\n    }\n    expose(assert_equals, \"assert_equals\");\n\n    function assert_not_equals(actual, expected, description)\n    {\n         /*\n          * Test if two primitives are unequal or two objects\n          * are different objects\n          */\n        assert(!same_value(actual, expected), \"assert_not_equals\", description,\n                                              \"got disallowed value ${actual}\",\n                                              {actual:actual});\n    }\n    expose(assert_not_equals, \"assert_not_equals\");\n\n    function assert_in_array(actual, expected, description)\n    {\n        assert(expected.indexOf(actual) != -1, \"assert_in_array\", description,\n                                               \"value ${actual} not in array ${expected}\",\n                                               {actual:actual, expected:expected});\n    }\n    expose(assert_in_array, \"assert_in_array\");\n\n    function assert_object_equals(actual, expected, description)\n    {\n         //This needs to be improved a great deal\n         function check_equal(actual, expected, stack)\n         {\n             stack.push(actual);\n\n             var p;\n             for (p in actual) {\n                 assert(expected.hasOwnProperty(p), \"assert_object_equals\", description,\n                                                    \"unexpected property ${p}\", {p:p});\n\n                 if (typeof actual[p] === \"object\" && actual[p] !== null) {\n                     if (stack.indexOf(actual[p]) === -1) {\n                         check_equal(actual[p], expected[p], stack);\n                     }\n                 } else {\n                     assert(same_value(actual[p], expected[p]), \"assert_object_equals\", description,\n                                                       \"property ${p} expected ${expected} got ${actual}\",\n                                                       {p:p, expected:expected, actual:actual});\n                 }\n             }\n             for (p in expected) {\n                 assert(actual.hasOwnProperty(p),\n                        \"assert_object_equals\", description,\n                        \"expected property ${p} missing\", {p:p});\n             }\n             stack.pop();\n         }\n         check_equal(actual, expected, []);\n    }\n    expose(assert_object_equals, \"assert_object_equals\");\n\n    function assert_array_equals(actual, expected, description)\n    {\n        assert(actual.length === expected.length,\n               \"assert_array_equals\", description,\n               \"lengths differ, expected ${expected} got ${actual}\",\n               {expected:expected.length, actual:actual.length});\n\n        for (var i = 0; i < actual.length; i++) {\n            assert(actual.hasOwnProperty(i) === expected.hasOwnProperty(i),\n                   \"assert_array_equals\", description,\n                   \"property ${i}, property expected to be ${expected} but was ${actual}\",\n                   {i:i, expected:expected.hasOwnProperty(i) ? \"present\" : \"missing\",\n                   actual:actual.hasOwnProperty(i) ? \"present\" : \"missing\"});\n            assert(same_value(expected[i], actual[i]),\n                   \"assert_array_equals\", description,\n                   \"property ${i}, expected ${expected} but got ${actual}\",\n                   {i:i, expected:expected[i], actual:actual[i]});\n        }\n    }\n    expose(assert_array_equals, \"assert_array_equals\");\n\n    function assert_approx_equals(actual, expected, epsilon, description)\n    {\n        /*\n         * Test if two primitive numbers are equal within +/- epsilon\n         */\n        assert(typeof actual === \"number\",\n               \"assert_approx_equals\", description,\n               \"expected a number but got a ${type_actual}\",\n               {type_actual:typeof actual});\n\n        assert(Math.abs(actual - expected) <= epsilon,\n               \"assert_approx_equals\", description,\n               \"expected ${expected} +/- ${epsilon} but got ${actual}\",\n               {expected:expected, actual:actual, epsilon:epsilon});\n    }\n    expose(assert_approx_equals, \"assert_approx_equals\");\n\n    function assert_less_than(actual, expected, description)\n    {\n        /*\n         * Test if a primitive number is less than another\n         */\n        assert(typeof actual === \"number\",\n               \"assert_less_than\", description,\n               \"expected a number but got a ${type_actual}\",\n               {type_actual:typeof actual});\n\n        assert(actual < expected,\n               \"assert_less_than\", description,\n               \"expected a number less than ${expected} but got ${actual}\",\n               {expected:expected, actual:actual});\n    }\n    expose(assert_less_than, \"assert_less_than\");\n\n    function assert_greater_than(actual, expected, description)\n    {\n        /*\n         * Test if a primitive number is greater than another\n         */\n        assert(typeof actual === \"number\",\n               \"assert_greater_than\", description,\n               \"expected a number but got a ${type_actual}\",\n               {type_actual:typeof actual});\n\n        assert(actual > expected,\n               \"assert_greater_than\", description,\n               \"expected a number greater than ${expected} but got ${actual}\",\n               {expected:expected, actual:actual});\n    }\n    expose(assert_greater_than, \"assert_greater_than\");\n\n    function assert_between_exclusive(actual, lower, upper, description)\n    {\n        /*\n         * Test if a primitive number is between two others\n         */\n        assert(typeof actual === \"number\",\n               \"assert_between_exclusive\", description,\n               \"expected a number but got a ${type_actual}\",\n               {type_actual:typeof actual});\n\n        assert(actual > lower && actual < upper,\n               \"assert_between_exclusive\", description,\n               \"expected a number greater than ${lower} \" +\n               \"and less than ${upper} but got ${actual}\",\n               {lower:lower, upper:upper, actual:actual});\n    }\n    expose(assert_between_exclusive, \"assert_between_exclusive\");\n\n    function assert_less_than_equal(actual, expected, description)\n    {\n        /*\n         * Test if a primitive number is less than or equal to another\n         */\n        assert(typeof actual === \"number\",\n               \"assert_less_than_equal\", description,\n               \"expected a number but got a ${type_actual}\",\n               {type_actual:typeof actual});\n\n        assert(actual <= expected,\n               \"assert_less_than_equal\", description,\n               \"expected a number less than or equal to ${expected} but got ${actual}\",\n               {expected:expected, actual:actual});\n    }\n    expose(assert_less_than_equal, \"assert_less_than_equal\");\n\n    function assert_greater_than_equal(actual, expected, description)\n    {\n        /*\n         * Test if a primitive number is greater than or equal to another\n         */\n        assert(typeof actual === \"number\",\n               \"assert_greater_than_equal\", description,\n               \"expected a number but got a ${type_actual}\",\n               {type_actual:typeof actual});\n\n        assert(actual >= expected,\n               \"assert_greater_than_equal\", description,\n               \"expected a number greater than or equal to ${expected} but got ${actual}\",\n               {expected:expected, actual:actual});\n    }\n    expose(assert_greater_than_equal, \"assert_greater_than_equal\");\n\n    function assert_between_inclusive(actual, lower, upper, description)\n    {\n        /*\n         * Test if a primitive number is between to two others or equal to either of them\n         */\n        assert(typeof actual === \"number\",\n               \"assert_between_inclusive\", description,\n               \"expected a number but got a ${type_actual}\",\n               {type_actual:typeof actual});\n\n        assert(actual >= lower && actual <= upper,\n               \"assert_between_inclusive\", description,\n               \"expected a number greater than or equal to ${lower} \" +\n               \"and less than or equal to ${upper} but got ${actual}\",\n               {lower:lower, upper:upper, actual:actual});\n    }\n    expose(assert_between_inclusive, \"assert_between_inclusive\");\n\n    function assert_regexp_match(actual, expected, description) {\n        /*\n         * Test if a string (actual) matches a regexp (expected)\n         */\n        assert(expected.test(actual),\n               \"assert_regexp_match\", description,\n               \"expected ${expected} but got ${actual}\",\n               {expected:expected, actual:actual});\n    }\n    expose(assert_regexp_match, \"assert_regexp_match\");\n\n    function assert_class_string(object, class_string, description) {\n        assert_equals({}.toString.call(object), \"[object \" + class_string + \"]\",\n                      description);\n    }\n    expose(assert_class_string, \"assert_class_string\");\n\n\n    function _assert_own_property(name) {\n        return function(object, property_name, description)\n        {\n            assert(object.hasOwnProperty(property_name),\n                   name, description,\n                   \"expected property ${p} missing\", {p:property_name});\n        };\n    }\n    expose(_assert_own_property(\"assert_exists\"), \"assert_exists\");\n    expose(_assert_own_property(\"assert_own_property\"), \"assert_own_property\");\n\n    function assert_not_exists(object, property_name, description)\n    {\n        assert(!object.hasOwnProperty(property_name),\n               \"assert_not_exists\", description,\n               \"unexpected property ${p} found\", {p:property_name});\n    }\n    expose(assert_not_exists, \"assert_not_exists\");\n\n    function _assert_inherits(name) {\n        return function (object, property_name, description)\n        {\n            assert(typeof object === \"object\" || typeof object === \"function\",\n                   name, description,\n                   \"provided value is not an object\");\n\n            assert(\"hasOwnProperty\" in object,\n                   name, description,\n                   \"provided value is an object but has no hasOwnProperty method\");\n\n            assert(!object.hasOwnProperty(property_name),\n                   name, description,\n                   \"property ${p} found on object expected in prototype chain\",\n                   {p:property_name});\n\n            assert(property_name in object,\n                   name, description,\n                   \"property ${p} not found in prototype chain\",\n                   {p:property_name});\n        };\n    }\n    expose(_assert_inherits(\"assert_inherits\"), \"assert_inherits\");\n    expose(_assert_inherits(\"assert_idl_attribute\"), \"assert_idl_attribute\");\n\n    function assert_readonly(object, property_name, description)\n    {\n         var initial_value = object[property_name];\n         try {\n             //Note that this can have side effects in the case where\n             //the property has PutForwards\n             object[property_name] = initial_value + \"a\"; //XXX use some other value here?\n             assert(same_value(object[property_name], initial_value),\n                    \"assert_readonly\", description,\n                    \"changing property ${p} succeeded\",\n                    {p:property_name});\n         } finally {\n             object[property_name] = initial_value;\n         }\n    }\n    expose(assert_readonly, \"assert_readonly\");\n\n    function assert_throws(code, func, description)\n    {\n        try {\n            func.call(this);\n            assert(false, \"assert_throws\", description,\n                   \"${func} did not throw\", {func:func});\n        } catch (e) {\n            if (e instanceof AssertionError) {\n                throw e;\n            }\n            if (code === null) {\n                return;\n            }\n            if (typeof code === \"object\") {\n                assert(typeof e == \"object\" && \"name\" in e && e.name == code.name,\n                       \"assert_throws\", description,\n                       \"${func} threw ${actual} (${actual_name}) expected ${expected} (${expected_name})\",\n                                    {func:func, actual:e, actual_name:e.name,\n                                     expected:code,\n                                     expected_name:code.name});\n                return;\n            }\n\n            var code_name_map = {\n                INDEX_SIZE_ERR: 'IndexSizeError',\n                HIERARCHY_REQUEST_ERR: 'HierarchyRequestError',\n                WRONG_DOCUMENT_ERR: 'WrongDocumentError',\n                INVALID_CHARACTER_ERR: 'InvalidCharacterError',\n                NO_MODIFICATION_ALLOWED_ERR: 'NoModificationAllowedError',\n                NOT_FOUND_ERR: 'NotFoundError',\n                NOT_SUPPORTED_ERR: 'NotSupportedError',\n                INUSE_ATTRIBUTE_ERR: 'InUseAttributeError',\n                INVALID_STATE_ERR: 'InvalidStateError',\n                SYNTAX_ERR: 'SyntaxError',\n                INVALID_MODIFICATION_ERR: 'InvalidModificationError',\n                NAMESPACE_ERR: 'NamespaceError',\n                INVALID_ACCESS_ERR: 'InvalidAccessError',\n                TYPE_MISMATCH_ERR: 'TypeMismatchError',\n                SECURITY_ERR: 'SecurityError',\n                NETWORK_ERR: 'NetworkError',\n                ABORT_ERR: 'AbortError',\n                URL_MISMATCH_ERR: 'URLMismatchError',\n                QUOTA_EXCEEDED_ERR: 'QuotaExceededError',\n                TIMEOUT_ERR: 'TimeoutError',\n                INVALID_NODE_TYPE_ERR: 'InvalidNodeTypeError',\n                DATA_CLONE_ERR: 'DataCloneError'\n            };\n\n            var name = code in code_name_map ? code_name_map[code] : code;\n\n            var name_code_map = {\n                IndexSizeError: 1,\n                HierarchyRequestError: 3,\n                WrongDocumentError: 4,\n                InvalidCharacterError: 5,\n                NoModificationAllowedError: 7,\n                NotFoundError: 8,\n                NotSupportedError: 9,\n                InUseAttributeError: 10,\n                InvalidStateError: 11,\n                SyntaxError: 12,\n                InvalidModificationError: 13,\n                NamespaceError: 14,\n                InvalidAccessError: 15,\n                TypeMismatchError: 17,\n                SecurityError: 18,\n                NetworkError: 19,\n                AbortError: 20,\n                URLMismatchError: 21,\n                QuotaExceededError: 22,\n                TimeoutError: 23,\n                InvalidNodeTypeError: 24,\n                DataCloneError: 25,\n\n                EncodingError: 0,\n                NotReadableError: 0,\n                UnknownError: 0,\n                ConstraintError: 0,\n                DataError: 0,\n                TransactionInactiveError: 0,\n                ReadOnlyError: 0,\n                VersionError: 0,\n                OperationError: 0,\n                NotAllowedError: 0\n            };\n\n            if (!(name in name_code_map)) {\n                throw new AssertionError('Test bug: unrecognized DOMException code \"' + code + '\" passed to assert_throws()');\n            }\n\n            var required_props = { code: name_code_map[name] };\n\n            if (required_props.code === 0 ||\n               (typeof e == \"object\" &&\n                \"name\" in e &&\n                e.name !== e.name.toUpperCase() &&\n                e.name !== \"DOMException\")) {\n                // New style exception: also test the name property.\n                required_props.name = name;\n            }\n\n            //We'd like to test that e instanceof the appropriate interface,\n            //but we can't, because we don't know what window it was created\n            //in.  It might be an instanceof the appropriate interface on some\n            //unknown other window.  TODO: Work around this somehow?\n\n            assert(typeof e == \"object\",\n                   \"assert_throws\", description,\n                   \"${func} threw ${e} with type ${type}, not an object\",\n                   {func:func, e:e, type:typeof e});\n\n            for (var prop in required_props) {\n                assert(typeof e == \"object\" && prop in e && e[prop] == required_props[prop],\n                       \"assert_throws\", description,\n                       \"${func} threw ${e} that is not a DOMException \" + code + \": property ${prop} is equal to ${actual}, expected ${expected}\",\n                       {func:func, e:e, prop:prop, actual:e[prop], expected:required_props[prop]});\n            }\n        }\n    }\n    expose(assert_throws, \"assert_throws\");\n\n    function assert_unreached(description) {\n         assert(false, \"assert_unreached\", description,\n                \"Reached unreachable code\");\n    }\n    expose(assert_unreached, \"assert_unreached\");\n\n    function assert_any(assert_func, actual, expected_array)\n    {\n        var args = [].slice.call(arguments, 3);\n        var errors = [];\n        var passed = false;\n        forEach(expected_array,\n                function(expected)\n                {\n                    try {\n                        assert_func.apply(this, [actual, expected].concat(args));\n                        passed = true;\n                    } catch (e) {\n                        errors.push(e.message);\n                    }\n                });\n        if (!passed) {\n            throw new AssertionError(errors.join(\"\\n\\n\"));\n        }\n    }\n    expose(assert_any, \"assert_any\");\n\n    function Test(name, properties)\n    {\n        if (tests.file_is_test && tests.tests.length) {\n            throw new Error(\"Tried to create a test with file_is_test\");\n        }\n        this.name = name;\n\n        this.phase = this.phases.INITIAL;\n\n        this.status = this.NOTRUN;\n        this.timeout_id = null;\n        this.index = null;\n\n        this.properties = properties;\n        var timeout = properties.timeout ? properties.timeout : settings.test_timeout;\n        if (timeout !== null) {\n            this.timeout_length = timeout * tests.timeout_multiplier;\n        } else {\n            this.timeout_length = null;\n        }\n\n        this.message = null;\n        this.stack = null;\n\n        this.steps = [];\n\n        this.cleanup_callbacks = [];\n\n        tests.push(this);\n    }\n\n    Test.statuses = {\n        PASS:0,\n        FAIL:1,\n        TIMEOUT:2,\n        NOTRUN:3\n    };\n\n    Test.prototype = merge({}, Test.statuses);\n\n    Test.prototype.phases = {\n        INITIAL:0,\n        STARTED:1,\n        HAS_RESULT:2,\n        COMPLETE:3\n    };\n\n    Test.prototype.structured_clone = function()\n    {\n        if (!this._structured_clone) {\n            var msg = this.message;\n            msg = msg ? String(msg) : msg;\n            this._structured_clone = merge({\n                name:String(this.name),\n                properties:merge({}, this.properties),\n            }, Test.statuses);\n        }\n        this._structured_clone.status = this.status;\n        this._structured_clone.message = this.message;\n        this._structured_clone.stack = this.stack;\n        this._structured_clone.index = this.index;\n        return this._structured_clone;\n    };\n\n    Test.prototype.step = function(func, this_obj)\n    {\n        if (this.phase > this.phases.STARTED) {\n            return;\n        }\n        this.phase = this.phases.STARTED;\n        //If we don't get a result before the harness times out that will be a test timout\n        this.set_status(this.TIMEOUT, \"Test timed out\");\n\n        tests.started = true;\n        tests.notify_test_state(this);\n\n        if (this.timeout_id === null) {\n            this.set_timeout();\n        }\n\n        this.steps.push(func);\n\n        if (arguments.length === 1) {\n            this_obj = this;\n        }\n\n        try {\n            return func.apply(this_obj, Array.prototype.slice.call(arguments, 2));\n        } catch (e) {\n            if (this.phase >= this.phases.HAS_RESULT) {\n                return;\n            }\n            var message = String((typeof e === \"object\" && e !== null) ? e.message : e);\n            var stack = e.stack ? e.stack : null;\n\n            this.set_status(this.FAIL, message, stack);\n            this.phase = this.phases.HAS_RESULT;\n            this.done();\n        }\n    };\n\n    Test.prototype.step_func = function(func, this_obj)\n    {\n        var test_this = this;\n\n        if (arguments.length === 1) {\n            this_obj = test_this;\n        }\n\n        return function()\n        {\n            return test_this.step.apply(test_this, [func, this_obj].concat(\n                Array.prototype.slice.call(arguments)));\n        };\n    };\n\n    Test.prototype.step_func_done = function(func, this_obj)\n    {\n        var test_this = this;\n\n        if (arguments.length === 1) {\n            this_obj = test_this;\n        }\n\n        return function()\n        {\n            if (func) {\n                test_this.step.apply(test_this, [func, this_obj].concat(\n                    Array.prototype.slice.call(arguments)));\n            }\n            test_this.done();\n        };\n    };\n\n    Test.prototype.unreached_func = function(description)\n    {\n        return this.step_func(function() {\n            assert_unreached(description);\n        });\n    };\n\n    Test.prototype.step_timeout = function(f, timeout) {\n        var test_this = this;\n        var args = Array.prototype.slice.call(arguments, 2);\n        return setTimeout(this.step_func(function() {\n            return f.apply(test_this, args);\n        }), timeout * tests.timeout_multiplier);\n    }\n\n    Test.prototype.add_cleanup = function(callback) {\n        this.cleanup_callbacks.push(callback);\n    };\n\n    Test.prototype.force_timeout = function() {\n        this.set_status(this.TIMEOUT);\n        this.phase = this.phases.HAS_RESULT;\n    };\n\n    Test.prototype.set_timeout = function()\n    {\n        if (this.timeout_length !== null) {\n            var this_obj = this;\n            this.timeout_id = setTimeout(function()\n                                         {\n                                             this_obj.timeout();\n                                         }, this.timeout_length);\n        }\n    };\n\n    Test.prototype.set_status = function(status, message, stack)\n    {\n        this.status = status;\n        this.message = message;\n        this.stack = stack ? stack : null;\n    };\n\n    Test.prototype.timeout = function()\n    {\n        this.timeout_id = null;\n        this.set_status(this.TIMEOUT, \"Test timed out\");\n        this.phase = this.phases.HAS_RESULT;\n        this.done();\n    };\n\n    Test.prototype.done = function()\n    {\n        if (this.phase == this.phases.COMPLETE) {\n            return;\n        }\n\n        if (this.phase <= this.phases.STARTED) {\n            this.set_status(this.PASS, null);\n        }\n\n        this.phase = this.phases.COMPLETE;\n\n        clearTimeout(this.timeout_id);\n        tests.result(this);\n        this.cleanup();\n    };\n\n    Test.prototype.cleanup = function() {\n        forEach(this.cleanup_callbacks,\n                function(cleanup_callback) {\n                    cleanup_callback();\n                });\n    };\n\n    /*\n     * A RemoteTest object mirrors a Test object on a remote worker. The\n     * associated RemoteWorker updates the RemoteTest object in response to\n     * received events. In turn, the RemoteTest object replicates these events\n     * on the local document. This allows listeners (test result reporting\n     * etc..) to transparently handle local and remote events.\n     */\n    function RemoteTest(clone) {\n        var this_obj = this;\n        Object.keys(clone).forEach(\n                function(key) {\n                    this_obj[key] = clone[key];\n                });\n        this.index = null;\n        this.phase = this.phases.INITIAL;\n        this.update_state_from(clone);\n        tests.push(this);\n    }\n\n    RemoteTest.prototype.structured_clone = function() {\n        var clone = {};\n        Object.keys(this).forEach(\n                (function(key) {\n                    if (typeof(this[key]) === \"object\") {\n                        clone[key] = merge({}, this[key]);\n                    } else {\n                        clone[key] = this[key];\n                    }\n                }).bind(this));\n        clone.phases = merge({}, this.phases);\n        return clone;\n    };\n\n    RemoteTest.prototype.cleanup = function() {};\n    RemoteTest.prototype.phases = Test.prototype.phases;\n    RemoteTest.prototype.update_state_from = function(clone) {\n        this.status = clone.status;\n        this.message = clone.message;\n        this.stack = clone.stack;\n        if (this.phase === this.phases.INITIAL) {\n            this.phase = this.phases.STARTED;\n        }\n    };\n    RemoteTest.prototype.done = function() {\n        this.phase = this.phases.COMPLETE;\n    }\n\n    /*\n     * A RemoteWorker listens for test events from a worker. These events are\n     * then used to construct and maintain RemoteTest objects that mirror the\n     * tests running on the remote worker.\n     */\n    function RemoteWorker(worker) {\n        this.running = true;\n        this.tests = new Array();\n\n        var this_obj = this;\n        worker.onerror = function(error) { this_obj.worker_error(error); };\n\n        var message_port;\n\n        if (is_service_worker(worker)) {\n            if (window.MessageChannel) {\n                // The ServiceWorker's implicit MessagePort is currently not\n                // reliably accessible from the ServiceWorkerGlobalScope due to\n                // Blink setting MessageEvent.source to null for messages sent\n                // via ServiceWorker.postMessage(). Until that's resolved,\n                // create an explicit MessageChannel and pass one end to the\n                // worker.\n                var message_channel = new MessageChannel();\n                message_port = message_channel.port1;\n                message_port.start();\n                worker.postMessage({type: \"connect\"}, [message_channel.port2]);\n            } else {\n                // If MessageChannel is not available, then try the\n                // ServiceWorker.postMessage() approach using MessageEvent.source\n                // on the other end.\n                message_port = navigator.serviceWorker;\n                worker.postMessage({type: \"connect\"});\n            }\n        } else if (is_shared_worker(worker)) {\n            message_port = worker.port;\n        } else {\n            message_port = worker;\n        }\n\n        // Keeping a reference to the worker until worker_done() is seen\n        // prevents the Worker object and its MessageChannel from going away\n        // before all the messages are dispatched.\n        this.worker = worker;\n\n        message_port.onmessage =\n            function(message) {\n                if (this_obj.running && (message.data.type in this_obj.message_handlers)) {\n                    this_obj.message_handlers[message.data.type].call(this_obj, message.data);\n                }\n            };\n    }\n\n    RemoteWorker.prototype.worker_error = function(error) {\n        var message = error.message || String(error);\n        var filename = (error.filename ? \" \" + error.filename: \"\");\n        // FIXME: Display worker error states separately from main document\n        // error state.\n        this.worker_done({\n            status: {\n                status: tests.status.ERROR,\n                message: \"Error in worker\" + filename + \": \" + message,\n                stack: error.stack\n            }\n        });\n        error.preventDefault();\n    };\n\n    RemoteWorker.prototype.test_state = function(data) {\n        var remote_test = this.tests[data.test.index];\n        if (!remote_test) {\n            remote_test = new RemoteTest(data.test);\n            this.tests[data.test.index] = remote_test;\n        }\n        remote_test.update_state_from(data.test);\n        tests.notify_test_state(remote_test);\n    };\n\n    RemoteWorker.prototype.test_done = function(data) {\n        var remote_test = this.tests[data.test.index];\n        remote_test.update_state_from(data.test);\n        remote_test.done();\n        tests.result(remote_test);\n    };\n\n    RemoteWorker.prototype.worker_done = function(data) {\n        if (tests.status.status === null &&\n            data.status.status !== data.status.OK) {\n            tests.status.status = data.status.status;\n            tests.status.message = data.status.message;\n            tests.status.stack = data.status.stack;\n        }\n        this.running = false;\n        this.worker = null;\n        if (tests.all_done()) {\n            tests.complete();\n        }\n    };\n\n    RemoteWorker.prototype.message_handlers = {\n        test_state: RemoteWorker.prototype.test_state,\n        result: RemoteWorker.prototype.test_done,\n        complete: RemoteWorker.prototype.worker_done\n    };\n\n    /*\n     * Harness\n     */\n\n    function TestsStatus()\n    {\n        this.status = null;\n        this.message = null;\n        this.stack = null;\n    }\n\n    TestsStatus.statuses = {\n        OK:0,\n        ERROR:1,\n        TIMEOUT:2\n    };\n\n    TestsStatus.prototype = merge({}, TestsStatus.statuses);\n\n    TestsStatus.prototype.structured_clone = function()\n    {\n        if (!this._structured_clone) {\n            var msg = this.message;\n            msg = msg ? String(msg) : msg;\n            this._structured_clone = merge({\n                status:this.status,\n                message:msg,\n                stack:this.stack\n            }, TestsStatus.statuses);\n        }\n        return this._structured_clone;\n    };\n\n    function Tests()\n    {\n        this.tests = [];\n        this.num_pending = 0;\n\n        this.phases = {\n            INITIAL:0,\n            SETUP:1,\n            HAVE_TESTS:2,\n            HAVE_RESULTS:3,\n            COMPLETE:4\n        };\n        this.phase = this.phases.INITIAL;\n\n        this.properties = {};\n\n        this.wait_for_finish = false;\n        this.processing_callbacks = false;\n\n        this.allow_uncaught_exception = false;\n\n        this.file_is_test = false;\n\n        this.timeout_multiplier = 1;\n        this.timeout_length = test_environment.test_timeout();\n        this.timeout_id = null;\n\n        this.start_callbacks = [];\n        this.test_state_callbacks = [];\n        this.test_done_callbacks = [];\n        this.all_done_callbacks = [];\n\n        this.pending_workers = [];\n\n        this.status = new TestsStatus();\n\n        var this_obj = this;\n\n        test_environment.add_on_loaded_callback(function() {\n            if (this_obj.all_done()) {\n                this_obj.complete();\n            }\n        });\n\n        this.set_timeout();\n    }\n\n    Tests.prototype.setup = function(func, properties)\n    {\n        if (this.phase >= this.phases.HAVE_RESULTS) {\n            return;\n        }\n\n        if (this.phase < this.phases.SETUP) {\n            this.phase = this.phases.SETUP;\n        }\n\n        this.properties = properties;\n\n        for (var p in properties) {\n            if (properties.hasOwnProperty(p)) {\n                var value = properties[p];\n                if (p == \"allow_uncaught_exception\") {\n                    this.allow_uncaught_exception = value;\n                } else if (p == \"explicit_done\" && value) {\n                    this.wait_for_finish = true;\n                } else if (p == \"explicit_timeout\" && value) {\n                    this.timeout_length = null;\n                    if (this.timeout_id)\n                    {\n                        clearTimeout(this.timeout_id);\n                    }\n                } else if (p == \"timeout_multiplier\") {\n                    this.timeout_multiplier = value;\n                }\n            }\n        }\n\n        if (func) {\n            try {\n                func();\n            } catch (e) {\n                this.status.status = this.status.ERROR;\n                this.status.message = String(e);\n                this.status.stack = e.stack ? e.stack : null;\n            }\n        }\n        this.set_timeout();\n    };\n\n    Tests.prototype.set_file_is_test = function() {\n        if (this.tests.length > 0) {\n            throw new Error(\"Tried to set file as test after creating a test\");\n        }\n        this.wait_for_finish = true;\n        this.file_is_test = true;\n        // Create the test, which will add it to the list of tests\n        async_test();\n    };\n\n    Tests.prototype.set_timeout = function() {\n        var this_obj = this;\n        clearTimeout(this.timeout_id);\n        if (this.timeout_length !== null) {\n            this.timeout_id = setTimeout(function() {\n                                             this_obj.timeout();\n                                         }, this.timeout_length);\n        }\n    };\n\n    Tests.prototype.timeout = function() {\n        if (this.status.status === null) {\n            this.status.status = this.status.TIMEOUT;\n        }\n        this.complete();\n    };\n\n    Tests.prototype.end_wait = function()\n    {\n        this.wait_for_finish = false;\n        if (this.all_done()) {\n            this.complete();\n        }\n    };\n\n    Tests.prototype.push = function(test)\n    {\n        if (this.phase < this.phases.HAVE_TESTS) {\n            this.start();\n        }\n        this.num_pending++;\n        test.index = this.tests.push(test);\n        this.notify_test_state(test);\n    };\n\n    Tests.prototype.notify_test_state = function(test) {\n        var this_obj = this;\n        forEach(this.test_state_callbacks,\n                function(callback) {\n                    callback(test, this_obj);\n                });\n    };\n\n    Tests.prototype.all_done = function() {\n        return (this.tests.length > 0 && test_environment.all_loaded &&\n                this.num_pending === 0 && !this.wait_for_finish &&\n                !this.processing_callbacks &&\n                !this.pending_workers.some(function(w) { return w.running; }));\n    };\n\n    Tests.prototype.start = function() {\n        this.phase = this.phases.HAVE_TESTS;\n        this.notify_start();\n    };\n\n    Tests.prototype.notify_start = function() {\n        var this_obj = this;\n        forEach (this.start_callbacks,\n                 function(callback)\n                 {\n                     callback(this_obj.properties);\n                 });\n    };\n\n    Tests.prototype.result = function(test)\n    {\n        if (this.phase > this.phases.HAVE_RESULTS) {\n            return;\n        }\n        this.phase = this.phases.HAVE_RESULTS;\n        this.num_pending--;\n        this.notify_result(test);\n    };\n\n    Tests.prototype.notify_result = function(test) {\n        var this_obj = this;\n        this.processing_callbacks = true;\n        forEach(this.test_done_callbacks,\n                function(callback)\n                {\n                    callback(test, this_obj);\n                });\n        this.processing_callbacks = false;\n        if (this_obj.all_done()) {\n            this_obj.complete();\n        }\n    };\n\n    Tests.prototype.complete = function() {\n        if (this.phase === this.phases.COMPLETE) {\n            return;\n        }\n        this.phase = this.phases.COMPLETE;\n        var this_obj = this;\n        this.tests.forEach(\n            function(x)\n            {\n                if (x.phase < x.phases.COMPLETE) {\n                    this_obj.notify_result(x);\n                    x.cleanup();\n                    x.phase = x.phases.COMPLETE;\n                }\n            }\n        );\n        this.notify_complete();\n    };\n\n    Tests.prototype.notify_complete = function() {\n        var this_obj = this;\n        if (this.status.status === null) {\n            this.status.status = this.status.OK;\n        }\n\n        forEach (this.all_done_callbacks,\n                 function(callback)\n                 {\n                     callback(this_obj.tests, this_obj.status);\n                 });\n    };\n\n    Tests.prototype.fetch_tests_from_worker = function(worker) {\n        if (this.phase >= this.phases.COMPLETE) {\n            return;\n        }\n\n        this.pending_workers.push(new RemoteWorker(worker));\n    };\n\n    function fetch_tests_from_worker(port) {\n        tests.fetch_tests_from_worker(port);\n    }\n    expose(fetch_tests_from_worker, 'fetch_tests_from_worker');\n\n    function timeout() {\n        if (tests.timeout_length === null) {\n            tests.timeout();\n        }\n    }\n    expose(timeout, 'timeout');\n\n    function add_start_callback(callback) {\n        tests.start_callbacks.push(callback);\n    }\n\n    function add_test_state_callback(callback) {\n        tests.test_state_callbacks.push(callback);\n    }\n\n    function add_result_callback(callback) {\n        tests.test_done_callbacks.push(callback);\n    }\n\n    function add_completion_callback(callback) {\n        tests.all_done_callbacks.push(callback);\n    }\n\n    expose(add_start_callback, 'add_start_callback');\n    expose(add_test_state_callback, 'add_test_state_callback');\n    expose(add_result_callback, 'add_result_callback');\n    expose(add_completion_callback, 'add_completion_callback');\n\n    function remove(array, item) {\n        var index = array.indexOf(item);\n        if (index > -1) {\n            array.splice(index, 1);\n        }\n    }\n\n    function remove_start_callback(callback) {\n        remove(tests.start_callbacks, callback);\n    }\n\n    function remove_test_state_callback(callback) {\n        remove(tests.test_state_callbacks, callback);\n    }\n\n    function remove_result_callback(callback) {\n        remove(tests.test_done_callbacks, callback);\n    }\n\n    function remove_completion_callback(callback) {\n       remove(tests.all_done_callbacks, callback);\n    }\n\n    /*\n     * Output listener\n    */\n\n    function Output() {\n        this.output_document = document;\n        this.output_node = null;\n        this.enabled = settings.output;\n        this.phase = this.INITIAL;\n    }\n\n    Output.prototype.INITIAL = 0;\n    Output.prototype.STARTED = 1;\n    Output.prototype.HAVE_RESULTS = 2;\n    Output.prototype.COMPLETE = 3;\n\n    Output.prototype.setup = function(properties) {\n        if (this.phase > this.INITIAL) {\n            return;\n        }\n\n        //If output is disabled in testharnessreport.js the test shouldn't be\n        //able to override that\n        this.enabled = this.enabled && (properties.hasOwnProperty(\"output\") ?\n                                        properties.output : settings.output);\n    };\n\n    Output.prototype.init = function(properties) {\n        if (this.phase >= this.STARTED) {\n            return;\n        }\n        if (properties.output_document) {\n            this.output_document = properties.output_document;\n        } else {\n            this.output_document = document;\n        }\n        this.phase = this.STARTED;\n    };\n\n    Output.prototype.resolve_log = function() {\n        var output_document;\n        if (typeof this.output_document === \"function\") {\n            output_document = this.output_document.apply(undefined);\n        } else {\n            output_document = this.output_document;\n        }\n        if (!output_document) {\n            return;\n        }\n        var node = output_document.getElementById(\"log\");\n        if (!node) {\n            if (!document.body || document.readyState == \"loading\") {\n                return;\n            }\n            node = output_document.createElement(\"div\");\n            node.id = \"log\";\n            output_document.body.appendChild(node);\n        }\n        this.output_document = output_document;\n        this.output_node = node;\n    };\n\n    Output.prototype.show_status = function() {\n        if (this.phase < this.STARTED) {\n            this.init();\n        }\n        if (!this.enabled) {\n            return;\n        }\n        if (this.phase < this.HAVE_RESULTS) {\n            this.resolve_log();\n            this.phase = this.HAVE_RESULTS;\n        }\n        var done_count = tests.tests.length - tests.num_pending;\n        if (this.output_node) {\n            if (done_count < 100 ||\n                (done_count < 1000 && done_count % 100 === 0) ||\n                done_count % 1000 === 0) {\n                this.output_node.textContent = \"Running, \" +\n                    done_count + \" complete, \" +\n                    tests.num_pending + \" remain\";\n            }\n        }\n    };\n\n    Output.prototype.show_results = function (tests, harness_status) {\n        if (this.phase >= this.COMPLETE) {\n            return;\n        }\n        if (!this.enabled) {\n            return;\n        }\n        if (!this.output_node) {\n            this.resolve_log();\n        }\n        this.phase = this.COMPLETE;\n\n        var log = this.output_node;\n        if (!log) {\n            return;\n        }\n        var output_document = this.output_document;\n\n        while (log.lastChild) {\n            log.removeChild(log.lastChild);\n        }\n\n        var harness_url = get_harness_url();\n        if (harness_url !== null) {\n            var stylesheet = output_document.createElementNS(xhtml_ns, \"link\");\n            stylesheet.setAttribute(\"rel\", \"stylesheet\");\n            stylesheet.setAttribute(\"href\", harness_url + \"testharness.css\");\n            var heads = output_document.getElementsByTagName(\"head\");\n            if (heads.length) {\n                heads[0].appendChild(stylesheet);\n            }\n        }\n\n        var status_text_harness = {};\n        status_text_harness[harness_status.OK] = \"OK\";\n        status_text_harness[harness_status.ERROR] = \"Error\";\n        status_text_harness[harness_status.TIMEOUT] = \"Timeout\";\n\n        var status_text = {};\n        status_text[Test.prototype.PASS] = \"Pass\";\n        status_text[Test.prototype.FAIL] = \"Fail\";\n        status_text[Test.prototype.TIMEOUT] = \"Timeout\";\n        status_text[Test.prototype.NOTRUN] = \"Not Run\";\n\n        var status_number = {};\n        forEach(tests,\n                function(test) {\n                    var status = status_text[test.status];\n                    if (status_number.hasOwnProperty(status)) {\n                        status_number[status] += 1;\n                    } else {\n                        status_number[status] = 1;\n                    }\n                });\n\n        function status_class(status)\n        {\n            return status.replace(/\\s/g, '').toLowerCase();\n        }\n\n        var summary_template = [\"section\", {\"id\":\"summary\"},\n                                [\"h2\", {}, \"Summary\"],\n                                function()\n                                {\n\n                                    var status = status_text_harness[harness_status.status];\n                                    var rv = [[\"section\", {},\n                                               [\"p\", {},\n                                                \"Harness status: \",\n                                                [\"span\", {\"class\":status_class(status)},\n                                                 status\n                                                ],\n                                               ]\n                                              ]];\n\n                                    if (harness_status.status === harness_status.ERROR) {\n                                        rv[0].push([\"pre\", {}, harness_status.message]);\n                                        if (harness_status.stack) {\n                                            rv[0].push([\"pre\", {}, harness_status.stack]);\n                                        }\n                                    }\n                                    return rv;\n                                },\n                                [\"p\", {}, \"Found ${num_tests} tests\"],\n                                function() {\n                                    var rv = [[\"div\", {}]];\n                                    var i = 0;\n                                    while (status_text.hasOwnProperty(i)) {\n                                        if (status_number.hasOwnProperty(status_text[i])) {\n                                            var status = status_text[i];\n                                            rv[0].push([\"div\", {\"class\":status_class(status)},\n                                                        [\"label\", {},\n                                                         [\"input\", {type:\"checkbox\", checked:\"checked\"}],\n                                                         status_number[status] + \" \" + status]]);\n                                        }\n                                        i++;\n                                    }\n                                    return rv;\n                                },\n                               ];\n\n        log.appendChild(render(summary_template, {num_tests:tests.length}, output_document));\n\n        forEach(output_document.querySelectorAll(\"section#summary label\"),\n                function(element)\n                {\n                    on_event(element, \"click\",\n                             function(e)\n                             {\n                                 if (output_document.getElementById(\"results\") === null) {\n                                     e.preventDefault();\n                                     return;\n                                 }\n                                 var result_class = element.parentNode.getAttribute(\"class\");\n                                 var style_element = output_document.querySelector(\"style#hide-\" + result_class);\n                                 var input_element = element.querySelector(\"input\");\n                                 if (!style_element && !input_element.checked) {\n                                     style_element = output_document.createElementNS(xhtml_ns, \"style\");\n                                     style_element.id = \"hide-\" + result_class;\n                                     style_element.textContent = \"table#results > tbody > tr.\"+result_class+\"{display:none}\";\n                                     output_document.body.appendChild(style_element);\n                                 } else if (style_element && input_element.checked) {\n                                     style_element.parentNode.removeChild(style_element);\n                                 }\n                             });\n                });\n\n        // This use of innerHTML plus manual escaping is not recommended in\n        // general, but is necessary here for performance.  Using textContent\n        // on each individual <td> adds tens of seconds of execution time for\n        // large test suites (tens of thousands of tests).\n        function escape_html(s)\n        {\n            return s.replace(/\\&/g, \"&amp;\")\n                .replace(/</g, \"&lt;\")\n                .replace(/\"/g, \"&quot;\")\n                .replace(/'/g, \"&#39;\");\n        }\n\n        function has_assertions()\n        {\n            for (var i = 0; i < tests.length; i++) {\n                if (tests[i].properties.hasOwnProperty(\"assert\")) {\n                    return true;\n                }\n            }\n            return false;\n        }\n\n        function get_assertion(test)\n        {\n            if (test.properties.hasOwnProperty(\"assert\")) {\n                if (Array.isArray(test.properties.assert)) {\n                    return test.properties.assert.join(' ');\n                }\n                return test.properties.assert;\n            }\n            return '';\n        }\n\n        log.appendChild(document.createElementNS(xhtml_ns, \"section\"));\n        var assertions = has_assertions();\n        var html = \"<h2>Details</h2><table id='results' \" + (assertions ? \"class='assertions'\" : \"\" ) + \">\" +\n            \"<thead><tr><th>Result</th><th>Test Name</th>\" +\n            (assertions ? \"<th>Assertion</th>\" : \"\") +\n            \"<th>Message</th></tr></thead>\" +\n            \"<tbody>\";\n        for (var i = 0; i < tests.length; i++) {\n            html += '<tr class=\"' +\n                escape_html(status_class(status_text[tests[i].status])) +\n                '\"><td>' +\n                escape_html(status_text[tests[i].status]) +\n                \"</td><td>\" +\n                escape_html(tests[i].name) +\n                \"</td><td>\" +\n                (assertions ? escape_html(get_assertion(tests[i])) + \"</td><td>\" : \"\") +\n                escape_html(tests[i].message ? tests[i].message : \" \") +\n                (tests[i].stack ? \"<pre>\" +\n                 escape_html(tests[i].stack) +\n                 \"</pre>\": \"\") +\n                \"</td></tr>\";\n        }\n        html += \"</tbody></table>\";\n        try {\n            log.lastChild.innerHTML = html;\n        } catch (e) {\n            log.appendChild(document.createElementNS(xhtml_ns, \"p\"))\n               .textContent = \"Setting innerHTML for the log threw an exception.\";\n            log.appendChild(document.createElementNS(xhtml_ns, \"pre\"))\n               .textContent = html;\n        }\n    };\n\n    /*\n     * Template code\n     *\n     * A template is just a javascript structure. An element is represented as:\n     *\n     * [tag_name, {attr_name:attr_value}, child1, child2]\n     *\n     * the children can either be strings (which act like text nodes), other templates or\n     * functions (see below)\n     *\n     * A text node is represented as\n     *\n     * [\"{text}\", value]\n     *\n     * String values have a simple substitution syntax; ${foo} represents a variable foo.\n     *\n     * It is possible to embed logic in templates by using a function in a place where a\n     * node would usually go. The function must either return part of a template or null.\n     *\n     * In cases where a set of nodes are required as output rather than a single node\n     * with children it is possible to just use a list\n     * [node1, node2, node3]\n     *\n     * Usage:\n     *\n     * render(template, substitutions) - take a template and an object mapping\n     * variable names to parameters and return either a DOM node or a list of DOM nodes\n     *\n     * substitute(template, substitutions) - take a template and variable mapping object,\n     * make the variable substitutions and return the substituted template\n     *\n     */\n\n    function is_single_node(template)\n    {\n        return typeof template[0] === \"string\";\n    }\n\n    function substitute(template, substitutions)\n    {\n        if (typeof template === \"function\") {\n            var replacement = template(substitutions);\n            if (!replacement) {\n                return null;\n            }\n\n            return substitute(replacement, substitutions);\n        }\n\n        if (is_single_node(template)) {\n            return substitute_single(template, substitutions);\n        }\n\n        return filter(map(template, function(x) {\n                              return substitute(x, substitutions);\n                          }), function(x) {return x !== null;});\n    }\n\n    function substitute_single(template, substitutions)\n    {\n        var substitution_re = /\\$\\{([^ }]*)\\}/g;\n\n        function do_substitution(input) {\n            var components = input.split(substitution_re);\n            var rv = [];\n            for (var i = 0; i < components.length; i += 2) {\n                rv.push(components[i]);\n                if (components[i + 1]) {\n                    rv.push(String(substitutions[components[i + 1]]));\n                }\n            }\n            return rv;\n        }\n\n        function substitute_attrs(attrs, rv)\n        {\n            rv[1] = {};\n            for (var name in template[1]) {\n                if (attrs.hasOwnProperty(name)) {\n                    var new_name = do_substitution(name).join(\"\");\n                    var new_value = do_substitution(attrs[name]).join(\"\");\n                    rv[1][new_name] = new_value;\n                }\n            }\n        }\n\n        function substitute_children(children, rv)\n        {\n            for (var i = 0; i < children.length; i++) {\n                if (children[i] instanceof Object) {\n                    var replacement = substitute(children[i], substitutions);\n                    if (replacement !== null) {\n                        if (is_single_node(replacement)) {\n                            rv.push(replacement);\n                        } else {\n                            extend(rv, replacement);\n                        }\n                    }\n                } else {\n                    extend(rv, do_substitution(String(children[i])));\n                }\n            }\n            return rv;\n        }\n\n        var rv = [];\n        rv.push(do_substitution(String(template[0])).join(\"\"));\n\n        if (template[0] === \"{text}\") {\n            substitute_children(template.slice(1), rv);\n        } else {\n            substitute_attrs(template[1], rv);\n            substitute_children(template.slice(2), rv);\n        }\n\n        return rv;\n    }\n\n    function make_dom_single(template, doc)\n    {\n        var output_document = doc || document;\n        var element;\n        if (template[0] === \"{text}\") {\n            element = output_document.createTextNode(\"\");\n            for (var i = 1; i < template.length; i++) {\n                element.data += template[i];\n            }\n        } else {\n            element = output_document.createElementNS(xhtml_ns, template[0]);\n            for (var name in template[1]) {\n                if (template[1].hasOwnProperty(name)) {\n                    element.setAttribute(name, template[1][name]);\n                }\n            }\n            for (var i = 2; i < template.length; i++) {\n                if (template[i] instanceof Object) {\n                    var sub_element = make_dom(template[i]);\n                    element.appendChild(sub_element);\n                } else {\n                    var text_node = output_document.createTextNode(template[i]);\n                    element.appendChild(text_node);\n                }\n            }\n        }\n\n        return element;\n    }\n\n    function make_dom(template, substitutions, output_document)\n    {\n        if (is_single_node(template)) {\n            return make_dom_single(template, output_document);\n        }\n\n        return map(template, function(x) {\n                       return make_dom_single(x, output_document);\n                   });\n    }\n\n    function render(template, substitutions, output_document)\n    {\n        return make_dom(substitute(template, substitutions), output_document);\n    }\n\n    /*\n     * Utility funcions\n     */\n    function assert(expected_true, function_name, description, error, substitutions)\n    {\n        if (tests.tests.length === 0) {\n            tests.set_file_is_test();\n        }\n        if (expected_true !== true) {\n            var msg = make_message(function_name, description,\n                                   error, substitutions);\n            throw new AssertionError(msg);\n        }\n    }\n\n    function AssertionError(message)\n    {\n        this.message = message;\n        this.stack = this.get_stack();\n    }\n\n    AssertionError.prototype = Object.create(Error.prototype);\n\n    AssertionError.prototype.get_stack = function() {\n        var stack = new Error().stack;\n        // IE11 does not initialize 'Error.stack' until the object is thrown.\n        if (!stack) {\n            try {\n                throw new Error();\n            } catch (e) {\n                stack = e.stack;\n            }\n        }\n\n        // 'Error.stack' is not supported in all browsers/versions\n        if (!stack) {\n            return \"(Stack trace unavailable)\";\n        }\n\n        var lines = stack.split(\"\\n\");\n\n        // Create a pattern to match stack frames originating within testharness.js.  These include the\n        // script URL, followed by the line/col (e.g., '/resources/testharness.js:120:21').\n        // Escape the URL per http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n        // in case it contains RegExp characters.\n        var script_url = get_script_url();\n        var re_text = script_url ? script_url.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&') : \"\\\\btestharness.js\";\n        var re = new RegExp(re_text + \":\\\\d+:\\\\d+\");\n\n        // Some browsers include a preamble that specifies the type of the error object.  Skip this by\n        // advancing until we find the first stack frame originating from testharness.js.\n        var i = 0;\n        while (!re.test(lines[i]) && i < lines.length) {\n            i++;\n        }\n\n        // Then skip the top frames originating from testharness.js to begin the stack at the test code.\n        while (re.test(lines[i]) && i < lines.length) {\n            i++;\n        }\n\n        // Paranoid check that we didn't skip all frames.  If so, return the original stack unmodified.\n        if (i >= lines.length) {\n            return stack;\n        }\n\n        return lines.slice(i).join(\"\\n\");\n    }\n\n    function make_message(function_name, description, error, substitutions)\n    {\n        for (var p in substitutions) {\n            if (substitutions.hasOwnProperty(p)) {\n                substitutions[p] = format_value(substitutions[p]);\n            }\n        }\n        var node_form = substitute([\"{text}\", \"${function_name}: ${description}\" + error],\n                                   merge({function_name:function_name,\n                                          description:(description?description + \" \":\"\")},\n                                          substitutions));\n        return node_form.slice(1).join(\"\");\n    }\n\n    function filter(array, callable, thisObj) {\n        var rv = [];\n        for (var i = 0; i < array.length; i++) {\n            if (array.hasOwnProperty(i)) {\n                var pass = callable.call(thisObj, array[i], i, array);\n                if (pass) {\n                    rv.push(array[i]);\n                }\n            }\n        }\n        return rv;\n    }\n\n    function map(array, callable, thisObj)\n    {\n        var rv = [];\n        rv.length = array.length;\n        for (var i = 0; i < array.length; i++) {\n            if (array.hasOwnProperty(i)) {\n                rv[i] = callable.call(thisObj, array[i], i, array);\n            }\n        }\n        return rv;\n    }\n\n    function extend(array, items)\n    {\n        Array.prototype.push.apply(array, items);\n    }\n\n    function forEach(array, callback, thisObj)\n    {\n        for (var i = 0; i < array.length; i++) {\n            if (array.hasOwnProperty(i)) {\n                callback.call(thisObj, array[i], i, array);\n            }\n        }\n    }\n\n    function merge(a,b)\n    {\n        var rv = {};\n        var p;\n        for (p in a) {\n            rv[p] = a[p];\n        }\n        for (p in b) {\n            rv[p] = b[p];\n        }\n        return rv;\n    }\n\n    function expose(object, name)\n    {\n        var components = name.split(\".\");\n        var target = test_environment.global_scope();\n        for (var i = 0; i < components.length - 1; i++) {\n            if (!(components[i] in target)) {\n                target[components[i]] = {};\n            }\n            target = target[components[i]];\n        }\n        target[components[components.length - 1]] = object;\n    }\n\n    function is_same_origin(w) {\n        try {\n            'random_prop' in w;\n            return true;\n        } catch (e) {\n            return false;\n        }\n    }\n\n    /** Returns the 'src' URL of the first <script> tag in the page to include the file 'testharness.js'. */\n    function get_script_url()\n    {\n        if (!('document' in self)) {\n            return undefined;\n        }\n\n        var scripts = document.getElementsByTagName(\"script\");\n        for (var i = 0; i < scripts.length; i++) {\n            var src;\n            if (scripts[i].src) {\n                src = scripts[i].src;\n            } else if (scripts[i].href) {\n                //SVG case\n                src = scripts[i].href.baseVal;\n            }\n\n            var matches = src && src.match(/^(.*\\/|)testharness\\.js$/);\n            if (matches) {\n                return src;\n            }\n        }\n        return undefined;\n    }\n\n    /** Returns the URL path at which the files for testharness.js are assumed to reside (e.g., '/resources/').\n        The path is derived from inspecting the 'src' of the <script> tag that included 'testharness.js'. */\n    function get_harness_url()\n    {\n        var script_url = get_script_url();\n\n        // Exclude the 'testharness.js' file from the returned path, but '+ 1' to include the trailing slash.\n        return script_url ? script_url.slice(0, script_url.lastIndexOf('/') + 1) : undefined;\n    }\n\n    function supports_post_message(w)\n    {\n        var supports;\n        var type;\n        // Given IE implements postMessage across nested iframes but not across\n        // windows or tabs, you can't infer cross-origin communication from the presence\n        // of postMessage on the current window object only.\n        //\n        // Touching the postMessage prop on a window can throw if the window is\n        // not from the same origin AND post message is not supported in that\n        // browser. So just doing an existence test here won't do, you also need\n        // to wrap it in a try..cacth block.\n        try {\n            type = typeof w.postMessage;\n            if (type === \"function\") {\n                supports = true;\n            }\n\n            // IE8 supports postMessage, but implements it as a host object which\n            // returns \"object\" as its `typeof`.\n            else if (type === \"object\") {\n                supports = true;\n            }\n\n            // This is the case where postMessage isn't supported AND accessing a\n            // window property across origins does NOT throw (e.g. old Safari browser).\n            else {\n                supports = false;\n            }\n        } catch (e) {\n            // This is the case where postMessage isn't supported AND accessing a\n            // window property across origins throws (e.g. old Firefox browser).\n            supports = false;\n        }\n        return supports;\n    }\n\n    /**\n     * Setup globals\n     */\n\n    var tests = new Tests();\n\n    addEventListener(\"error\", function(e) {\n        if (tests.file_is_test) {\n            var test = tests.tests[0];\n            if (test.phase >= test.phases.HAS_RESULT) {\n                return;\n            }\n            test.set_status(test.FAIL, e.message, e.stack);\n            test.phase = test.phases.HAS_RESULT;\n            test.done();\n            done();\n        } else if (!tests.allow_uncaught_exception) {\n            tests.status.status = tests.status.ERROR;\n            tests.status.message = e.message;\n            tests.status.stack = e.stack;\n        }\n    });\n\n    test_environment.on_tests_ready();\n\n})();\n// vim: set expandtab shiftwidth=4 tabstop=4:\n"
  },
  {
    "path": "test/harness/testharnessreport.js",
    "content": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\nvar props = {output: true,\n             explicit_timeout: true,\n             message_events: [\"completion\"]};\n\nif (window.opener && \"timeout_multiplier\" in window.opener) {\n    props[\"timeout_multiplier\"] = window.opener.timeout_multiplier;\n}\n\nif (window.opener && window.opener.explicit_timeout) {\n    props[\"explicit_timeout\"] = window.opener.explicit_timeout;\n}\n\nsetup(props);\n"
  },
  {
    "path": "test/js-api/LICENSE.md",
    "content": "# Dual-License for W3C Test Suites\n\nAll documents in this Repository are licensed by contributors to be distributed under both the [W3C Test Suite License](#w3c-test-suite-license) and the [W3C 3-clause BSD License](#w3c-3-clause-bsd-license), reproduced below. The choice of license is up to the licensee. For more information, see [Licenses for W3C Test Suites](https://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html)\n\n# W3C Test Suite License\n\nThis document, Test Suites and other documents that link to this statement are provided by the copyright holders under the following license: By using and/or copying this document, or the W3C document from which this statement is linked, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions:\n\nPermission to copy, and distribute the contents of this document, or the W3C document from which this statement is linked, in any medium for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the document, or portions thereof, that you use:\n\n*    A link or URL to the original W3C document.\n*    The pre-existing copyright notice of the original author, or if it doesn't exist, a notice (hypertext is preferred, but a textual representation is permitted) of the form: \"Copyright © [$date-of-document] World Wide Web Consortium, (MIT, ERCIM, Keio, Beihang) and others. All Rights Reserved. http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html\"\n*    If it exists, the STATUS of the W3C document.\n\nWhen space permits, inclusion of the full text of this NOTICE should be provided. We request that authorship attribution be provided in any software, documents, or other items or products that you create pursuant to the implementation of the contents of this document, or any portion thereof.\n\nNo right to create modifications or derivatives of W3C documents is granted pursuant to this license. However, if additional requirements (documented in the Copyright FAQ) are satisfied, the right to create modifications or derivatives is sometimes granted by the W3C to individuals complying with those requirements.\n\nIf a Test Suite distinguishes the test harness (or, framework for navigation) and the actual tests, permission is given to remove or alter the harness or navigation if the Test Suite in question allows to do so. The tests themselves shall NOT be changed in any way.\n\nThe name and trademarks of W3C and other copyright holders may NOT be used in advertising or publicity pertaining to this document or other documents that link to this statement without specific, written prior permission. Title to copyright in this document will at all times remain with copyright holders. Permission is given to use the trademarked string \"W3C\" within claims of performance concerning W3C Specifications or features described therein, and there only, if the test suite so authorizes.\n\nTHIS WORK IS PROVIDED BY W3C, MIT, ERCIM, KEIO, BEIHANG, THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL W3C, MIT, ERCIM, KEIO, BEIHANG, THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n# W3C 3-clause BSD License\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n*    Redistributions of works must retain the original copyright notice, this list of conditions and the following disclaimer.\n*    Redistributions in binary form must reproduce the original copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n*    Neither the name of the W3C nor the names of its contributors may be used to endorse or promote products derived from this work without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "test/js-api/README.md",
    "content": "This directory contains tests specific to the [JavaScript API] to WebAssembly.\n\nThese tests exist in the [web-platform-tests project], and are included here\nprimarily to simplify sharing them between JavaScript engine implementers.\n\nThese tests can be run in a pure JavaScript environment, that is, a JS shell\n(like V8 or spidermonkey's shells), as well as in the browser.\n\nThe tests use the [testharness.js] library and the [multi-global tests] setup\nfor smooth integrations with the web-platform-tests project and the existing\ntest infrastructure in implementations.\n\n## Metadata\n\nAll tests must have the `.any.js` extension.\n\nIn order to be run in the JavaScript shell, a metadata comment to add the\n`jsshell` scope to the default set of scopes (`window` and `dedicatedworker`)\nis required at the start of the file:\n\n```js\n// META: global=jsshell\n```\n\nAdditional JavaScript files can be imported with\n\n```js\n// META: script=helper-file.js\n\n```\n\n## Harness\n\nA single test file contains multiple subtests, which are created with one of\nthe following functions:\n\n- For synchronous tests: `test(function, name)` runs the function immediately.\n  The test fails if any assertion fails or an exception is thrown while calling\n  the function.\n- For asynchronous tests: `promise_test(function, name)` where `function`\n  returns a `Promise`. The test fails if the returned `Promise` rejects.\n\nAll assertions must be in one of those subtests.\n\nA number of assertion functions are provided, e.g.:\n\n- `assert_equals(x, y)`;\n- `assert_not_equals(x, y)`;\n- `assert_true(x)`;\n- `assert_false(x)`;\n- `assert_unreached()`;\n- `assert_throws(error, function)`: checks if `function` throws an appropriate\n  exception (a typical value for `error` would be `new TypeError()`);\n- `assert_class_string(object, class_name)`: checks if the result of calling\n  `Object.prototype.toString` on `object` uses `class_name`;\n- `promise_rejects`: `assert_throws`, but for `Promise`s.\n\nAll the above functions also take an optional trailing description argument.\n\nNon-trivial code that runs before the subtests should be put in the function\nargument to `setup(function)`, to ensure any exceptions are handled gracefully.\n\nFinally, the harness also exposes a `format_value` function that provides a\nhelpful stringification of its argument.\n\nSee the [testharness.js] documentation for more information.\n\n[JavaScript API]: https://webassembly.github.io/spec/js-api/\n[web-platform-tests project]: https://github.com/web-platform-tests/wpt/tree/master/wasm/jsapi\n[testharness.js]: https://web-platform-tests.org/writing-tests/testharness-api.html\n[multi-global tests]: https://web-platform-tests.org/writing-tests/testharness.html#multi-global-tests\n"
  },
  {
    "path": "test/js-api/assertions.js",
    "content": "function assert_function_name(fn, name, description) {\n  const propdesc = Object.getOwnPropertyDescriptor(fn, \"name\");\n  assert_equals(typeof propdesc, \"object\", `${description} should have name property`);\n  assert_false(propdesc.writable, \"writable\", `${description} name should not be writable`);\n  assert_false(propdesc.enumerable, \"enumerable\", `${description} name should not be enumerable`);\n  assert_true(propdesc.configurable, \"configurable\", `${description} name should be configurable`);\n  assert_equals(propdesc.value, name, `${description} name should be ${name}`);\n}\n\nfunction assert_function_length(fn, length, description) {\n  const propdesc = Object.getOwnPropertyDescriptor(fn, \"length\");\n  assert_equals(typeof propdesc, \"object\", `${description} should have length property`);\n  assert_false(propdesc.writable, \"writable\", `${description} length should not be writable`);\n  assert_false(propdesc.enumerable, \"enumerable\", `${description} length should not be enumerable`);\n  assert_true(propdesc.configurable, \"configurable\", `${description} length should be configurable`);\n  assert_equals(propdesc.value, length, `${description} length should be ${length}`);\n}\n\nfunction assert_exported_function(fn, { name, length }, description) {\n  assert_equals(Object.getPrototypeOf(fn), Function.prototype,\n                `${description}: prototype`);\n\n  assert_function_name(fn, name, description);\n  assert_function_length(fn, length, description);\n}\n\nfunction assert_Instance(instance, expected_exports) {\n  assert_equals(Object.getPrototypeOf(instance), WebAssembly.Instance.prototype,\n                \"prototype\");\n  assert_true(Object.isExtensible(instance), \"extensible\");\n\n  assert_equals(instance.exports, instance.exports, \"exports should be idempotent\");\n  const exports = instance.exports;\n\n  assert_equals(Object.getPrototypeOf(exports), null, \"exports prototype\");\n  assert_false(Object.isExtensible(exports), \"extensible exports\");\n  assert_array_equals(Object.keys(exports), Object.keys(expected_exports), \"matching export keys\");\n  for (const [key, expected] of Object.entries(expected_exports)) {\n    const property = Object.getOwnPropertyDescriptor(exports, key);\n    assert_equals(typeof property, \"object\", `${key} should be present`);\n    assert_false(property.writable, `${key}: writable`);\n    assert_true(property.enumerable, `${key}: enumerable`);\n    assert_false(property.configurable, `${key}: configurable`);\n    const actual = property.value;\n    assert_true(Object.isExtensible(actual), `${key}: extensible`);\n\n    switch (expected.kind) {\n    case \"function\":\n      assert_exported_function(actual, expected, `value of ${key}`);\n      break;\n    case \"global\":\n      assert_equals(Object.getPrototypeOf(actual), WebAssembly.Global.prototype,\n                    `value of ${key}: prototype`);\n      assert_equals(actual.value, expected.value, `value of ${key}: value`);\n      assert_equals(actual.valueOf(), expected.value, `value of ${key}: valueOf()`);\n      break;\n    case \"memory\":\n      assert_equals(Object.getPrototypeOf(actual), WebAssembly.Memory.prototype,\n                    `value of ${key}: prototype`);\n      assert_equals(Object.getPrototypeOf(actual.buffer), ArrayBuffer.prototype,\n                    `value of ${key}: prototype of buffer`);\n      assert_equals(actual.buffer.byteLength, 0x10000 * expected.size, `value of ${key}: size of buffer`);\n      const array = new Uint8Array(actual.buffer);\n      assert_equals(array[0], 0, `value of ${key}: first element of buffer`);\n      assert_equals(array[array.byteLength - 1], 0, `value of ${key}: last element of buffer`);\n      break;\n    case \"table\":\n      assert_equals(Object.getPrototypeOf(actual), WebAssembly.Table.prototype,\n                    `value of ${key}: prototype`);\n      assert_equals(actual.length, expected.length, `value of ${key}: length of table`);\n      break;\n    }\n  }\n}\n\nfunction assert_WebAssemblyInstantiatedSource(actual, expected_exports={}) {\n  assert_equals(Object.getPrototypeOf(actual), Object.prototype,\n                \"Prototype\");\n  assert_true(Object.isExtensible(actual), \"Extensibility\");\n\n  const module = Object.getOwnPropertyDescriptor(actual, \"module\");\n  assert_equals(typeof module, \"object\", \"module: type of descriptor\");\n  assert_true(module.writable, \"module: writable\");\n  assert_true(module.enumerable, \"module: enumerable\");\n  assert_true(module.configurable, \"module: configurable\");\n  assert_equals(Object.getPrototypeOf(module.value), WebAssembly.Module.prototype,\n                \"module: prototype\");\n\n  const instance = Object.getOwnPropertyDescriptor(actual, \"instance\");\n  assert_equals(typeof instance, \"object\", \"instance: type of descriptor\");\n  assert_true(instance.writable, \"instance: writable\");\n  assert_true(instance.enumerable, \"instance: enumerable\");\n  assert_true(instance.configurable, \"instance: configurable\");\n  assert_Instance(instance.value, expected_exports);\n}\n"
  },
  {
    "path": "test/js-api/bad-imports.js",
    "content": "/**\n * `t` should be a function that takes at least three arguments:\n *\n * - the name of the test;\n * - the expected error (to be passed to `assert_throws_js`);\n * - a function that takes a `WasmModuleBuilder` and initializes it;\n * - (optionally) an options object.\n *\n * The function is expected to create a test that checks if instantiating a\n * module with the result of the `WasmModuleBuilder` and the options object\n * (if any) yields the correct error.\n */\nfunction test_bad_imports(t) {\n  function value_type(type) {\n    switch (type) {\n      case \"i32\": return kWasmI32;\n      case \"i64\": return kWasmI64;\n      case \"f32\": return kWasmF32;\n      case \"f64\": return kWasmF64;\n      default: throw new TypeError(`Unexpected type ${type}`);\n    }\n  }\n\n  for (const value of [null, true, \"\", Symbol(), 1, 0.1, NaN]) {\n    t(`Non-object imports argument: ${format_value(value)}`,\n      TypeError,\n      builder => {},\n      value);\n  }\n\n  for (const value of [undefined, null, true, \"\", Symbol(), 1, 0.1, NaN]) {\n    const imports = {\n      \"module\": value,\n    };\n    t(`Non-object module: ${format_value(value)}`,\n      TypeError,\n      builder => {\n        builder.addImport(\"module\", \"fn\", kSig_v_v);\n      },\n      imports);\n  }\n\n  t(`Missing imports argument`,\n    TypeError,\n    builder => {\n      builder.addImport(\"module\", \"fn\", kSig_v_v);\n    });\n\n  for (const [value, name] of [[undefined, \"undefined\"], [{}, \"empty object\"], [{ \"module\\0\": null }, \"wrong property\"]]) {\n    t(`Imports argument with missing property: ${name}`,\n      TypeError,\n      builder => {\n        builder.addImport(\"module\", \"fn\", kSig_v_v);\n      },\n      value);\n  }\n\n  for (const value of [undefined, null, true, \"\", Symbol(), 1, 0.1, NaN, {}]) {\n    t(`Importing a function with an incorrectly-typed value: ${format_value(value)}`,\n      WebAssembly.LinkError,\n      builder => {\n        builder.addImport(\"module\", \"fn\", kSig_v_v);\n      },\n      {\n        \"module\": {\n          \"fn\": value,\n        },\n      });\n  }\n\n  const nonGlobals = [\n    [undefined],\n    [null],\n    [true],\n    [\"\"],\n    [Symbol()],\n    [{}, \"plain object\"],\n    [WebAssembly.Global, \"WebAssembly.Global\"],\n    [WebAssembly.Global.prototype, \"WebAssembly.Global.prototype\"],\n    [Object.create(WebAssembly.Global.prototype), \"Object.create(WebAssembly.Global.prototype)\"],\n  ];\n\n  for (const type of [\"i32\", \"i64\", \"f32\", \"f64\"]) {\n    const extendedNonGlobals = nonGlobals.concat([\n      type === \"i64\" ? [0, \"Number\"] : [0n, \"BigInt\"],\n      [new WebAssembly.Global({value: type === \"f32\" ? \"f64\" : \"f32\"}), \"WebAssembly.Global object (wrong value type)\"],\n    ]);\n    for (const [value, name = format_value(value)] of extendedNonGlobals) {\n      t(`Importing an ${type} global with an incorrectly-typed value: ${name}`,\n        WebAssembly.LinkError,\n        builder => {\n          builder.addImportedGlobal(\"module\", \"global\", value_type(type));\n        },\n        {\n          \"module\": {\n            \"global\": value,\n          },\n        });\n    }\n  }\n\n  for (const type of [\"i32\", \"i64\", \"f32\", \"f64\"]) {\n    const value = type === \"i64\" ? 0n : 0;\n    t(`Importing an ${type} mutable global with a primitive value`,\n      WebAssembly.LinkError,\n      builder => {\n        builder.addImportedGlobal(\"module\", \"global\", value_type(type), true);\n      },\n      {\n        \"module\": {\n          \"global\": value,\n        },\n      });\n\n    const global = new WebAssembly.Global({ \"value\": type }, value);\n    t(`Importing an ${type} mutable global with an immutable Global object`,\n      WebAssembly.LinkError,\n      builder => {\n        builder.addImportedGlobal(\"module\", \"global\", value_type(type), true);\n      },\n      {\n        \"module\": {\n          \"global\": global,\n        },\n      });\n  }\n\n  const nonMemories = [\n    [undefined],\n    [null],\n    [true],\n    [\"\"],\n    [Symbol()],\n    [1],\n    [0.1],\n    [NaN],\n    [{}, \"plain object\"],\n    [WebAssembly.Memory, \"WebAssembly.Memory\"],\n    [WebAssembly.Memory.prototype, \"WebAssembly.Memory.prototype\"],\n    [Object.create(WebAssembly.Memory.prototype), \"Object.create(WebAssembly.Memory.prototype)\"],\n    [new WebAssembly.Memory({\"initial\": 256}), \"WebAssembly.Memory object (too large)\"],\n  ];\n\n  for (const [value, name = format_value(value)] of nonMemories) {\n    t(`Importing memory with an incorrectly-typed value: ${name}`,\n      WebAssembly.LinkError,\n      builder => {\n        builder.addImportedMemory(\"module\", \"memory\", 0, 128);\n      },\n      {\n        \"module\": {\n          \"memory\": value,\n        },\n      });\n  }\n\n  const nonTables = [\n    [undefined],\n    [null],\n    [true],\n    [\"\"],\n    [Symbol()],\n    [1],\n    [0.1],\n    [NaN],\n    [{}, \"plain object\"],\n    [WebAssembly.Table, \"WebAssembly.Table\"],\n    [WebAssembly.Table.prototype, \"WebAssembly.Table.prototype\"],\n    [Object.create(WebAssembly.Table.prototype), \"Object.create(WebAssembly.Table.prototype)\"],\n    [new WebAssembly.Table({\"element\": \"anyfunc\", \"initial\": 256}), \"WebAssembly.Table object (too large)\"],\n  ];\n\n  for (const [value, name = format_value(value)] of nonTables) {\n    t(`Importing table with an incorrectly-typed value: ${name}`,\n      WebAssembly.LinkError,\n      builder => {\n        builder.addImportedTable(\"module\", \"table\", 0, 128);\n      },\n      {\n        \"module\": {\n          \"table\": value,\n        },\n      });\n  }\n}\n"
  },
  {
    "path": "test/js-api/constructor/compile.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n\nfunction assert_Module(module) {\n  assert_equals(Object.getPrototypeOf(module), WebAssembly.Module.prototype,\n                \"Prototype\");\n  assert_true(Object.isExtensible(module), \"Extensibility\");\n}\n\nlet emptyModuleBinary;\nsetup(() => {\n  emptyModuleBinary = new WasmModuleBuilder().toBuffer();\n});\n\npromise_test(t => {\n  return promise_rejects_js(t, TypeError, WebAssembly.compile());\n}, \"Missing argument\");\n\npromise_test(t => {\n  const invalidArguments = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    ArrayBuffer,\n    ArrayBuffer.prototype,\n    Array.from(emptyModuleBinary),\n  ];\n  return Promise.all(invalidArguments.map(argument => {\n    return promise_rejects_js(t, TypeError, WebAssembly.compile(argument),\n                           `compile(${format_value(argument)})`);\n  }));\n}, \"Invalid arguments\");\n\npromise_test(() => {\n  const fn = WebAssembly.compile;\n  const thisValues = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly,\n  ];\n  return Promise.all(thisValues.map(thisValue => {\n    return fn.call(thisValue, emptyModuleBinary).then(assert_Module);\n  }));\n}, \"Branding\");\n\ntest(() => {\n  const promise = WebAssembly.compile(emptyModuleBinary);\n  assert_equals(Object.getPrototypeOf(promise), Promise.prototype, \"prototype\");\n  assert_true(Object.isExtensible(promise), \"extensibility\");\n}, \"Promise type\");\n\npromise_test(t => {\n  const buffer = new Uint8Array();\n  return promise_rejects_js(t, WebAssembly.CompileError, WebAssembly.compile(buffer));\n}, \"Empty buffer\");\n\npromise_test(t => {\n  const buffer = new Uint8Array(Array.from(emptyModuleBinary).concat([0, 0]));\n  return promise_rejects_js(t, WebAssembly.CompileError, WebAssembly.compile(buffer));\n}, \"Invalid code\");\n\npromise_test(() => {\n  return WebAssembly.compile(emptyModuleBinary).then(assert_Module);\n}, \"Result type\");\n\npromise_test(() => {\n  return WebAssembly.compile(emptyModuleBinary, {}).then(assert_Module);\n}, \"Stray argument\");\n\npromise_test(() => {\n  const buffer = new WasmModuleBuilder().toBuffer();\n  assert_equals(buffer[0], 0);\n  const promise = WebAssembly.compile(buffer);\n  buffer[0] = 1;\n  return promise.then(assert_Module);\n}, \"Changing the buffer\");\n"
  },
  {
    "path": "test/js-api/constructor/instantiate-bad-imports.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n// META: script=/wasm/jsapi/bad-imports.js\n\ntest_bad_imports((name, error, build, ...arguments) => {\n  promise_test(t => {\n    const builder = new WasmModuleBuilder();\n    build(builder);\n    const buffer = builder.toBuffer();\n    const module = new WebAssembly.Module(buffer);\n    return promise_rejects_js(t, error, WebAssembly.instantiate(module, ...arguments));\n  }, `WebAssembly.instantiate(module): ${name}`);\n});\n\ntest_bad_imports((name, error, build, ...arguments) => {\n  promise_test(t => {\n    const builder = new WasmModuleBuilder();\n    build(builder);\n    const buffer = builder.toBuffer();\n    return promise_rejects_js(t, error, WebAssembly.instantiate(buffer, ...arguments));\n  }, `WebAssembly.instantiate(buffer): ${name}`);\n});\n"
  },
  {
    "path": "test/js-api/constructor/instantiate.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n// META: script=/wasm/jsapi/assertions.js\n// META: script=/wasm/jsapi/instanceTestFactory.js\n\nlet emptyModuleBinary;\nsetup(() => {\n  emptyModuleBinary = new WasmModuleBuilder().toBuffer();\n});\n\npromise_test(t => {\n  return promise_rejects_js(t, TypeError, WebAssembly.instantiate());\n}, \"Missing arguments\");\n\npromise_test(() => {\n  const fn = WebAssembly.instantiate;\n  const thisValues = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly,\n  ];\n  return Promise.all(thisValues.map(thisValue => {\n    return fn.call(thisValue, emptyModuleBinary).then(assert_WebAssemblyInstantiatedSource);\n  }));\n}, \"Branding\");\n\npromise_test(t => {\n  const invalidArguments = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Module,\n    WebAssembly.Module.prototype,\n    ArrayBuffer,\n    ArrayBuffer.prototype,\n    Array.from(emptyModuleBinary),\n  ];\n  return Promise.all(invalidArguments.map(argument => {\n    return promise_rejects_js(t, TypeError, WebAssembly.instantiate(argument),\n                           `instantiate(${format_value(argument)})`);\n  }));\n}, \"Invalid arguments\");\n\ntest(() => {\n  const promise = WebAssembly.instantiate(emptyModuleBinary);\n  assert_equals(Object.getPrototypeOf(promise), Promise.prototype, \"prototype\");\n  assert_true(Object.isExtensible(promise), \"extensibility\");\n}, \"Promise type\");\n\nfor (const [name, fn] of instanceTestFactory) {\n  promise_test(() => {\n    const { buffer, args, exports, verify } = fn();\n    return WebAssembly.instantiate(buffer, ...args).then(result => {\n      assert_WebAssemblyInstantiatedSource(result, exports);\n      verify(result.instance);\n    });\n  }, `${name}: BufferSource argument`);\n\n  promise_test(() => {\n    const { buffer, args, exports, verify } = fn();\n    const module = new WebAssembly.Module(buffer);\n    return WebAssembly.instantiate(module, ...args).then(instance => {\n      assert_Instance(instance, exports);\n      verify(instance);\n    });\n  }, `${name}: Module argument`);\n}\n\npromise_test(() => {\n  const builder = new WasmModuleBuilder();\n  builder.addImportedGlobal(\"module\", \"global\", kWasmI32);\n  const buffer = builder.toBuffer();\n  const order = [];\n\n  const imports = {\n    get module() {\n      order.push(\"module getter\");\n      return {\n        get global() {\n          order.push(\"global getter\");\n          return 0;\n        },\n      }\n    },\n  };\n\n  const expected = [\n    \"module getter\",\n    \"global getter\",\n  ];\n  const p = WebAssembly.instantiate(buffer, imports);\n  assert_array_equals(order, []);\n  return p.then(result => {\n    assert_WebAssemblyInstantiatedSource(result);\n    assert_array_equals(order, expected);\n  });\n}, \"Synchronous options handling: Buffer argument\");\n\npromise_test(() => {\n  const builder = new WasmModuleBuilder();\n  builder.addImportedGlobal(\"module\", \"global\", kWasmI32);\n  const buffer = builder.toBuffer();\n  const module = new WebAssembly.Module(buffer);\n  const order = [];\n\n  const imports = {\n    get module() {\n      order.push(\"module getter\");\n      return {\n        get global() {\n          order.push(\"global getter\");\n          return 0;\n        },\n      }\n    },\n  };\n\n  const expected = [\n    \"module getter\",\n    \"global getter\",\n  ];\n  const p = WebAssembly.instantiate(module, imports);\n  assert_array_equals(order, expected);\n  return p.then(instance => assert_Instance(instance, {}));\n}, \"Synchronous options handling: Module argument\");\n\npromise_test(t => {\n  const buffer = new Uint8Array();\n  return promise_rejects_js(t, WebAssembly.CompileError, WebAssembly.instantiate(buffer));\n}, \"Empty buffer\");\n\npromise_test(t => {\n  const buffer = new Uint8Array(Array.from(emptyModuleBinary).concat([0, 0]));\n  return promise_rejects_js(t, WebAssembly.CompileError, WebAssembly.instantiate(buffer));\n}, \"Invalid code\");\n\npromise_test(() => {\n  const buffer = new WasmModuleBuilder().toBuffer();\n  assert_equals(buffer[0], 0);\n  const promise = WebAssembly.instantiate(buffer);\n  buffer[0] = 1;\n  return promise.then(assert_WebAssemblyInstantiatedSource);\n}, \"Changing the buffer\");\n"
  },
  {
    "path": "test/js-api/constructor/multi-value.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n// META: script=/wasm/jsapi/assertions.js\n\nconst type_if_fi = makeSig([kWasmF64, kWasmI32], [kWasmI32, kWasmF64]);\n\npromise_test(async () => {\n  const builder = new WasmModuleBuilder();\n\n  builder\n    .addFunction(\"swap\", type_if_fi)\n    .addBody([\n        kExprLocalGet, 1,\n        kExprLocalGet, 0,\n        kExprReturn,\n    ])\n    .exportFunc();\n\n  const buffer = builder.toBuffer();\n\n  const result = await WebAssembly.instantiate(buffer);\n  const swapped = result.instance.exports.swap(4.2, 7);\n  assert_true(Array.isArray(swapped));\n  assert_equals(Object.getPrototypeOf(swapped), Array.prototype);\n  assert_array_equals(swapped, [7, 4.2]);\n}, \"multiple return values from wasm to js\");\n\npromise_test(async () => {\n  const builder = new WasmModuleBuilder();\n\n  const swap = builder\n    .addFunction(\"swap\", type_if_fi)\n    .addBody([\n        kExprLocalGet, 1,\n        kExprLocalGet, 0,\n        kExprReturn,\n    ]);\n  builder\n    .addFunction(\"callswap\", kSig_i_v)\n    .addBody([\n        ...wasmF64Const(4.2),\n        ...wasmI32Const(7),\n        kExprCallFunction, swap.index,\n        kExprDrop,\n        kExprReturn,\n    ])\n    .exportFunc();\n\n  const buffer = builder.toBuffer();\n\n  const result = await WebAssembly.instantiate(buffer);\n  const swapped = result.instance.exports.callswap();\n  assert_equals(swapped, 7);\n}, \"multiple return values inside wasm\");\n\npromise_test(async () => {\n  const builder = new WasmModuleBuilder();\n\n  const fnIndex = builder.addImport(\"module\", \"fn\", type_if_fi);\n  builder\n    .addFunction(\"callfn\", kSig_i_v)\n    .addBody([\n        ...wasmF64Const(4.2),\n        ...wasmI32Const(7),\n        kExprCallFunction, fnIndex,\n        kExprDrop,\n        kExprReturn,\n    ])\n    .exportFunc();\n\n  const buffer = builder.toBuffer();\n\n  const actual = [];\n  const imports = {\n    \"module\": {\n      fn(f32, i32) {\n        assert_equals(f32, 4.2);\n        assert_equals(i32, 7);\n        const result = [2, 7.3];\n        let i = 0;\n        return {\n          get [Symbol.iterator]() {\n            actual.push(\"@@iterator getter\");\n            return function iterator() {\n              actual.push(\"@@iterator call\");\n              return {\n                get next() {\n                  actual.push(\"next getter\");\n                  return function next(...args) {\n                    assert_array_equals(args, []);\n                    let j = ++i;\n                    actual.push(`next call ${j}`);\n                    if (j > result.length) {\n                      return {\n                        get done() {\n                          actual.push(`done call ${j}`);\n                          return true;\n                        }\n                      };\n                    }\n                    return {\n                      get done() {\n                        actual.push(`done call ${j}`);\n                        return false;\n                      },\n                      get value() {\n                        actual.push(`value call ${j}`);\n                        return {\n                          get valueOf() {\n                            actual.push(`valueOf get ${j}`);\n                            return function() {\n                              actual.push(`valueOf call ${j}`);\n                              return result[j - 1];\n                            };\n                          }\n                        };\n                      }\n                    };\n                  };\n                }\n              };\n            }\n          },\n        };\n      },\n    }\n  };\n\n  const { instance } = await WebAssembly.instantiate(buffer, imports);\n  const result = instance.exports.callfn();\n  assert_equals(result, 2);\n  assert_array_equals(actual, [\n    \"@@iterator getter\",\n    \"@@iterator call\",\n    \"next getter\",\n    \"next call 1\",\n    \"done call 1\",\n    \"value call 1\",\n    \"next call 2\",\n    \"done call 2\",\n    \"value call 2\",\n    \"next call 3\",\n    \"done call 3\",\n    \"valueOf get 1\",\n    \"valueOf call 1\",\n    \"valueOf get 2\",\n    \"valueOf call 2\",\n  ]);\n}, \"multiple return values from js to wasm\");\n"
  },
  {
    "path": "test/js-api/constructor/validate.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n\nlet emptyModuleBinary;\nsetup(() => {\n  emptyModuleBinary = new WasmModuleBuilder().toBuffer();\n});\n\ntest(() => {\n  assert_throws_js(TypeError, () => WebAssembly.validate());\n}, \"Missing argument\");\n\ntest(() => {\n  const invalidArguments = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    ArrayBuffer,\n    ArrayBuffer.prototype,\n    Array.from(emptyModuleBinary),\n  ];\n  for (const argument of invalidArguments) {\n    assert_throws_js(TypeError, () => WebAssembly.validate(argument),\n                     `validate(${format_value(argument)})`);\n  }\n}, \"Invalid arguments\");\n\ntest(() => {\n  const fn = WebAssembly.validate;\n  const thisValues = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly,\n  ];\n  for (const thisValue of thisValues) {\n    assert_true(fn.call(thisValue, emptyModuleBinary), `this=${format_value(thisValue)}`);\n  }\n}, \"Branding\");\n\nconst modules = [\n  // Incomplete header.\n  [[], false],\n  [[0x00], false],\n  [[0x00, 0x61], false],\n  [[0x00, 0x61, 0x73], false],\n  [[0x00, 0x61, 0x73, 0x6d], false],\n  [[0x00, 0x61, 0x73, 0x6d, 0x01], false],\n  [[0x00, 0x61, 0x73, 0x6d, 0x01, 0x00], false],\n  [[0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00], false],\n\n  // Complete header.\n  [[0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00], true],\n\n  // Invalid version.\n  [[0x00, 0x61, 0x73, 0x6d, 0x00, 0x00, 0x00, 0x00], false],\n  [[0x00, 0x61, 0x73, 0x6d, 0x02, 0x00, 0x00, 0x00], false],\n\n  // Nameless custom section.\n  [[0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00], false],\n\n  // Custom section with empty name.\n  [[0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00], true],\n\n  // Custom section with name \"a\".\n  [[0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x61], true],\n];\nconst bufferTypes = [\n  Uint8Array,\n  Int8Array,\n  Uint16Array,\n  Int16Array,\n  Uint32Array,\n  Int32Array,\n];\nfor (const [module, expected] of modules) {\n  const name = module.map(n => n.toString(16)).join(\" \");\n  for (const bufferType of bufferTypes) {\n    if (module.length % bufferType.BYTES_PER_ELEMENT === 0) {\n      test(() => {\n        const bytes = new Uint8Array(module);\n        const moduleBuffer = new bufferType(bytes.buffer);\n        assert_equals(WebAssembly.validate(moduleBuffer), expected);\n      }, `Validating module [${name}] in ${bufferType.name}`);\n    }\n  }\n}\n\ntest(() => {\n  assert_true(WebAssembly.validate(emptyModuleBinary, {}));\n}, \"Stray argument\");\n"
  },
  {
    "path": "test/js-api/error-interfaces-no-symbol-tostringtag.js",
    "content": "// META: global=jsshell\n\ntest(() => {\n  assert_not_own_property(WebAssembly.CompileError.prototype, Symbol.toStringTag);\n}, \"WebAssembly.CompileError\");\n\ntest(() => {\n  assert_not_own_property(WebAssembly.LinkError.prototype, Symbol.toStringTag);\n}, \"WebAssembly.LinkError\");\n\ntest(() => {\n  assert_not_own_property(WebAssembly.RuntimeError.prototype, Symbol.toStringTag);\n}, \"WebAssembly.RuntimeError\");\n"
  },
  {
    "path": "test/js-api/global/constructor.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/assertions.js\n\nfunction assert_Global(actual, expected) {\n  assert_equals(Object.getPrototypeOf(actual), WebAssembly.Global.prototype,\n                \"prototype\");\n  assert_true(Object.isExtensible(actual), \"extensible\");\n\n  assert_equals(actual.value, expected, \"value\");\n  assert_equals(actual.valueOf(), expected, \"valueOf\");\n}\n\ntest(() => {\n  assert_function_name(WebAssembly.Global, \"Global\", \"WebAssembly.Global\");\n}, \"name\");\n\ntest(() => {\n  assert_function_length(WebAssembly.Global, 1, \"WebAssembly.Global\");\n}, \"length\");\n\ntest(() => {\n  assert_throws_js(TypeError, () => new WebAssembly.Global());\n}, \"No arguments\");\n\ntest(() => {\n  const argument = { \"value\": \"i32\" };\n  assert_throws_js(TypeError, () => WebAssembly.Global(argument));\n}, \"Calling\");\n\ntest(() => {\n  const order = [];\n\n  new WebAssembly.Global({\n    get value() {\n      order.push(\"descriptor value\");\n      return {\n        toString() {\n          order.push(\"descriptor value toString\");\n          return \"f64\";\n        },\n      };\n    },\n\n    get mutable() {\n      order.push(\"descriptor mutable\");\n      return false;\n    },\n  }, {\n    valueOf() {\n      order.push(\"value valueOf()\");\n    }\n  });\n\n  assert_array_equals(order, [\n    \"descriptor mutable\",\n    \"descriptor value\",\n    \"descriptor value toString\",\n    \"value valueOf()\",\n  ]);\n}, \"Order of evaluation\");\n\ntest(() => {\n  const invalidArguments = [\n    undefined,\n    null,\n    false,\n    true,\n    \"\",\n    \"test\",\n    Symbol(),\n    1,\n    NaN,\n    {},\n  ];\n  for (const invalidArgument of invalidArguments) {\n    assert_throws_js(TypeError,\n                     () => new WebAssembly.Global(invalidArgument),\n                     `new Global(${format_value(invalidArgument)})`);\n  }\n}, \"Invalid descriptor argument\");\n\ntest(() => {\n  const invalidTypes = [\"i16\", \"i128\", \"f16\", \"f128\", \"u32\", \"u64\", \"i32\\0\"];\n  for (const value of invalidTypes) {\n    const argument = { value };\n    assert_throws_js(TypeError, () => new WebAssembly.Global(argument));\n  }\n}, \"Invalid type argument\");\n\ntest(() => {\n  const argument = { \"value\": \"i64\" };\n  const global = new WebAssembly.Global(argument);\n  assert_Global(global, 0n);\n}, \"i64 with default\");\n\nfor (const type of [\"i32\", \"f32\", \"f64\"]) {\n  test(() => {\n    const argument = { \"value\": type };\n    const global = new WebAssembly.Global(argument);\n    assert_Global(global, 0);\n  }, `Default value for type ${type}`);\n\n  const valueArguments = [\n    [undefined, 0],\n    [null, 0],\n    [true, 1],\n    [false, 0],\n    [2, 2],\n    [\"3\", 3],\n    [{ toString() { return \"5\" } }, 5, \"object with toString returning string\"],\n    [{ valueOf() { return \"8\" } }, 8, \"object with valueOf returning string\"],\n    [{ toString() { return 6 } }, 6, \"object with toString returning number\"],\n    [{ valueOf() { return 9 } }, 9, \"object with valueOf returning number\"],\n  ];\n  for (const [value, expected, name = format_value(value)] of valueArguments) {\n    test(() => {\n      const argument = { \"value\": type };\n      const global = new WebAssembly.Global(argument, value);\n      assert_Global(global, expected);\n    }, `Explicit value ${name} for type ${type}`);\n  }\n\n  test(() => {\n    const argument = { \"value\": type };\n    assert_throws_js(TypeError, () => new WebAssembly.Global(argument, 0n));\n  }, `BigInt value for type ${type}`);\n}\n\nconst valueArguments = [\n  [undefined, 0n],\n  [true, 1n],\n  [false, 0n],\n  [\"3\", 3n],\n  [123n, 123n],\n  [{ toString() { return \"5\" } }, 5n, \"object with toString returning string\"],\n  [{ valueOf() { return \"8\" } }, 8n, \"object with valueOf returning string\"],\n  [{ toString() { return 6n } }, 6n, \"object with toString returning bigint\"],\n  [{ valueOf() { return 9n } }, 9n, \"object with valueOf returning bigint\"],\n];\nfor (const [value, expected, name = format_value(value)] of valueArguments) {\n  test(() => {\n    const argument = { \"value\": \"i64\" };\n    const global = new WebAssembly.Global(argument, value);\n    assert_Global(global, expected);\n  }, `Explicit value ${name} for type i64`);\n}\n\nconst invalidBigints = [\n  null,\n  666,\n  { toString() { return 5 } },\n  { valueOf() { return 8 } },\n  Symbol(),\n];\nfor (const invalidBigint of invalidBigints) {\n  test(() => {\n    var argument = { \"value\": \"i64\" };\n    assert_throws_js(TypeError, () => new WebAssembly.Global(argument, invalidBigint));\n  }, `Pass non-bigint as i64 Global value: ${format_value(invalidBigint)}`);\n}\n\ntest(() => {\n  const argument = { \"value\": \"i32\" };\n  const global = new WebAssembly.Global(argument, 0, {});\n  assert_Global(global, 0);\n}, \"Stray argument\");\n"
  },
  {
    "path": "test/js-api/global/toString.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n\ntest(() => {\n  const argument = { \"value\": \"i32\" };\n  const global = new WebAssembly.Global(argument);\n  assert_class_string(global, \"WebAssembly.Global\");\n}, \"Object.prototype.toString on an Global\");\n\ntest(() => {\n  assert_own_property(WebAssembly.Global.prototype, Symbol.toStringTag);\n\n  const propDesc = Object.getOwnPropertyDescriptor(WebAssembly.Global.prototype, Symbol.toStringTag);\n  assert_equals(propDesc.value, \"WebAssembly.Global\", \"value\");\n  assert_equals(propDesc.configurable, true, \"configurable\");\n  assert_equals(propDesc.enumerable, false, \"enumerable\");\n  assert_equals(propDesc.writable, false, \"writable\");\n}, \"@@toStringTag exists on the prototype with the appropriate descriptor\");\n"
  },
  {
    "path": "test/js-api/global/value-get-set.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n\ntest(() => {\n  const thisValues = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Global,\n    WebAssembly.Global.prototype,\n  ];\n\n  const desc = Object.getOwnPropertyDescriptor(WebAssembly.Global.prototype, \"value\");\n  assert_equals(typeof desc, \"object\");\n\n  const getter = desc.get;\n  assert_equals(typeof getter, \"function\");\n\n  const setter = desc.set;\n  assert_equals(typeof setter, \"function\");\n\n  for (const thisValue of thisValues) {\n    assert_throws_js(TypeError, () => getter.call(thisValue), `getter with this=${format_value(thisValue)}`);\n    assert_throws_js(TypeError, () => setter.call(thisValue, 1), `setter with this=${format_value(thisValue)}`);\n  }\n}, \"Branding\");\n\nfor (const type of [\"i32\", \"i64\", \"f32\", \"f64\"]) {\n  const [initial, value, invalid] = type === \"i64\" ? [0n, 1n, 2] : [0, 1, 2n];\n  const immutableOptions = [\n    [{}, \"missing\"],\n    [{ \"mutable\": undefined }, \"undefined\"],\n    [{ \"mutable\": null }, \"null\"],\n    [{ \"mutable\": false }, \"false\"],\n    [{ \"mutable\": \"\" }, \"empty string\"],\n    [{ \"mutable\": 0 }, \"zero\"],\n  ];\n  for (const [opts, name] of immutableOptions) {\n    test(() => {\n      opts.value = type;\n      const global = new WebAssembly.Global(opts);\n      assert_equals(global.value, initial, \"initial value\");\n      assert_equals(global.valueOf(), initial, \"initial valueOf\");\n\n      assert_throws_js(TypeError, () => global.value = value);\n\n      assert_equals(global.value, initial, \"post-set value\");\n      assert_equals(global.valueOf(), initial, \"post-set valueOf\");\n    }, `Immutable ${type} (${name})`);\n\n    test(t => {\n      opts.value = type;\n      const global = new WebAssembly.Global(opts);\n      assert_equals(global.value, initial, \"initial value\");\n      assert_equals(global.valueOf(), initial, \"initial valueOf\");\n\n      const value = {\n        valueOf: t.unreached_func(\"should not call valueOf\"),\n        toString: t.unreached_func(\"should not call toString\"),\n      };\n      assert_throws_js(TypeError, () => global.value = value);\n\n      assert_equals(global.value, initial, \"post-set value\");\n      assert_equals(global.valueOf(), initial, \"post-set valueOf\");\n    }, `Immutable ${type} with ToNumber side-effects (${name})`);\n  }\n\n  const mutableOptions = [\n    [{ \"mutable\": true }, \"true\"],\n    [{ \"mutable\": 1 }, \"one\"],\n    [{ \"mutable\": \"x\" }, \"string\"],\n    [Object.create({ \"mutable\": true }), \"true on prototype\"],\n  ];\n  for (const [opts, name] of mutableOptions) {\n    test(() => {\n      opts.value = type;\n      const global = new WebAssembly.Global(opts);\n      assert_equals(global.value, initial, \"initial value\");\n      assert_equals(global.valueOf(), initial, \"initial valueOf\");\n\n      global.value = value;\n\n      assert_throws_js(TypeError, () => global.value = invalid);\n\n      assert_equals(global.value, value, \"post-set value\");\n      assert_equals(global.valueOf(), value, \"post-set valueOf\");\n    }, `Mutable ${type} (${name})`);\n  }\n}\n\ntest(() => {\n  const argument = { \"value\": \"i64\", \"mutable\": true };\n  const global = new WebAssembly.Global(argument);\n\n  assert_equals(global.value, 0n, \"initial value using ToJSValue\");\n\n  const valid = [\n    [123n, 123n],\n    [2n ** 63n, - (2n ** 63n)],\n    [true, 1n],\n    [false, 0n],\n    [\"456\", 456n],\n  ];\n  for (const [input, output] of valid) {\n    global.value = input;\n    assert_equals(global.valueOf(), output, \"post-set valueOf\");\n  }\n\n  const invalid = [\n    undefined,\n    null,\n    0,\n    1,\n    4.2,\n    Symbol(),\n  ];\n  for (const input of invalid) {\n    assert_throws_js(TypeError, () => global.value = input);\n  }\n}, \"i64 mutability\");\n\ntest(() => {\n  const argument = { \"value\": \"i32\", \"mutable\": true };\n  const global = new WebAssembly.Global(argument);\n  const desc = Object.getOwnPropertyDescriptor(WebAssembly.Global.prototype, \"value\");\n  assert_equals(typeof desc, \"object\");\n\n  const setter = desc.set;\n  assert_equals(typeof setter, \"function\");\n\n  assert_throws_js(TypeError, () => setter.call(global));\n}, \"Calling setter without argument\");\n\ntest(() => {\n  const argument = { \"value\": \"i32\", \"mutable\": true };\n  const global = new WebAssembly.Global(argument);\n  const desc = Object.getOwnPropertyDescriptor(WebAssembly.Global.prototype, \"value\");\n  assert_equals(typeof desc, \"object\");\n\n  const getter = desc.get;\n  assert_equals(typeof getter, \"function\");\n\n  const setter = desc.set;\n  assert_equals(typeof setter, \"function\");\n\n  assert_equals(getter.call(global, {}), 0);\n  assert_equals(setter.call(global, 1, {}), undefined);\n  assert_equals(global.value, 1);\n}, \"Stray argument\");\n"
  },
  {
    "path": "test/js-api/global/valueOf.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n\ntest(() => {\n  const argument = { \"value\": \"i32\" };\n  const thisValues = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Global,\n    WebAssembly.Global.prototype,\n  ];\n\n  const fn = WebAssembly.Global.prototype.valueOf;\n\n  for (const thisValue of thisValues) {\n    assert_throws_js(TypeError, () => fn.call(thisValue), `this=${format_value(thisValue)}`);\n  }\n}, \"Branding\");\n\ntest(() => {\n  const argument = { \"value\": \"i32\" };\n  const global = new WebAssembly.Global(argument, 0);\n  assert_equals(global.valueOf({}), 0);\n}, \"Stray argument\");\n"
  },
  {
    "path": "test/js-api/instance/constructor-bad-imports.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n// META: script=/wasm/jsapi/bad-imports.js\n\ntest_bad_imports((name, error, build, ...arguments) => {\n  test(() => {\n    const builder = new WasmModuleBuilder();\n    build(builder);\n    const buffer = builder.toBuffer();\n    const module = new WebAssembly.Module(buffer);\n    assert_throws_js(error, () => new WebAssembly.Instance(module, ...arguments));\n  }, `new WebAssembly.Instance(module): ${name}`);\n});\n"
  },
  {
    "path": "test/js-api/instance/constructor-caching.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n\nfunction getExports() {\n  const builder = new WasmModuleBuilder();\n  builder\n    .addFunction(\"fn\", kSig_v_d)\n    .addBody([])\n    .exportFunc();\n\n  builder.setTableBounds(1);\n  builder.addExportOfKind(\"table\", kExternalTable, 0);\n  builder.addGlobal(kWasmI32, false).exportAs(\"global\");\n  builder.addMemory(4, 8, true);\n\n  const buffer = builder.toBuffer();\n  const module = new WebAssembly.Module(buffer);\n  const instance = new WebAssembly.Instance(module);\n  return instance.exports;\n}\n\ntest(() => {\n  const exports = getExports();\n\n  const builder = new WasmModuleBuilder();\n  const functionIndex = builder.addImport(\"module\", \"imported\", kSig_v_d);\n  builder.addExport(\"exportedFunction\", functionIndex);\n\n  const globalIndex = builder.addImportedGlobal(\"module\", \"global\", kWasmI32);\n  builder.addExportOfKind(\"exportedGlobal\", kExternalGlobal, globalIndex);\n\n  builder.addImportedMemory(\"module\", \"memory\", 4);\n  builder.exportMemoryAs(\"exportedMemory\");\n\n  const tableIndex = builder.addImportedTable(\"module\", \"table\", 1);\n  builder.addExportOfKind(\"exportedTable\", kExternalTable, tableIndex);\n\n  const buffer = builder.toBuffer();\n\n  const module = new WebAssembly.Module(buffer);\n  const instance = new WebAssembly.Instance(module, {\n    \"module\": {\n      \"imported\": exports.fn,\n      \"global\": exports.global,\n      \"memory\": exports.memory,\n      \"table\": exports.table,\n    }\n  });\n\n  assert_equals(instance.exports.exportedFunction, exports.fn);\n  assert_equals(instance.exports.exportedGlobal, exports.global);\n  assert_equals(instance.exports.exportedMemory, exports.memory);\n  assert_equals(instance.exports.exportedTable, exports.table);\n});\n"
  },
  {
    "path": "test/js-api/instance/constructor.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n// META: script=/wasm/jsapi/assertions.js\n// META: script=/wasm/jsapi/instanceTestFactory.js\n\nlet emptyModuleBinary;\nsetup(() => {\n  emptyModuleBinary = new WasmModuleBuilder().toBuffer();\n});\n\ntest(() => {\n  assert_function_name(WebAssembly.Instance, \"Instance\", \"WebAssembly.Instance\");\n}, \"name\");\n\ntest(() => {\n  assert_function_length(WebAssembly.Instance, 1, \"WebAssembly.Instance\");\n}, \"length\");\n\ntest(() => {\n  assert_throws_js(TypeError, () => new WebAssembly.Instance());\n}, \"No arguments\");\n\ntest(() => {\n  const invalidArguments = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Module,\n    WebAssembly.Module.prototype,\n  ];\n  for (const argument of invalidArguments) {\n    assert_throws_js(TypeError, () => new WebAssembly.Instance(argument),\n                     `new Instance(${format_value(argument)})`);\n  }\n}, \"Non-Module arguments\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  assert_throws_js(TypeError, () => WebAssembly.Instance(module));\n}, \"Calling\");\n\nfor (const [name, fn] of instanceTestFactory) {\n  test(() => {\n    const { buffer, args, exports, verify } = fn();\n    const module = new WebAssembly.Module(buffer);\n    const instance = new WebAssembly.Instance(module, ...args);\n    assert_Instance(instance, exports);\n    verify(instance);\n  }, name);\n}\n"
  },
  {
    "path": "test/js-api/instance/exports.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n\nlet emptyModuleBinary;\nsetup(() => {\n  emptyModuleBinary = new WasmModuleBuilder().toBuffer();\n});\n\ntest(() => {\n  const thisValues = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Instance,\n    WebAssembly.Instance.prototype,\n  ];\n\n  const desc = Object.getOwnPropertyDescriptor(WebAssembly.Instance.prototype, \"exports\");\n  assert_equals(typeof desc, \"object\");\n\n  const getter = desc.get;\n  assert_equals(typeof getter, \"function\");\n\n  assert_equals(typeof desc.set, \"undefined\");\n\n  for (const thisValue of thisValues) {\n    assert_throws_js(TypeError, () => getter.call(thisValue), `this=${format_value(thisValue)}`);\n  }\n}, \"Branding\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  const instance = new WebAssembly.Instance(module);\n  const exports = instance.exports;\n\n  const desc = Object.getOwnPropertyDescriptor(WebAssembly.Instance.prototype, \"exports\");\n  assert_equals(typeof desc, \"object\");\n\n  const getter = desc.get;\n  assert_equals(typeof getter, \"function\");\n\n  assert_equals(getter.call(instance, {}), exports);\n}, \"Stray argument\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  const instance = new WebAssembly.Instance(module);\n  const exports = instance.exports;\n  instance.exports = {};\n  assert_equals(instance.exports, exports, \"Should not change the exports\");\n}, \"Setting (sloppy mode)\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  const instance = new WebAssembly.Instance(module);\n  const exports = instance.exports;\n  assert_throws_js(TypeError, () => {\n    \"use strict\";\n    instance.exports = {};\n  });\n  assert_equals(instance.exports, exports, \"Should not change the exports\");\n}, \"Setting (strict mode)\");\n"
  },
  {
    "path": "test/js-api/instance/toString.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n\ntest(() => {\n  const emptyModuleBinary = new WasmModuleBuilder().toBuffer();\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  const instance = new WebAssembly.Instance(module);\n  assert_class_string(instance, \"WebAssembly.Instance\");\n}, \"Object.prototype.toString on an Instance\");\n\ntest(() => {\n  assert_own_property(WebAssembly.Instance.prototype, Symbol.toStringTag);\n\n  const propDesc = Object.getOwnPropertyDescriptor(WebAssembly.Instance.prototype, Symbol.toStringTag);\n  assert_equals(propDesc.value, \"WebAssembly.Instance\", \"value\");\n  assert_equals(propDesc.configurable, true, \"configurable\");\n  assert_equals(propDesc.enumerable, false, \"enumerable\");\n  assert_equals(propDesc.writable, false, \"writable\");\n}, \"@@toStringTag exists on the prototype with the appropriate descriptor\");\n"
  },
  {
    "path": "test/js-api/instanceTestFactory.js",
    "content": "const instanceTestFactory = [\n  [\n    \"Empty module without imports argument\",\n    function() {\n      return {\n        buffer: emptyModuleBinary,\n        args: [],\n        exports: {},\n        verify: () => {},\n      };\n    }\n  ],\n\n  [\n    \"Empty module with undefined imports argument\",\n    function() {\n      return {\n        buffer: emptyModuleBinary,\n        args: [undefined],\n        exports: {},\n        verify: () => {},\n      };\n    }\n  ],\n\n  [\n    \"Empty module with empty imports argument\",\n    function() {\n      return {\n        buffer: emptyModuleBinary,\n        args: [{}],\n        exports: {},\n        verify: () => {},\n      };\n    }\n  ],\n\n  [\n    \"getter order for imports object\",\n    function() {\n      const builder = new WasmModuleBuilder();\n      builder.addImportedGlobal(\"module\", \"global1\", kWasmI32);\n      builder.addImportedGlobal(\"module2\", \"global3\", kWasmI32);\n      builder.addImportedMemory(\"module\", \"memory\", 0, 128);\n      builder.addImportedGlobal(\"module\", \"global2\", kWasmI32);\n      const buffer = builder.toBuffer();\n      const order = [];\n\n      const imports = {\n        get module() {\n          order.push(\"module getter\");\n          return {\n            get global1() {\n              order.push(\"global1 getter\");\n              return 0;\n            },\n            get global2() {\n              order.push(\"global2 getter\");\n              return 0;\n            },\n            get memory() {\n              order.push(\"memory getter\");\n              return new WebAssembly.Memory({ \"initial\": 64, maximum: 128 });\n            },\n          }\n        },\n        get module2() {\n          order.push(\"module2 getter\");\n          return {\n            get global3() {\n              order.push(\"global3 getter\");\n              return 0;\n            },\n          }\n        },\n      };\n\n      const expected = [\n        \"module getter\",\n        \"global1 getter\",\n        \"module2 getter\",\n        \"global3 getter\",\n        \"module getter\",\n        \"memory getter\",\n        \"module getter\",\n        \"global2 getter\",\n      ];\n      return {\n        buffer,\n        args: [imports],\n        exports: {},\n        verify: () => assert_array_equals(order, expected),\n      };\n    }\n  ],\n\n  [\n    \"imports\",\n    function() {\n      const builder = new WasmModuleBuilder();\n\n      builder.addImport(\"module\", \"fn\", kSig_v_v);\n      builder.addImportedGlobal(\"module\", \"global\", kWasmI32);\n      builder.addImportedMemory(\"module\", \"memory\", 0, 128);\n      builder.addImportedTable(\"module\", \"table\", 0, 128);\n\n      const buffer = builder.toBuffer();\n      const imports = {\n        \"module\": {\n          \"fn\": function() {},\n          \"global\": 0,\n          \"memory\": new WebAssembly.Memory({ \"initial\": 64, maximum: 128 }),\n          \"table\": new WebAssembly.Table({ \"element\": \"anyfunc\", \"initial\": 64, maximum: 128 }),\n        },\n        get \"module2\"() {\n          assert_unreached(\"Should not get modules that are not imported\");\n        },\n      };\n\n      return {\n        buffer,\n        args: [imports],\n        exports: {},\n        verify: () => {},\n      };\n    }\n  ],\n\n  [\n    \"No imports\",\n    function() {\n      const builder = new WasmModuleBuilder();\n\n      builder\n        .addFunction(\"fn\", kSig_v_d)\n        .addBody([])\n        .exportFunc();\n      builder\n        .addFunction(\"fn2\", kSig_v_v)\n        .addBody([])\n        .exportFunc();\n\n      builder.setTableBounds(1);\n      builder.addExportOfKind(\"table\", kExternalTable, 0);\n\n      builder.addGlobal(kWasmI32, true)\n        .exportAs(\"global\")\n        .init = 7;\n      builder.addGlobal(kWasmF64, true)\n        .exportAs(\"global2\")\n        .init = 1.2;\n\n      builder.addMemory(4, 8, true);\n\n      const buffer = builder.toBuffer();\n\n      const exports = {\n        \"fn\": { \"kind\": \"function\", \"name\": \"0\", \"length\": 1 },\n        \"fn2\": { \"kind\": \"function\", \"name\": \"1\", \"length\": 0 },\n        \"table\": { \"kind\": \"table\", \"length\": 1 },\n        \"global\": { \"kind\": \"global\", \"value\": 7 },\n        \"global2\": { \"kind\": \"global\", \"value\": 1.2 },\n        \"memory\": { \"kind\": \"memory\", \"size\": 4 },\n      };\n\n      return {\n        buffer,\n        args: [],\n        exports,\n        verify: () => {},\n      };\n    }\n  ],\n\n  [\n    \"exports and imports\",\n    function() {\n      const value = 102;\n\n      const builder = new WasmModuleBuilder();\n\n      const index = builder.addImportedGlobal(\"module\", \"global\", kWasmI32);\n      builder\n        .addFunction(\"fn\", kSig_i_v)\n        .addBody([\n            kExprGlobalGet,\n            index,\n            kExprReturn,\n        ])\n        .exportFunc();\n\n      const buffer = builder.toBuffer();\n\n      const imports = {\n        \"module\": {\n          \"global\": value,\n        },\n      };\n\n      const exports = {\n        \"fn\": { \"kind\": \"function\", \"name\": \"0\", \"length\": 0 },\n      };\n\n      return {\n        buffer,\n        args: [imports],\n        exports,\n        verify: instance => assert_equals(instance.exports.fn(), value)\n      };\n    }\n  ],\n\n  [\n    \"i64 exports and imports\",\n    function() {\n      const value = 102n;\n\n      const builder = new WasmModuleBuilder();\n\n      const index = builder.addImportedGlobal(\"module\", \"global\", kWasmI64);\n      builder\n        .addFunction(\"fn\", kSig_l_v)\n        .addBody([\n            kExprGlobalGet,\n            index,\n            kExprReturn,\n        ])\n        .exportFunc();\n\n      const index2 = builder.addImportedGlobal(\"module\", \"global2\", kWasmI64);\n      builder.addExportOfKind(\"global\", kExternalGlobal, index2);\n\n      const buffer = builder.toBuffer();\n\n      const imports = {\n        \"module\": {\n          \"global\": value,\n          \"global2\": 2n ** 63n,\n        },\n      };\n\n      const exports = {\n        \"fn\": { \"kind\": \"function\", \"name\": \"0\", \"length\": 0 },\n        \"global\": { \"kind\": \"global\", \"value\": -(2n ** 63n) },\n      };\n\n      return {\n        buffer,\n        args: [imports],\n        exports,\n        verify: instance => assert_equals(instance.exports.fn(), value)\n      };\n    }\n  ],\n\n  [\n    \"import with i32-returning function\",\n    function() {\n      const builder = new WasmModuleBuilder();\n\n      const fnIndex = builder.addImport(\"module\", \"fn\", kSig_i_v);\n      const fn2 = builder\n        .addFunction(\"fn2\", kSig_v_v)\n        .addBody([\n            kExprCallFunction,\n            fnIndex,\n            kExprReturn,\n        ])\n        .exportFunc();\n\n      const buffer = builder.toBuffer();\n\n      let called = false;\n      const imports = {\n        \"module\": {\n          \"fn\": function() {\n            called = true;\n            return 6n;\n          },\n        },\n      };\n\n      return {\n        buffer,\n        args: [imports],\n        exports: {\n          \"fn2\": { \"kind\": \"function\", \"name\": String(fn2.index), \"length\": 0 },\n        },\n        verify: instance => {\n          assert_throws_js(TypeError, () => instance.exports.fn2());\n          assert_true(called, \"Should have called into JS\");\n        }\n      };\n    }\n  ],\n\n  [\n    \"import with function that takes and returns i32\",\n    function() {\n      const builder = new WasmModuleBuilder();\n\n      const fnIndex = builder.addImport(\"module\", \"fn\", kSig_i_i);\n      const fn2 = builder\n        .addFunction(\"fn2\", kSig_i_v)\n        .addBody([\n            kExprI32Const, 0x66,\n            kExprCallFunction,\n            fnIndex,\n            kExprReturn,\n        ])\n        .exportFunc();\n\n      const buffer = builder.toBuffer();\n\n      let called = false;\n      const imports = {\n        \"module\": {\n          \"fn\": function(n) {\n            called = true;\n            assert_equals(n, -26);\n            return { valueOf() { return 6; } };\n          },\n        },\n      };\n\n      return {\n        buffer,\n        args: [imports],\n        exports: {\n          \"fn2\": { \"kind\": \"function\", \"name\": String(fn2.index), \"length\": 0 },\n        },\n        verify: instance => {\n          assert_equals(instance.exports.fn2(), 6);\n          assert_true(called, \"Should have called into JS\");\n        }\n      };\n    }\n  ],\n\n  [\n    \"import with i64-returning function\",\n    function() {\n      const builder = new WasmModuleBuilder();\n\n      const fnIndex = builder.addImport(\"module\", \"fn\", kSig_l_v);\n      const fn2 = builder\n        .addFunction(\"fn2\", kSig_v_v)\n        .addBody([\n            kExprCallFunction,\n            fnIndex,\n            kExprReturn,\n        ])\n        .exportFunc();\n\n      const buffer = builder.toBuffer();\n\n      let called = false;\n      const imports = {\n        \"module\": {\n          \"fn\": function() {\n            called = true;\n            return 6;\n          },\n        },\n      };\n\n      return {\n        buffer,\n        args: [imports],\n        exports: {\n          \"fn2\": { \"kind\": \"function\", \"name\": String(fn2.index), \"length\": 0 },\n        },\n        verify: instance => {\n          assert_throws_js(TypeError, () => instance.exports.fn2());\n          assert_true(called, \"Should have called into JS\");\n        }\n      };\n    }\n  ],\n\n  [\n    \"import with function that takes and returns i64\",\n    function() {\n      const builder = new WasmModuleBuilder();\n\n      const fnIndex = builder.addImport(\"module\", \"fn\", kSig_l_l);\n      const fn2 = builder\n        .addFunction(\"fn2\", kSig_l_v)\n        .addBody([\n            kExprI64Const, 0x66,\n            kExprCallFunction,\n            fnIndex,\n            kExprReturn,\n        ])\n        .exportFunc();\n\n      const buffer = builder.toBuffer();\n\n      let called = false;\n      const imports = {\n        \"module\": {\n          \"fn\": function(n) {\n            called = true;\n            assert_equals(n, -26n);\n            return { valueOf() { return 6n; } };\n          },\n        },\n      };\n\n      return {\n        buffer,\n        args: [imports],\n        exports: {\n          \"fn2\": { \"kind\": \"function\", \"name\": String(fn2.index), \"length\": 0 },\n        },\n        verify: instance => {\n          assert_equals(instance.exports.fn2(), 6n);\n          assert_true(called, \"Should have called into JS\");\n        }\n      };\n    }\n  ],\n\n  [\n    \"import with i32-taking function\",\n    function() {\n      const builder = new WasmModuleBuilder();\n\n      const fn = builder\n        .addFunction(\"fn\", kSig_v_i)\n        .addBody([\n            kExprReturn,\n        ])\n        .exportFunc();\n\n      const buffer = builder.toBuffer();\n\n      return {\n        buffer,\n        args: [],\n        exports: {\n          \"fn\": { \"kind\": \"function\", \"name\": String(fn.index), \"length\": 1 },\n        },\n        verify: instance => assert_throws_js(TypeError, () => instance.exports.fn(6n))\n      };\n    }\n  ],\n\n  [\n    \"import with i64-taking function\",\n    function() {\n      const builder = new WasmModuleBuilder();\n\n      const fn = builder\n        .addFunction(\"fn\", kSig_v_l)\n        .addBody([\n            kExprReturn,\n        ])\n        .exportFunc();\n\n      const buffer = builder.toBuffer();\n\n      return {\n        buffer,\n        args: [],\n        exports: {\n          \"fn\": { \"kind\": \"function\", \"name\": String(fn.index), \"length\": 1 },\n        },\n        verify: instance => assert_throws_js(TypeError, () => instance.exports.fn(6))\n      };\n    }\n  ],\n\n  [\n    \"export i64-returning function\",\n    function() {\n      const builder = new WasmModuleBuilder();\n\n      const fn = builder\n        .addFunction(\"fn\", kSig_l_v)\n        .addBody([\n            kExprI64Const, 0x66,\n            kExprReturn,\n        ])\n        .exportFunc();\n\n      const buffer = builder.toBuffer();\n\n      return {\n        buffer,\n        args: [],\n        exports: {\n          \"fn\": { \"kind\": \"function\", \"name\": String(fn.index), \"length\": 0 },\n        },\n        verify: instance => assert_equals(instance.exports.fn(), -26n)\n      };\n    }\n  ],\n\n  [\n    \"i32 mutable WebAssembly.Global import\",\n    function() {\n      const initial = 102;\n      const value = new WebAssembly.Global({ \"value\": \"i32\", \"mutable\": true }, initial);\n\n      const builder = new WasmModuleBuilder();\n\n      const index = builder.addImportedGlobal(\"module\", \"global\", kWasmI32, true);\n      const fn = builder\n        .addFunction(\"fn\", kSig_i_v)\n        .addBody([\n            kExprGlobalGet,\n            index,\n            kExprReturn,\n        ])\n        .exportFunc();\n\n      const buffer = builder.toBuffer();\n\n      const imports = {\n        \"module\": {\n          \"global\": value,\n        },\n      };\n\n      const exports = {\n        \"fn\": { \"kind\": \"function\", \"name\": String(fn.index), \"length\": 0 },\n      };\n\n      return {\n        buffer,\n        args: [imports],\n        exports,\n        verify: instance => {\n          assert_equals(instance.exports.fn(), initial);\n          const after = 201;\n          value.value = after;\n          assert_equals(instance.exports.fn(), after);\n        }\n      };\n    }\n  ],\n\n  [\n    \"i64 mutable WebAssembly.Global import\",\n    function() {\n      const initial = 102n;\n      const value = new WebAssembly.Global({ \"value\": \"i64\", \"mutable\": true }, initial);\n\n      const builder = new WasmModuleBuilder();\n\n      const index = builder.addImportedGlobal(\"module\", \"global\", kWasmI64, true);\n      const fn = builder\n        .addFunction(\"fn\", kSig_l_v)\n        .addBody([\n            kExprGlobalGet,\n            index,\n            kExprReturn,\n        ])\n        .exportFunc();\n\n      const buffer = builder.toBuffer();\n\n      const imports = {\n        \"module\": {\n          \"global\": value,\n        },\n      };\n\n      const exports = {\n        \"fn\": { \"kind\": \"function\", \"name\": String(fn.index), \"length\": 0 },\n      };\n\n      return {\n        buffer,\n        args: [imports],\n        exports,\n        verify: instance => {\n          assert_equals(instance.exports.fn(), initial);\n          const after = 201n;\n          value.value = after;\n          assert_equals(instance.exports.fn(), after);\n        }\n      };\n    }\n  ],\n\n  [\n    \"Multiple i64 arguments\",\n    function() {\n      const builder = new WasmModuleBuilder();\n\n      const fn = builder\n          .addFunction(\"fn\", kSig_l_ll)\n          .addBody([\n              kExprLocalGet, 1,\n          ])\n          .exportFunc();\n\n      const buffer = builder.toBuffer();\n\n      const exports = {\n        \"fn\": { \"kind\": \"function\", \"name\": String(fn.index), \"length\": 2 },\n      };\n\n      return {\n        buffer,\n        args: [],\n        exports,\n        verify: instance => {\n          const fn = instance.exports.fn;\n          assert_equals(fn(1n, 0n), 0n);\n          assert_equals(fn(1n, 123n), 123n);\n          assert_equals(fn(1n, -123n), -123n);\n          assert_equals(fn(1n, \"5\"), 5n);\n          assert_throws_js(TypeError, () => fn(1n, 5));\n        }\n      };\n    }\n  ],\n\n  [\n    \"stray argument\",\n    function() {\n      return {\n        buffer: emptyModuleBinary,\n        args: [{}, {}],\n        exports: {},\n        verify: () => {}\n      };\n    }\n  ],\n];\n"
  },
  {
    "path": "test/js-api/interface.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/assertions.js\n\nfunction test_operations(object, object_name, operations) {\n  for (const [name, length] of operations) {\n    test(() => {\n      const propdesc = Object.getOwnPropertyDescriptor(object, name);\n      assert_equals(typeof propdesc, \"object\");\n      assert_true(propdesc.writable, \"writable\");\n      assert_true(propdesc.enumerable, \"enumerable\");\n      assert_true(propdesc.configurable, \"configurable\");\n      assert_equals(propdesc.value, object[name]);\n    }, `${object_name}.${name}`);\n\n    test(() => {\n      assert_function_name(object[name], name, `${object_name}.${name}`);\n    }, `${object_name}.${name}: name`);\n\n    test(() => {\n      assert_function_length(object[name], length, `${object_name}.${name}`);\n    }, `${object_name}.${name}: length`);\n  }\n}\n\nfunction test_attributes(object, object_name, attributes) {\n  for (const [name, mutable] of attributes) {\n    test(() => {\n      const propdesc = Object.getOwnPropertyDescriptor(object, name);\n      assert_equals(typeof propdesc, \"object\");\n      assert_true(propdesc.enumerable, \"enumerable\");\n      assert_true(propdesc.configurable, \"configurable\");\n    }, `${object_name}.${name}`);\n\n    test(() => {\n      const propdesc = Object.getOwnPropertyDescriptor(object, name);\n      assert_equals(typeof propdesc, \"object\");\n      assert_equals(typeof propdesc.get, \"function\");\n      assert_function_name(propdesc.get, \"get \" + name, `getter for \"${name}\"`);\n      assert_function_length(propdesc.get, 0, `getter for \"${name}\"`);\n    }, `${object_name}.${name}: getter`);\n\n    test(() => {\n      const propdesc = Object.getOwnPropertyDescriptor(object, name);\n      assert_equals(typeof propdesc, \"object\");\n      if (mutable) {\n        assert_equals(typeof propdesc.set, \"function\");\n        assert_function_name(propdesc.set, \"set \" + name, `setter for \"${name}\"`);\n        assert_function_length(propdesc.set, 1, `setter for \"${name}\"`);\n      } else {\n        assert_equals(typeof propdesc.set, \"undefined\");\n      }\n    }, `${object_name}.${name}: setter`);\n  }\n}\n\ntest(() => {\n  const propdesc = Object.getOwnPropertyDescriptor(this, \"WebAssembly\");\n  assert_equals(typeof propdesc, \"object\");\n  assert_true(propdesc.writable, \"writable\");\n  assert_false(propdesc.enumerable, \"enumerable\");\n  assert_true(propdesc.configurable, \"configurable\");\n  assert_equals(propdesc.value, this.WebAssembly);\n}, \"WebAssembly: property descriptor\");\n\ntest(() => {\n  assert_throws_js(TypeError, () => WebAssembly());\n}, \"WebAssembly: calling\");\n\ntest(() => {\n  assert_throws_js(TypeError, () => new WebAssembly());\n}, \"WebAssembly: constructing\");\n\nconst interfaces = [\n  \"Module\",\n  \"Instance\",\n  \"Memory\",\n  \"Table\",\n  \"Global\",\n  \"CompileError\",\n  \"LinkError\",\n  \"RuntimeError\",\n];\n\nfor (const name of interfaces) {\n  test(() => {\n    const propdesc = Object.getOwnPropertyDescriptor(WebAssembly, name);\n    assert_equals(typeof propdesc, \"object\");\n    assert_true(propdesc.writable, \"writable\");\n    assert_false(propdesc.enumerable, \"enumerable\");\n    assert_true(propdesc.configurable, \"configurable\");\n    assert_equals(propdesc.value, WebAssembly[name]);\n  }, `WebAssembly.${name}: property descriptor`);\n\n  test(() => {\n    const interface_object = WebAssembly[name];\n    const propdesc = Object.getOwnPropertyDescriptor(interface_object, \"prototype\");\n    assert_equals(typeof propdesc, \"object\");\n    assert_false(propdesc.writable, \"writable\");\n    assert_false(propdesc.enumerable, \"enumerable\");\n    assert_false(propdesc.configurable, \"configurable\");\n  }, `WebAssembly.${name}: prototype`);\n\n  test(() => {\n    const interface_object = WebAssembly[name];\n    const interface_prototype_object = interface_object.prototype;\n    const propdesc = Object.getOwnPropertyDescriptor(interface_prototype_object, \"constructor\");\n    assert_equals(typeof propdesc, \"object\");\n    assert_true(propdesc.writable, \"writable\");\n    assert_false(propdesc.enumerable, \"enumerable\");\n    assert_true(propdesc.configurable, \"configurable\");\n    assert_equals(propdesc.value, interface_object);\n  }, `WebAssembly.${name}: prototype.constructor`);\n}\n\ntest_operations(WebAssembly, \"WebAssembly\", [\n  [\"validate\", 1],\n  [\"compile\", 1],\n  [\"instantiate\", 1],\n]);\n\n\ntest_operations(WebAssembly.Module, \"WebAssembly.Module\", [\n  [\"exports\", 1],\n  [\"imports\", 1],\n  [\"customSections\", 2],\n]);\n\n\ntest_attributes(WebAssembly.Instance.prototype, \"WebAssembly.Instance\", [\n  [\"exports\", false],\n]);\n\n\ntest_operations(WebAssembly.Memory.prototype, \"WebAssembly.Memory\", [\n  [\"grow\", 1],\n]);\n\ntest_attributes(WebAssembly.Memory.prototype, \"WebAssembly.Memory\", [\n  [\"buffer\", false],\n]);\n\n\ntest_operations(WebAssembly.Table.prototype, \"WebAssembly.Table\", [\n  [\"grow\", 1],\n  [\"get\", 1],\n  [\"set\", 2],\n]);\n\ntest_attributes(WebAssembly.Table.prototype, \"WebAssembly.Table\", [\n  [\"length\", false],\n]);\n\n\ntest_operations(WebAssembly.Global.prototype, \"WebAssembly.Global\", [\n  [\"valueOf\", 0],\n]);\n\ntest_attributes(WebAssembly.Global.prototype, \"WebAssembly.Global\", [\n  [\"value\", true],\n]);\n"
  },
  {
    "path": "test/js-api/limits.any.js",
    "content": "// META: global=jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n// META: timeout=long\n\n// Static limits\nconst kJSEmbeddingMaxTypes = 1000000;\nconst kJSEmbeddingMaxFunctions = 1000000;\nconst kJSEmbeddingMaxImports = 100000;\nconst kJSEmbeddingMaxExports = 100000;\nconst kJSEmbeddingMaxGlobals = 1000000;\nconst kJSEmbeddingMaxDataSegments = 100000;\n\nconst kJSEmbeddingMaxModuleSize = 1024 * 1024 * 1024; // = 1 GiB\nconst kJSEmbeddingMaxFunctionSize = 7654321;\nconst kJSEmbeddingMaxFunctionLocals = 50000;\nconst kJSEmbeddingMaxFunctionParams = 1000;\nconst kJSEmbeddingMaxFunctionReturns = 1000;\nconst kJSEmbeddingMaxElementSegments = 10000000;\nconst kJSEmbeddingMaxTables = 100000;\nconst kJSEmbeddingMaxMemories = 1;\n\n// Dynamic limits\nconst kJSEmbeddingMaxTableSize = 10000000;\n\n// This function runs the {gen} function with the values {min}, {limit}, and\n// {limit+1}, assuming that values below and including the limit should\n// pass. {name} is used for test names.\nfunction testLimit(name, min, limit, gen) {\n  function get_buffer(count) {\n    const builder = new WasmModuleBuilder();\n    gen(builder, count);\n    return builder.toBuffer();\n  }\n\n  const buffer_with_min = get_buffer(min);\n  const buffer_with_limit = get_buffer(limit);\n  const buffer_with_limit_plus_1 = get_buffer(limit + 1);\n\n  test(() => { assert_true(WebAssembly.validate(buffer_with_min)); },\n       `Validate ${name} minimum`);\n  test(() => { assert_true(WebAssembly.validate(buffer_with_limit)); },\n       `Validate ${name} limit`);\n  test(() => { assert_false(WebAssembly.validate(buffer_with_limit_plus_1)); },\n       `Validate ${name} over limit`);\n\n  test(() => { new WebAssembly.Module(buffer_with_min); },\n       `Compile ${name} minimum`);\n  test(() => { new WebAssembly.Module(buffer_with_limit); },\n       `Compile ${name} limit`);\n  test(() => {\n    assert_throws(new WebAssembly.CompileError(),\n                  () => new WebAssembly.Module(buffer_with_limit_plus_1));\n  }, `Compile ${name} over limit`);\n\n  promise_test(t => { return WebAssembly.compile(buffer_with_min); },\n               `Async compile ${name} minimum`);\n  promise_test(t => { return WebAssembly.compile(buffer_with_limit); },\n               `Async compile ${name} limit`);\n  promise_test(t => {\n    return promise_rejects(t, new WebAssembly.CompileError(),\n                           WebAssembly.compile(buffer_with_limit_plus_1));\n  }, `Async compile ${name} over limit`);\n}\n\ntestLimit(\"types\", 1, kJSEmbeddingMaxTypes, (builder, count) => {\n  for (let i = 0; i < count; i++) {\n    builder.addType(kSig_i_i);\n  }\n});\n\ntestLimit(\"functions\", 1, kJSEmbeddingMaxFunctions, (builder, count) => {\n        const type = builder.addType(kSig_v_v);\n        const body = [];\n        for (let i = 0; i < count; i++) {\n            builder.addFunction(/*name=*/ undefined, type).addBody(body);\n        }\n    });\n\ntestLimit(\"imports\", 1, kJSEmbeddingMaxImports, (builder, count) => {\n  const type = builder.addType(kSig_v_v);\n  for (let i = 0; i < count; i++) {\n    builder.addImport(\"\", \"\", type);\n  }\n});\n\ntestLimit(\"exports\", 1, kJSEmbeddingMaxExports, (builder, count) => {\n  const type = builder.addType(kSig_v_v);\n  const f = builder.addFunction(/*name=*/ undefined, type);\n  f.addBody([]);\n  for (let i = 0; i < count; i++) {\n    builder.addExport(\"f\" + i, f.index);\n  }\n});\n\ntestLimit(\"globals\", 1, kJSEmbeddingMaxGlobals, (builder, count) => {\n  for (let i = 0; i < count; i++) {\n    builder.addGlobal(kWasmI32, true);\n  }\n});\n\ntestLimit(\"data segments\", 1, kJSEmbeddingMaxDataSegments, (builder, count) => {\n  const data = [];\n  builder.addMemory(1, 1, false, false);\n  for (let i = 0; i < count; i++) {\n    builder.addDataSegment(0, data);\n  }\n});\n\ntestLimit(\"function size\", 2, kJSEmbeddingMaxFunctionSize, (builder, count) => {\n  const type = builder.addType(kSig_v_v);\n  const nops = count - 2;\n  const array = new Array(nops);\n  for (let i = 0; i < nops; i++)\n    array[i] = kExprNop;\n  builder.addFunction(undefined, type).addBody(array);\n});\n\ntestLimit(\"function locals\", 1, kJSEmbeddingMaxFunctionLocals,\n          (builder, count) => {\n            const type = builder.addType(kSig_v_v);\n            builder.addFunction(undefined, type)\n                .addLocals({i32_count : count})\n                .addBody([]);\n          });\n\ntestLimit(\"function params\", 1, kJSEmbeddingMaxFunctionParams,\n          (builder, count) => {\n            const array = new Array(count);\n            for (let i = 0; i < count; i++) {\n              array[i] = kWasmI32;\n            }\n            const type = builder.addType({params : array, results : []});\n          });\n\ntestLimit(\"function params+locals\", 1, kJSEmbeddingMaxFunctionLocals - 2,\n          (builder, count) => {\n            const type = builder.addType(kSig_i_ii);\n            builder.addFunction(undefined, type)\n                .addLocals({i32_count : count})\n                .addBody([ kExprUnreachable ]);\n          });\n\ntestLimit(\"function returns\", 0, kJSEmbeddingMaxFunctionReturns,\n          (builder, count) => {\n            const array = new Array(count);\n            for (let i = 0; i < count; i++) {\n              array[i] = kWasmI32;\n            }\n            const type = builder.addType({params : [], results : array});\n          });\n\ntestLimit(\"element segments\", 1, kJSEmbeddingMaxElementSegments,\n          (builder, count) => {\n            builder.setTableBounds(1, 1);\n            const array = [];\n            for (let i = 0; i < count; i++) {\n              builder.addElementSegment(0, false, false, array);\n            }\n          });\n\ntestLimit(\"tables\", 0, kJSEmbeddingMaxTables, (builder, count) => {\n  for (let i = 0; i < count; i++) {\n    builder.addImportedTable(\"\", \"\", 1, 1);\n  }\n});\n\ntestLimit(\"memories\", 0, kJSEmbeddingMaxMemories, (builder, count) => {\n  for (let i = 0; i < count; i++) {\n    builder.addImportedMemory(\"\", \"\", 1, 1, false);\n  }\n});\n\nconst instantiationShouldFail = 1;\nconst instantiationShouldSucceed = 2;\n// This function tries to compile and instantiate the module produced\n// with {gen}. Compilation should work, an error should only happen during\n// instantiation or runtime. If {instantiationResult} is\n// {instantiationShouldSucceed}, then {gen} should generate a function called\n// \"grow\" which grows the tested aspect and returns \"-1\" if growing fails.\nfunction testDynamicLimit(name, instantiationResult, imports, gen) {\n  const builder = new WasmModuleBuilder();\n  gen(builder);\n  const buffer = builder.toBuffer();\n\n  test(() => { assert_true(WebAssembly.validate(buffer)); },\n       `Validate ${name} beyond its dynamic limit`);\n\n  test(() => { new WebAssembly.Module(buffer); },\n       `Compile ${name} beyond its dynamic limit`);\n\n  promise_test(t => { return WebAssembly.compile(buffer); },\n               `Async compile ${name} beyond its dynamic limit.`);\n\n  test(() => {\n    const compiled_module = new WebAssembly.Module(buffer);\n    if (instantiationResult == instantiationShouldFail) {\n      assert_throws(new RangeError(),\n                    () => new WebAssembly.Instance(compiled_module, imports));\n    } else if (instantiationResult == instantiationShouldSucceed) {\n       const instance = new WebAssembly.Instance(compiled_module, imports);\n       assertEquals(-1, instance.exports.grow());\n    }\n  }, `Instantiate ${name} over limit`);\n\n  promise_test(t => {\n    if (instantiationResult == instantiationShouldFail) {\n      return Promise.resolve();\n      return promise_rejects(t, new RangeError(),\n                             WebAssembly.instantiate(buffer, imports));\n    } else if (instantiationResult == instantiationShouldSucceed) {\n      return WebAssembly.instantiate(buffer, imports)\n          .then(({instance}) => { assertEquals(-1, instance.exports.grow()); });\n    } else {\n      return Promise.resolve();\n    }\n  }, `Async instantiate ${name} over limit`);\n}\n\ntestDynamicLimit(\"initial table size\", instantiationShouldFail, {}, (builder) => {\n  builder.setTableBounds(kJSEmbeddingMaxTableSize + 1, undefined);\n});\n\ntestDynamicLimit(\n    \"maximum table size\", instantiationShouldSucceed, {}, (builder) => {\n      builder.setTableBounds(1, kJSEmbeddingMaxTableSize + 1);\n      // table.grow requires the reference types proposal. Instead we just\n      // return -1.\n      builder.addFunction(\"grow\", kSig_i_v)\n          .addBody([\n            ...wasmI32Const(-1)\n          ])\n          .exportFunc();\n    });\n\ntest(() => {\n  assert_throws(\n      new RangeError(),\n      () => new WebAssembly.Table(\n          {element : \"anyfunc\", initial : kJSEmbeddingMaxTableSize + 1}));\n\n  let memory = new WebAssembly.Table(\n      {initial : 1, maximum : kJSEmbeddingMaxTableSize + 1, element: \"anyfunc\"});\n  assert_throws(new RangeError(),\n                () => memory.grow(kJSEmbeddingMaxTableSize));\n}, `Grow WebAssembly.Table object beyond the embedder-defined limit`);\n\n"
  },
  {
    "path": "test/js-api/memory/assertions.js",
    "content": "function assert_ArrayBuffer(actual, { size=0, shared=false, detached=false }, message) {\n  // https://github.com/WebAssembly/spec/issues/840\n  // See https://github.com/whatwg/html/issues/5380 for why not `self.SharedArrayBuffer`\n  const isShared = !(\"isView\" in actual.constructor);\n  assert_equals(isShared, shared, `${message}: constructor`);\n  const sharedString = shared ? \"Shared\" : \"\";\n  assert_equals(actual.toString(), `[object ${sharedString}ArrayBuffer]`, `${message}: toString()`);\n  assert_equals(Object.getPrototypeOf(actual).toString(), `[object ${sharedString}ArrayBuffer]`, `${message}: prototype toString()`);\n  if (detached) {\n    // https://github.com/tc39/ecma262/issues/678\n    let byteLength;\n    try {\n      byteLength = actual.byteLength;\n    } catch (e) {\n      byteLength = 0;\n    }\n    assert_equals(byteLength, 0, `${message}: detached size`);\n  } else {\n    assert_equals(actual.byteLength, 0x10000 * size, `${message}: size`);\n    if (size > 0) {\n      const array = new Uint8Array(actual);\n      assert_equals(array[0], 0, `${message}: first element`);\n      assert_equals(array[array.byteLength - 1], 0, `${message}: last element`);\n    }\n  }\n  assert_equals(Object.isFrozen(actual), shared, \"buffer frozen\");\n  assert_equals(Object.isExtensible(actual), !shared, \"buffer extensibility\");\n}\n\nfunction assert_Memory(memory, { size=0, shared=false }) {\n  assert_equals(Object.getPrototypeOf(memory), WebAssembly.Memory.prototype,\n                \"prototype\");\n  assert_true(Object.isExtensible(memory), \"extensible\");\n\n  // https://github.com/WebAssembly/spec/issues/840\n  assert_equals(memory.buffer, memory.buffer, \"buffer should be idempotent\");\n  assert_ArrayBuffer(memory.buffer, { size, shared });\n}\n"
  },
  {
    "path": "test/js-api/memory/buffer.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n\ntest(() => {\n  const thisValues = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Memory,\n    WebAssembly.Memory.prototype,\n  ];\n\n  const desc = Object.getOwnPropertyDescriptor(WebAssembly.Memory.prototype, \"buffer\");\n  assert_equals(typeof desc, \"object\");\n\n  const getter = desc.get;\n  assert_equals(typeof getter, \"function\");\n\n  assert_equals(typeof desc.set, \"undefined\");\n\n  for (const thisValue of thisValues) {\n    assert_throws_js(TypeError, () => getter.call(thisValue), `this=${format_value(thisValue)}`);\n  }\n}, \"Branding\");\n\ntest(() => {\n  const argument = { \"initial\": 0 };\n  const memory = new WebAssembly.Memory(argument);\n  const buffer = memory.buffer;\n\n  const desc = Object.getOwnPropertyDescriptor(WebAssembly.Memory.prototype, \"buffer\");\n  assert_equals(typeof desc, \"object\");\n\n  const getter = desc.get;\n  assert_equals(typeof getter, \"function\");\n\n  assert_equals(getter.call(memory, {}), buffer);\n}, \"Stray argument\");\n\ntest(() => {\n  const argument = { \"initial\": 0 };\n  const memory = new WebAssembly.Memory(argument);\n  const memory2 = new WebAssembly.Memory(argument);\n  const buffer = memory.buffer;\n  assert_not_equals(buffer, memory2.buffer, \"Need two distinct buffers\");\n  memory.buffer = memory2.buffer;\n  assert_equals(memory.buffer, buffer, \"Should not change the buffer\");\n}, \"Setting (sloppy mode)\");\n\ntest(() => {\n  const argument = { \"initial\": 0 };\n  const memory = new WebAssembly.Memory(argument);\n  const memory2 = new WebAssembly.Memory(argument);\n  const buffer = memory.buffer;\n  assert_not_equals(buffer, memory2.buffer, \"Need two distinct buffers\");\n  assert_throws_js(TypeError, () => {\n    \"use strict\";\n    memory.buffer = memory2.buffer;\n  });\n  assert_equals(memory.buffer, buffer, \"Should not change the buffer\");\n}, \"Setting (strict mode)\");\n"
  },
  {
    "path": "test/js-api/memory/constructor.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/assertions.js\n// META: script=/wasm/jsapi/memory/assertions.js\n\ntest(() => {\n  assert_function_name(WebAssembly.Memory, \"Memory\", \"WebAssembly.Memory\");\n}, \"name\");\n\ntest(() => {\n  assert_function_length(WebAssembly.Memory, 1, \"WebAssembly.Memory\");\n}, \"length\");\n\ntest(() => {\n  assert_throws_js(TypeError, () => new WebAssembly.Memory());\n}, \"No arguments\");\n\ntest(() => {\n  const argument = { \"initial\": 0 };\n  assert_throws_js(TypeError, () => WebAssembly.Memory(argument));\n}, \"Calling\");\n\ntest(() => {\n  const invalidArguments = [\n    undefined,\n    null,\n    false,\n    true,\n    \"\",\n    \"test\",\n    Symbol(),\n    1,\n    NaN,\n    {},\n  ];\n  for (const invalidArgument of invalidArguments) {\n    assert_throws_js(TypeError,\n                     () => new WebAssembly.Memory(invalidArgument),\n                     `new Memory(${format_value(invalidArgument)})`);\n  }\n}, \"Invalid descriptor argument\");\n\ntest(() => {\n  assert_throws_js(TypeError, () => new WebAssembly.Memory({ \"initial\": undefined }));\n}, \"Undefined initial value in descriptor\");\n\nconst outOfRangeValues = [\n  NaN,\n  Infinity,\n  -Infinity,\n  -1,\n  0x100000000,\n  0x1000000000,\n];\n\nfor (const value of outOfRangeValues) {\n  test(() => {\n    assert_throws_js(TypeError, () => new WebAssembly.Memory({ \"initial\": value }));\n  }, `Out-of-range initial value in descriptor: ${format_value(value)}`);\n\n  test(() => {\n    assert_throws_js(TypeError, () => new WebAssembly.Memory({ \"initial\": 0, \"maximum\": value }));\n  }, `Out-of-range maximum value in descriptor: ${format_value(value)}`);\n}\n\ntest(() => {\n  assert_throws_js(RangeError, () => new WebAssembly.Memory({ \"initial\": 10, \"maximum\": 9 }));\n}, \"Initial value exceeds maximum\");\n\ntest(() => {\n  const proxy = new Proxy({}, {\n    has(o, x) {\n      assert_unreached(`Should not call [[HasProperty]] with ${x}`);\n    },\n    get(o, x) {\n      return 0;\n    },\n  });\n  new WebAssembly.Memory(proxy);\n}, \"Proxy descriptor\");\n\ntest(() => {\n  const order = [];\n\n  new WebAssembly.Memory({\n    get maximum() {\n      order.push(\"maximum\");\n      return {\n        valueOf() {\n          order.push(\"maximum valueOf\");\n          return 1;\n        },\n      };\n    },\n\n    get initial() {\n      order.push(\"initial\");\n      return {\n        valueOf() {\n          order.push(\"initial valueOf\");\n          return 1;\n        },\n      };\n    },\n  });\n\n  assert_array_equals(order, [\n    \"initial\",\n    \"initial valueOf\",\n    \"maximum\",\n    \"maximum valueOf\",\n  ]);\n}, \"Order of evaluation for descriptor\");\n\ntest(() => {\n  const argument = { \"initial\": 0 };\n  const memory = new WebAssembly.Memory(argument);\n  assert_Memory(memory, { \"size\": 0 });\n}, \"Zero initial\");\n\ntest(() => {\n  const argument = { \"initial\": 4 };\n  const memory = new WebAssembly.Memory(argument);\n  assert_Memory(memory, { \"size\": 4 });\n}, \"Non-zero initial\");\n\ntest(() => {\n  const argument = { \"initial\": 0 };\n  const memory = new WebAssembly.Memory(argument, {});\n  assert_Memory(memory, { \"size\": 0 });\n}, \"Stray argument\");\n"
  },
  {
    "path": "test/js-api/memory/grow.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/memory/assertions.js\n\ntest(() => {\n  const argument = { \"initial\": 0 };\n  const memory = new WebAssembly.Memory(argument);\n  assert_throws_js(TypeError, () => memory.grow());\n}, \"Missing arguments\");\n\ntest(t => {\n  const thisValues = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Memory,\n    WebAssembly.Memory.prototype,\n  ];\n\n  const argument = {\n    valueOf: t.unreached_func(\"Should not touch the argument (valueOf)\"),\n    toString: t.unreached_func(\"Should not touch the argument (toString)\"),\n  };\n\n  const fn = WebAssembly.Memory.prototype.grow;\n\n  for (const thisValue of thisValues) {\n    assert_throws_js(TypeError, () => fn.call(thisValue, argument), `this=${format_value(thisValue)}`);\n  }\n}, \"Branding\");\n\ntest(() => {\n  const argument = { \"initial\": 0 };\n  const memory = new WebAssembly.Memory(argument);\n  const oldMemory = memory.buffer;\n  assert_ArrayBuffer(oldMemory, { \"size\": 0 }, \"Buffer before growing\");\n\n  const result = memory.grow(2);\n  assert_equals(result, 0);\n\n  const newMemory = memory.buffer;\n  assert_not_equals(oldMemory, newMemory);\n  assert_ArrayBuffer(oldMemory, { \"detached\": true }, \"Old buffer after growing\");\n  assert_ArrayBuffer(newMemory, { \"size\": 2 }, \"New buffer after growing\");\n}, \"Zero initial\");\n\ntest(() => {\n  const argument = { \"initial\": { valueOf() { return 0 } } };\n  const memory = new WebAssembly.Memory(argument);\n  const oldMemory = memory.buffer;\n  assert_ArrayBuffer(oldMemory, { \"size\": 0 }, \"Buffer before growing\");\n\n  const result = memory.grow({ valueOf() { return 2 } });\n  assert_equals(result, 0);\n\n  const newMemory = memory.buffer;\n  assert_not_equals(oldMemory, newMemory);\n  assert_ArrayBuffer(oldMemory, { \"detached\": true }, \"Old buffer after growing\");\n  assert_ArrayBuffer(newMemory, { \"size\": 2 }, \"New buffer after growing\");\n}, \"Zero initial with valueOf\");\n\ntest(() => {\n  const argument = { \"initial\": 3 };\n  const memory = new WebAssembly.Memory(argument);\n  const oldMemory = memory.buffer;\n  assert_ArrayBuffer(oldMemory, { \"size\": 3 }, \"Buffer before growing\");\n\n  const result = memory.grow(2);\n  assert_equals(result, 3);\n\n  const newMemory = memory.buffer;\n  assert_not_equals(oldMemory, newMemory);\n  assert_ArrayBuffer(oldMemory, { \"detached\": true }, \"Old buffer after growing\");\n  assert_ArrayBuffer(newMemory, { \"size\": 5 }, \"New buffer after growing\");\n}, \"Non-zero initial\");\n\ntest(() => {\n  const argument = { \"initial\": 0, \"maximum\": 2 };\n  const memory = new WebAssembly.Memory(argument);\n  const oldMemory = memory.buffer;\n  assert_ArrayBuffer(oldMemory, { \"size\": 0 }, \"Buffer before growing\");\n\n  const result = memory.grow(2);\n  assert_equals(result, 0);\n\n  const newMemory = memory.buffer;\n  assert_not_equals(oldMemory, newMemory);\n  assert_ArrayBuffer(oldMemory, { \"detached\": true }, \"Old buffer after growing\");\n  assert_ArrayBuffer(newMemory, { \"size\": 2 }, \"New buffer after growing\");\n}, \"Zero initial with respected maximum\");\n\ntest(() => {\n  const argument = { \"initial\": 0, \"maximum\": 2 };\n  const memory = new WebAssembly.Memory(argument);\n  const oldMemory = memory.buffer;\n  assert_ArrayBuffer(oldMemory, { \"size\": 0 }, \"Buffer before growing\");\n\n  const result = memory.grow(1);\n  assert_equals(result, 0);\n\n  const newMemory = memory.buffer;\n  assert_not_equals(oldMemory, newMemory);\n  assert_ArrayBuffer(oldMemory, { \"detached\": true }, \"Old buffer after growing once\");\n  assert_ArrayBuffer(newMemory, { \"size\": 1 }, \"New buffer after growing once\");\n\n  const result2 = memory.grow(1);\n  assert_equals(result2, 1);\n\n  const newestMemory = memory.buffer;\n  assert_not_equals(newMemory, newestMemory);\n  assert_ArrayBuffer(oldMemory, { \"detached\": true }, \"New buffer after growing twice\");\n  assert_ArrayBuffer(newMemory, { \"detached\": true }, \"New buffer after growing twice\");\n  assert_ArrayBuffer(newestMemory, { \"size\": 2 }, \"Newest buffer after growing twice\");\n}, \"Zero initial with respected maximum grown twice\");\n\ntest(() => {\n  const argument = { \"initial\": 1, \"maximum\": 2 };\n  const memory = new WebAssembly.Memory(argument);\n  const oldMemory = memory.buffer;\n  assert_ArrayBuffer(oldMemory, { \"size\": 1 }, \"Buffer before growing\");\n\n  assert_throws_js(RangeError, () => memory.grow(2));\n  assert_equals(memory.buffer, oldMemory);\n  assert_ArrayBuffer(memory.buffer, { \"size\": 1 }, \"Buffer before trying to grow\");\n}, \"Zero initial growing too much\");\n\nconst outOfRangeValues = [\n  undefined,\n  NaN,\n  Infinity,\n  -Infinity,\n  -1,\n  0x100000000,\n  0x1000000000,\n  \"0x100000000\",\n  { valueOf() { return 0x100000000; } },\n];\n\nfor (const value of outOfRangeValues) {\n  test(() => {\n    const argument = { \"initial\": 0 };\n    const memory = new WebAssembly.Memory(argument);\n    assert_throws_js(TypeError, () => memory.grow(value));\n  }, `Out-of-range argument: ${format_value(value)}`);\n}\n\ntest(() => {\n  const argument = { \"initial\": 0 };\n  const memory = new WebAssembly.Memory(argument);\n  const oldMemory = memory.buffer;\n  assert_ArrayBuffer(oldMemory, { \"size\": 0 }, \"Buffer before growing\");\n\n  const result = memory.grow(2, {});\n  assert_equals(result, 0);\n\n  const newMemory = memory.buffer;\n  assert_not_equals(oldMemory, newMemory);\n  assert_ArrayBuffer(oldMemory, { \"detached\": true }, \"Old buffer after growing\");\n  assert_ArrayBuffer(newMemory, { \"size\": 2 }, \"New buffer after growing\");\n}, \"Stray argument\");\n\ntest(() => {\n  const argument = { \"initial\": 1, \"maximum\": 2, \"shared\": true };\n  const memory = new WebAssembly.Memory(argument);\n  const oldMemory = memory.buffer;\n  assert_ArrayBuffer(oldMemory, { \"size\": 1, \"shared\": true }, \"Buffer before growing\");\n\n  const result = memory.grow(1);\n  assert_equals(result, 1);\n\n  const newMemory = memory.buffer;\n  assert_not_equals(oldMemory, newMemory);\n  assert_ArrayBuffer(oldMemory, { \"size\": 1, \"shared\": true }, \"Old buffer after growing\");\n  assert_ArrayBuffer(newMemory, { \"size\": 2, \"shared\": true }, \"New buffer after growing\");\n\n  // The old and new buffers must have the same value for the\n  // [[ArrayBufferData]] internal slot.\n  const oldArray = new Uint8Array(oldMemory);\n  const newArray = new Uint8Array(newMemory);\n  assert_equals(oldArray[0], 0, \"old first element\");\n  assert_equals(newArray[0], 0, \"new first element\");\n  oldArray[0] = 1;\n  assert_equals(oldArray[0], 1, \"old first element\");\n  assert_equals(newArray[0], 1, \"new first element\");\n\n}, \"Growing shared memory does not detach old buffer\");\n"
  },
  {
    "path": "test/js-api/memory/toString.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n\ntest(() => {\n  const argument = { \"initial\": 0 };\n  const memory = new WebAssembly.Memory(argument);\n  assert_class_string(memory, \"WebAssembly.Memory\");\n}, \"Object.prototype.toString on an Memory\");\n\ntest(() => {\n  assert_own_property(WebAssembly.Memory.prototype, Symbol.toStringTag);\n\n  const propDesc = Object.getOwnPropertyDescriptor(WebAssembly.Memory.prototype, Symbol.toStringTag);\n  assert_equals(propDesc.value, \"WebAssembly.Memory\", \"value\");\n  assert_equals(propDesc.configurable, true, \"configurable\");\n  assert_equals(propDesc.enumerable, false, \"enumerable\");\n  assert_equals(propDesc.writable, false, \"writable\");\n}, \"@@toStringTag exists on the prototype with the appropriate descriptor\");\n"
  },
  {
    "path": "test/js-api/module/constructor.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n// META: script=/wasm/jsapi/assertions.js\n\nlet emptyModuleBinary;\nsetup(() => {\n  emptyModuleBinary = new WasmModuleBuilder().toBuffer();\n});\n\ntest(() => {\n  assert_function_name(WebAssembly.Module, \"Module\", \"WebAssembly.Module\");\n}, \"name\");\n\ntest(() => {\n  assert_function_length(WebAssembly.Module, 1, \"WebAssembly.Module\");\n}, \"length\");\n\ntest(() => {\n  assert_throws_js(TypeError, () => new WebAssembly.Module());\n}, \"No arguments\");\n\ntest(() => {\n  assert_throws_js(TypeError, () => WebAssembly.Module(emptyModuleBinary));\n}, \"Calling\");\n\ntest(() => {\n  const invalidArguments = [\n    undefined,\n    null,\n    true,\n    \"test\",\n    Symbol(),\n    7,\n    NaN,\n    {},\n    ArrayBuffer,\n    ArrayBuffer.prototype,\n    Array.from(emptyModuleBinary),\n  ];\n  for (const argument of invalidArguments) {\n    assert_throws_js(TypeError, () => new WebAssembly.Module(argument),\n                     `new Module(${format_value(argument)})`);\n  }\n}, \"Invalid arguments\");\n\ntest(() => {\n  const buffer = new Uint8Array();\n  assert_throws_js(WebAssembly.CompileError, () => new WebAssembly.Module(buffer));\n}, \"Empty buffer\");\n\ntest(() => {\n  const buffer = new Uint8Array(Array.from(emptyModuleBinary).concat([0, 0]));\n  assert_throws_js(WebAssembly.CompileError, () => new WebAssembly.Module(buffer));\n}, \"Invalid code\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  assert_equals(Object.getPrototypeOf(module), WebAssembly.Module.prototype);\n}, \"Prototype\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  assert_true(Object.isExtensible(module));\n}, \"Extensibility\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary, {});\n  assert_equals(Object.getPrototypeOf(module), WebAssembly.Module.prototype);\n}, \"Stray argument\");\n"
  },
  {
    "path": "test/js-api/module/customSections.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n\nfunction assert_ArrayBuffer(buffer, expected) {\n  assert_equals(Object.getPrototypeOf(buffer), ArrayBuffer.prototype, \"Prototype\");\n  assert_true(Object.isExtensible(buffer), \"isExtensible\");\n  assert_array_equals(new Uint8Array(buffer), expected);\n}\n\nfunction assert_sections(sections, expected) {\n  assert_true(Array.isArray(sections), \"Should be array\");\n  assert_equals(Object.getPrototypeOf(sections), Array.prototype, \"Prototype\");\n  assert_true(Object.isExtensible(sections), \"isExtensible\");\n\n  assert_equals(sections.length, expected.length);\n  for (let i = 0; i < expected.length; ++i) {\n    assert_ArrayBuffer(sections[i], expected[i]);\n  }\n}\n\nlet emptyModuleBinary;\nsetup(() => {\n  emptyModuleBinary = new WasmModuleBuilder().toBuffer();\n});\n\ntest(() => {\n  assert_throws_js(TypeError, () => WebAssembly.Module.customSections());\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  assert_throws_js(TypeError, () => WebAssembly.Module.customSections(module));\n}, \"Missing arguments\");\n\ntest(() => {\n  const invalidArguments = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Module,\n    WebAssembly.Module.prototype,\n  ];\n  for (const argument of invalidArguments) {\n    assert_throws_js(TypeError, () => WebAssembly.Module.customSections(argument, \"\"),\n                     `customSections(${format_value(argument)})`);\n  }\n}, \"Non-Module arguments\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  const fn = WebAssembly.Module.customSections;\n  const thisValues = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Module,\n    WebAssembly.Module.prototype,\n  ];\n  for (const thisValue of thisValues) {\n    assert_sections(fn.call(thisValue, module, \"\"), []);\n  }\n}, \"Branding\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  assert_sections(WebAssembly.Module.customSections(module, \"\"), []);\n}, \"Empty module\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  assert_not_equals(WebAssembly.Module.customSections(module, \"\"),\n                    WebAssembly.Module.customSections(module, \"\"));\n}, \"Empty module: array caching\");\n\ntest(() => {\n  const bytes1 = [87, 101, 98, 65, 115, 115, 101, 109, 98, 108, 121];\n  const bytes2 = [74, 83, 65, 80, 73];\n\n  const builder = new WasmModuleBuilder();\n  builder.addCustomSection(\"name\", bytes1);\n  builder.addCustomSection(\"name\", bytes2);\n  builder.addCustomSection(\"foo\", bytes1);\n  const buffer = builder.toBuffer()\n  const module = new WebAssembly.Module(buffer);\n\n  assert_sections(WebAssembly.Module.customSections(module, \"name\"), [\n    bytes1,\n    bytes2,\n  ])\n\n  assert_sections(WebAssembly.Module.customSections(module, \"foo\"), [\n    bytes1,\n  ])\n\n  assert_sections(WebAssembly.Module.customSections(module, \"\"), [])\n  assert_sections(WebAssembly.Module.customSections(module, \"\\0\"), [])\n  assert_sections(WebAssembly.Module.customSections(module, \"name\\0\"), [])\n  assert_sections(WebAssembly.Module.customSections(module, \"foo\\0\"), [])\n}, \"Custom sections\");\n\ntest(() => {\n  const bytes = [87, 101, 98, 65, 115, 115, 101, 109, 98, 108, 121];\n  const name = \"yee\\uD801\\uDC37eey\"\n\n  const builder = new WasmModuleBuilder();\n  builder.addCustomSection(name, bytes);\n  const buffer = builder.toBuffer();\n  const module = new WebAssembly.Module(buffer);\n\n  assert_sections(WebAssembly.Module.customSections(module, name), [\n    bytes,\n  ]);\n  assert_sections(WebAssembly.Module.customSections(module, \"yee\\uFFFDeey\"), []);\n  assert_sections(WebAssembly.Module.customSections(module, \"yee\\uFFFD\\uFFFDeey\"), []);\n}, \"Custom sections with surrogate pairs\");\n\ntest(() => {\n  const bytes = [87, 101, 98, 65, 115, 115, 101, 109, 98, 108, 121];\n\n  const builder = new WasmModuleBuilder();\n  builder.addCustomSection(\"na\\uFFFDme\", bytes);\n  const buffer = builder.toBuffer();\n  const module = new WebAssembly.Module(buffer);\n\n  assert_sections(WebAssembly.Module.customSections(module, \"name\"), []);\n  assert_sections(WebAssembly.Module.customSections(module, \"na\\uFFFDme\"), [\n    bytes,\n  ]);\n  assert_sections(WebAssembly.Module.customSections(module, \"na\\uDC01me\"), []);\n}, \"Custom sections with U+FFFD\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  assert_sections(WebAssembly.Module.customSections(module, \"\", {}), []);\n}, \"Stray argument\");\n"
  },
  {
    "path": "test/js-api/module/exports.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n\nlet emptyModuleBinary;\nsetup(() => {\n  emptyModuleBinary = new WasmModuleBuilder().toBuffer();\n});\n\nfunction assert_ModuleExportDescriptor(export_, expected) {\n  assert_equals(Object.getPrototypeOf(export_), Object.prototype, \"Prototype\");\n  assert_true(Object.isExtensible(export_), \"isExtensible\");\n\n  const name = Object.getOwnPropertyDescriptor(export_, \"name\");\n  assert_true(name.writable, \"name: writable\");\n  assert_true(name.enumerable, \"name: enumerable\");\n  assert_true(name.configurable, \"name: configurable\");\n  assert_equals(name.value, expected.name);\n\n  const kind = Object.getOwnPropertyDescriptor(export_, \"kind\");\n  assert_true(kind.writable, \"kind: writable\");\n  assert_true(kind.enumerable, \"kind: enumerable\");\n  assert_true(kind.configurable, \"kind: configurable\");\n  assert_equals(kind.value, expected.kind);\n}\n\nfunction assert_exports(exports, expected) {\n  assert_true(Array.isArray(exports), \"Should be array\");\n  assert_equals(Object.getPrototypeOf(exports), Array.prototype, \"Prototype\");\n  assert_true(Object.isExtensible(exports), \"isExtensible\");\n\n  assert_equals(exports.length, expected.length);\n  for (let i = 0; i < expected.length; ++i) {\n    assert_ModuleExportDescriptor(exports[i], expected[i]);\n  }\n}\n\ntest(() => {\n  assert_throws_js(TypeError, () => WebAssembly.Module.exports());\n}, \"Missing arguments\");\n\ntest(() => {\n  const invalidArguments = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Module,\n    WebAssembly.Module.prototype,\n  ];\n  for (const argument of invalidArguments) {\n    assert_throws_js(TypeError, () => WebAssembly.Module.exports(argument),\n                     `exports(${format_value(argument)})`);\n  }\n}, \"Non-Module arguments\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  const fn = WebAssembly.Module.exports;\n  const thisValues = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Module,\n    WebAssembly.Module.prototype,\n  ];\n  for (const thisValue of thisValues) {\n    assert_array_equals(fn.call(thisValue, module), []);\n  }\n}, \"Branding\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  const exports = WebAssembly.Module.exports(module);\n  assert_exports(exports, []);\n}, \"Empty module\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  assert_not_equals(WebAssembly.Module.exports(module), WebAssembly.Module.exports(module));\n}, \"Empty module: array caching\");\n\ntest(() => {\n  const builder = new WasmModuleBuilder();\n\n  builder\n    .addFunction(\"fn\", kSig_v_v)\n    .addBody([])\n    .exportFunc();\n  builder\n    .addFunction(\"fn2\", kSig_v_v)\n    .addBody([])\n    .exportFunc();\n\n  builder.setTableBounds(1);\n  builder.addExportOfKind(\"table\", kExternalTable, 0);\n\n  builder.addGlobal(kWasmI32, true)\n    .exportAs(\"global\")\n    .init = 7;\n  builder.addGlobal(kWasmF64, true)\n    .exportAs(\"global2\")\n    .init = 1.2;\n\n  builder.addMemory(0, 256, true);\n\n  const buffer = builder.toBuffer()\n  const module = new WebAssembly.Module(buffer);\n  const exports = WebAssembly.Module.exports(module);\n  const expected = [\n    { \"kind\": \"function\", \"name\": \"fn\" },\n    { \"kind\": \"function\", \"name\": \"fn2\" },\n    { \"kind\": \"table\", \"name\": \"table\" },\n    { \"kind\": \"global\", \"name\": \"global\" },\n    { \"kind\": \"global\", \"name\": \"global2\" },\n    { \"kind\": \"memory\", \"name\": \"memory\" },\n  ];\n  assert_exports(exports, expected);\n}, \"exports\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  const exports = WebAssembly.Module.exports(module, {});\n  assert_exports(exports, []);\n}, \"Stray argument\");\n"
  },
  {
    "path": "test/js-api/module/imports.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n\nfunction assert_ModuleImportDescriptor(import_, expected) {\n  assert_equals(Object.getPrototypeOf(import_), Object.prototype, \"Prototype\");\n  assert_true(Object.isExtensible(import_), \"isExtensible\");\n\n  const module = Object.getOwnPropertyDescriptor(import_, \"module\");\n  assert_true(module.writable, \"module: writable\");\n  assert_true(module.enumerable, \"module: enumerable\");\n  assert_true(module.configurable, \"module: configurable\");\n  assert_equals(module.value, expected.module);\n\n  const name = Object.getOwnPropertyDescriptor(import_, \"name\");\n  assert_true(name.writable, \"name: writable\");\n  assert_true(name.enumerable, \"name: enumerable\");\n  assert_true(name.configurable, \"name: configurable\");\n  assert_equals(name.value, expected.name);\n\n  const kind = Object.getOwnPropertyDescriptor(import_, \"kind\");\n  assert_true(kind.writable, \"kind: writable\");\n  assert_true(kind.enumerable, \"kind: enumerable\");\n  assert_true(kind.configurable, \"kind: configurable\");\n  assert_equals(kind.value, expected.kind);\n}\n\nfunction assert_imports(imports, expected) {\n  assert_true(Array.isArray(imports), \"Should be array\");\n  assert_equals(Object.getPrototypeOf(imports), Array.prototype, \"Prototype\");\n  assert_true(Object.isExtensible(imports), \"isExtensible\");\n\n  assert_equals(imports.length, expected.length);\n  for (let i = 0; i < expected.length; ++i) {\n    assert_ModuleImportDescriptor(imports[i], expected[i]);\n  }\n}\n\nlet emptyModuleBinary;\nsetup(() => {\n  emptyModuleBinary = new WasmModuleBuilder().toBuffer();\n});\n\ntest(() => {\n  assert_throws_js(TypeError, () => WebAssembly.Module.imports());\n}, \"Missing arguments\");\n\ntest(() => {\n  const invalidArguments = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Module,\n    WebAssembly.Module.prototype,\n  ];\n  for (const argument of invalidArguments) {\n    assert_throws_js(TypeError, () => WebAssembly.Module.imports(argument),\n                     `imports(${format_value(argument)})`);\n  }\n}, \"Non-Module arguments\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  const fn = WebAssembly.Module.imports;\n  const thisValues = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Module,\n    WebAssembly.Module.prototype,\n  ];\n  for (const thisValue of thisValues) {\n    assert_array_equals(fn.call(thisValue, module), []);\n  }\n}, \"Branding\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  const imports = WebAssembly.Module.imports(module);\n  assert_true(Array.isArray(imports));\n}, \"Return type\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  const imports = WebAssembly.Module.imports(module);\n  assert_imports(imports, []);\n}, \"Empty module\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  assert_not_equals(WebAssembly.Module.imports(module), WebAssembly.Module.imports(module));\n}, \"Empty module: array caching\");\n\ntest(() => {\n  const builder = new WasmModuleBuilder();\n\n  builder.addImport(\"module\", \"fn\", kSig_v_v);\n  builder.addImportedGlobal(\"module\", \"global\", kWasmI32);\n  builder.addImportedMemory(\"module\", \"memory\", 0, 128);\n  builder.addImportedTable(\"module\", \"table\", 0, 128);\n\n  const buffer = builder.toBuffer()\n  const module = new WebAssembly.Module(buffer);\n  const imports = WebAssembly.Module.imports(module);\n  const expected = [\n    { \"module\": \"module\", \"kind\": \"function\", \"name\": \"fn\" },\n    { \"module\": \"module\", \"kind\": \"global\", \"name\": \"global\" },\n    { \"module\": \"module\", \"kind\": \"memory\", \"name\": \"memory\" },\n    { \"module\": \"module\", \"kind\": \"table\", \"name\": \"table\" },\n  ];\n  assert_imports(imports, expected);\n}, \"imports\");\n\ntest(() => {\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  const imports = WebAssembly.Module.imports(module, {});\n  assert_imports(imports, []);\n}, \"Stray argument\");\n"
  },
  {
    "path": "test/js-api/module/toString.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n\ntest(() => {\n  const emptyModuleBinary = new WasmModuleBuilder().toBuffer();\n  const module = new WebAssembly.Module(emptyModuleBinary);\n  assert_class_string(module, \"WebAssembly.Module\");\n}, \"Object.prototype.toString on an Module\");\n\ntest(() => {\n  assert_own_property(WebAssembly.Module.prototype, Symbol.toStringTag);\n\n  const propDesc = Object.getOwnPropertyDescriptor(WebAssembly.Module.prototype, Symbol.toStringTag);\n  assert_equals(propDesc.value, \"WebAssembly.Module\", \"value\");\n  assert_equals(propDesc.configurable, true, \"configurable\");\n  assert_equals(propDesc.enumerable, false, \"enumerable\");\n  assert_equals(propDesc.writable, false, \"writable\");\n}, \"@@toStringTag exists on the prototype with the appropriate descriptor\");\n"
  },
  {
    "path": "test/js-api/prototypes.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/assertions.js\n// META: script=/wasm/jsapi/wasm-module-builder.js\n\nlet emptyModuleBinary;\nsetup(() => {\n  emptyModuleBinary = new WasmModuleBuilder().toBuffer();\n});\n\ntest(() => {\n  class _Module extends WebAssembly.Module {}\n  let module = new _Module(emptyModuleBinary);\n  assert_true(module instanceof _Module, \"_Module instanceof _Module\");\n  assert_true(module instanceof WebAssembly.Module, \"_Module instanceof WebAssembly.Module\");\n}, \"_Module\");\n\ntest(() => {\n  class _Instance extends WebAssembly.Instance {}\n  let instance = new _Instance(new WebAssembly.Module(emptyModuleBinary));\n  assert_true(instance instanceof _Instance, \"_Instance instanceof _Instance\");\n  assert_true(instance instanceof WebAssembly.Instance, \"_Instance instanceof WebAssembly.Instance\");\n}, \"_Instance\");\n\ntest(() => {\n  class _Memory extends WebAssembly.Memory {}\n  let memory = new _Memory({initial: 0, maximum: 1});\n  assert_true(memory instanceof _Memory, \"_Memory instanceof _Memory\");\n  assert_true(memory instanceof WebAssembly.Memory, \"_Memory instanceof WebAssembly.Memory\");\n}, \"_Memory\");\n\ntest(() => {\n  class _Table extends WebAssembly.Table {}\n  let table = new _Table({initial: 0, element: \"anyfunc\"});\n  assert_true(table instanceof _Table, \"_Table instanceof _Table\");\n  assert_true(table instanceof WebAssembly.Table, \"_Table instanceof WebAssembly.Table\");\n}, \"_Table\");\n\ntest(() => {\n  class _Global extends WebAssembly.Global {}\n  let global = new _Global({value: \"i32\", mutable: false}, 0);\n  assert_true(global instanceof _Global, \"_Global instanceof _Global\");\n  assert_true(global instanceof WebAssembly.Global, \"_Global instanceof WebAssembly.Global\");\n}, \"_Global\");\n"
  },
  {
    "path": "test/js-api/table/assertions.js",
    "content": "function assert_equal_to_array(table, expected, message) {\n  assert_equals(table.length, expected.length, `${message}: length`);\n  // The argument check in get() happens before the range check, and negative numbers\n  // are illegal, hence will throw TypeError per spec.\n  assert_throws_js(TypeError, () => table.get(-1), `${message}: table.get(-1)`);\n  for (let i = 0; i < expected.length; ++i) {\n    assert_equals(table.get(i), expected[i], `${message}: table.get(${i} of ${expected.length})`);\n  }\n  assert_throws_js(RangeError, () => table.get(expected.length),\n                   `${message}: table.get(${expected.length} of ${expected.length})`);\n  assert_throws_js(RangeError, () => table.get(expected.length + 1),\n                   `${message}: table.get(${expected.length + 1} of ${expected.length})`);\n}\n"
  },
  {
    "path": "test/js-api/table/constructor.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/assertions.js\n\nfunction assert_Table(actual, expected) {\n  assert_equals(Object.getPrototypeOf(actual), WebAssembly.Table.prototype,\n                \"prototype\");\n  assert_true(Object.isExtensible(actual), \"extensible\");\n\n  assert_equals(actual.length, expected.length, \"length\");\n  for (let i = 0; i < expected.length; ++i) {\n    assert_equals(actual.get(i), null, `actual.get(${i})`);\n  }\n}\n\ntest(() => {\n  assert_function_name(WebAssembly.Table, \"Table\", \"WebAssembly.Table\");\n}, \"name\");\n\ntest(() => {\n  assert_function_length(WebAssembly.Table, 1, \"WebAssembly.Table\");\n}, \"length\");\n\ntest(() => {\n  assert_throws_js(TypeError, () => new WebAssembly.Table());\n}, \"No arguments\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 0 };\n  assert_throws_js(TypeError, () => WebAssembly.Table(argument));\n}, \"Calling\");\n\ntest(() => {\n  assert_throws_js(TypeError, () => new WebAssembly.Table({}));\n}, \"Empty descriptor\");\n\ntest(() => {\n  const invalidArguments = [\n    undefined,\n    null,\n    false,\n    true,\n    \"\",\n    \"test\",\n    Symbol(),\n    1,\n    NaN,\n    {},\n  ];\n  for (const invalidArgument of invalidArguments) {\n    assert_throws_js(TypeError,\n                     () => new WebAssembly.Table(invalidArgument),\n                     `new Table(${format_value(invalidArgument)})`);\n  }\n}, \"Invalid descriptor argument\");\n\ntest(() => {\n  assert_throws_js(TypeError, () => new WebAssembly.Table({ \"element\": \"anyfunc\", \"initial\": undefined }));\n}, \"Undefined initial value in descriptor\");\n\ntest(() => {\n  assert_throws_js(TypeError, () => new WebAssembly.Table({ \"element\": undefined, \"initial\": 0 }));\n}, \"Undefined element value in descriptor\");\n\nconst outOfRangeValues = [\n  NaN,\n  Infinity,\n  -Infinity,\n  -1,\n  0x100000000,\n  0x1000000000,\n];\n\nfor (const value of outOfRangeValues) {\n  test(() => {\n    assert_throws_js(TypeError, () => new WebAssembly.Table({ \"element\": \"anyfunc\", \"initial\": value }));\n  }, `Out-of-range initial value in descriptor: ${format_value(value)}`);\n\n  test(() => {\n    assert_throws_js(TypeError, () => new WebAssembly.Table({ \"element\": \"anyfunc\", \"initial\": 0, \"maximum\": value }));\n  }, `Out-of-range maximum value in descriptor: ${format_value(value)}`);\n}\n\ntest(() => {\n  assert_throws_js(RangeError, () => new WebAssembly.Table({ \"element\": \"anyfunc\", \"initial\": 10, \"maximum\": 9 }));\n}, \"Initial value exceeds maximum\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 0 };\n  const table = new WebAssembly.Table(argument);\n  assert_Table(table, { \"length\": 0 });\n}, \"Basic (zero)\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 5 };\n  const table = new WebAssembly.Table(argument);\n  assert_Table(table, { \"length\": 5 });\n}, \"Basic (non-zero)\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 0 };\n  const table = new WebAssembly.Table(argument, {});\n  assert_Table(table, { \"length\": 0 });\n}, \"Stray argument\");\n\ntest(() => {\n  const proxy = new Proxy({}, {\n    has(o, x) {\n      assert_unreached(`Should not call [[HasProperty]] with ${x}`);\n    },\n    get(o, x) {\n      switch (x) {\n      case \"element\":\n        return \"anyfunc\";\n      case \"initial\":\n      case \"maximum\":\n        return 0;\n      default:\n        return undefined;\n      }\n    },\n  });\n  const table = new WebAssembly.Table(proxy);\n  assert_Table(table, { \"length\": 0 });\n}, \"Proxy descriptor\");\n\ntest(() => {\n  const table = new WebAssembly.Table({\n    \"element\": {\n      toString() { return \"anyfunc\"; },\n    },\n    \"initial\": 1,\n  });\n  assert_Table(table, { \"length\": 1 });\n}, \"Type conversion for descriptor.element\");\n\ntest(() => {\n  const order = [];\n\n  new WebAssembly.Table({\n    get maximum() {\n      order.push(\"maximum\");\n      return {\n        valueOf() {\n          order.push(\"maximum valueOf\");\n          return 1;\n        },\n      };\n    },\n\n    get initial() {\n      order.push(\"initial\");\n      return {\n        valueOf() {\n          order.push(\"initial valueOf\");\n          return 1;\n        },\n      };\n    },\n\n    get element() {\n      order.push(\"element\");\n      return {\n        toString() {\n          order.push(\"element toString\");\n          return \"anyfunc\";\n        },\n      };\n    },\n  });\n\n  assert_array_equals(order, [\n    \"element\",\n    \"element toString\",\n    \"initial\",\n    \"initial valueOf\",\n    \"maximum\",\n    \"maximum valueOf\",\n  ]);\n}, \"Order of evaluation for descriptor\");\n"
  },
  {
    "path": "test/js-api/table/get-set.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=/wasm/jsapi/wasm-module-builder.js\n// META: script=assertions.js\n\nlet functions = {};\nsetup(() => {\n  const builder = new WasmModuleBuilder();\n\n  builder\n    .addFunction(\"fn\", kSig_v_d)\n    .addBody([])\n    .exportFunc();\n  builder\n    .addFunction(\"fn2\", kSig_v_v)\n    .addBody([])\n    .exportFunc();\n\n  const buffer = builder.toBuffer()\n  const module = new WebAssembly.Module(buffer);\n  const instance = new WebAssembly.Instance(module, {});\n  functions = instance.exports;\n});\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 5 };\n  const table = new WebAssembly.Table(argument);\n  assert_throws_js(TypeError, () => table.get());\n}, \"Missing arguments: get\");\n\ntest(t => {\n  const thisValues = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Table,\n    WebAssembly.Table.prototype,\n  ];\n\n  const argument = {\n    valueOf: t.unreached_func(\"Should not touch the argument (valueOf)\"),\n    toString: t.unreached_func(\"Should not touch the argument (toString)\"),\n  };\n\n  const fn = WebAssembly.Table.prototype.get;\n\n  for (const thisValue of thisValues) {\n    assert_throws_js(TypeError, () => fn.call(thisValue, argument), `this=${format_value(thisValue)}`);\n  }\n}, \"Branding: get\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 5 };\n  const table = new WebAssembly.Table(argument);\n  assert_throws_js(TypeError, () => table.set());\n  assert_throws_js(TypeError, () => table.set(0));\n}, \"Missing arguments: set\");\n\ntest(t => {\n  const thisValues = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Table,\n    WebAssembly.Table.prototype,\n  ];\n\n  const argument = {\n    valueOf: t.unreached_func(\"Should not touch the argument (valueOf)\"),\n    toString: t.unreached_func(\"Should not touch the argument (toString)\"),\n  };\n\n  const fn = WebAssembly.Table.prototype.set;\n\n  for (const thisValue of thisValues) {\n    assert_throws_js(TypeError, () => fn.call(thisValue, argument, null), `this=${format_value(thisValue)}`);\n  }\n}, \"Branding: set\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 5 };\n  const table = new WebAssembly.Table(argument);\n  assert_equal_to_array(table, [null, null, null, null, null]);\n\n  const {fn, fn2} = functions;\n\n  assert_equals(table.set(0, fn), undefined, \"set() returns undefined.\");\n  table.set(2, fn2);\n  table.set(4, fn);\n\n  assert_equal_to_array(table, [fn, null, fn2, null, fn]);\n\n  table.set(0, null);\n  assert_equal_to_array(table, [null, null, fn2, null, fn]);\n}, \"Basic\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 5 };\n  const table = new WebAssembly.Table(argument);\n  assert_equal_to_array(table, [null, null, null, null, null]);\n\n  const {fn, fn2} = functions;\n\n  table.set(0, fn);\n  table.set(2, fn2);\n  table.set(4, fn);\n\n  assert_equal_to_array(table, [fn, null, fn2, null, fn]);\n\n  table.grow(4);\n\n  assert_equal_to_array(table, [fn, null, fn2, null, fn, null, null, null, null]);\n}, \"Growing\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 5 };\n  const table = new WebAssembly.Table(argument);\n  assert_equal_to_array(table, [null, null, null, null, null]);\n\n  const {fn} = functions;\n\n  // -1 is the wrong type hence the type check on entry gets this\n  // before the range check does.\n  assert_throws_js(TypeError, () => table.set(-1, fn));\n  assert_throws_js(RangeError, () => table.set(5, fn));\n  assert_equal_to_array(table, [null, null, null, null, null]);\n}, \"Setting out-of-bounds\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 1 };\n  const table = new WebAssembly.Table(argument);\n  assert_equal_to_array(table, [null]);\n\n  const invalidArguments = [\n    undefined,\n    true,\n    false,\n    \"test\",\n    Symbol(),\n    7,\n    NaN,\n    {},\n  ];\n  for (const argument of invalidArguments) {\n    assert_throws_js(TypeError, () => table.set(0, argument),\n                     `set(${format_value(argument)})`);\n  }\n  assert_equal_to_array(table, [null]);\n}, \"Setting non-function\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 1 };\n  const table = new WebAssembly.Table(argument);\n  assert_equal_to_array(table, [null]);\n\n  const fn = function() {};\n  assert_throws_js(TypeError, () => table.set(0, fn));\n  assert_equal_to_array(table, [null]);\n}, \"Setting non-wasm function\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 1 };\n  const table = new WebAssembly.Table(argument);\n  assert_equal_to_array(table, [null]);\n\n  const fn = () => {};\n  assert_throws_js(TypeError, () => table.set(0, fn));\n  assert_equal_to_array(table, [null]);\n}, \"Setting non-wasm arrow function\");\n\nconst outOfRangeValues = [\n  undefined,\n  NaN,\n  Infinity,\n  -Infinity,\n  -1,\n  0x100000000,\n  0x1000000000,\n  \"0x100000000\",\n  { valueOf() { return 0x100000000; } },\n];\n\nfor (const value of outOfRangeValues) {\n  test(() => {\n    const argument = { \"element\": \"anyfunc\", \"initial\": 1 };\n    const table = new WebAssembly.Table(argument);\n    assert_throws_js(TypeError, () => table.get(value));\n  }, `Getting out-of-range argument: ${format_value(value)}`);\n\n  test(() => {\n    const argument = { \"element\": \"anyfunc\", \"initial\": 1 };\n    const table = new WebAssembly.Table(argument);\n    assert_throws_js(TypeError, () => table.set(value, null));\n  }, `Setting out-of-range argument: ${format_value(value)}`);\n}\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 1 };\n  const table = new WebAssembly.Table(argument);\n  let called = 0;\n  const value = {\n    valueOf() {\n      called++;\n      return 0;\n    },\n  };\n  assert_throws_js(TypeError, () => table.set(value, {}));\n  assert_equals(called, 1);\n}, \"Order of argument conversion\");\n\ntest(() => {\n  const {fn} = functions;\n  const argument = { \"element\": \"anyfunc\", \"initial\": 1 };\n  const table = new WebAssembly.Table(argument);\n\n  assert_equals(table.get(0, {}), null);\n  assert_equals(table.set(0, fn, {}), undefined);\n}, \"Stray argument\");\n"
  },
  {
    "path": "test/js-api/table/grow.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n// META: script=assertions.js\n\nfunction nulls(n) {\n  return Array(n).fill(null);\n}\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 5 };\n  const table = new WebAssembly.Table(argument);\n  assert_throws_js(TypeError, () => table.grow());\n}, \"Missing arguments\");\n\ntest(t => {\n  const thisValues = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Table,\n    WebAssembly.Table.prototype,\n  ];\n\n  const argument = {\n    valueOf: t.unreached_func(\"Should not touch the argument (valueOf)\"),\n    toString: t.unreached_func(\"Should not touch the argument (toString)\"),\n  };\n\n  const fn = WebAssembly.Table.prototype.grow;\n\n  for (const thisValue of thisValues) {\n    assert_throws_js(TypeError, () => fn.call(thisValue, argument), `this=${format_value(thisValue)}`);\n  }\n}, \"Branding\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 5 };\n  const table = new WebAssembly.Table(argument);\n  assert_equal_to_array(table, nulls(5), \"before\");\n\n  const result = table.grow(3);\n  assert_equals(result, 5);\n  assert_equal_to_array(table, nulls(8), \"after\");\n}, \"Basic\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 3, \"maximum\": 5 };\n  const table = new WebAssembly.Table(argument);\n  assert_equal_to_array(table, nulls(3), \"before\");\n\n  const result = table.grow(2);\n  assert_equals(result, 3);\n  assert_equal_to_array(table, nulls(5), \"after\");\n}, \"Reached maximum\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 2, \"maximum\": 5 };\n  const table = new WebAssembly.Table(argument);\n  assert_equal_to_array(table, nulls(2), \"before\");\n\n  assert_throws_js(RangeError, () => table.grow(4));\n  assert_equal_to_array(table, nulls(2), \"after\");\n}, \"Exceeded maximum\");\n\nconst outOfRangeValues = [\n  undefined,\n  NaN,\n  Infinity,\n  -Infinity,\n  -1,\n  0x100000000,\n  0x1000000000,\n  \"0x100000000\",\n  { valueOf() { return 0x100000000; } },\n];\n\nfor (const value of outOfRangeValues) {\n  test(() => {\n    const argument = { \"element\": \"anyfunc\", \"initial\": 1 };\n    const table = new WebAssembly.Table(argument);\n    assert_throws_js(TypeError, () => table.grow(value));\n  }, `Out-of-range argument: ${format_value(value)}`);\n}\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 5 };\n  const table = new WebAssembly.Table(argument);\n  assert_equal_to_array(table, nulls(5), \"before\");\n\n  const result = table.grow(3, null, {});\n  assert_equals(result, 5);\n  assert_equal_to_array(table, nulls(8), \"after\");\n}, \"Stray argument\");\n"
  },
  {
    "path": "test/js-api/table/length.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n\ntest(() => {\n  const thisValues = [\n    undefined,\n    null,\n    true,\n    \"\",\n    Symbol(),\n    1,\n    {},\n    WebAssembly.Table,\n    WebAssembly.Table.prototype,\n  ];\n\n  const desc = Object.getOwnPropertyDescriptor(WebAssembly.Table.prototype, \"length\");\n  assert_equals(typeof desc, \"object\");\n\n  const getter = desc.get;\n  assert_equals(typeof getter, \"function\");\n\n  assert_equals(typeof desc.set, \"undefined\");\n\n  for (const thisValue of thisValues) {\n    assert_throws_js(TypeError, () => getter.call(thisValue), `this=${format_value(thisValue)}`);\n  }\n}, \"Branding\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 2 };\n  const table = new WebAssembly.Table(argument);\n  assert_equals(table.length, 2, \"Initial length\");\n\n  const desc = Object.getOwnPropertyDescriptor(WebAssembly.Table.prototype, \"length\");\n  assert_equals(typeof desc, \"object\");\n\n  const getter = desc.get;\n  assert_equals(typeof getter, \"function\");\n\n  assert_equals(getter.call(table, {}), 2);\n}, \"Stray argument\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 2 };\n  const table = new WebAssembly.Table(argument);\n  assert_equals(table.length, 2, \"Initial length\");\n  table.length = 4;\n  assert_equals(table.length, 2, \"Should not change the length\");\n}, \"Setting (sloppy mode)\");\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 2 };\n  const table = new WebAssembly.Table(argument);\n  assert_equals(table.length, 2, \"Initial length\");\n  assert_throws_js(TypeError, () => {\n    \"use strict\";\n    table.length = 4;\n  });\n  assert_equals(table.length, 2, \"Should not change the length\");\n}, \"Setting (strict mode)\");\n"
  },
  {
    "path": "test/js-api/table/toString.any.js",
    "content": "// META: global=window,dedicatedworker,jsshell\n\ntest(() => {\n  const argument = { \"element\": \"anyfunc\", \"initial\": 0 };\n  const table = new WebAssembly.Table(argument);\n  assert_class_string(table, \"WebAssembly.Table\");\n}, \"Object.prototype.toString on an Table\");\n\ntest(() => {\n  assert_own_property(WebAssembly.Table.prototype, Symbol.toStringTag);\n\n  const propDesc = Object.getOwnPropertyDescriptor(WebAssembly.Table.prototype, Symbol.toStringTag);\n  assert_equals(propDesc.value, \"WebAssembly.Table\", \"value\");\n  assert_equals(propDesc.configurable, true, \"configurable\");\n  assert_equals(propDesc.enumerable, false, \"enumerable\");\n  assert_equals(propDesc.writable, false, \"writable\");\n}, \"@@toStringTag exists on the prototype with the appropriate descriptor\");\n"
  },
  {
    "path": "test/js-api/wasm-module-builder.js",
    "content": "// Copyright 2016 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// Used for encoding f32 and double constants to bits.\nlet byte_view = new Uint8Array(8);\nlet data_view = new DataView(byte_view.buffer);\n\n// The bytes function receives one of\n//  - several arguments, each of which is either a number or a string of length\n//    1; if it's a string, the charcode of the contained character is used.\n//  - a single array argument containing the actual arguments\n//  - a single string; the returned buffer will contain the char codes of all\n//    contained characters.\nfunction bytes(...input) {\n  if (input.length == 1 && typeof input[0] == 'array') input = input[0];\n  if (input.length == 1 && typeof input[0] == 'string') {\n    let len = input[0].length;\n    let view = new Uint8Array(len);\n    for (let i = 0; i < len; i++) view[i] = input[0].charCodeAt(i);\n    return view.buffer;\n  }\n  let view = new Uint8Array(input.length);\n  for (let i = 0; i < input.length; i++) {\n    let val = input[i];\n    if (typeof val == 'string') {\n      assertEquals(1, val.length, 'string inputs must have length 1');\n      val = val.charCodeAt(0);\n    }\n    view[i] = val | 0;\n  }\n  return view.buffer;\n}\n\n// Header declaration constants\nvar kWasmH0 = 0;\nvar kWasmH1 = 0x61;\nvar kWasmH2 = 0x73;\nvar kWasmH3 = 0x6d;\n\nvar kWasmV0 = 0x1;\nvar kWasmV1 = 0;\nvar kWasmV2 = 0;\nvar kWasmV3 = 0;\n\nvar kHeaderSize = 8;\nvar kPageSize = 65536;\nvar kSpecMaxPages = 65535;\nvar kMaxVarInt32Size = 5;\nvar kMaxVarInt64Size = 10;\n\nlet kDeclNoLocals = 0;\n\n// Section declaration constants\nlet kUnknownSectionCode = 0;\nlet kTypeSectionCode = 1;        // Function signature declarations\nlet kImportSectionCode = 2;      // Import declarations\nlet kFunctionSectionCode = 3;    // Function declarations\nlet kTableSectionCode = 4;       // Indirect function table and other tables\nlet kMemorySectionCode = 5;      // Memory attributes\nlet kGlobalSectionCode = 6;      // Global declarations\nlet kExportSectionCode = 7;      // Exports\nlet kStartSectionCode = 8;       // Start function declaration\nlet kElementSectionCode = 9;     // Elements section\nlet kCodeSectionCode = 10;       // Function code\nlet kDataSectionCode = 11;       // Data segments\nlet kDataCountSectionCode = 12;  // Data segment count (between Element & Code)\nlet kExceptionSectionCode = 13;  // Exception section (between Global & Export)\n\n// Name section types\nlet kModuleNameCode = 0;\nlet kFunctionNamesCode = 1;\nlet kLocalNamesCode = 2;\n\nlet kWasmFunctionTypeForm = 0x60;\nlet kWasmAnyFunctionTypeForm = 0x70;\n\nlet kHasMaximumFlag = 1;\nlet kSharedHasMaximumFlag = 3;\n\n// Segment flags\nlet kActiveNoIndex = 0;\nlet kPassive = 1;\nlet kActiveWithIndex = 2;\nlet kPassiveWithElements = 5;\n\n// Function declaration flags\nlet kDeclFunctionName   = 0x01;\nlet kDeclFunctionImport = 0x02;\nlet kDeclFunctionLocals = 0x04;\nlet kDeclFunctionExport = 0x08;\n\n// Local types\nlet kWasmStmt = 0x40;\nlet kWasmI32 = 0x7f;\nlet kWasmI64 = 0x7e;\nlet kWasmF32 = 0x7d;\nlet kWasmF64 = 0x7c;\nlet kWasmS128 = 0x7b;\nlet kWasmAnyRef = 0x6f;\nlet kWasmAnyFunc = 0x70;\nlet kWasmExnRef = 0x68;\n\nlet kExternalFunction = 0;\nlet kExternalTable = 1;\nlet kExternalMemory = 2;\nlet kExternalGlobal = 3;\nlet kExternalException = 4;\n\nlet kTableZero = 0;\nlet kMemoryZero = 0;\nlet kSegmentZero = 0;\n\nlet kExceptionAttribute = 0;\n\n// Useful signatures\nlet kSig_i_i = makeSig([kWasmI32], [kWasmI32]);\nlet kSig_l_l = makeSig([kWasmI64], [kWasmI64]);\nlet kSig_i_l = makeSig([kWasmI64], [kWasmI32]);\nlet kSig_i_ii = makeSig([kWasmI32, kWasmI32], [kWasmI32]);\nlet kSig_i_iii = makeSig([kWasmI32, kWasmI32, kWasmI32], [kWasmI32]);\nlet kSig_v_iiii = makeSig([kWasmI32, kWasmI32, kWasmI32, kWasmI32], []);\nlet kSig_f_ff = makeSig([kWasmF32, kWasmF32], [kWasmF32]);\nlet kSig_d_dd = makeSig([kWasmF64, kWasmF64], [kWasmF64]);\nlet kSig_l_ll = makeSig([kWasmI64, kWasmI64], [kWasmI64]);\nlet kSig_i_dd = makeSig([kWasmF64, kWasmF64], [kWasmI32]);\nlet kSig_v_v = makeSig([], []);\nlet kSig_i_v = makeSig([], [kWasmI32]);\nlet kSig_l_v = makeSig([], [kWasmI64]);\nlet kSig_f_v = makeSig([], [kWasmF32]);\nlet kSig_d_v = makeSig([], [kWasmF64]);\nlet kSig_v_i = makeSig([kWasmI32], []);\nlet kSig_v_ii = makeSig([kWasmI32, kWasmI32], []);\nlet kSig_v_iii = makeSig([kWasmI32, kWasmI32, kWasmI32], []);\nlet kSig_v_l = makeSig([kWasmI64], []);\nlet kSig_v_d = makeSig([kWasmF64], []);\nlet kSig_v_dd = makeSig([kWasmF64, kWasmF64], []);\nlet kSig_v_ddi = makeSig([kWasmF64, kWasmF64, kWasmI32], []);\nlet kSig_ii_v = makeSig([], [kWasmI32, kWasmI32]);\nlet kSig_iii_v = makeSig([], [kWasmI32, kWasmI32, kWasmI32]);\nlet kSig_ii_i = makeSig([kWasmI32], [kWasmI32, kWasmI32]);\nlet kSig_iii_i = makeSig([kWasmI32], [kWasmI32, kWasmI32, kWasmI32]);\nlet kSig_ii_ii = makeSig([kWasmI32, kWasmI32], [kWasmI32, kWasmI32]);\nlet kSig_iii_ii = makeSig([kWasmI32, kWasmI32], [kWasmI32, kWasmI32, kWasmI32]);\n\nlet kSig_v_f = makeSig([kWasmF32], []);\nlet kSig_f_f = makeSig([kWasmF32], [kWasmF32]);\nlet kSig_f_d = makeSig([kWasmF64], [kWasmF32]);\nlet kSig_d_d = makeSig([kWasmF64], [kWasmF64]);\nlet kSig_r_r = makeSig([kWasmAnyRef], [kWasmAnyRef]);\nlet kSig_a_a = makeSig([kWasmAnyFunc], [kWasmAnyFunc]);\nlet kSig_e_e = makeSig([kWasmExnRef], [kWasmExnRef]);\nlet kSig_i_r = makeSig([kWasmAnyRef], [kWasmI32]);\nlet kSig_v_r = makeSig([kWasmAnyRef], []);\nlet kSig_v_a = makeSig([kWasmAnyFunc], []);\nlet kSig_v_e = makeSig([kWasmExnRef], []);\nlet kSig_v_rr = makeSig([kWasmAnyRef, kWasmAnyRef], []);\nlet kSig_v_aa = makeSig([kWasmAnyFunc, kWasmAnyFunc], []);\nlet kSig_r_v = makeSig([], [kWasmAnyRef]);\nlet kSig_a_v = makeSig([], [kWasmAnyFunc]);\nlet kSig_a_i = makeSig([kWasmI32], [kWasmAnyFunc]);\nlet kSig_e_v = makeSig([], [kWasmExnRef]);\n\nfunction makeSig(params, results) {\n  return {params: params, results: results};\n}\n\nfunction makeSig_v_x(x) {\n  return makeSig([x], []);\n}\n\nfunction makeSig_v_xx(x) {\n  return makeSig([x, x], []);\n}\n\nfunction makeSig_r_v(r) {\n  return makeSig([], [r]);\n}\n\nfunction makeSig_r_x(r, x) {\n  return makeSig([x], [r]);\n}\n\nfunction makeSig_r_xx(r, x) {\n  return makeSig([x, x], [r]);\n}\n\n// Opcodes\nlet kExprUnreachable = 0x00;\nlet kExprNop = 0x01;\nlet kExprBlock = 0x02;\nlet kExprLoop = 0x03;\nlet kExprIf = 0x04;\nlet kExprElse = 0x05;\nlet kExprTry = 0x06;\nlet kExprCatch = 0x07;\nlet kExprThrow = 0x08;\nlet kExprRethrow = 0x09;\nlet kExprBrOnExn = 0x0a;\nlet kExprEnd = 0x0b;\nlet kExprBr = 0x0c;\nlet kExprBrIf = 0x0d;\nlet kExprBrTable = 0x0e;\nlet kExprReturn = 0x0f;\nlet kExprCallFunction = 0x10;\nlet kExprCallIndirect = 0x11;\nlet kExprReturnCall = 0x12;\nlet kExprReturnCallIndirect = 0x13;\nlet kExprDrop = 0x1a;\nlet kExprSelect = 0x1b;\nlet kExprLocalGet = 0x20;\nlet kExprLocalSet = 0x21;\nlet kExprLocalTee = 0x22;\nlet kExprGlobalGet = 0x23;\nlet kExprGlobalSet = 0x24;\nlet kExprTableGet = 0x25;\nlet kExprTableSet = 0x26;\nlet kExprI32LoadMem = 0x28;\nlet kExprI64LoadMem = 0x29;\nlet kExprF32LoadMem = 0x2a;\nlet kExprF64LoadMem = 0x2b;\nlet kExprI32LoadMem8S = 0x2c;\nlet kExprI32LoadMem8U = 0x2d;\nlet kExprI32LoadMem16S = 0x2e;\nlet kExprI32LoadMem16U = 0x2f;\nlet kExprI64LoadMem8S = 0x30;\nlet kExprI64LoadMem8U = 0x31;\nlet kExprI64LoadMem16S = 0x32;\nlet kExprI64LoadMem16U = 0x33;\nlet kExprI64LoadMem32S = 0x34;\nlet kExprI64LoadMem32U = 0x35;\nlet kExprI32StoreMem = 0x36;\nlet kExprI64StoreMem = 0x37;\nlet kExprF32StoreMem = 0x38;\nlet kExprF64StoreMem = 0x39;\nlet kExprI32StoreMem8 = 0x3a;\nlet kExprI32StoreMem16 = 0x3b;\nlet kExprI64StoreMem8 = 0x3c;\nlet kExprI64StoreMem16 = 0x3d;\nlet kExprI64StoreMem32 = 0x3e;\nlet kExprMemorySize = 0x3f;\nlet kExprMemoryGrow = 0x40;\nlet kExprI32Const = 0x41;\nlet kExprI64Const = 0x42;\nlet kExprF32Const = 0x43;\nlet kExprF64Const = 0x44;\nlet kExprI32Eqz = 0x45;\nlet kExprI32Eq = 0x46;\nlet kExprI32Ne = 0x47;\nlet kExprI32LtS = 0x48;\nlet kExprI32LtU = 0x49;\nlet kExprI32GtS = 0x4a;\nlet kExprI32GtU = 0x4b;\nlet kExprI32LeS = 0x4c;\nlet kExprI32LeU = 0x4d;\nlet kExprI32GeS = 0x4e;\nlet kExprI32GeU = 0x4f;\nlet kExprI64Eqz = 0x50;\nlet kExprI64Eq = 0x51;\nlet kExprI64Ne = 0x52;\nlet kExprI64LtS = 0x53;\nlet kExprI64LtU = 0x54;\nlet kExprI64GtS = 0x55;\nlet kExprI64GtU = 0x56;\nlet kExprI64LeS = 0x57;\nlet kExprI64LeU = 0x58;\nlet kExprI64GeS = 0x59;\nlet kExprI64GeU = 0x5a;\nlet kExprF32Eq = 0x5b;\nlet kExprF32Ne = 0x5c;\nlet kExprF32Lt = 0x5d;\nlet kExprF32Gt = 0x5e;\nlet kExprF32Le = 0x5f;\nlet kExprF32Ge = 0x60;\nlet kExprF64Eq = 0x61;\nlet kExprF64Ne = 0x62;\nlet kExprF64Lt = 0x63;\nlet kExprF64Gt = 0x64;\nlet kExprF64Le = 0x65;\nlet kExprF64Ge = 0x66;\nlet kExprI32Clz = 0x67;\nlet kExprI32Ctz = 0x68;\nlet kExprI32Popcnt = 0x69;\nlet kExprI32Add = 0x6a;\nlet kExprI32Sub = 0x6b;\nlet kExprI32Mul = 0x6c;\nlet kExprI32DivS = 0x6d;\nlet kExprI32DivU = 0x6e;\nlet kExprI32RemS = 0x6f;\nlet kExprI32RemU = 0x70;\nlet kExprI32And = 0x71;\nlet kExprI32Ior = 0x72;\nlet kExprI32Xor = 0x73;\nlet kExprI32Shl = 0x74;\nlet kExprI32ShrS = 0x75;\nlet kExprI32ShrU = 0x76;\nlet kExprI32Rol = 0x77;\nlet kExprI32Ror = 0x78;\nlet kExprI64Clz = 0x79;\nlet kExprI64Ctz = 0x7a;\nlet kExprI64Popcnt = 0x7b;\nlet kExprI64Add = 0x7c;\nlet kExprI64Sub = 0x7d;\nlet kExprI64Mul = 0x7e;\nlet kExprI64DivS = 0x7f;\nlet kExprI64DivU = 0x80;\nlet kExprI64RemS = 0x81;\nlet kExprI64RemU = 0x82;\nlet kExprI64And = 0x83;\nlet kExprI64Ior = 0x84;\nlet kExprI64Xor = 0x85;\nlet kExprI64Shl = 0x86;\nlet kExprI64ShrS = 0x87;\nlet kExprI64ShrU = 0x88;\nlet kExprI64Rol = 0x89;\nlet kExprI64Ror = 0x8a;\nlet kExprF32Abs = 0x8b;\nlet kExprF32Neg = 0x8c;\nlet kExprF32Ceil = 0x8d;\nlet kExprF32Floor = 0x8e;\nlet kExprF32Trunc = 0x8f;\nlet kExprF32NearestInt = 0x90;\nlet kExprF32Sqrt = 0x91;\nlet kExprF32Add = 0x92;\nlet kExprF32Sub = 0x93;\nlet kExprF32Mul = 0x94;\nlet kExprF32Div = 0x95;\nlet kExprF32Min = 0x96;\nlet kExprF32Max = 0x97;\nlet kExprF32CopySign = 0x98;\nlet kExprF64Abs = 0x99;\nlet kExprF64Neg = 0x9a;\nlet kExprF64Ceil = 0x9b;\nlet kExprF64Floor = 0x9c;\nlet kExprF64Trunc = 0x9d;\nlet kExprF64NearestInt = 0x9e;\nlet kExprF64Sqrt = 0x9f;\nlet kExprF64Add = 0xa0;\nlet kExprF64Sub = 0xa1;\nlet kExprF64Mul = 0xa2;\nlet kExprF64Div = 0xa3;\nlet kExprF64Min = 0xa4;\nlet kExprF64Max = 0xa5;\nlet kExprF64CopySign = 0xa6;\nlet kExprI32ConvertI64 = 0xa7;\nlet kExprI32SConvertF32 = 0xa8;\nlet kExprI32UConvertF32 = 0xa9;\nlet kExprI32SConvertF64 = 0xaa;\nlet kExprI32UConvertF64 = 0xab;\nlet kExprI64SConvertI32 = 0xac;\nlet kExprI64UConvertI32 = 0xad;\nlet kExprI64SConvertF32 = 0xae;\nlet kExprI64UConvertF32 = 0xaf;\nlet kExprI64SConvertF64 = 0xb0;\nlet kExprI64UConvertF64 = 0xb1;\nlet kExprF32SConvertI32 = 0xb2;\nlet kExprF32UConvertI32 = 0xb3;\nlet kExprF32SConvertI64 = 0xb4;\nlet kExprF32UConvertI64 = 0xb5;\nlet kExprF32ConvertF64 = 0xb6;\nlet kExprF64SConvertI32 = 0xb7;\nlet kExprF64UConvertI32 = 0xb8;\nlet kExprF64SConvertI64 = 0xb9;\nlet kExprF64UConvertI64 = 0xba;\nlet kExprF64ConvertF32 = 0xbb;\nlet kExprI32ReinterpretF32 = 0xbc;\nlet kExprI64ReinterpretF64 = 0xbd;\nlet kExprF32ReinterpretI32 = 0xbe;\nlet kExprF64ReinterpretI64 = 0xbf;\nlet kExprI32SExtendI8 = 0xc0;\nlet kExprI32SExtendI16 = 0xc1;\nlet kExprI64SExtendI8 = 0xc2;\nlet kExprI64SExtendI16 = 0xc3;\nlet kExprI64SExtendI32 = 0xc4;\nlet kExprRefNull = 0xd0;\nlet kExprRefIsNull = 0xd1;\nlet kExprRefFunc = 0xd2;\n\n// Prefix opcodes\nlet kNumericPrefix = 0xfc;\nlet kSimdPrefix = 0xfd;\nlet kAtomicPrefix = 0xfe;\n\n// Numeric opcodes.\nlet kExprMemoryInit = 0x08;\nlet kExprDataDrop = 0x09;\nlet kExprMemoryCopy = 0x0a;\nlet kExprMemoryFill = 0x0b;\nlet kExprTableInit = 0x0c;\nlet kExprElemDrop = 0x0d;\nlet kExprTableCopy = 0x0e;\nlet kExprTableGrow = 0x0f;\nlet kExprTableSize = 0x10;\nlet kExprTableFill = 0x11;\n\n// Atomic opcodes.\nlet kExprAtomicNotify = 0x00;\nlet kExprI32AtomicWait = 0x01;\nlet kExprI64AtomicWait = 0x02;\nlet kExprI32AtomicLoad = 0x10;\nlet kExprI32AtomicLoad8U = 0x12;\nlet kExprI32AtomicLoad16U = 0x13;\nlet kExprI32AtomicStore = 0x17;\nlet kExprI32AtomicStore8U = 0x19;\nlet kExprI32AtomicStore16U = 0x1a;\nlet kExprI32AtomicAdd = 0x1e;\nlet kExprI32AtomicAdd8U = 0x20;\nlet kExprI32AtomicAdd16U = 0x21;\nlet kExprI32AtomicSub = 0x25;\nlet kExprI32AtomicSub8U = 0x27;\nlet kExprI32AtomicSub16U = 0x28;\nlet kExprI32AtomicAnd = 0x2c;\nlet kExprI32AtomicAnd8U = 0x2e;\nlet kExprI32AtomicAnd16U = 0x2f;\nlet kExprI32AtomicOr = 0x33;\nlet kExprI32AtomicOr8U = 0x35;\nlet kExprI32AtomicOr16U = 0x36;\nlet kExprI32AtomicXor = 0x3a;\nlet kExprI32AtomicXor8U = 0x3c;\nlet kExprI32AtomicXor16U = 0x3d;\nlet kExprI32AtomicExchange = 0x41;\nlet kExprI32AtomicExchange8U = 0x43;\nlet kExprI32AtomicExchange16U = 0x44;\nlet kExprI32AtomicCompareExchange = 0x48;\nlet kExprI32AtomicCompareExchange8U = 0x4a;\nlet kExprI32AtomicCompareExchange16U = 0x4b;\n\nlet kExprI64AtomicLoad = 0x11;\nlet kExprI64AtomicLoad8U = 0x14;\nlet kExprI64AtomicLoad16U = 0x15;\nlet kExprI64AtomicLoad32U = 0x16;\nlet kExprI64AtomicStore = 0x18;\nlet kExprI64AtomicStore8U = 0x1b;\nlet kExprI64AtomicStore16U = 0x1c;\nlet kExprI64AtomicStore32U = 0x1d;\nlet kExprI64AtomicAdd = 0x1f;\nlet kExprI64AtomicAdd8U = 0x22;\nlet kExprI64AtomicAdd16U = 0x23;\nlet kExprI64AtomicAdd32U = 0x24;\nlet kExprI64AtomicSub = 0x26;\nlet kExprI64AtomicSub8U = 0x29;\nlet kExprI64AtomicSub16U = 0x2a;\nlet kExprI64AtomicSub32U = 0x2b;\nlet kExprI64AtomicAnd = 0x2d;\nlet kExprI64AtomicAnd8U = 0x30;\nlet kExprI64AtomicAnd16U = 0x31;\nlet kExprI64AtomicAnd32U = 0x32;\nlet kExprI64AtomicOr = 0x34;\nlet kExprI64AtomicOr8U = 0x37;\nlet kExprI64AtomicOr16U = 0x38;\nlet kExprI64AtomicOr32U = 0x39;\nlet kExprI64AtomicXor = 0x3b;\nlet kExprI64AtomicXor8U = 0x3e;\nlet kExprI64AtomicXor16U = 0x3f;\nlet kExprI64AtomicXor32U = 0x40;\nlet kExprI64AtomicExchange = 0x42;\nlet kExprI64AtomicExchange8U = 0x45;\nlet kExprI64AtomicExchange16U = 0x46;\nlet kExprI64AtomicExchange32U = 0x47;\nlet kExprI64AtomicCompareExchange = 0x49\nlet kExprI64AtomicCompareExchange8U = 0x4c;\nlet kExprI64AtomicCompareExchange16U = 0x4d;\nlet kExprI64AtomicCompareExchange32U = 0x4e;\n\n// Simd opcodes.\nlet kExprS128LoadMem = 0x00;\nlet kExprS128StoreMem = 0x01;\nlet kExprI32x4Splat = 0x0c;\nlet kExprI32x4Eq = 0x2c;\nlet kExprS1x4AllTrue = 0x75;\nlet kExprF32x4Min = 0x9e;\n\nclass Binary {\n  constructor() {\n    this.length = 0;\n    this.buffer = new Uint8Array(8192);\n  }\n\n  ensure_space(needed) {\n    if (this.buffer.length - this.length >= needed) return;\n    let new_capacity = this.buffer.length * 2;\n    while (new_capacity - this.length < needed) new_capacity *= 2;\n    let new_buffer = new Uint8Array(new_capacity);\n    new_buffer.set(this.buffer);\n    this.buffer = new_buffer;\n  }\n\n  trunc_buffer() {\n    return new Uint8Array(this.buffer.buffer, 0, this.length);\n  }\n\n  reset() {\n    this.length = 0;\n  }\n\n  emit_u8(val) {\n    this.ensure_space(1);\n    this.buffer[this.length++] = val;\n  }\n\n  emit_u16(val) {\n    this.ensure_space(2);\n    this.buffer[this.length++] = val;\n    this.buffer[this.length++] = val >> 8;\n  }\n\n  emit_u32(val) {\n    this.ensure_space(4);\n    this.buffer[this.length++] = val;\n    this.buffer[this.length++] = val >> 8;\n    this.buffer[this.length++] = val >> 16;\n    this.buffer[this.length++] = val >> 24;\n  }\n\n  emit_leb_u(val, max_len) {\n    this.ensure_space(max_len);\n    for (let i = 0; i < max_len; ++i) {\n      let v = val & 0xff;\n      val = val >>> 7;\n      if (val == 0) {\n        this.buffer[this.length++] = v;\n        return;\n      }\n      this.buffer[this.length++] = v | 0x80;\n    }\n    throw new Error(\"Leb value exceeds maximum length of \" + max_len);\n  }\n\n  emit_u32v(val) {\n    this.emit_leb_u(val, kMaxVarInt32Size);\n  }\n\n  emit_u64v(val) {\n    this.emit_leb_u(val, kMaxVarInt64Size);\n  }\n\n  emit_bytes(data) {\n    this.ensure_space(data.length);\n    this.buffer.set(data, this.length);\n    this.length += data.length;\n  }\n\n  emit_string(string) {\n    // When testing illegal names, we pass a byte array directly.\n    if (string instanceof Array) {\n      this.emit_u32v(string.length);\n      this.emit_bytes(string);\n      return;\n    }\n\n    // This is the hacky way to convert a JavaScript string to a UTF8 encoded\n    // string only containing single-byte characters.\n    let string_utf8 = unescape(encodeURIComponent(string));\n    this.emit_u32v(string_utf8.length);\n    for (let i = 0; i < string_utf8.length; i++) {\n      this.emit_u8(string_utf8.charCodeAt(i));\n    }\n  }\n\n  emit_header() {\n    this.emit_bytes([\n      kWasmH0, kWasmH1, kWasmH2, kWasmH3, kWasmV0, kWasmV1, kWasmV2, kWasmV3\n    ]);\n  }\n\n  emit_section(section_code, content_generator) {\n    // Emit section name.\n    this.emit_u8(section_code);\n    // Emit the section to a temporary buffer: its full length isn't know yet.\n    const section = new Binary;\n    content_generator(section);\n    // Emit section length.\n    this.emit_u32v(section.length);\n    // Copy the temporary buffer.\n    // Avoid spread because {section} can be huge.\n    this.emit_bytes(section.trunc_buffer());\n  }\n}\n\nclass WasmFunctionBuilder {\n  constructor(module, name, type_index) {\n    this.module = module;\n    this.name = name;\n    this.type_index = type_index;\n    this.body = [];\n    this.locals = [];\n    this.local_names = [];\n  }\n\n  numLocalNames() {\n    let num_local_names = 0;\n    for (let loc_name of this.local_names) {\n      if (loc_name !== undefined) ++num_local_names;\n    }\n    return num_local_names;\n  }\n\n  exportAs(name) {\n    this.module.addExport(name, this.index);\n    return this;\n  }\n\n  exportFunc() {\n    this.exportAs(this.name);\n    return this;\n  }\n\n  addBody(body) {\n    for (let b of body) {\n      if (typeof b !== 'number' || (b & (~0xFF)) !== 0 )\n        throw new Error('invalid body (entries must be 8 bit numbers): ' + body);\n    }\n    this.body = body.slice();\n    // Automatically add the end for the function block to the body.\n    this.body.push(kExprEnd);\n    return this;\n  }\n\n  addBodyWithEnd(body) {\n    this.body = body;\n    return this;\n  }\n\n  getNumLocals() {\n    let total_locals = 0;\n    for (let l of this.locals) {\n      for (let type of [\"i32\", \"i64\", \"f32\", \"f64\", \"s128\"]) {\n        total_locals += l[type + \"_count\"] || 0;\n      }\n    }\n    return total_locals;\n  }\n\n  addLocals(locals, names) {\n    const old_num_locals = this.getNumLocals();\n    this.locals.push(locals);\n    if (names) {\n      const missing_names = old_num_locals - this.local_names.length;\n      this.local_names.push(...new Array(missing_names), ...names);\n    }\n    return this;\n  }\n\n  end() {\n    return this.module;\n  }\n}\n\nclass WasmGlobalBuilder {\n  constructor(module, type, mutable) {\n    this.module = module;\n    this.type = type;\n    this.mutable = mutable;\n    this.init = 0;\n  }\n\n  exportAs(name) {\n    this.module.exports.push({name: name, kind: kExternalGlobal,\n                              index: this.index});\n    return this;\n  }\n}\n\nclass WasmTableBuilder {\n  constructor(module, type, initial_size, max_size) {\n    this.module = module;\n    this.type = type;\n    this.initial_size = initial_size;\n    this.has_max = max_size != undefined;\n    this.max_size = max_size;\n  }\n\n  exportAs(name) {\n    this.module.exports.push({name: name, kind: kExternalTable,\n                              index: this.index});\n    return this;\n  }\n}\n\nclass WasmModuleBuilder {\n  constructor() {\n    this.types = [];\n    this.imports = [];\n    this.exports = [];\n    this.globals = [];\n    this.tables = [];\n    this.exceptions = [];\n    this.functions = [];\n    this.element_segments = [];\n    this.data_segments = [];\n    this.explicit = [];\n    this.num_imported_funcs = 0;\n    this.num_imported_globals = 0;\n    this.num_imported_tables = 0;\n    this.num_imported_exceptions = 0;\n    return this;\n  }\n\n  addStart(start_index) {\n    this.start_index = start_index;\n    return this;\n  }\n\n  addMemory(min, max, exp, shared) {\n    this.memory = {min: min, max: max, exp: exp, shared: shared};\n    return this;\n  }\n\n  addExplicitSection(bytes) {\n    this.explicit.push(bytes);\n    return this;\n  }\n\n  stringToBytes(name) {\n    var result = new Binary();\n    result.emit_string(name);\n    return result.trunc_buffer()\n  }\n\n  createCustomSection(name, bytes) {\n    name = this.stringToBytes(name);\n    var section = new Binary();\n    section.emit_u8(kUnknownSectionCode);\n    section.emit_u32v(name.length + bytes.length);\n    section.emit_bytes(name);\n    section.emit_bytes(bytes);\n    return section.trunc_buffer();\n  }\n\n  addCustomSection(name, bytes) {\n    this.explicit.push(this.createCustomSection(name, bytes));\n  }\n\n  addType(type) {\n    this.types.push(type);\n    var pl = type.params.length;  // should have params\n    var rl = type.results.length; // should have results\n    return this.types.length - 1;\n  }\n\n  addGlobal(local_type, mutable) {\n    let glob = new WasmGlobalBuilder(this, local_type, mutable);\n    glob.index = this.globals.length + this.num_imported_globals;\n    this.globals.push(glob);\n    return glob;\n  }\n\n  addTable(type, initial_size, max_size = undefined) {\n    if (type != kWasmAnyRef && type != kWasmAnyFunc && type != kWasmExnRef) {\n      throw new Error(\n          'Tables must be of type kWasmAnyRef, kWasmAnyFunc, or kWasmExnRef');\n    }\n    let table = new WasmTableBuilder(this, type, initial_size, max_size);\n    table.index = this.tables.length + this.num_imported_tables;\n    this.tables.push(table);\n    return table;\n  }\n\n  addException(type) {\n    let type_index = (typeof type) == \"number\" ? type : this.addType(type);\n    let except_index = this.exceptions.length + this.num_imported_exceptions;\n    this.exceptions.push(type_index);\n    return except_index;\n  }\n\n  addFunction(name, type) {\n    let type_index = (typeof type) == \"number\" ? type : this.addType(type);\n    let func = new WasmFunctionBuilder(this, name, type_index);\n    func.index = this.functions.length + this.num_imported_funcs;\n    this.functions.push(func);\n    return func;\n  }\n\n  addImport(module, name, type) {\n    if (this.functions.length != 0) {\n      throw new Error('Imported functions must be declared before local ones');\n    }\n    let type_index = (typeof type) == \"number\" ? type : this.addType(type);\n    this.imports.push({module: module, name: name, kind: kExternalFunction,\n                       type: type_index});\n    return this.num_imported_funcs++;\n  }\n\n  addImportedGlobal(module, name, type, mutable = false) {\n    if (this.globals.length != 0) {\n      throw new Error('Imported globals must be declared before local ones');\n    }\n    let o = {module: module, name: name, kind: kExternalGlobal, type: type,\n             mutable: mutable};\n    this.imports.push(o);\n    return this.num_imported_globals++;\n  }\n\n  addImportedMemory(module, name, initial = 0, maximum, shared) {\n    let o = {module: module, name: name, kind: kExternalMemory,\n             initial: initial, maximum: maximum, shared: shared};\n    this.imports.push(o);\n    return this;\n  }\n\n  addImportedTable(module, name, initial, maximum, type) {\n    if (this.tables.length != 0) {\n      throw new Error('Imported tables must be declared before local ones');\n    }\n    let o = {module: module, name: name, kind: kExternalTable, initial: initial,\n             maximum: maximum, type: type || kWasmAnyFunctionTypeForm};\n    this.imports.push(o);\n    return this.num_imported_tables++;\n  }\n\n  addImportedException(module, name, type) {\n    if (this.exceptions.length != 0) {\n      throw new Error('Imported exceptions must be declared before local ones');\n    }\n    let type_index = (typeof type) == \"number\" ? type : this.addType(type);\n    let o = {module: module, name: name, kind: kExternalException, type: type_index};\n    this.imports.push(o);\n    return this.num_imported_exceptions++;\n  }\n\n  addExport(name, index) {\n    this.exports.push({name: name, kind: kExternalFunction, index: index});\n    return this;\n  }\n\n  addExportOfKind(name, kind, index) {\n    this.exports.push({name: name, kind: kind, index: index});\n    return this;\n  }\n\n  addDataSegment(addr, data, is_global = false) {\n    this.data_segments.push(\n        {addr: addr, data: data, is_global: is_global, is_active: true});\n    return this.data_segments.length - 1;\n  }\n\n  addPassiveDataSegment(data) {\n    this.data_segments.push({data: data, is_active: false});\n    return this.data_segments.length - 1;\n  }\n\n  exportMemoryAs(name) {\n    this.exports.push({name: name, kind: kExternalMemory, index: 0});\n  }\n\n  addElementSegment(table, base, is_global, array) {\n    this.element_segments.push({table: table, base: base, is_global: is_global,\n                                    array: array, is_active: true});\n    return this;\n  }\n\n  addPassiveElementSegment(array, is_import = false) {\n    this.element_segments.push({array: array, is_active: false});\n    return this;\n  }\n\n  appendToTable(array) {\n    for (let n of array) {\n      if (typeof n != 'number')\n        throw new Error('invalid table (entries have to be numbers): ' + array);\n    }\n    if (this.tables.length == 0) {\n      this.addTable(kWasmAnyFunc, 0);\n    }\n    // Adjust the table to the correct size.\n    let table = this.tables[0];\n    const base = table.initial_size;\n    const table_size = base + array.length;\n    table.initial_size = table_size;\n    if (table.has_max && table_size > table.max_size) {\n      table.max_size = table_size;\n    }\n    return this.addElementSegment(0, base, false, array);\n  }\n\n  setTableBounds(min, max = undefined) {\n    if (this.tables.length != 0) {\n      throw new Error(\"The table bounds of table '0' have already been set.\");\n    }\n    this.addTable(kWasmAnyFunc, min, max);\n    return this;\n  }\n\n  setName(name) {\n    this.name = name;\n    return this;\n  }\n\n  toBuffer(debug = false) {\n    let binary = new Binary;\n    let wasm = this;\n\n    // Add header\n    binary.emit_header();\n\n    // Add type section\n    if (wasm.types.length > 0) {\n      if (debug) print(\"emitting types @ \" + binary.length);\n      binary.emit_section(kTypeSectionCode, section => {\n        section.emit_u32v(wasm.types.length);\n        for (let type of wasm.types) {\n          section.emit_u8(kWasmFunctionTypeForm);\n          section.emit_u32v(type.params.length);\n          for (let param of type.params) {\n            section.emit_u8(param);\n          }\n          section.emit_u32v(type.results.length);\n          for (let result of type.results) {\n            section.emit_u8(result);\n          }\n        }\n      });\n    }\n\n    // Add imports section\n    if (wasm.imports.length > 0) {\n      if (debug) print(\"emitting imports @ \" + binary.length);\n      binary.emit_section(kImportSectionCode, section => {\n        section.emit_u32v(wasm.imports.length);\n        for (let imp of wasm.imports) {\n          section.emit_string(imp.module);\n          section.emit_string(imp.name || '');\n          section.emit_u8(imp.kind);\n          if (imp.kind == kExternalFunction) {\n            section.emit_u32v(imp.type);\n          } else if (imp.kind == kExternalGlobal) {\n            section.emit_u32v(imp.type);\n            section.emit_u8(imp.mutable);\n          } else if (imp.kind == kExternalMemory) {\n            var has_max = (typeof imp.maximum) != \"undefined\";\n            var is_shared = (typeof imp.shared) != \"undefined\";\n            if (is_shared) {\n              section.emit_u8(has_max ? 3 : 2); // flags\n            } else {\n              section.emit_u8(has_max ? 1 : 0); // flags\n            }\n            section.emit_u32v(imp.initial); // initial\n            if (has_max) section.emit_u32v(imp.maximum); // maximum\n          } else if (imp.kind == kExternalTable) {\n            section.emit_u8(imp.type);\n            var has_max = (typeof imp.maximum) != \"undefined\";\n            section.emit_u8(has_max ? 1 : 0); // flags\n            section.emit_u32v(imp.initial); // initial\n            if (has_max) section.emit_u32v(imp.maximum); // maximum\n          } else if (imp.kind == kExternalException) {\n            section.emit_u32v(kExceptionAttribute);\n            section.emit_u32v(imp.type);\n          } else {\n            throw new Error(\"unknown/unsupported import kind \" + imp.kind);\n          }\n        }\n      });\n    }\n\n    // Add functions declarations\n    if (wasm.functions.length > 0) {\n      if (debug) print(\"emitting function decls @ \" + binary.length);\n      binary.emit_section(kFunctionSectionCode, section => {\n        section.emit_u32v(wasm.functions.length);\n        for (let func of wasm.functions) {\n          section.emit_u32v(func.type_index);\n        }\n      });\n    }\n\n    // Add table section\n    if (wasm.tables.length > 0) {\n      if (debug) print (\"emitting tables @ \" + binary.length);\n      binary.emit_section(kTableSectionCode, section => {\n        section.emit_u32v(wasm.tables.length);\n        for (let table of wasm.tables) {\n          section.emit_u8(table.type);\n          section.emit_u8(table.has_max);\n          section.emit_u32v(table.initial_size);\n          if (table.has_max) section.emit_u32v(table.max_size);\n        }\n      });\n    }\n\n    // Add memory section\n    if (wasm.memory !== undefined) {\n      if (debug) print(\"emitting memory @ \" + binary.length);\n      binary.emit_section(kMemorySectionCode, section => {\n        section.emit_u8(1);  // one memory entry\n        const has_max = wasm.memory.max !== undefined;\n        const is_shared = wasm.memory.shared !== undefined;\n        // Emit flags (bit 0: reszeable max, bit 1: shared memory)\n        if (is_shared) {\n          section.emit_u8(has_max ? kSharedHasMaximumFlag : 2);\n        } else {\n          section.emit_u8(has_max ? kHasMaximumFlag : 0);\n        }\n        section.emit_u32v(wasm.memory.min);\n        if (has_max) section.emit_u32v(wasm.memory.max);\n      });\n    }\n\n    // Add global section.\n    if (wasm.globals.length > 0) {\n      if (debug) print (\"emitting globals @ \" + binary.length);\n      binary.emit_section(kGlobalSectionCode, section => {\n        section.emit_u32v(wasm.globals.length);\n        for (let global of wasm.globals) {\n          section.emit_u8(global.type);\n          section.emit_u8(global.mutable);\n          if ((typeof global.init_index) == \"undefined\") {\n            // Emit a constant initializer.\n            switch (global.type) {\n            case kWasmI32:\n              section.emit_u8(kExprI32Const);\n              section.emit_u32v(global.init);\n              break;\n            case kWasmI64:\n              section.emit_u8(kExprI64Const);\n              section.emit_u64v(global.init);\n              break;\n            case kWasmF32:\n              section.emit_bytes(wasmF32Const(global.init));\n              break;\n            case kWasmF64:\n              section.emit_bytes(wasmF64Const(global.init));\n              break;\n            case kWasmAnyFunc:\n            case kWasmAnyRef:\n              if (global.function_index !== undefined) {\n                section.emit_u8(kExprRefFunc);\n                section.emit_u32v(global.function_index);\n              } else {\n                section.emit_u8(kExprRefNull);\n              }\n              break;\n            case kWasmExnRef:\n              section.emit_u8(kExprRefNull);\n              break;\n            }\n          } else {\n            // Emit a global-index initializer.\n            section.emit_u8(kExprGlobalGet);\n            section.emit_u32v(global.init_index);\n          }\n          section.emit_u8(kExprEnd);  // end of init expression\n        }\n      });\n    }\n\n    // Add exceptions.\n    if (wasm.exceptions.length > 0) {\n      if (debug) print(\"emitting exceptions @ \" + binary.length);\n      binary.emit_section(kExceptionSectionCode, section => {\n        section.emit_u32v(wasm.exceptions.length);\n        for (let type of wasm.exceptions) {\n          section.emit_u32v(kExceptionAttribute);\n          section.emit_u32v(type);\n        }\n      });\n    }\n\n    // Add export table.\n    var mem_export = (wasm.memory !== undefined && wasm.memory.exp);\n    var exports_count = wasm.exports.length + (mem_export ? 1 : 0);\n    if (exports_count > 0) {\n      if (debug) print(\"emitting exports @ \" + binary.length);\n      binary.emit_section(kExportSectionCode, section => {\n        section.emit_u32v(exports_count);\n        for (let exp of wasm.exports) {\n          section.emit_string(exp.name);\n          section.emit_u8(exp.kind);\n          section.emit_u32v(exp.index);\n        }\n        if (mem_export) {\n          section.emit_string(\"memory\");\n          section.emit_u8(kExternalMemory);\n          section.emit_u8(0);\n        }\n      });\n    }\n\n    // Add start function section.\n    if (wasm.start_index !== undefined) {\n      if (debug) print(\"emitting start function @ \" + binary.length);\n      binary.emit_section(kStartSectionCode, section => {\n        section.emit_u32v(wasm.start_index);\n      });\n    }\n\n    // Add element segments\n    if (wasm.element_segments.length > 0) {\n      if (debug) print(\"emitting element segments @ \" + binary.length);\n      binary.emit_section(kElementSectionCode, section => {\n        var inits = wasm.element_segments;\n        section.emit_u32v(inits.length);\n\n        for (let init of inits) {\n          if (init.is_active) {\n            // Active segment.\n            if (init.table == 0) {\n              section.emit_u32v(kActiveNoIndex);\n            } else {\n              section.emit_u32v(kActiveWithIndex);\n              section.emit_u32v(init.table);\n            }\n            if (init.is_global) {\n              section.emit_u8(kExprGlobalGet);\n            } else {\n              section.emit_u8(kExprI32Const);\n            }\n            section.emit_u32v(init.base);\n            section.emit_u8(kExprEnd);\n            if (init.table != 0) {\n              section.emit_u8(kExternalFunction);\n            }\n            section.emit_u32v(init.array.length);\n            for (let index of init.array) {\n              section.emit_u32v(index);\n            }\n          } else {\n            // Passive segment.\n            section.emit_u8(kPassiveWithElements);  // flags\n            section.emit_u8(kWasmAnyFunc);\n            section.emit_u32v(init.array.length);\n            for (let index of init.array) {\n              if (index === null) {\n                section.emit_u8(kExprRefNull);\n                section.emit_u8(kExprEnd);\n              } else {\n                section.emit_u8(kExprRefFunc);\n                section.emit_u32v(index);\n                section.emit_u8(kExprEnd);\n              }\n            }\n          }\n        }\n      });\n    }\n\n    // If there are any passive data segments, add the DataCount section.\n    if (wasm.data_segments.some(seg => !seg.is_active)) {\n      binary.emit_section(kDataCountSectionCode, section => {\n        section.emit_u32v(wasm.data_segments.length);\n      });\n    }\n\n    // Add function bodies.\n    if (wasm.functions.length > 0) {\n      // emit function bodies\n      if (debug) print(\"emitting code @ \" + binary.length);\n      binary.emit_section(kCodeSectionCode, section => {\n        section.emit_u32v(wasm.functions.length);\n        let header = new Binary;\n        for (let func of wasm.functions) {\n          header.reset();\n          // Function body length will be patched later.\n          let local_decls = [];\n          for (let l of func.locals || []) {\n            if (l.i32_count > 0) {\n              local_decls.push({count: l.i32_count, type: kWasmI32});\n            }\n            if (l.i64_count > 0) {\n              local_decls.push({count: l.i64_count, type: kWasmI64});\n            }\n            if (l.f32_count > 0) {\n              local_decls.push({count: l.f32_count, type: kWasmF32});\n            }\n            if (l.f64_count > 0) {\n              local_decls.push({count: l.f64_count, type: kWasmF64});\n            }\n            if (l.s128_count > 0) {\n              local_decls.push({count: l.s128_count, type: kWasmS128});\n            }\n            if (l.anyref_count > 0) {\n              local_decls.push({count: l.anyref_count, type: kWasmAnyRef});\n            }\n            if (l.anyfunc_count > 0) {\n              local_decls.push({count: l.anyfunc_count, type: kWasmAnyFunc});\n            }\n            if (l.except_count > 0) {\n              local_decls.push({count: l.except_count, type: kWasmExnRef});\n            }\n          }\n\n          header.emit_u32v(local_decls.length);\n          for (let decl of local_decls) {\n            header.emit_u32v(decl.count);\n            header.emit_u8(decl.type);\n          }\n\n          section.emit_u32v(header.length + func.body.length);\n          section.emit_bytes(header.trunc_buffer());\n          section.emit_bytes(func.body);\n        }\n      });\n    }\n\n    // Add data segments.\n    if (wasm.data_segments.length > 0) {\n      if (debug) print(\"emitting data segments @ \" + binary.length);\n      binary.emit_section(kDataSectionCode, section => {\n        section.emit_u32v(wasm.data_segments.length);\n        for (let seg of wasm.data_segments) {\n          if (seg.is_active) {\n            section.emit_u8(0);  // linear memory index 0 / flags\n            if (seg.is_global) {\n              // initializer is a global variable\n              section.emit_u8(kExprGlobalGet);\n              section.emit_u32v(seg.addr);\n            } else {\n              // initializer is a constant\n              section.emit_u8(kExprI32Const);\n              section.emit_u32v(seg.addr);\n            }\n            section.emit_u8(kExprEnd);\n          } else {\n            section.emit_u8(kPassive);  // flags\n          }\n          section.emit_u32v(seg.data.length);\n          section.emit_bytes(seg.data);\n        }\n      });\n    }\n\n    // Add any explicitly added sections\n    for (let exp of wasm.explicit) {\n      if (debug) print(\"emitting explicit @ \" + binary.length);\n      binary.emit_bytes(exp);\n    }\n\n    // Add names.\n    let num_function_names = 0;\n    let num_functions_with_local_names = 0;\n    for (let func of wasm.functions) {\n      if (func.name !== undefined) ++num_function_names;\n      if (func.numLocalNames() > 0) ++num_functions_with_local_names;\n    }\n    if (num_function_names > 0 || num_functions_with_local_names > 0 ||\n        wasm.name !== undefined) {\n      if (debug) print('emitting names @ ' + binary.length);\n      binary.emit_section(kUnknownSectionCode, section => {\n        section.emit_string('name');\n        // Emit module name.\n        if (wasm.name !== undefined) {\n          section.emit_section(kModuleNameCode, name_section => {\n            name_section.emit_string(wasm.name);\n          });\n        }\n        // Emit function names.\n        if (num_function_names > 0) {\n          section.emit_section(kFunctionNamesCode, name_section => {\n            name_section.emit_u32v(num_function_names);\n            for (let func of wasm.functions) {\n              if (func.name === undefined) continue;\n              name_section.emit_u32v(func.index);\n              name_section.emit_string(func.name);\n            }\n          });\n        }\n        // Emit local names.\n        if (num_functions_with_local_names > 0) {\n          section.emit_section(kLocalNamesCode, name_section => {\n            name_section.emit_u32v(num_functions_with_local_names);\n            for (let func of wasm.functions) {\n              if (func.numLocalNames() == 0) continue;\n              name_section.emit_u32v(func.index);\n              name_section.emit_u32v(func.numLocalNames());\n              for (let i = 0; i < func.local_names.length; ++i) {\n                if (func.local_names[i] === undefined) continue;\n                name_section.emit_u32v(i);\n                name_section.emit_string(func.local_names[i]);\n              }\n            }\n          });\n        }\n      });\n    }\n\n    return binary.trunc_buffer();\n  }\n\n  toArray(debug = false) {\n    return Array.from(this.toBuffer(debug));\n  }\n\n  instantiate(ffi) {\n    let module = this.toModule();\n    let instance = new WebAssembly.Instance(module, ffi);\n    return instance;\n  }\n\n  asyncInstantiate(ffi) {\n    return WebAssembly.instantiate(this.toBuffer(), ffi)\n        .then(({module, instance}) => instance);\n  }\n\n  toModule(debug = false) {\n    return new WebAssembly.Module(this.toBuffer(debug));\n  }\n}\n\nfunction wasmSignedLeb(val, max_len = 5) {\n  let res = [];\n  for (let i = 0; i < max_len; ++i) {\n    let v = val & 0x7f;\n    // If {v} sign-extended from 7 to 32 bits is equal to val, we are done.\n    if (((v << 25) >> 25) == val) {\n      res.push(v);\n      return res;\n    }\n    res.push(v | 0x80);\n    val = val >> 7;\n  }\n  throw new Error(\n      'Leb value <' + val + '> exceeds maximum length of ' + max_len);\n}\n\nfunction wasmI32Const(val) {\n  return [kExprI32Const, ...wasmSignedLeb(val, 5)];\n}\n\nfunction wasmF32Const(f) {\n  // Write in little-endian order at offset 0.\n  data_view.setFloat32(0, f, true);\n  return [\n    kExprF32Const, byte_view[0], byte_view[1], byte_view[2], byte_view[3]\n  ];\n}\n\nfunction wasmF64Const(f) {\n  // Write in little-endian order at offset 0.\n  data_view.setFloat64(0, f, true);\n  return [\n    kExprF64Const, byte_view[0], byte_view[1], byte_view[2],\n    byte_view[3], byte_view[4], byte_view[5], byte_view[6], byte_view[7]\n  ];\n}\n"
  },
  {
    "path": "test/meta/Makefile",
    "content": "SHARED_MEM=false\n\n# SpiderMonkey shell\nJSSHELL=~/mozilla-central/js/src/build-debug/dist/bin/js -e 'const WITH_SHARED_MEMORY=$(SHARED_MEM);' -f common.js\n\n# Node.js\n#JSSHELL=./noderun.sh $(SHARED_MEM)\n\nTARGETDIR=../core\n\n.PHONY: all\n\nall: $(TARGETDIR)/memory_copy.wast \\\n\t$(TARGETDIR)/memory_init.wast \\\n\t$(TARGETDIR)/memory_fill.wast \\\n\t$(TARGETDIR)/table_copy.wast \\\n\t$(TARGETDIR)/table_init.wast\n\n$(TARGETDIR)/memory_copy.wast: generate_memory_copy.js common.js Makefile\n\t$(JSSHELL) $< > $@\n\n$(TARGETDIR)/memory_init.wast: generate_memory_init.js common.js Makefile\n\t$(JSSHELL) $< > $@\n\n$(TARGETDIR)/memory_fill.wast: generate_memory_fill.js common.js Makefile\n\t$(JSSHELL) $< > $@\n\n$(TARGETDIR)/table_copy.wast: generate_table_copy.js common.js Makefile\n\t$(JSSHELL) $< > $@\n\n$(TARGETDIR)/table_init.wast: generate_table_init.js common.js Makefile\n\t$(JSSHELL) $< > $@\n"
  },
  {
    "path": "test/meta/README.md",
    "content": "These programs generate test cases.  See Makefile for details.\n"
  },
  {
    "path": "test/meta/common.js",
    "content": "const PAGESIZE = 65536;\n\nfunction print_origin(origin) {\n    print(\";;\");\n    print(\";; Generated by ../meta/\" + origin);\n    print(\";; DO NOT EDIT THIS FILE.  CHANGE THE SOURCE AND REGENERATE.\");\n    print(\";;\");\n}\n\nfunction checkRangeCode() {\n    return `\n  (func (export \"checkRange\") (param $from i32) (param $to i32) (param $expected i32) (result i32)\n    (loop $cont\n      (if (i32.eq (local.get $from) (local.get $to))\n        (then\n          (return (i32.const -1))))\n      (if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))\n        (then\n          (local.set $from (i32.add (local.get $from) (i32.const 1)))\n          (br $cont))))\n    (return (local.get $from)))\n`;\n}\n\nfunction checkRange(from, to, expected) {\n    print(\n`(assert_return (invoke \"checkRange\" (i32.const ${from}) (i32.const ${to}) (i32.const ${expected}))\n               (i32.const -1))`);\n}\n"
  },
  {
    "path": "test/meta/generate_memory_copy.js",
    "content": "// This program generates .wast code that contains all the spec tests for\n// memory.copy.  See `Makefile`.\n\nprint_origin(\"generate_memory_copy.js\");\n\n// In-bounds tests.\n\nfunction mem_test(instruction, expected_result_vector) {\n    print(\n`\n(module\n  (memory (export \"memory0\") 1 1)\n  (data (i32.const 2) \"\\\\03\\\\01\\\\04\\\\01\")\n  (data (i32.const 12) \"\\\\07\\\\05\\\\02\\\\03\\\\06\")\n  (func (export \"test\")\n    ${instruction})\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(invoke \"test\")\n`);\n    for (let i = 0; i < expected_result_vector.length; i++) {\n        print(`(assert_return (invoke \"load8_u\" (i32.const ${i})) (i32.const ${expected_result_vector[i]}))`);\n    }\n}\n\nconst e = 0;\n\n// This just gives the initial state of the memory, with its active\n// initialisers applied.\nmem_test(\"(nop)\",\n         [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n// Copy non-zero over non-zero\nmem_test(\"(memory.copy (i32.const 13) (i32.const 2) (i32.const 3))\",\n         [e,e,3,1,4, 1,e,e,e,e, e,e,7,3,1, 4,6,e,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n// Copy non-zero over zero\nmem_test(\"(memory.copy (i32.const 25) (i32.const 15) (i32.const 2))\",\n         [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, 3,6,e,e,e]);\n\n// Copy zero over non-zero\nmem_test(\"(memory.copy (i32.const 13) (i32.const 25) (i32.const 3))\",\n         [e,e,3,1,4, 1,e,e,e,e, e,e,7,e,e, e,6,e,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n// Copy zero over zero\nmem_test(\"(memory.copy (i32.const 20) (i32.const 22) (i32.const 4))\",\n         [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n// Copy zero and non-zero entries, non overlapping\nmem_test(\"(memory.copy (i32.const 25) (i32.const 1) (i32.const 3))\",\n         [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,3,1,e,e]);\n\n// Copy zero and non-zero entries, overlapping, backwards\nmem_test(\"(memory.copy (i32.const 10) (i32.const 12) (i32.const 7))\",\n         [e,e,3,1,4, 1,e,e,e,e, 7,5,2,3,6, e,e,e,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n// Copy zero and non-zero entries, overlapping, forwards\nmem_test(\"(memory.copy (i32.const 12) (i32.const 10) (i32.const 7))\",\n         [e,e,3,1,4, 1,e,e,e,e, e,e,e,e,7, 5,2,3,6,e, e,e,e,e,e, e,e,e,e,e]);\n\n// Out-of-bounds tests.\n//\n// The operation is out of bounds of the memory for the source or target, but\n// must perform the operation up to the appropriate bound.  Major cases:\n//\n// - non-overlapping regions\n// - overlapping regions with src >= dest\n// - overlapping regions with src == dest\n// - overlapping regions with src < dest\n// - arithmetic overflow on src addresses\n// - arithmetic overflow on target addresses\n//\n// for each of those,\n//\n// - src address oob\n// - target address oob\n// - both oob\n\nfunction initializers(count, startingAt) {\n    let s = \"\";\n    for ( let i=0, j=startingAt; i < count; i++, j++ )\n        s += \"\\\\\" + (i + 256).toString(16).substring(1);\n    return s;\n}\n\nfunction mem_copy(min, max, shared, srcOffs, targetOffs, len) {\n    let copyDown = srcOffs < targetOffs;\n    let memLength = min * PAGESIZE;\n    let targetAvail = memLength - targetOffs;\n    let srcAvail = memLength - srcOffs;\n    let targetLim = targetOffs + Math.min(len, targetAvail, srcAvail);\n    let srcLim = srcOffs + Math.min(len, targetAvail, srcAvail);\n\n    print(\n`\n(module\n  (memory (export \"mem\") ${min} ${max} ${shared})\n  (data (i32.const ${srcOffs}) \"${initializers(srcLim - srcOffs, 0)}\")\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (memory.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len)))\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(assert_trap (invoke \"run\" (i32.const ${targetOffs}) (i32.const ${srcOffs}) (i32.const ${len}))\n             \"out of bounds\")\n`);\n\n    let immediateOOB = copyDown && (srcOffs + len > memLength || targetOffs + len > memLength);\n\n    var s = 0;\n    var i = 0;\n    let k = 0;\n    for (i=0; i < memLength; i++ ) {\n        if (i >= srcOffs && i < srcLim) {\n            print(`(assert_return (invoke \"load8_u\" (i32.const ${i})) (i32.const ${(s++) & 0xFF}))`);\n            continue;\n        }\n        // Only spot-check for zero, or we'll be here all night.\n        if (++k == 199) {\n            print(`(assert_return (invoke \"load8_u\" (i32.const ${i})) (i32.const 0))`);\n            k = 0;\n        }\n    }\n}\n\n// OOB target address, nonoverlapping\nmem_copy(1, 1, \"\", 0, PAGESIZE-20, 40);\nmem_copy(1, 1, \"\", 0, PAGESIZE-21, 39);\nif (WITH_SHARED_MEMORY) {\n    mem_copy(2, 4, \"shared\", 0, 2*PAGESIZE-20, 40);\n    mem_copy(2, 4, \"shared\", 0, 2*PAGESIZE-21, 39);\n}\n\n// OOB source address, nonoverlapping\nmem_copy(1, 1, \"\", PAGESIZE-20, 0, 40);\nmem_copy(1, 1, \"\", PAGESIZE-21, 0, 39);\nif (WITH_SHARED_MEMORY) {\n    mem_copy(2, 4, \"shared\", 2*PAGESIZE-20, 0, 40);\n    mem_copy(2, 4, \"shared\", 2*PAGESIZE-21, 0, 39);\n}\n\n// OOB target address, overlapping, src < target\nmem_copy(1, 1, \"\", PAGESIZE-50, PAGESIZE-20, 40);\n\n// OOB source address, overlapping, target < src\nmem_copy(1, 1, \"\", PAGESIZE-20, PAGESIZE-50, 40);\n\n// OOB both, overlapping, including target == src\nmem_copy(1, 1, \"\", PAGESIZE-30, PAGESIZE-20, 40);\nmem_copy(1, 1, \"\", PAGESIZE-20, PAGESIZE-30, 40);\nmem_copy(1, 1, \"\", PAGESIZE-20, PAGESIZE-20, 40);\n\n// Arithmetic overflow on source address.\nmem_copy(1, \"\", \"\", PAGESIZE-20, 0, 0xFFFFF000);\n\n// Arithmetic overflow on target adddress is an overlapping case.\nmem_copy(1, 1, \"\", PAGESIZE-0x1000, PAGESIZE-20, 0xFFFFFF00);\n\n// Sundry compilation failures.\n\n// Module doesn't have a memory.\nprint(\n`\n(assert_invalid\n  (module\n    (func (export \"testfn\")\n      (memory.copy (i32.const 10) (i32.const 20) (i32.const 30))))\n  \"unknown memory 0\")\n`);\n\n// Invalid argument types.  TODO: We can add anyref, funcref, etc here.\n{\n    const tys = ['i32', 'f32', 'i64', 'f64'];\n    for (let ty1 of tys) {\n    for (let ty2 of tys) {\n    for (let ty3 of tys) {\n        if (ty1 == 'i32' && ty2 == 'i32' && ty3 == 'i32')\n            continue;  // this is the only valid case\n        print(\n`(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.copy (${ty1}.const 10) (${ty2}.const 20) (${ty3}.const 30))))\n  \"type mismatch\")\n`);\n    }}}\n}\n\n// Both ranges valid.  Copy 5 bytes backwards by 1 (overlapping).\n// result = 0x00--(09) 0x55--(11) 0x00--(pagesize-20)\nprint(\n`\n(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.fill (i32.const 10) (i32.const 0x55) (i32.const 10))\n    (memory.copy (i32.const 9) (i32.const 10) (i32.const 5)))\n  ${checkRangeCode()})\n(invoke \"test\")\n`);\ncheckRange(0,    0+9,     0x00);\ncheckRange(9,    9+11,    0x55);\ncheckRange(9+11, 0x10000, 0x00);\n\n// Both ranges valid.  Copy 5 bytes forwards by 1 (overlapping).\n// result = 0x00--(10) 0x55--(11) 0x00--(pagesize-19)\nprint(\n`\n(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.fill (i32.const 10) (i32.const 0x55) (i32.const 10))\n    (memory.copy (i32.const 16) (i32.const 15) (i32.const 5)))\n  ${checkRangeCode()})\n(invoke \"test\")\n`);\ncheckRange(0,     0+10,    0x00);\ncheckRange(10,    10+11,   0x55);\ncheckRange(10+11, 0x10000, 0x00);\n\n// Destination range invalid\nprint(\n`\n(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0xFF00) (i32.const 0x8000) (i32.const 257))))\n(assert_trap (invoke \"test\") \"out of bounds\")\n`);\n\n// Destination wraparound the end of 32-bit offset space\nprint(\n`(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0xFFFFFF00) (i32.const 0x4000) (i32.const 257))))\n(assert_trap (invoke \"test\") \"out of bounds\")\n`);\n\n// Source range invalid\nprint(\n`(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0x8000) (i32.const 0xFF00) (i32.const 257))))\n(assert_trap (invoke \"test\") \"out of bounds\")\n`);\n\n// Source wraparound the end of 32-bit offset space\nprint(\n`(module\n (memory 1 1)\n (func (export \"test\")\n   (memory.copy (i32.const 0x4000) (i32.const 0xFFFFFF00) (i32.const 257))))\n(assert_trap (invoke \"test\") \"out of bounds\")\n`);\n\n// Zero len with both offsets in-bounds is a no-op\nprint(\n`(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.fill (i32.const 0x0000) (i32.const 0x55) (i32.const 0x8000))\n    (memory.fill (i32.const 0x8000) (i32.const 0xAA) (i32.const 0x8000))\n    (memory.copy (i32.const 0x9000) (i32.const 0x7000) (i32.const 0)))\n  ${checkRangeCode()})\n(invoke \"test\")\n`);\ncheckRange(0x00000, 0x08000, 0x55);\ncheckRange(0x08000, 0x10000, 0xAA);\n\n// Zero len with dest offset out-of-bounds at the end of memory is allowed\nprint(\n`(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0x10000) (i32.const 0x7000) (i32.const 0))))\n(invoke \"test\")\n`);\n\n// Zero len with dest offset out-of-bounds past the end of memory is not allowed\nprint(\n`(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0x20000) (i32.const 0x7000) (i32.const 0))))\n(assert_trap (invoke \"test\") \"out of bounds\")\n`);\n\n// Zero len with src offset out-of-bounds at the end of memory is allowed\nprint(\n`(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0x9000) (i32.const 0x10000) (i32.const 0))))\n(invoke \"test\")\n`);\n\n// Zero len with src offset out-of-bounds past the end of memory is not allowed\nprint(\n`(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0x9000) (i32.const 0x20000) (i32.const 0))))\n(assert_trap (invoke \"test\") \"out of bounds\")\n`);\n\n// Zero len with both dest and src offsets out-of-bounds at the end of memory is allowed\nprint(\n`(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0x10000) (i32.const 0x10000) (i32.const 0))))\n(invoke \"test\")\n`);\n\n// Zero len with both dest and src offsets out-of-bounds past the end of memory is not allowed\nprint(\n`(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.copy (i32.const 0x20000) (i32.const 0x20000) (i32.const 0))))\n(assert_trap (invoke \"test\") \"out of bounds\")\n`);\n\n// 100 random fills followed by 100 random copies, in a single-page buffer,\n// followed by verification of the (now heavily mashed-around) buffer.\nprint(\n`(module\n  (memory 1 1)\n  (func (export \"test\")\n    (memory.fill (i32.const 17767) (i32.const 1) (i32.const 1344))\n    (memory.fill (i32.const 39017) (i32.const 2) (i32.const 1055))\n    (memory.fill (i32.const 56401) (i32.const 3) (i32.const 988))\n    (memory.fill (i32.const 37962) (i32.const 4) (i32.const 322))\n    (memory.fill (i32.const 7977) (i32.const 5) (i32.const 1994))\n    (memory.fill (i32.const 22714) (i32.const 6) (i32.const 3036))\n    (memory.fill (i32.const 16882) (i32.const 7) (i32.const 2372))\n    (memory.fill (i32.const 43491) (i32.const 8) (i32.const 835))\n    (memory.fill (i32.const 124) (i32.const 9) (i32.const 1393))\n    (memory.fill (i32.const 2132) (i32.const 10) (i32.const 2758))\n    (memory.fill (i32.const 8987) (i32.const 11) (i32.const 3098))\n    (memory.fill (i32.const 52711) (i32.const 12) (i32.const 741))\n    (memory.fill (i32.const 3958) (i32.const 13) (i32.const 2823))\n    (memory.fill (i32.const 49715) (i32.const 14) (i32.const 1280))\n    (memory.fill (i32.const 50377) (i32.const 15) (i32.const 1466))\n    (memory.fill (i32.const 20493) (i32.const 16) (i32.const 3158))\n    (memory.fill (i32.const 47665) (i32.const 17) (i32.const 544))\n    (memory.fill (i32.const 12451) (i32.const 18) (i32.const 2669))\n    (memory.fill (i32.const 24869) (i32.const 19) (i32.const 2651))\n    (memory.fill (i32.const 45317) (i32.const 20) (i32.const 1570))\n    (memory.fill (i32.const 43096) (i32.const 21) (i32.const 1691))\n    (memory.fill (i32.const 33886) (i32.const 22) (i32.const 646))\n    (memory.fill (i32.const 48555) (i32.const 23) (i32.const 1858))\n    (memory.fill (i32.const 53453) (i32.const 24) (i32.const 2657))\n    (memory.fill (i32.const 30363) (i32.const 25) (i32.const 981))\n    (memory.fill (i32.const 9300) (i32.const 26) (i32.const 1807))\n    (memory.fill (i32.const 50190) (i32.const 27) (i32.const 487))\n    (memory.fill (i32.const 62753) (i32.const 28) (i32.const 530))\n    (memory.fill (i32.const 36316) (i32.const 29) (i32.const 943))\n    (memory.fill (i32.const 6768) (i32.const 30) (i32.const 381))\n    (memory.fill (i32.const 51262) (i32.const 31) (i32.const 3089))\n    (memory.fill (i32.const 49729) (i32.const 32) (i32.const 658))\n    (memory.fill (i32.const 44540) (i32.const 33) (i32.const 1702))\n    (memory.fill (i32.const 33342) (i32.const 34) (i32.const 1092))\n    (memory.fill (i32.const 50814) (i32.const 35) (i32.const 1410))\n    (memory.fill (i32.const 47594) (i32.const 36) (i32.const 2204))\n    (memory.fill (i32.const 54123) (i32.const 37) (i32.const 2394))\n    (memory.fill (i32.const 55183) (i32.const 38) (i32.const 250))\n    (memory.fill (i32.const 22620) (i32.const 39) (i32.const 2097))\n    (memory.fill (i32.const 17132) (i32.const 40) (i32.const 3264))\n    (memory.fill (i32.const 54331) (i32.const 41) (i32.const 3299))\n    (memory.fill (i32.const 39474) (i32.const 42) (i32.const 2796))\n    (memory.fill (i32.const 36156) (i32.const 43) (i32.const 2070))\n    (memory.fill (i32.const 35308) (i32.const 44) (i32.const 2763))\n    (memory.fill (i32.const 32731) (i32.const 45) (i32.const 312))\n    (memory.fill (i32.const 63746) (i32.const 46) (i32.const 192))\n    (memory.fill (i32.const 30974) (i32.const 47) (i32.const 596))\n    (memory.fill (i32.const 16635) (i32.const 48) (i32.const 501))\n    (memory.fill (i32.const 57002) (i32.const 49) (i32.const 686))\n    (memory.fill (i32.const 34299) (i32.const 50) (i32.const 385))\n    (memory.fill (i32.const 60881) (i32.const 51) (i32.const 903))\n    (memory.fill (i32.const 61445) (i32.const 52) (i32.const 2390))\n    (memory.fill (i32.const 46972) (i32.const 53) (i32.const 1441))\n    (memory.fill (i32.const 25973) (i32.const 54) (i32.const 3162))\n    (memory.fill (i32.const 5566) (i32.const 55) (i32.const 2135))\n    (memory.fill (i32.const 35977) (i32.const 56) (i32.const 519))\n    (memory.fill (i32.const 44892) (i32.const 57) (i32.const 3280))\n    (memory.fill (i32.const 46760) (i32.const 58) (i32.const 1678))\n    (memory.fill (i32.const 46607) (i32.const 59) (i32.const 3168))\n    (memory.fill (i32.const 22449) (i32.const 60) (i32.const 1441))\n    (memory.fill (i32.const 58609) (i32.const 61) (i32.const 663))\n    (memory.fill (i32.const 32261) (i32.const 62) (i32.const 1671))\n    (memory.fill (i32.const 3063) (i32.const 63) (i32.const 721))\n    (memory.fill (i32.const 34025) (i32.const 64) (i32.const 84))\n    (memory.fill (i32.const 33338) (i32.const 65) (i32.const 2029))\n    (memory.fill (i32.const 36810) (i32.const 66) (i32.const 29))\n    (memory.fill (i32.const 19147) (i32.const 67) (i32.const 3034))\n    (memory.fill (i32.const 12616) (i32.const 68) (i32.const 1043))\n    (memory.fill (i32.const 18276) (i32.const 69) (i32.const 3324))\n    (memory.fill (i32.const 4639) (i32.const 70) (i32.const 1091))\n    (memory.fill (i32.const 16158) (i32.const 71) (i32.const 1997))\n    (memory.fill (i32.const 18204) (i32.const 72) (i32.const 2259))\n    (memory.fill (i32.const 50532) (i32.const 73) (i32.const 3189))\n    (memory.fill (i32.const 11028) (i32.const 74) (i32.const 1968))\n    (memory.fill (i32.const 15962) (i32.const 75) (i32.const 1455))\n    (memory.fill (i32.const 45406) (i32.const 76) (i32.const 1177))\n    (memory.fill (i32.const 54137) (i32.const 77) (i32.const 1568))\n    (memory.fill (i32.const 33083) (i32.const 78) (i32.const 1642))\n    (memory.fill (i32.const 61028) (i32.const 79) (i32.const 3284))\n    (memory.fill (i32.const 51729) (i32.const 80) (i32.const 223))\n    (memory.fill (i32.const 4361) (i32.const 81) (i32.const 2171))\n    (memory.fill (i32.const 57514) (i32.const 82) (i32.const 1322))\n    (memory.fill (i32.const 55724) (i32.const 83) (i32.const 2648))\n    (memory.fill (i32.const 24091) (i32.const 84) (i32.const 1045))\n    (memory.fill (i32.const 43183) (i32.const 85) (i32.const 3097))\n    (memory.fill (i32.const 32307) (i32.const 86) (i32.const 2796))\n    (memory.fill (i32.const 3811) (i32.const 87) (i32.const 2010))\n    (memory.fill (i32.const 54856) (i32.const 88) (i32.const 0))\n    (memory.fill (i32.const 49941) (i32.const 89) (i32.const 2069))\n    (memory.fill (i32.const 20411) (i32.const 90) (i32.const 2896))\n    (memory.fill (i32.const 33826) (i32.const 91) (i32.const 192))\n    (memory.fill (i32.const 9402) (i32.const 92) (i32.const 2195))\n    (memory.fill (i32.const 12413) (i32.const 93) (i32.const 24))\n    (memory.fill (i32.const 14091) (i32.const 94) (i32.const 577))\n    (memory.fill (i32.const 44058) (i32.const 95) (i32.const 2089))\n    (memory.fill (i32.const 36735) (i32.const 96) (i32.const 3436))\n    (memory.fill (i32.const 23288) (i32.const 97) (i32.const 2765))\n    (memory.fill (i32.const 6392) (i32.const 98) (i32.const 830))\n    (memory.fill (i32.const 33307) (i32.const 99) (i32.const 1938))\n    (memory.fill (i32.const 21941) (i32.const 100) (i32.const 2750))\n    (memory.copy (i32.const 59214) (i32.const 54248) (i32.const 2098))\n    (memory.copy (i32.const 63026) (i32.const 39224) (i32.const 230))\n    (memory.copy (i32.const 51833) (i32.const 23629) (i32.const 2300))\n    (memory.copy (i32.const 6708) (i32.const 23996) (i32.const 639))\n    (memory.copy (i32.const 6990) (i32.const 33399) (i32.const 1097))\n    (memory.copy (i32.const 19403) (i32.const 10348) (i32.const 3197))\n    (memory.copy (i32.const 27308) (i32.const 54406) (i32.const 100))\n    (memory.copy (i32.const 27221) (i32.const 43682) (i32.const 1717))\n    (memory.copy (i32.const 60528) (i32.const 8629) (i32.const 119))\n    (memory.copy (i32.const 5947) (i32.const 2308) (i32.const 658))\n    (memory.copy (i32.const 4787) (i32.const 51631) (i32.const 2269))\n    (memory.copy (i32.const 12617) (i32.const 19197) (i32.const 833))\n    (memory.copy (i32.const 11854) (i32.const 46505) (i32.const 3300))\n    (memory.copy (i32.const 11376) (i32.const 45012) (i32.const 2281))\n    (memory.copy (i32.const 34186) (i32.const 6697) (i32.const 2572))\n    (memory.copy (i32.const 4936) (i32.const 1690) (i32.const 1328))\n    (memory.copy (i32.const 63164) (i32.const 7637) (i32.const 1670))\n    (memory.copy (i32.const 44568) (i32.const 18344) (i32.const 33))\n    (memory.copy (i32.const 43918) (i32.const 22348) (i32.const 1427))\n    (memory.copy (i32.const 46637) (i32.const 49819) (i32.const 1434))\n    (memory.copy (i32.const 63684) (i32.const 8755) (i32.const 834))\n    (memory.copy (i32.const 33485) (i32.const 20131) (i32.const 3317))\n    (memory.copy (i32.const 40575) (i32.const 54317) (i32.const 3201))\n    (memory.copy (i32.const 25812) (i32.const 59254) (i32.const 2452))\n    (memory.copy (i32.const 19678) (i32.const 56882) (i32.const 346))\n    (memory.copy (i32.const 15852) (i32.const 35914) (i32.const 2430))\n    (memory.copy (i32.const 11824) (i32.const 35574) (i32.const 300))\n    (memory.copy (i32.const 59427) (i32.const 13957) (i32.const 3153))\n    (memory.copy (i32.const 34299) (i32.const 60594) (i32.const 1281))\n    (memory.copy (i32.const 8964) (i32.const 12276) (i32.const 943))\n    (memory.copy (i32.const 2827) (i32.const 10425) (i32.const 1887))\n    (memory.copy (i32.const 43194) (i32.const 43910) (i32.const 738))\n    (memory.copy (i32.const 63038) (i32.const 18949) (i32.const 122))\n    (memory.copy (i32.const 24044) (i32.const 44761) (i32.const 1755))\n    (memory.copy (i32.const 22608) (i32.const 14755) (i32.const 702))\n    (memory.copy (i32.const 11284) (i32.const 26579) (i32.const 1830))\n    (memory.copy (i32.const 23092) (i32.const 20471) (i32.const 1064))\n    (memory.copy (i32.const 57248) (i32.const 54770) (i32.const 2631))\n    (memory.copy (i32.const 25492) (i32.const 1025) (i32.const 3113))\n    (memory.copy (i32.const 49588) (i32.const 44220) (i32.const 975))\n    (memory.copy (i32.const 28280) (i32.const 41722) (i32.const 2336))\n    (memory.copy (i32.const 61289) (i32.const 230) (i32.const 2872))\n    (memory.copy (i32.const 22480) (i32.const 52506) (i32.const 2197))\n    (memory.copy (i32.const 40553) (i32.const 9578) (i32.const 1958))\n    (memory.copy (i32.const 29004) (i32.const 20862) (i32.const 2186))\n    (memory.copy (i32.const 53029) (i32.const 43955) (i32.const 1037))\n    (memory.copy (i32.const 25476) (i32.const 35667) (i32.const 1650))\n    (memory.copy (i32.const 58516) (i32.const 45819) (i32.const 1986))\n    (memory.copy (i32.const 38297) (i32.const 5776) (i32.const 1955))\n    (memory.copy (i32.const 28503) (i32.const 55364) (i32.const 2368))\n    (memory.copy (i32.const 62619) (i32.const 18108) (i32.const 1356))\n    (memory.copy (i32.const 50149) (i32.const 13861) (i32.const 382))\n    (memory.copy (i32.const 16904) (i32.const 36341) (i32.const 1900))\n    (memory.copy (i32.const 48098) (i32.const 11358) (i32.const 2807))\n    (memory.copy (i32.const 28512) (i32.const 40362) (i32.const 323))\n    (memory.copy (i32.const 35506) (i32.const 27856) (i32.const 1670))\n    (memory.copy (i32.const 62970) (i32.const 53332) (i32.const 1341))\n    (memory.copy (i32.const 14133) (i32.const 46312) (i32.const 644))\n    (memory.copy (i32.const 29030) (i32.const 19074) (i32.const 496))\n    (memory.copy (i32.const 44952) (i32.const 47577) (i32.const 2784))\n    (memory.copy (i32.const 39559) (i32.const 44661) (i32.const 1350))\n    (memory.copy (i32.const 10352) (i32.const 29274) (i32.const 1475))\n    (memory.copy (i32.const 46911) (i32.const 46178) (i32.const 1467))\n    (memory.copy (i32.const 4905) (i32.const 28740) (i32.const 1895))\n    (memory.copy (i32.const 38012) (i32.const 57253) (i32.const 1751))\n    (memory.copy (i32.const 26446) (i32.const 27223) (i32.const 1127))\n    (memory.copy (i32.const 58835) (i32.const 24657) (i32.const 1063))\n    (memory.copy (i32.const 61356) (i32.const 38790) (i32.const 766))\n    (memory.copy (i32.const 44160) (i32.const 2284) (i32.const 1520))\n    (memory.copy (i32.const 32740) (i32.const 47237) (i32.const 3014))\n    (memory.copy (i32.const 11148) (i32.const 21260) (i32.const 1011))\n    (memory.copy (i32.const 7665) (i32.const 31612) (i32.const 3034))\n    (memory.copy (i32.const 18044) (i32.const 12987) (i32.const 3320))\n    (memory.copy (i32.const 57306) (i32.const 55905) (i32.const 308))\n    (memory.copy (i32.const 24675) (i32.const 16815) (i32.const 1155))\n    (memory.copy (i32.const 19900) (i32.const 10115) (i32.const 722))\n    (memory.copy (i32.const 2921) (i32.const 5935) (i32.const 2370))\n    (memory.copy (i32.const 32255) (i32.const 50095) (i32.const 2926))\n    (memory.copy (i32.const 15126) (i32.const 17299) (i32.const 2607))\n    (memory.copy (i32.const 45575) (i32.const 28447) (i32.const 2045))\n    (memory.copy (i32.const 55149) (i32.const 36113) (i32.const 2596))\n    (memory.copy (i32.const 28461) (i32.const 54157) (i32.const 1168))\n    (memory.copy (i32.const 47951) (i32.const 53385) (i32.const 3137))\n    (memory.copy (i32.const 30646) (i32.const 45155) (i32.const 2649))\n    (memory.copy (i32.const 5057) (i32.const 4295) (i32.const 52))\n    (memory.copy (i32.const 6692) (i32.const 24195) (i32.const 441))\n    (memory.copy (i32.const 32984) (i32.const 27117) (i32.const 3445))\n    (memory.copy (i32.const 32530) (i32.const 59372) (i32.const 2785))\n    (memory.copy (i32.const 34361) (i32.const 8962) (i32.const 2406))\n    (memory.copy (i32.const 17893) (i32.const 54538) (i32.const 3381))\n    (memory.copy (i32.const 22685) (i32.const 44151) (i32.const 136))\n    (memory.copy (i32.const 59089) (i32.const 7077) (i32.const 1045))\n    (memory.copy (i32.const 42945) (i32.const 55028) (i32.const 2389))\n    (memory.copy (i32.const 44693) (i32.const 20138) (i32.const 877))\n    (memory.copy (i32.const 36810) (i32.const 25196) (i32.const 3447))\n    (memory.copy (i32.const 45742) (i32.const 31888) (i32.const 854))\n    (memory.copy (i32.const 24236) (i32.const 31866) (i32.const 1377))\n    (memory.copy (i32.const 33778) (i32.const 692) (i32.const 1594))\n    (memory.copy (i32.const 60618) (i32.const 18585) (i32.const 2987))\n    (memory.copy (i32.const 50370) (i32.const 41271) (i32.const 1406))\n  )\n  ${checkRangeCode()})\n(invoke \"test\")\n`);\ncheckRange(0, 124, 0);\ncheckRange(124, 1517, 9);\ncheckRange(1517, 2132, 0);\ncheckRange(2132, 2827, 10);\ncheckRange(2827, 2921, 92);\ncheckRange(2921, 3538, 83);\ncheckRange(3538, 3786, 77);\ncheckRange(3786, 4042, 97);\ncheckRange(4042, 4651, 99);\ncheckRange(4651, 5057, 0);\ncheckRange(5057, 5109, 99);\ncheckRange(5109, 5291, 0);\ncheckRange(5291, 5524, 72);\ncheckRange(5524, 5691, 92);\ncheckRange(5691, 6552, 83);\ncheckRange(6552, 7133, 77);\ncheckRange(7133, 7665, 99);\ncheckRange(7665, 8314, 0);\ncheckRange(8314, 8360, 62);\ncheckRange(8360, 8793, 86);\ncheckRange(8793, 8979, 83);\ncheckRange(8979, 9373, 79);\ncheckRange(9373, 9518, 95);\ncheckRange(9518, 9934, 59);\ncheckRange(9934, 10087, 77);\ncheckRange(10087, 10206, 5);\ncheckRange(10206, 10230, 77);\ncheckRange(10230, 10249, 41);\ncheckRange(10249, 11148, 83);\ncheckRange(11148, 11356, 74);\ncheckRange(11356, 11380, 93);\ncheckRange(11380, 11939, 74);\ncheckRange(11939, 12159, 68);\ncheckRange(12159, 12575, 83);\ncheckRange(12575, 12969, 79);\ncheckRange(12969, 13114, 95);\ncheckRange(13114, 14133, 59);\ncheckRange(14133, 14404, 76);\ncheckRange(14404, 14428, 57);\ncheckRange(14428, 14458, 59);\ncheckRange(14458, 14580, 32);\ncheckRange(14580, 14777, 89);\ncheckRange(14777, 15124, 59);\ncheckRange(15124, 15126, 36);\ncheckRange(15126, 15192, 100);\ncheckRange(15192, 15871, 96);\ncheckRange(15871, 15998, 95);\ncheckRange(15998, 17017, 59);\ncheckRange(17017, 17288, 76);\ncheckRange(17288, 17312, 57);\ncheckRange(17312, 17342, 59);\ncheckRange(17342, 17464, 32);\ncheckRange(17464, 17661, 89);\ncheckRange(17661, 17727, 59);\ncheckRange(17727, 17733, 5);\ncheckRange(17733, 17893, 96);\ncheckRange(17893, 18553, 77);\ncheckRange(18553, 18744, 42);\ncheckRange(18744, 18801, 76);\ncheckRange(18801, 18825, 57);\ncheckRange(18825, 18876, 59);\ncheckRange(18876, 18885, 77);\ncheckRange(18885, 18904, 41);\ncheckRange(18904, 19567, 83);\ncheckRange(19567, 20403, 96);\ncheckRange(20403, 21274, 77);\ncheckRange(21274, 21364, 100);\ncheckRange(21364, 21468, 74);\ncheckRange(21468, 21492, 93);\ncheckRange(21492, 22051, 74);\ncheckRange(22051, 22480, 68);\ncheckRange(22480, 22685, 100);\ncheckRange(22685, 22694, 68);\ncheckRange(22694, 22821, 10);\ncheckRange(22821, 22869, 100);\ncheckRange(22869, 24107, 97);\ncheckRange(24107, 24111, 37);\ncheckRange(24111, 24236, 77);\ncheckRange(24236, 24348, 72);\ncheckRange(24348, 24515, 92);\ncheckRange(24515, 24900, 83);\ncheckRange(24900, 25136, 95);\ncheckRange(25136, 25182, 85);\ncheckRange(25182, 25426, 68);\ncheckRange(25426, 25613, 89);\ncheckRange(25613, 25830, 96);\ncheckRange(25830, 26446, 100);\ncheckRange(26446, 26517, 10);\ncheckRange(26517, 27468, 92);\ncheckRange(27468, 27503, 95);\ncheckRange(27503, 27573, 77);\ncheckRange(27573, 28245, 92);\ncheckRange(28245, 28280, 95);\ncheckRange(28280, 29502, 77);\ncheckRange(29502, 29629, 42);\ncheckRange(29629, 30387, 83);\ncheckRange(30387, 30646, 77);\ncheckRange(30646, 31066, 92);\ncheckRange(31066, 31131, 77);\ncheckRange(31131, 31322, 42);\ncheckRange(31322, 31379, 76);\ncheckRange(31379, 31403, 57);\ncheckRange(31403, 31454, 59);\ncheckRange(31454, 31463, 77);\ncheckRange(31463, 31482, 41);\ncheckRange(31482, 31649, 83);\ncheckRange(31649, 31978, 72);\ncheckRange(31978, 32145, 92);\ncheckRange(32145, 32530, 83);\ncheckRange(32530, 32766, 95);\ncheckRange(32766, 32812, 85);\ncheckRange(32812, 33056, 68);\ncheckRange(33056, 33660, 89);\ncheckRange(33660, 33752, 59);\ncheckRange(33752, 33775, 36);\ncheckRange(33775, 33778, 32);\ncheckRange(33778, 34603, 9);\ncheckRange(34603, 35218, 0);\ncheckRange(35218, 35372, 10);\ncheckRange(35372, 35486, 77);\ncheckRange(35486, 35605, 5);\ncheckRange(35605, 35629, 77);\ncheckRange(35629, 35648, 41);\ncheckRange(35648, 36547, 83);\ncheckRange(36547, 36755, 74);\ncheckRange(36755, 36767, 93);\ncheckRange(36767, 36810, 83);\ncheckRange(36810, 36839, 100);\ncheckRange(36839, 37444, 96);\ncheckRange(37444, 38060, 100);\ncheckRange(38060, 38131, 10);\ncheckRange(38131, 39082, 92);\ncheckRange(39082, 39117, 95);\ncheckRange(39117, 39187, 77);\ncheckRange(39187, 39859, 92);\ncheckRange(39859, 39894, 95);\ncheckRange(39894, 40257, 77);\ncheckRange(40257, 40344, 89);\ncheckRange(40344, 40371, 59);\ncheckRange(40371, 40804, 77);\ncheckRange(40804, 40909, 5);\ncheckRange(40909, 42259, 92);\ncheckRange(42259, 42511, 77);\ncheckRange(42511, 42945, 83);\ncheckRange(42945, 43115, 77);\ncheckRange(43115, 43306, 42);\ncheckRange(43306, 43363, 76);\ncheckRange(43363, 43387, 57);\ncheckRange(43387, 43438, 59);\ncheckRange(43438, 43447, 77);\ncheckRange(43447, 43466, 41);\ncheckRange(43466, 44129, 83);\ncheckRange(44129, 44958, 96);\ncheckRange(44958, 45570, 77);\ncheckRange(45570, 45575, 92);\ncheckRange(45575, 45640, 77);\ncheckRange(45640, 45742, 42);\ncheckRange(45742, 45832, 72);\ncheckRange(45832, 45999, 92);\ncheckRange(45999, 46384, 83);\ncheckRange(46384, 46596, 95);\ncheckRange(46596, 46654, 92);\ncheckRange(46654, 47515, 83);\ncheckRange(47515, 47620, 77);\ncheckRange(47620, 47817, 79);\ncheckRange(47817, 47951, 95);\ncheckRange(47951, 48632, 100);\ncheckRange(48632, 48699, 97);\ncheckRange(48699, 48703, 37);\ncheckRange(48703, 49764, 77);\ncheckRange(49764, 49955, 42);\ncheckRange(49955, 50012, 76);\ncheckRange(50012, 50036, 57);\ncheckRange(50036, 50087, 59);\ncheckRange(50087, 50096, 77);\ncheckRange(50096, 50115, 41);\ncheckRange(50115, 50370, 83);\ncheckRange(50370, 51358, 92);\ncheckRange(51358, 51610, 77);\ncheckRange(51610, 51776, 83);\ncheckRange(51776, 51833, 89);\ncheckRange(51833, 52895, 100);\ncheckRange(52895, 53029, 97);\ncheckRange(53029, 53244, 68);\ncheckRange(53244, 54066, 100);\ncheckRange(54066, 54133, 97);\ncheckRange(54133, 54137, 37);\ncheckRange(54137, 55198, 77);\ncheckRange(55198, 55389, 42);\ncheckRange(55389, 55446, 76);\ncheckRange(55446, 55470, 57);\ncheckRange(55470, 55521, 59);\ncheckRange(55521, 55530, 77);\ncheckRange(55530, 55549, 41);\ncheckRange(55549, 56212, 83);\ncheckRange(56212, 57048, 96);\ncheckRange(57048, 58183, 77);\ncheckRange(58183, 58202, 41);\ncheckRange(58202, 58516, 83);\ncheckRange(58516, 58835, 95);\ncheckRange(58835, 58855, 77);\ncheckRange(58855, 59089, 95);\ncheckRange(59089, 59145, 77);\ncheckRange(59145, 59677, 99);\ncheckRange(59677, 60134, 0);\ncheckRange(60134, 60502, 89);\ncheckRange(60502, 60594, 59);\ncheckRange(60594, 60617, 36);\ncheckRange(60617, 60618, 32);\ncheckRange(60618, 60777, 42);\ncheckRange(60777, 60834, 76);\ncheckRange(60834, 60858, 57);\ncheckRange(60858, 60909, 59);\ncheckRange(60909, 60918, 77);\ncheckRange(60918, 60937, 41);\ncheckRange(60937, 61600, 83);\ncheckRange(61600, 62436, 96);\ncheckRange(62436, 63307, 77);\ncheckRange(63307, 63397, 100);\ncheckRange(63397, 63501, 74);\ncheckRange(63501, 63525, 93);\ncheckRange(63525, 63605, 74);\ncheckRange(63605, 63704, 100);\ncheckRange(63704, 63771, 97);\ncheckRange(63771, 63775, 37);\ncheckRange(63775, 64311, 77);\ncheckRange(64311, 64331, 26);\ncheckRange(64331, 64518, 92);\ncheckRange(64518, 64827, 11);\ncheckRange(64827, 64834, 26);\ncheckRange(64834, 65536, 0);\n"
  },
  {
    "path": "test/meta/generate_memory_fill.js",
    "content": "// This program generates .wast code that contains all the spec tests for\n// memory.fill.  See `Makefile`.\n\nprint_origin(\"generate_memory_fill.js\");\n\nlet PREAMBLE =\n  `(memory 1 1)\n  ${checkRangeCode()}`;\n\n// Range valid\nprint(\n`\n(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.fill (i32.const 0xFF00) (i32.const 0x55) (i32.const 256))))\n(invoke \"test\")\n`);\ncheckRange(0x00000, 0x0FF00, 0x00)\ncheckRange(0x0FF00, 0x10000, 0x55)\n\n// Range invalid\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.fill (i32.const 0xFF00) (i32.const 0x55) (i32.const 257))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n`);\n\n// Wraparound the end of 32-bit offset space\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.fill (i32.const 0xFFFFFF00) (i32.const 0x55) (i32.const 257))))\n(assert_trap (invoke \"test\") \"out of bounds memory access\")\n`);\n\n// Zero len with offset in-bounds is a no-op\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.fill (i32.const 0x12) (i32.const 0x55) (i32.const 0))))\n(invoke \"test\")\n`);\ncheckRange(0x00000, 0x10000, 0x00);\n\n// Zero len with offset out-of-bounds at the end of memory is allowed\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.fill (i32.const 0x10000) (i32.const 0x55) (i32.const 0))))\n(invoke \"test\")\n`);\n\n// Zero len with offset out-of-bounds past the end of memory is not allowed\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.fill (i32.const 0x20000) (i32.const 0x55) (i32.const 0))))\n(assert_trap (invoke \"test\") \"out of bounds\")\n`);\n\n// Very large range\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.fill (i32.const 0x1) (i32.const 0xAA) (i32.const 0xFFFE))))\n(invoke \"test\")\n`);\ncheckRange(0x00000, 0x00001, 0x00);\ncheckRange(0x00001, 0x0FFFF, 0xAA);\ncheckRange(0x0FFFF, 0x10000, 0x00);\n\n// Sequencing\nprint(\n`\n(module\n  ${PREAMBLE}\n  (func (export \"test\")\n     (memory.fill (i32.const 0x12) (i32.const 0x55) (i32.const 10))\n     (memory.fill (i32.const 0x15) (i32.const 0xAA) (i32.const 4))))\n(invoke \"test\")\n`);\ncheckRange(0x0,     0x12+0,  0x00);\ncheckRange(0x12+0,  0x12+3,  0x55);\ncheckRange(0x12+3,  0x12+7,  0xAA);\ncheckRange(0x12+7,  0x12+10, 0x55);\ncheckRange(0x12+10, 0x10000, 0x00);\n\n// Sundry compilation failures.\n\n// Module doesn't have a memory.\nprint(\n`(assert_invalid\n  (module\n    (func (export \"testfn\")\n      (memory.fill (i32.const 10) (i32.const 20) (i32.const 30))))\n  \"unknown memory 0\")\n`);\n\n// Invalid argument types.  TODO: We can add anyref, funcref, etc here.\n{\n    const tys = ['i32', 'f32', 'i64', 'f64'];\n    for (let ty1 of tys) {\n    for (let ty2 of tys) {\n    for (let ty3 of tys) {\n        if (ty1 == 'i32' && ty2 == 'i32' && ty3 == 'i32')\n            continue;  // this is the only valid case\n        print(\n`(assert_invalid\n  (module\n    (memory 1 1)\n    (func (export \"testfn\")\n      (memory.fill (${ty1}.const 10) (${ty2}.const 20) (${ty3}.const 30))))\n  \"type mismatch\")\n`);\n    }}}\n}\n\n// memory.fill: out of bounds, and should not perform a partial fill.\n//\n// Arithmetic overflow of memory offset + len should not affect the behavior, we\n// should still fill up to the limit.\n\nfunction mem_fill(min, max, shared, backup, write=backup*2) {\n    print(\n`(module\n  (memory ${min} ${max} ${shared})\n  ${checkRangeCode()}\n  (func (export \"run\") (param $offs i32) (param $val i32) (param $len i32)\n    (memory.fill (local.get $offs) (local.get $val) (local.get $len))))\n`);\n    // A fill past the end should throw *and* not have performed a partial fill\n    let offs = min*PAGESIZE - backup;\n    let val = 37;\n    print(\n`(assert_trap (invoke \"run\" (i32.const ${offs}) (i32.const ${val}) (i32.const ${write}))\n              \"out of bounds\")\n`);\n    checkRange(0, min, 0);\n}\n\nmem_fill(1, 1, \"\", 256);\nmem_fill(1, 1, \"\", 257);\nmem_fill(1, 1, \"\", 257, 0xFFFFFFFF); // offs + len overflows 32-bit\n\nif (WITH_SHARED_MEMORY) {\n    mem_fill(2, 4, \"shared\", 256);\n    mem_fill(2, 4, \"shared\", 257);\n    mem_fill(2, 4, \"shared\", 257, 0xFFFFFFFF); // offs + len overflows 32-bit\n}\n"
  },
  {
    "path": "test/meta/generate_memory_init.js",
    "content": "// This program generates .wast code that contains all the spec tests for\n// memory.init and data.drop.  See `Makefile`.\n\nprint_origin(\"generate_memory_init.js\");\n\n// In-bounds tests.\n\nfunction mem_test(instruction, expected_result_vector) {\n    print(\n`\n(module\n  (memory (export \"memory0\") 1 1)\n  (data (i32.const 2) \"\\\\03\\\\01\\\\04\\\\01\")\n  (data \"\\\\02\\\\07\\\\01\\\\08\")\n  (data (i32.const 12) \"\\\\07\\\\05\\\\02\\\\03\\\\06\")\n  (data \"\\\\05\\\\09\\\\02\\\\07\\\\06\")\n  (func (export \"test\")\n    ${instruction})\n  (func (export \"load8_u\") (param i32) (result i32)\n    (i32.load8_u (local.get 0))))\n\n(invoke \"test\")\n`);\n    for (let i = 0; i < expected_result_vector.length; i++) {\n        print(`(assert_return (invoke \"load8_u\" (i32.const ${i})) (i32.const ${expected_result_vector[i]}))`);\n    }\n}\n\nconst e = 0;\n\n// This just gives the initial state of the memory, with its active\n// initialisers applied.\nmem_test(\"(nop)\",\n         [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n// Passive init that overwrites all-zero entries\nmem_test(\"(memory.init 1 (i32.const 7) (i32.const 0) (i32.const 4))\",\n         [e,e,3,1,4, 1,e,2,7,1, 8,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n// Passive init that overwrites existing active-init-created entries\nmem_test(\"(memory.init 3 (i32.const 15) (i32.const 1) (i32.const 3))\",\n         [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 9,2,7,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n// Perform active and passive initialisation and then multiple copies\nmem_test(`(memory.init 1 (i32.const 7) (i32.const 0) (i32.const 4))\n    (data.drop 1)\n    (memory.init 3 (i32.const 15) (i32.const 1) (i32.const 3))\n    (data.drop 3)\n    (memory.copy (i32.const 20) (i32.const 15) (i32.const 5))\n    (memory.copy (i32.const 21) (i32.const 29) (i32.const 1))\n    (memory.copy (i32.const 24) (i32.const 10) (i32.const 1))\n    (memory.copy (i32.const 13) (i32.const 11) (i32.const 4))\n    (memory.copy (i32.const 19) (i32.const 20) (i32.const 5))`,\n         [e,e,3,1,4, 1,e,2,7,1, 8,e,7,e,7, 5,2,7,e,9, e,7,e,8,8, e,e,e,e,e]);\n\n// Miscellaneous\n\nlet PREAMBLE =\n    `(memory 1)\n    (data \"\\\\37\")`;\n\n// drop with no memory\nprint(\n`(assert_invalid\n   (module\n     (func (export \"test\")\n       (data.drop 0)))\n   \"unknown memory 0\")\n`);\n\n// drop with data seg ix out of range\nprint(\n`(assert_invalid\n  (module\n    ${PREAMBLE}\n    (func (export \"test\")\n      (data.drop 4)))\n  \"unknown data segment\")\n`);\n\n// drop, then drop\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (data.drop 0)\n    (data.drop 0)))\n(invoke \"test\")\n`);\n\n// drop, then init\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (data.drop 0)\n    (memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 1))))\n(assert_trap (invoke \"test\") \"out of bounds\")\n`);\n\n// init with data seg ix indicating an active segment\nprint(\n`(module\n   (memory 1)\n   (data (i32.const 0) \"\\\\37\")\n   (func (export \"test\")\n     (memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 1))))\n(assert_trap (invoke \"test\") \"out of bounds\")\n`);\n\n// init with no memory\nprint(\n`(assert_invalid\n  (module\n    (func (export \"test\")\n      (memory.init 1 (i32.const 1234) (i32.const 1) (i32.const 1))))\n  \"unknown memory 0\")\n`);\n\n// init with data seg ix out of range\nprint(\n`(assert_invalid\n  (module\n    ${PREAMBLE}\n    (func (export \"test\")\n      (memory.init 1 (i32.const 1234) (i32.const 1) (i32.const 1))))\n  \"unknown data segment 1\")\n`);\n\n// init, using a data seg ix more than once is OK\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.init 0 (i32.const 1) (i32.const 0) (i32.const 1))\n    (memory.init 0 (i32.const 1) (i32.const 0) (i32.const 1))))\n(invoke \"test\")\n`);\n\n// init: seg ix is valid passive, but length to copy > len of seg\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.init 0 (i32.const 1234) (i32.const 0) (i32.const 5))))\n(assert_trap (invoke \"test\") \"out of bounds\")\n`);\n\n// init: seg ix is valid passive, but implies copying beyond end of seg\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.init 0 (i32.const 1234) (i32.const 2) (i32.const 3))))\n(assert_trap (invoke \"test\") \"out of bounds\")\n`);\n\n// init: seg ix is valid passive, but implies copying beyond end of dst\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.init 0 (i32.const 0xFFFE) (i32.const 1) (i32.const 3))))\n(assert_trap (invoke \"test\") \"out of bounds\")\n`);\n\n// init: seg ix is valid passive, src offset past the end, zero len is invalid\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.init 0 (i32.const 1234) (i32.const 4) (i32.const 0))))\n(assert_trap (invoke \"test\") \"out of bounds\")\n`);\n\n// init: seg ix is valid passive, zero len, src offset at the end\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 0))))\n(invoke \"test\")\n`);\n\n// init: seg ix is valid passive, dst offset past the end, zero len is invalid\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.init 0 (i32.const 0x10001) (i32.const 0) (i32.const 0))))\n(assert_trap (invoke \"test\") \"out of bounds\")\n`);\n\n// init: seg ix is valid passive, zero len, but dst offset at the end\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.init 0 (i32.const 0x10000) (i32.const 0) (i32.const 0))))\n(invoke \"test\")\n`);\n\n// init: seg ix is valid passive, zero len, dst and src offsets at the end\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.init 0 (i32.const 0x10000) (i32.const 1) (i32.const 0))))\n(invoke \"test\")\n`);\n\n// init: seg ix is valid passive, src and dst offset past the end, zero len is\n// invalid\nprint(\n`(module\n  ${PREAMBLE}\n  (func (export \"test\")\n    (memory.init 0 (i32.const 0x10001) (i32.const 4) (i32.const 0))))\n(assert_trap (invoke \"test\") \"out of bounds\")\n`);\n\n// invalid argument types.  TODO: can add anyfunc etc here.\n{\n    const tys  = ['i32', 'f32', 'i64', 'f64'];\n\n    for (let ty1 of tys) {\n    for (let ty2 of tys) {\n    for (let ty3 of tys) {\n        if (ty1 == 'i32' && ty2 == 'i32' && ty3 == 'i32')\n            continue;  // this is the only valid case\n        print(\n`(assert_invalid\n  (module\n    ${PREAMBLE}\n    (func (export \"test\")\n      (memory.init 0 (${ty1}.const 1) (${ty2}.const 1) (${ty3}.const 1))))\n  \"type mismatch\")\n`);\n    }}}\n}\n\n// memory.init: out of bounds of the memory or the segment, but should perform\n// the operation up to the appropriate bound.\n//\n// Arithmetic overflow of memoffset + len or of bufferoffset + len should not\n// affect the behavior.\n\n// Note, the length of the data segment is 16.\nconst mem_init_len = 16;\n\nfunction mem_init(min, max, shared, backup, write) {\n    print(\n`(module\n  (memory ${min} ${max} ${shared})\n  (data \"\\\\42\\\\42\\\\42\\\\42\\\\42\\\\42\\\\42\\\\42\\\\42\\\\42\\\\42\\\\42\\\\42\\\\42\\\\42\\\\42\")\n   ${checkRangeCode()}\n  (func (export \"run\") (param $offs i32) (param $len i32)\n    (memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))\n`);\n    // A fill writing past the end of the memory should throw *and* have filled\n    // all the way up to the end.\n    //\n    // A fill reading past the end of the segment should throw *and* have filled\n    // memory with as much data as was available.\n    let offs = min*PAGESIZE - backup;\n    print(\n`(assert_trap (invoke \"run\" (i32.const ${offs}) (i32.const ${write}))\n              \"out of bounds\")\n`);\n    checkRange(0, min, 0);\n}\n\n// We exceed the bounds of the memory but not of the data segment\nmem_init(1, 1, \"\", Math.floor(mem_init_len/2), mem_init_len);\nmem_init(1, 1, \"\", Math.floor(mem_init_len/2)+1, mem_init_len);\nif (WITH_SHARED_MEMORY) {\n    mem_init(2, 4, \"shared\", Math.floor(mem_init_len/2), mem_init_len);\n    mem_init(2, 4, \"shared\", Math.floor(mem_init_len/2)+1, mem_init_len);\n}\n\n// We exceed the bounds of the data segment but not the memory\nmem_init(1, 1, \"\", mem_init_len*4, mem_init_len*2-2);\nmem_init(1, 1, \"\", mem_init_len*4-1, mem_init_len*2-1);\nif (WITH_SHARED_MEMORY) {\n    mem_init(2, 4, \"shared\", mem_init_len*4, mem_init_len*2-2);\n    mem_init(2, 4, \"shared\", mem_init_len*4-1, mem_init_len*2-1);\n}\n\n// We arithmetically overflow the memory limit but not the segment limit\nmem_init(1, \"\", \"\", Math.floor(mem_init_len/2), 0xFFFFFF00);\n\n// We arithmetically overflow the segment limit but not the memory limit\nmem_init(1, \"\", \"\", PAGESIZE, 0xFFFFFFFC);\n\n// Test that the data segment index is properly encoded as an unsigned (not\n// signed) LEB.\nprint(\n`\n(module\n  (memory 1)\n  ;; 65 data segments. 64 is the smallest positive number that is encoded\n  ;; differently as a signed LEB.\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\") (data \"\")\n  (data \"\")\n  (func (memory.init 64 (i32.const 0) (i32.const 0) (i32.const 0))))\n`)\n"
  },
  {
    "path": "test/meta/generate_table_copy.js",
    "content": "// This program generates .wast code that contains all the spec tests for\n// table.copy.  See `Makefile`.\n\nprint_origin(\"generate_table_copy.js\");\n\n// This module \"a\" exports 5 functions ...\n\nfunction emit_a() {\n    print(\n`\n(module\n  (func (export \"ef0\") (result i32) (i32.const 0))\n  (func (export \"ef1\") (result i32) (i32.const 1))\n  (func (export \"ef2\") (result i32) (i32.const 2))\n  (func (export \"ef3\") (result i32) (i32.const 3))\n  (func (export \"ef4\") (result i32) (i32.const 4))\n)\n(register \"a\")`);\n}\n\n// ... and this one imports those 5 functions.  It adds 5 of its own, creates a\n// 30 element table using both active and passive initialisers, with a mixture\n// of the imported and local functions.  |test| is exported.  It uses the\n// supplied |insn| to modify the table somehow.  |check| will then indirect-call\n// the table entry number specified as a parameter.  That will either return a\n// value 0 to 9 indicating the function called, or will throw an exception if\n// the table entry is empty.\n\nfunction emit_b(insn, t0, t1) {\n    print(\n`\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t${t0}) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t${t0}) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (elem (table $t${t1}) (i32.const 3) func 1 3 1 4)\n  (elem (table $t${t1}) (i32.const 11) func 6 3 2 5 7)\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    ${insn})\n  (func (export \"check_t0\") (param i32) (result i32)\n    (call_indirect $t${t0} (type 0) (local.get 0)))\n  (func (export \"check_t1\") (param i32) (result i32)\n    (call_indirect $t${t1} (type 0) (local.get 0)))\n)\n`);\n}\n\n// This is the test driver.  It constructs the abovementioned module, using the\n// given |instruction| to modify the table, and then probes the table by making\n// indirect calls, one for each element of |expected_result_vector|.  The\n// results are compared to those in the vector.\n//\n// \"dest_table\" may be t0 or t1.\n\nfunction tab_test(args, t0, t1, dest_table, expected_t0, expected_t1) {\n    if (typeof args != \"string\")\n        emit_b(\"(nop)\", t0, t1);\n    else\n        emit_b(`(table.copy $t${dest_table} $t${t0} ${args})`, t0, t1);\n    print(`(invoke \"test\")`);\n    for (let i = 0; i < expected_t0.length; i++) {\n        let expected = expected_t0[i];\n        if (expected === undefined) {\n            print(`(assert_trap (invoke \"check_t0\" (i32.const ${i})) \"uninitialized element\")`);\n        } else {\n            print(`(assert_return (invoke \"check_t0\" (i32.const ${i})) (i32.const ${expected}))`);\n        }\n    }\n    for (let i = 0; i < expected_t1.length; i++) {\n        let expected = expected_t1[i];\n        if (expected === undefined) {\n            print(`(assert_trap (invoke \"check_t1\" (i32.const ${i})) \"uninitialized element\")`);\n        } else {\n            print(`(assert_return (invoke \"check_t1\" (i32.const ${i})) (i32.const ${expected}))`);\n        }\n    }\n}\n\nemit_a();\n\n// Using 'e' for empty (undefined) spaces in the table, to make it easier\n// to count through the vector entries when debugging.\nlet e = undefined;\n\nfor ( let table of [0,1] ) {\n    let other_table = (table + 1) % 2;\n\n    // Tests for copying in a single table.\n\n    // This just gives the initial state of the table, with its active\n    // initialisers applied\n    tab_test(false, table, other_table, table,\n             [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,e,e,e,e],\n             [e,e,e,1,3, 1,4,e,e,e, e,6,3,2,5, 7,e,e,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n    // Copy non-null over non-null\n    tab_test(\"(i32.const 13) (i32.const 2) (i32.const 3)\", table, other_table, table,\n             [e,e,3,1,4, 1,e,e,e,e, e,e,7,3,1, 4,6,e,e,e, e,e,e,e,e, e,e,e,e,e],\n             [e,e,e,1,3, 1,4,e,e,e, e,6,3,2,5, 7,e,e,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n    // Copy non-null over null\n    tab_test(\"(i32.const 25) (i32.const 15) (i32.const 2)\", table, other_table, table,\n             [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, 3,6,e,e,e],\n             [e,e,e,1,3, 1,4,e,e,e, e,6,3,2,5, 7,e,e,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n    // Copy null over non-null\n    tab_test(\"(i32.const 13) (i32.const 25) (i32.const 3)\", table, other_table, table,\n             [e,e,3,1,4, 1,e,e,e,e, e,e,7,e,e, e,6,e,e,e, e,e,e,e,e, e,e,e,e,e],\n             [e,e,e,1,3, 1,4,e,e,e, e,6,3,2,5, 7,e,e,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n    // Copy null over null\n    tab_test(\"(i32.const 20) (i32.const 22) (i32.const 4)\", table, other_table, table,\n             [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,e,e,e,e],\n             [e,e,e,1,3, 1,4,e,e,e, e,6,3,2,5, 7,e,e,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n    // Copy null and non-null entries, non overlapping\n    tab_test(\"(i32.const 25) (i32.const 1) (i32.const 3)\", table, other_table, table,\n             [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,3,1,e,e],\n             [e,e,e,1,3, 1,4,e,e,e, e,6,3,2,5, 7,e,e,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n    // Copy null and non-null entries, overlapping, backwards\n    tab_test(\"(i32.const 10) (i32.const 12) (i32.const 7)\", table, other_table, table,\n             [e,e,3,1,4, 1,e,e,e,e, 7,5,2,3,6, e,e,e,e,e, e,e,e,e,e, e,e,e,e,e],\n             [e,e,e,1,3, 1,4,e,e,e, e,6,3,2,5, 7,e,e,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n    // Copy null and non-null entries, overlapping, forwards\n    tab_test(\"(i32.const 12) (i32.const 10) (i32.const 7)\", table, other_table, table,\n             [e,e,3,1,4, 1,e,e,e,e, e,e,e,e,7, 5,2,3,6,e, e,e,e,e,e, e,e,e,e,e],\n             [e,e,e,1,3, 1,4,e,e,e, e,6,3,2,5, 7,e,e,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n    // Tests for copying from one table to the other.  Here, overlap and copy\n    // direction don't matter.\n\n    tab_test(\"(i32.const 10) (i32.const 0) (i32.const 20)\", table, other_table, other_table,\n             [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,e,e,e,e],\n             [e,e,e,1,3, 1,4,e,e,e, e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 3,6,e,e,e]);\n}\n\n// Out-of-bounds checks.\n\nfunction do_test(insn1, insn2, errText)\n{\n    print(`\n(module\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t0) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t0) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    ${insn1}\n    ${insn2}))\n`);\n\n    if (errText !== undefined) {\n        print(`(assert_trap (invoke \"test\") \"${errText}\")`);\n    } else {\n        print(`(invoke \"test\")`);\n    }\n}\n\nfunction tab_test2(insn1, insn2, errKind, errText) {\n    do_test(insn1, insn2, errKind, errText);\n}\n\nfunction tab_test_nofail(insn1, insn2) {\n    do_test(insn1, insn2, undefined, undefined);\n}\n\nfor ( let dest of [\"$t0\",\"$t1\"] ) {\n    // Here we test the boundary-failure cases.  The table's valid indices are 0..29\n    // inclusive.\n\n    // copy: dst range invalid\n    tab_test2(`(table.copy ${dest} $t0 (i32.const 28) (i32.const 1) (i32.const 3))`,\n              \"\",\n              \"out of bounds\");\n\n    // copy: dst wraparound end of 32 bit offset space\n    tab_test2(`(table.copy ${dest} $t0 (i32.const 0xFFFFFFFE) (i32.const 1) (i32.const 2))`,\n              \"\",\n              \"out of bounds\");\n\n    // copy: src range invalid\n    tab_test2(`(table.copy ${dest} $t0 (i32.const 15) (i32.const 25) (i32.const 6))`,\n              \"\",\n              \"out of bounds\");\n\n    // copy: src wraparound end of 32 bit offset space\n    tab_test2(`(table.copy ${dest} $t0 (i32.const 15) (i32.const 0xFFFFFFFE) (i32.const 2))`,\n              \"\",\n              \"out of bounds\");\n\n    // copy: zero length with both offsets in-bounds is OK\n    tab_test_nofail(\n        `(table.copy ${dest} $t0 (i32.const 15) (i32.const 25) (i32.const 0))`,\n        \"\");\n\n    // copy: zero length with dst offset out of bounds at the end of the table is allowed\n    tab_test2(`(table.copy ${dest} $t0 (i32.const 30) (i32.const 15) (i32.const 0))`,\n              \"\",\n              undefined);\n\n    // copy: zero length with dst offset out of bounds past the end of the table is not allowed\n    tab_test2(`(table.copy ${dest} $t0 (i32.const 31) (i32.const 15) (i32.const 0))`,\n              \"\",\n              \"out of bounds\");\n\n    // copy: zero length with src offset out of bounds at the end of the table is allowed\n    tab_test2(`(table.copy ${dest} $t0 (i32.const 15) (i32.const 30) (i32.const 0))`,\n              \"\",\n              undefined);\n\n    // copy: zero length with src offset out of bounds past the end of the table is not allowed\n    tab_test2(`(table.copy ${dest} $t0 (i32.const 15) (i32.const 31) (i32.const 0))`,\n              \"\",\n              \"out of bounds\");\n\n    // copy: zero length with both dst and src offset out of bounds at the end of the table is allowed\n    tab_test2(`(table.copy ${dest} $t0 (i32.const 30) (i32.const 30) (i32.const 0))`,\n              \"\",\n              undefined);\n\n    // copy: zero length with both dst and src offset out of bounds past the end of the table is not allowed\n    tab_test2(`(table.copy ${dest} $t0 (i32.const 31) (i32.const 31) (i32.const 0))`,\n              \"\",\n              \"out of bounds\");\n}\n\n// table.copy: out of bounds of the table for the source or target, but should\n// perform the operation up to the appropriate bound.  Major cases:\n//\n// - non-overlapping regions\n// - overlapping regions with src > dest\n// - overlapping regions with src == dest\n// - overlapping regions with src < dest\n// - arithmetic overflow on src addresses\n// - arithmetic overflow on target addresses\n//\n// for each of those,\n//\n// - src address oob\n// - target address oob\n// - both oob\n\nconst tbl_copy_len = 16;\n\nfunction tbl_copy(min, max, srcOffs, targetOffs, len) {\n    let copyDown = srcOffs < targetOffs;\n    let tblLength = min;\n\n    let targetAvail = tblLength - targetOffs;\n    let srcAvail = tblLength - srcOffs;\n    let targetLim = targetOffs + Math.min(len, targetAvail, srcAvail);\n    let srcLim = srcOffs + Math.min(len, targetAvail, srcAvail);\n\n    print(\n        `\n(module\n  (type (func (result i32)))\n  (table ${min} ${max} funcref)\n  (elem (i32.const ${srcOffs})\n        ${(function () {\n             var s = \"\";\n             for (let i=srcOffs, j=0; i < srcLim; i++, j++)\n               s += \" $f\" + j;\n             return s;\n         })()})\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $targetOffs i32) (param $srcOffs i32) (param $len i32)\n    (table.copy (local.get $targetOffs) (local.get $srcOffs) (local.get $len))))\n`);\n\n    let immediateOOB = copyDown && (srcOffs + len > tblLength || targetOffs + len > tblLength);\n\n    print(`(assert_trap (invoke \"run\" (i32.const ${targetOffs}) (i32.const ${srcOffs}) (i32.const ${len}))\n             \"out of bounds\")`);\n\n    var s = 0;\n    var i = 0;\n    for (i=0; i < tblLength; i++ ) {\n        if (i >= srcOffs && i < srcLim) {\n            print(`(assert_return (invoke \"test\" (i32.const ${i})) (i32.const ${s++}))`);\n            continue;\n        }\n        print(`(assert_trap (invoke \"test\" (i32.const ${i})) \"uninitialized element\")`);\n    }\n}\n\n// OOB target address, nonoverlapping\ntbl_copy(tbl_copy_len*2, tbl_copy_len*4, 0, Math.floor(1.5*tbl_copy_len), tbl_copy_len);\ntbl_copy(tbl_copy_len*2, tbl_copy_len*4, 0, Math.floor(1.5*tbl_copy_len)-1, tbl_copy_len-1);\n\n// OOB source address, nonoverlapping\ntbl_copy(tbl_copy_len*2, tbl_copy_len*4, Math.floor(1.5*tbl_copy_len), 0, tbl_copy_len);\ntbl_copy(tbl_copy_len*2, tbl_copy_len*4, Math.floor(1.5*tbl_copy_len)-1, 0, tbl_copy_len-1);\n\n// OOB target address, overlapping, src < target\ntbl_copy(tbl_copy_len*2, tbl_copy_len*4, tbl_copy_len-5, Math.floor(1.5*tbl_copy_len), tbl_copy_len);\n\n// OOB source address, overlapping, target < src\ntbl_copy(tbl_copy_len*2, tbl_copy_len*4, Math.floor(1.5*tbl_copy_len), tbl_copy_len-5, tbl_copy_len);\n\n// OOB both, overlapping, including src == target\ntbl_copy(tbl_copy_len*2, tbl_copy_len*4, tbl_copy_len+5, Math.floor(1.5*tbl_copy_len), tbl_copy_len);\ntbl_copy(tbl_copy_len*2, tbl_copy_len*4, Math.floor(1.5*tbl_copy_len), tbl_copy_len+5, tbl_copy_len);\ntbl_copy(tbl_copy_len*2, tbl_copy_len*4, tbl_copy_len+5, tbl_copy_len+5, tbl_copy_len);\n\n// Arithmetic overflow on source address.\ntbl_copy(tbl_copy_len*8, tbl_copy_len*8, tbl_copy_len*7, 0, 0xFFFFFFE0);\n\n// Arithmetic overflow on target adddress is an overlapping case.\ntbl_copy(tbl_copy_len*8, tbl_copy_len*8, 0, tbl_copy_len*7, 0xFFFFFFE0);\n"
  },
  {
    "path": "test/meta/generate_table_init.js",
    "content": "// This program generates .wast code that contains all the spec tests for\n// table.init and elem.drop.  See `Makefile`.\n\nprint_origin(\"generate_table_init.js\");\n\n// This module \"a\" exports 5 functions ...\n\nfunction emit_a() {\n    print(\n`\n(module\n  (func (export \"ef0\") (result i32) (i32.const 0))\n  (func (export \"ef1\") (result i32) (i32.const 1))\n  (func (export \"ef2\") (result i32) (i32.const 2))\n  (func (export \"ef3\") (result i32) (i32.const 3))\n  (func (export \"ef4\") (result i32) (i32.const 4))\n)\n(register \"a\")`);\n}\n\n// ... and this one imports those 5 functions.  It adds 5 of its own, creates a\n// 30 element table using both active and passive initialisers, with a mixture\n// of the imported and local functions.  |test| is exported.  It uses the\n// supplied |insn| to modify the table somehow.  |check| will then indirect-call\n// the table entry number specified as a parameter.  That will either return a\n// value 0 to 9 indicating the function called, or will throw an exception if\n// the table entry is empty.\n\nfunction emit_b(insn, table) {\n    print(\n`\n(module\n  (type (func (result i32)))  ;; type #0\n  (import \"a\" \"ef0\" (func (result i32)))    ;; index 0\n  (import \"a\" \"ef1\" (func (result i32)))\n  (import \"a\" \"ef2\" (func (result i32)))\n  (import \"a\" \"ef3\" (func (result i32)))\n  (import \"a\" \"ef4\" (func (result i32)))    ;; index 4\n  (table $t0 30 30 funcref)\n  (table $t1 30 30 funcref)\n  (elem (table $t${table}) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t${table}) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 5))  ;; index 5\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))  ;; index 9\n  (func (export \"test\")\n    ${insn})\n  (func (export \"check\") (param i32) (result i32)\n    (call_indirect $t${table} (type 0) (local.get 0)))\n)\n`);\n}\n\n// This is the test driver.  It constructs the abovementioned module, using the\n// given |instruction| to modify the table, and then probes the table by making\n// indirect calls, one for each element of |expected_result_vector|.  The\n// results are compared to those in the vector.\n\nfunction tab_test(instruction, table, expected_result_vector) {\n    emit_b(instruction, table);\n    print(`(invoke \"test\")`);\n    for (let i = 0; i < expected_result_vector.length; i++) {\n        let expected = expected_result_vector[i];\n        if (expected === undefined) {\n            print(`(assert_trap (invoke \"check\" (i32.const ${i})) \"uninitialized element\")`);\n        } else {\n            print(`(assert_return (invoke \"check\" (i32.const ${i})) (i32.const ${expected}))`);\n        }\n    }\n}\n\nemit_a();\n\n// Using 'e' for empty (undefined) spaces in the table, to make it easier\n// to count through the vector entries when debugging.\nlet e = undefined;\n\nfor ( let table of [0, 1] ) {\n    // Passive init that overwrites all-null entries\n    tab_test(`(table.init $t${table} 1 (i32.const 7) (i32.const 0) (i32.const 4))`,\n             table,\n             [e,e,3,1,4, 1,e,2,7,1, 8,e,7,5,2, 3,6,e,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n    // Passive init that overwrites existing active-init-created entries\n    tab_test(`(table.init $t${table} 3 (i32.const 15) (i32.const 1) (i32.const 3))`,\n             table,\n             [e,e,3,1,4, 1,e,e,e,e, e,e,7,5,2, 9,2,7,e,e, e,e,e,e,e, e,e,e,e,e]);\n\n    // Perform active and passive initialisation and then multiple copies\n    tab_test(\n        `(table.init $t${table} 1 (i32.const 7) (i32.const 0) (i32.const 4))\n         (elem.drop 1)\n         (table.init $t${table} 3 (i32.const 15) (i32.const 1) (i32.const 3))\n         (elem.drop 3)\n         (table.copy $t${table} ${table} (i32.const 20) (i32.const 15) (i32.const 5))\n         (table.copy $t${table} ${table} (i32.const 21) (i32.const 29) (i32.const 1))\n         (table.copy $t${table} ${table} (i32.const 24) (i32.const 10) (i32.const 1))\n         (table.copy $t${table} ${table} (i32.const 13) (i32.const 11) (i32.const 4))\n         (table.copy $t${table} ${table} (i32.const 19) (i32.const 20) (i32.const 5))`,\n        table,\n        [e,e,3,1,4, 1,e,2,7,1, 8,e,7,e,7, 5,2,7,e,9, e,7,e,8,8, e,e,e,e,e]);\n}\n\n// elem.drop requires a table, minimally\nprint(\n`(assert_invalid\n  (module\n    (func (export \"test\")\n      (elem.drop 0)))\n  \"unknown table 0\")\n`);\n\n// table.init requires a table, minimally\nprint(\n`(assert_invalid\n  (module\n    (func (export \"test\")\n      (table.init 0 (i32.const 12) (i32.const 1) (i32.const 1))))\n  \"unknown table 0\")\n`);\n\n// elem.drop with elem seg ix out of range\nprint(\n`(assert_invalid\n  (module\n    (elem funcref (ref.func 0))\n    (func (result i32) (i32.const 0))\n    (func (export \"test\")\n      (elem.drop 4)))\n  \"unknown table 0\")\n`);\n\n// init with elem seg ix out of range\nprint(\n`(assert_invalid\n  (module\n    (elem funcref (ref.func 0))\n    (func (result i32) (i32.const 0))\n    (func (export \"test\")\n      (table.init 4 (i32.const 12) (i32.const 1) (i32.const 1))))\n  \"unknown table 0\")\n`);\n\nlet tab0_len = 30;\nlet tab1_len = 28;\n\nfunction do_test(insn1, insn2, table, errText)\n{\n    print(`\n(module\n  (table $t0 ${tab0_len} ${tab0_len} funcref)\n  (table $t1 ${tab1_len} ${tab1_len} funcref)\n  (elem (table $t${table}) (i32.const 2) func 3 1 4 1)\n  (elem funcref\n    (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8))\n  (elem (table $t${table}) (i32.const 12) func 7 5 2 3 6)\n  (elem funcref\n    (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6))\n  (func (result i32) (i32.const 0))\n  (func (result i32) (i32.const 1))\n  (func (result i32) (i32.const 2))\n  (func (result i32) (i32.const 3))\n  (func (result i32) (i32.const 4))\n  (func (result i32) (i32.const 5))\n  (func (result i32) (i32.const 6))\n  (func (result i32) (i32.const 7))\n  (func (result i32) (i32.const 8))\n  (func (result i32) (i32.const 9))\n  (func (export \"test\")\n    ${insn1}\n    ${insn2}))`);\n\n    if (errText !== undefined) {\n        print(`(assert_trap (invoke \"test\") \"${errText}\")`);\n    } else {\n        print(`(invoke \"test\")`);\n    }\n}\n\nfunction tab_test1(insn1, table, errText) {\n    do_test(insn1, \"\", table, errText);\n}\n\nfunction tab_test2(insn1, insn2, errText) {\n    do_test(insn1, insn2, 0, errText);\n}\n\n// drop with elem seg ix indicating an active segment\ntab_test1(\"(elem.drop 2)\", 0,\n          undefined);\n\n// init with elem seg ix indicating an active segment\ntab_test1(\"(table.init 2 (i32.const 12) (i32.const 1) (i32.const 1))\", 0,\n          \"out of bounds\");\n\n// init, using an elem seg ix more than once is OK\ntab_test2(\n    \"(table.init 1 (i32.const 12) (i32.const 1) (i32.const 1))\",\n    \"(table.init 1 (i32.const 21) (i32.const 1) (i32.const 1))\",\n    undefined);\n\n// drop, then drop\ntab_test2(\"(elem.drop 1)\",\n          \"(elem.drop 1)\",\n          undefined);\n\n// drop, then init\ntab_test2(\"(elem.drop 1)\",\n          \"(table.init 1 (i32.const 12) (i32.const 1) (i32.const 1))\",\n          \"out of bounds\");\n\n// init: seg ix is valid passive, but length to copy > len of seg\ntab_test1(\"(table.init 1 (i32.const 12) (i32.const 0) (i32.const 5))\", 0,\n          \"out of bounds\");\n\n// init: seg ix is valid passive, but implies copying beyond end of seg\ntab_test1(\"(table.init 1 (i32.const 12) (i32.const 2) (i32.const 3))\", 0,\n          \"out of bounds\");\n\n// Tables are of different length with t1 shorter than t0, to test that we're not\n// using t0's limit for t1's bound\n\nfor ( let [table, oobval] of [[0,30],[1,28]] ) {\n    // init: seg ix is valid passive, but implies copying beyond end of dst\n    tab_test1(`(table.init $t${table} 1 (i32.const ${oobval-2}) (i32.const 1) (i32.const 3))`,\n              table,\n              \"out of bounds\");\n\n    // init: seg ix is valid passive, zero len, and src offset out of bounds at the\n    // end of the table - this is allowed\n    tab_test1(`(table.init $t${table} 1 (i32.const 12) (i32.const 4) (i32.const 0))`,\n              table,\n              undefined);\n\n    // init: seg ix is valid passive, zero len, and src offset out of bounds past the\n    // end of the table - this is not allowed\n    tab_test1(`(table.init $t${table} 1 (i32.const 12) (i32.const 5) (i32.const 0))`,\n              table,\n              \"out of bounds\");\n\n    // init: seg ix is valid passive, zero len, and dst offset out of bounds at the\n    // end of the table - this is allowed\n    tab_test1(`(table.init $t${table} 1 (i32.const ${oobval}) (i32.const 2) (i32.const 0))`,\n              table,\n              undefined);\n\n    // init: seg ix is valid passive, zero len, and dst offset out of bounds past the\n    // end of the table - this is not allowed\n    tab_test1(`(table.init $t${table} 1 (i32.const ${oobval+1}) (i32.const 2) (i32.const 0))`,\n              table,\n              \"out of bounds\");\n\n    // init: seg ix is valid passive, zero len, and dst and src offsets out of bounds\n    // at the end of the table - this is allowed\n    tab_test1(`(table.init $t${table} 1 (i32.const ${oobval}) (i32.const 4) (i32.const 0))`,\n              table,\n              undefined);\n\n    // init: seg ix is valid passive, zero len, and src/dst offset out of bounds past the\n    // end of the table - this is not allowed\n    tab_test1(`(table.init $t${table} 1 (i32.const ${oobval+1}) (i32.const 5) (i32.const 0))`,\n              table,\n              \"out of bounds\");\n}\n\n// invalid argument types\n{\n    const tys  = ['i32', 'f32', 'i64', 'f64'];\n\n    for (let ty1 of tys) {\n    for (let ty2 of tys) {\n    for (let ty3 of tys) {\n        if (ty1 == 'i32' && ty2 == 'i32' && ty3 == 'i32')\n            continue;  // this is the only valid case\n        print(\n`\n(assert_invalid\n  (module\n    (table 10 funcref)\n    (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0))\n    (func $f0)\n    (func (export \"test\")\n      (table.init 0 (${ty1}.const 1) (${ty2}.const 1) (${ty3}.const 1))))\n  \"type mismatch\")`);\n    }}}\n}\n\n// table.init: out of bounds of the table or the element segment, but should\n// perform the operation up to the appropriate bound.\n//\n// Arithmetic overflow of tableoffset + len or of segmentoffset + len should not\n// affect the behavior.\n\n// Note, the length of the element segment is 16.\nconst tbl_init_len = 16;\n\nfunction tbl_init(min, max, backup, write, segoffs=0) {\n    print(\n        `\n(module\n  (type (func (result i32)))\n  (table ${min} ${max} funcref)\n  (elem funcref\n    (ref.func $f0) (ref.func $f1) (ref.func $f2) (ref.func $f3)\n    (ref.func $f4) (ref.func $f5) (ref.func $f6) (ref.func $f7)\n    (ref.func $f8) (ref.func $f9) (ref.func $f10) (ref.func $f11)\n    (ref.func $f12) (ref.func $f13) (ref.func $f14) (ref.func $f15))\n  (func $f0 (export \"f0\") (result i32) (i32.const 0))\n  (func $f1 (export \"f1\") (result i32) (i32.const 1))\n  (func $f2 (export \"f2\") (result i32) (i32.const 2))\n  (func $f3 (export \"f3\") (result i32) (i32.const 3))\n  (func $f4 (export \"f4\") (result i32) (i32.const 4))\n  (func $f5 (export \"f5\") (result i32) (i32.const 5))\n  (func $f6 (export \"f6\") (result i32) (i32.const 6))\n  (func $f7 (export \"f7\") (result i32) (i32.const 7))\n  (func $f8 (export \"f8\") (result i32) (i32.const 8))\n  (func $f9 (export \"f9\") (result i32) (i32.const 9))\n  (func $f10 (export \"f10\") (result i32) (i32.const 10))\n  (func $f11 (export \"f11\") (result i32) (i32.const 11))\n  (func $f12 (export \"f12\") (result i32) (i32.const 12))\n  (func $f13 (export \"f13\") (result i32) (i32.const 13))\n  (func $f14 (export \"f14\") (result i32) (i32.const 14))\n  (func $f15 (export \"f15\") (result i32) (i32.const 15))\n  (func (export \"test\") (param $n i32) (result i32)\n    (call_indirect (type 0) (local.get $n)))\n  (func (export \"run\") (param $offs i32) (param $len i32)\n    (table.init 0 (local.get $offs) (i32.const ${segoffs}) (local.get $len))))`);\n\n    // A fill writing past the end of the table should throw *and* have filled\n    // all the way up to the end.\n    //\n    // A fill reading past the end of the segment should throw *and* have filled\n    // table with as much data as was available.\n    let offs = min - backup;\n    print(`(assert_trap (invoke \"run\" (i32.const ${offs}) (i32.const ${write})) \"out of bounds\")`);\n    for (let i=0; i < min; i++) {\n        print(`(assert_trap (invoke \"test\" (i32.const ${i})) \"uninitialized element\")`);\n    }\n}\n\n// We exceed the bounds of the table but not of the element segment\ntbl_init(tbl_init_len*2, tbl_init_len*4, Math.floor(tbl_init_len/2), tbl_init_len);\ntbl_init(tbl_init_len*2, tbl_init_len*4, Math.floor(tbl_init_len/2)-1, tbl_init_len);\n\n// We exceed the bounds of the element segment but not the table\ntbl_init(tbl_init_len*10, tbl_init_len*20, tbl_init_len*4, tbl_init_len*2);\ntbl_init(tbl_init_len*10, tbl_init_len*20, tbl_init_len*4-1, tbl_init_len*2-1);\n\n// We arithmetically overflow the table limit but not the segment limit\ntbl_init(tbl_init_len*4, tbl_init_len*4, tbl_init_len, 0xFFFFFFF0);\n\n// We arithmetically overflow the segment limit but not the table limit\ntbl_init(tbl_init_len, tbl_init_len, tbl_init_len, 0xFFFFFFFC, Math.floor(tbl_init_len/2));\n\n// Test that the elem segment index is properly encoded as an unsigned (not\n// signed) LEB.\nprint(\n`\n(module\n  (table 1 funcref)\n  ;; 65 elem segments. 64 is the smallest positive number that is encoded\n  ;; differently as a signed LEB.\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref) (elem funcref) (elem funcref) (elem funcref)\n  (elem funcref)\n  (func (table.init 64 (i32.const 0) (i32.const 0) (i32.const 0))))\n`)\n"
  },
  {
    "path": "test/meta/noderun.sh",
    "content": "if [ $# -ne 2 ]; then\n    echo \"Bad args\"\n    exit 1\nfi\n\nrm -f nodeprog.js\ncat <<EOF >> nodeprog.js\nconst WITH_SHARED_MEMORY=$1;\nfunction print(x) {\n    console.log(x);\n}\nEOF\ncat common.js >> nodeprog.js\ncat $2 >> nodeprog.js\nnode nodeprog.js\nrm nodeprog.js\n"
  },
  {
    "path": "test/sync-js-api.py",
    "content": "#!/usr/bin/env python3\n\nimport glob\nimport os\nimport shutil\nimport subprocess\n\nLOCAL_FILES = [\n    \"LICENSE.md\",\n    \"README.md\",\n\n    # Currently doesn't pass the stability checker in wpt.\n    \"limits.any.js\",\n]\n\n\ndef copy_from_local(local_dir, out):\n    for local_file in LOCAL_FILES:\n        shutil.copy(os.path.join(local_dir, local_file), out)\n\n\ndef copy_from_upstream(upstream, out):\n    upstream = os.path.abspath(upstream)\n    paths = glob.glob(os.path.join(upstream, \"**\", \"*.js\"), recursive=True)\n    for path in paths:\n        relpath = os.path.relpath(path, upstream)\n\n        # Tests for proposals that have not merged here yet.\n        if \".tentative\" in relpath:\n            continue\n\n        # Requires `fetch()` and various wpt infrastructure.\n        if os.path.basename(relpath) == \"idlharness.any.js\":\n            continue\n\n        dest = os.path.join(out, relpath)\n        os.makedirs(os.path.dirname(dest), exist_ok=True)\n        shutil.copy(path, dest)\n\n\ndef main(upstream):\n    local_dir = os.path.join(\"test\", \"js-api\")\n    scratch = os.path.join(\"test\", \"js-api-temp\")\n    os.mkdir(scratch)\n    copy_from_local(local_dir, scratch)\n    copy_from_upstream(os.path.join(upstream, \"wasm\", \"jsapi\"), scratch)\n    shutil.rmtree(local_dir)\n    os.rename(scratch, local_dir)\n    subprocess.check_call([\"git\", \"add\", local_dir])\n\n\nif __name__ == \"__main__\":\n    import sys\n    main(*sys.argv[1:])\n"
  },
  {
    "path": "w3c.json",
    "content": " {\n    \"group\":      [78073]\n,   \"contacts\":   [\"ericprud\"]\n,   \"repo-type\":  \"cg-report\"\n}\n"
  },
  {
    "path": "wasm-specs.bib",
    "content": "@report{WebAssemblyCoreSpecification,\n  title = {{WebAssembly Core Specification}},\n  editor = {Rossberg, Andreas},\n  date = {2019-12-05},\n  institution = {{W3C}},\n  url = {https://www.w3.org/TR/wasm-core-1/},\n  langid = {english},\n  note = {https://webassembly.github.io/spec/core/_download/WebAssembly.pdf}\n}\n"
  }
]